0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【TryHackMe】Memory Forensics:Walkthrough

0
Posted at

概要

TryHackMe「Memory Forensics」のWalkthroughです。

Task2

Q1.What is John's password?

Volatility2,3のWindows版を使用します。

まず基本情報を調べます。

vol.exe -f "C:\Users\user\Desktop\THM\Memory Forensics\Snapshot6_1609157562389.vmem" windows.info

Kernel Base     0xf80002a59000
DTB     0x187000
Symbols file:///C:/Users/user/Downloads/volatility3-win-exes-2.28.0/symbols/windows/ntkrnlmp.pdb/3844DBB920174967BE7AA4A2C20430FA-2.json.xz
Is64Bit True
IsPAE   False
layer_name      0 WindowsIntel32e
memory_layer    1 FileLayer
KdDebuggerDataBlock     0xf80002c4a0a0
NTBuildLab      7601.17514.amd64fre.win7sp1_rtm.
CSDVersion      1
KdVersionBlock  0xf80002c4a068
Major/Minor     15.7601
MachineType     34404
KeNumberProcessors      1
SystemTime      2020-12-27 06:20:05+00:00
NtSystemRoot    C:\Windows
NtProductType   NtProductWinNt
NtMajorVersion  6
NtMinorVersion  1
PE MajorOperatingSystemVersion  6
PE MinorOperatingSystemVersion  1
PE Machine      34404
PE TimeDateStamp        Sat Nov 20 09:30:02 2010

Windows7を使用していると分かりました。
NTLMハッシュ値を抽出します。

vol.exe -f "C:\Users\user\Desktop\THM\Memory Forensics\Snapshot6_1609157562389.vmem" windows.hashdump.Hashdump

Administrator   500     aad3b435b51404eeaad3b435b51404ee        31d6cfe0d16ae931b73c59d7e0c089c0
Guest   501     aad3b435b51404eeaad3b435b51404ee        31d6cfe0d16ae931b73c59d7e0c089c0
John    1001    aad3b435b51404eeaad3b435b51404ee        47fbd6536d7868c873d5ea455f2fc0c9
HomeGroupUser$  1002    aad3b435b51404eeaad3b435b51404ee        91c34c06b7988e216c3bfeb9530cabfb

ハッシュ値を解析すると、Johnのパスワードが分かりました。

$ john --wordlist=/usr/share/wordlists/rockyou.txt hash.txt --format=NT
                 (Administrator)     
charmander999    (John)

A.charmander999

Task3

Q1.When was the machine last shutdown?

レジストリキーのControlSet001\Control\Windowsを調べます。

C:\Users\user\Downloads\volatility3-win-exes-2.28.0>vol.exe -f "C:\Users\user\Desktop\THM\Memory Forensics\Snapshot19_1609159453792.vmem" windows.registry.printkey --key "ControlSet001\Control\Windows"
Volatility 3 Framework 2.28.0
WARNING  volatility3.framework.layers.vmware: No metadata file found alongside VMEM file. A VMSS or VMSN file may be required to correctly process a VMEM file. These should be placed in the same directory with the same file name, e.g. Snapshot19_1609159453792.vmem and Snapshot19_1609159453792.vmss.
Progress:  100.00               PDB scanning finished
Last Write Time Hive Offset     Type    Key     Name    Data    Volatile

-       0xf8a00000f010  Key     [NONAME]\ControlSet001\Control\Windows  -       -       -
2020-12-27 22:50:12.000000 UTC  0xf8a000024010  REG_DWORD       \REGISTRY\MACHINE\SYSTEM\ControlSet001\Control\Windows
        ErrorMode       0       False
2020-12-27 22:50:12.000000 UTC  0xf8a000024010  REG_EXPAND_SZ   \REGISTRY\MACHINE\SYSTEM\ControlSet001\Control\Windows
        Directory       %SystemRoot%    False
2020-12-27 22:50:12.000000 UTC  0xf8a000024010  REG_DWORD       \REGISTRY\MACHINE\SYSTEM\ControlSet001\Control\Windows
        NoInteractiveServices   0       False
2020-12-27 22:50:12.000000 UTC  0xf8a000024010  REG_EXPAND_SZ   \REGISTRY\MACHINE\SYSTEM\ControlSet001\Control\Windows
        SystemDirectory %SystemRoot%\system32   False
2020-12-27 22:50:12.000000 UTC  0xf8a000024010  REG_DWORD       \REGISTRY\MACHINE\SYSTEM\ControlSet001\Control\Windows
        ShellErrorMode  1       False
2020-12-27 22:50:12.000000 UTC  0xf8a000024010  REG_DWORD       \REGISTRY\MACHINE\SYSTEM\ControlSet001\Control\Windows
        CSDVersion      256     False
2020-12-27 22:50:12.000000 UTC  0xf8a000024010  REG_DWORD       \REGISTRY\MACHINE\SYSTEM\ControlSet001\Control\Windows
        CSDReleaseType  0       False
2020-12-27 22:50:12.000000 UTC  0xf8a000024010  REG_DWORD       \REGISTRY\MACHINE\SYSTEM\ControlSet001\Control\Windows
        CSDBuildNumber  17514   False
2020-12-27 22:50:12.000000 UTC  0xf8a000024010  REG_DWORD       \REGISTRY\MACHINE\SYSTEM\ControlSet001\Control\Windows
        ComponentizedBuild      1       False
2020-12-27 22:50:12.000000 UTC  0xf8a000024010  REG_BINARY      \REGISTRY\MACHINE\SYSTEM\ControlSet001\Control\Windows
        ShutdownTime
