1
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?

More than 3 years have passed since last update.

MemLabs Lab0 で Volatility3 を勉強した

Last updated at Posted at 2021-11-20

Volatility3 を勉強した記録
題材 stuxnet999/MemLabs

問題配付サイト

プロセス列挙

# python3 vol.py -f Challenge.raw windows.pstree

(略)
324	1876	explorer.exe	0x84d83d20	33	827	1	False	2018-10-23 08:30:04.000000 	N/A
* 1000	324	VBoxTray.exe	0x84d83d20	14	159	1	False	2018-10-23 08:30:08.000000 	N/A
* 2096	324	cmd.exe	0x84d83d20	1	22	1	False	2018-10-23 08:30:18.000000 	N/A
* 2412	324	DumpIt.exe	0x84d83d20	2	38	1	False	2018-10-23 08:30:48.000000 	N/A

エクスプローラでcmd.exeを表示してWクリックする等して cmd が起動されている。(デスクトップのショートカットから起動したのかも?)

とにかく PID 2096 の cmd.exe が不審。

volatility3からcmdscanがなくなっているから,cmd.exeのダンプをとってみる。

プロセス「cmd.exe」をダンプ

# python3 vol.py -f Challenge.raw windows.pslist --pid 2096 --dump

strings (Unicode) で ¥ を検索

# strings -a -el pid.2096.0x4aa80000.dmp | grep -i -F \\

\XCOPY.EXE
\\.\
Software\Policies\Microsoft\Windows\System
Software\Microsoft\Command Processor
Software\Classes
\\?\
 :\*
\CMD.EXE
C:\Users\hello
Desktop\
C:\Users\hello>
C:\Python27
C:\Python27\python.exe C:\Users\hello\Desktop\demon.py.txt   <-- ★
m;C:\Windows\System32\WindowsPowerShell\v1.0\
:\Users\hello\Desktop\demon.py.txt
:\Python27\python.exe C:\Users\hello\Desktop\demon.py.txt
\Shell\Open\Command

pythonコードが書かれた demon.py.txt を動かしてる

ファイル「demon.py.txt」をダンプ

filescan でアドレスを特定

# python3 vol.py -f Challenge.raw windows.filescan | grep -i -F "demon.py.txt"

0x3d4d1dc8 100.0\Users\hello\Desktop\demon.py.txt	128

アドレスが判ったので,dumpfilesでダンプ

# python3 vol.py -f Challenge.raw windows.dumpfiles --physaddr 0x3d4d1dc8

あとは見るだけ

# cat file.0x3d4d1dc8.0x84dde548.DataSectionObject.demon.py.txt.dat

a = "1_4m_b3tt3r}"
b = ""
for i in a:
    b = b + chr(ord(i)^2)
print b.encode("hex")

フラグの末尾が見えました。

1
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
1
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?