d2 e3 50 a2 a2 dc d6 01                         ..P.....                False
-       0xf8a000061010  Key     \REGISTRY\MACHINE\HARDWARE\ControlSet001\Control\Windows        -       -       -
-       0xf8a0000f7010  Key     \SystemRoot\System32\Config\DEFAULT\ControlSet001\Control\Windows       -       -
        -
-       0xf8a0007ac010  Key     \Device\HarddiskVolume1\Boot\BCD\ControlSet001\Control\Windows  -       -       -
-       0xf8a001502010  Key     \SystemRoot\System32\Config\SOFTWARE\ControlSet001\Control\Windows      -       -
        -
-       0xf8a001674410  Key     \SystemRoot\System32\Config\SECURITY\ControlSet001\Control\Windows      -       -
        -
-       0xf8a0016dc410  Key     \SystemRoot\System32\Config\SAM\ControlSet001\Control\Windows   -       -       -
-       0xf8a0016f7010  Key     \??\C:\Windows\ServiceProfiles\NetworkService\NTUSER.DAT\ControlSet001\Control\Windows
        -       -       -
-       0xf8a0017a9010  Key     \??\C:\Windows\ServiceProfiles\LocalService\NTUSER.DAT\ControlSet001\Control\Windows
        -       -       -
-       0xf8a00196c010  Key     \??\C:\Users\John\ntuser.dat\ControlSet001\Control\Windows      -       -       -
-       0xf8a00197f010  Key     \??\C:\Users\John\AppData\Local\Microsoft\Windows\UsrClass.dat\ControlSet001\Control\Windows    -       -       -
-       0xf8a0024e4010  Key     \??\C:\System Volume Information\Syscache.hve\ControlSet001\Control\Windows     -
        -       -

キーの最終更新日やShutdownTimeの項目から、シャットダウン時刻が分かりました。

A.2020-12-27 22:50:12

Q2.What did John write?

consoleでコマンド実行履歴を調べます。

C:\Users\user\Desktop\THM\Memory Forensics>C:\Users\user\Downloads\volatility_2.6_win64_standalone\volatility_2.6_win64_standalone\volatility_2.6_win64_standalone.exe -f Snapshot19_1609159453792.vmem --profile=Win7SP1x64 consoles
Volatility Foundation Volatility Framework 2.6
**************************************************
ConsoleProcess: conhost.exe Pid: 2488
Console: 0xffa66200 CommandHistorySize: 50
HistoryBufferCount: 1 HistoryBufferMax: 4
OriginalTitle: %SystemRoot%\System32\cmd.exe
Title: Administrator: C:\Windows\System32\cmd.exe
AttachedProcess: cmd.exe Pid: 1920 Handle: 0x60
----
CommandHistory: 0x21e9c0 Application: cmd.exe Flags: Allocated, Reset
CommandCount: 7 LastAdded: 6 LastDisplayed: 6
FirstCommand: 0 CommandCountMax: 50
ProcessHandle: 0x60
Cmd #0 at 0x1fe3a0: cd /
Cmd #1 at 0x1f78b0: echo THM{You_found_me} > test.txt
Cmd #2 at 0x21dcf0: cls
Cmd #3 at 0x1fe3c0: cd /Users
Cmd #4 at 0x1fe3e0: cd /John
Cmd #5 at 0x21db30: dir
Cmd #6 at 0x1fe400: cd John
----
Screen 0x200f70 X:80 Y:300
Dump:

C:\>cd /Users

C:\Users>cd /John
The system cannot find the path specified.

C:\Users>dir
 Volume in drive C has no label.
 Volume Serial Number is 1602-421F

 Directory of C:\Users

12/27/2020  02:20 AM    <DIR>          .
12/27/2020  02:20 AM    <DIR>          ..
12/27/2020  02:21 AM    <DIR>          John
04/12/2011  08:45 AM    <DIR>          Public
               0 File(s)              0 bytes
               4 Dir(s)  54,565,433,344 bytes free

C:\Users>cd John

C:\Users\John>

文字列をテキストファイルに出力していることが分かりました。

Cmd #1 at 0x1f78b0: echo THM{You_found_me} > test.txt

A.You_found_me

Task4

Q4.What is the TrueCrypt passphrase?

truecryptsummaryで情報を抽出します。

C:\Users\user\Desktop\THM\Memory Forensics>C:\Users\user\Downloads\volatility_2.6_win64_standalone\volatility_2.6_win64_standalone\volatility_2.6_win64_standalone.exe -f Snapshot14_1609164553061.vmem --profile=Win7SP1x64 truecryptsummary
Volatility Foundation Volatility Framework 2.6
Password             forgetmenot at offset 0xfffff8800512bee4
Process              TrueCrypt.exe at 0xfffffa80052c2b30 pid 1904
Kernel Module        truecrypt.sys at 0xfffff880050f0000 - 0xfffff88005131000
Symbolic Link        Volume{079ed9bf-4815-11eb-bff1-000c29582936} -> \Device\TrueCryptVolumeM mounted 2020-12-27 13:41:12 UTC+0000
Symbolic Link        M: -> \Device\TrueCryptVolumeM mounted 2020-12-27 13:41:12 UTC+0000
Symbolic Link        M: -> \Device\TrueCryptVolumeM mounted 2020-12-27 13:41:12 UTC+0000
Driver               \Driver\truecrypt at 0x3cad2e70 range 0xfffff880050f0000 - 0xfffff88005131000
Device               TrueCryptVolumeM at 0xfffffa8004b23080 type FILE_DEVICE_DISK
Container            Path: \??\C:\Users\John\Documents\test.txt
Device               TrueCrypt at 0xfffffa800771fc40 type FILE_DEVICE_UNKNOWN

パスワードが分かりました。

Password             forgetmenot at offset 0xfffff8800512bee4

A.forgetmenot

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?