CTF刷题笔记 - misc方向 - 电子取证 内存分析_ctf 镜像恶意进程分析(1)

volatility -f Target.vmem --profile=Win7SP1x64 lsadump



![](https://img-blog.csdnimg.cn/img_convert/ea87642e801abcd71594c374028dd6b1.png)


flag{W31C0M3 T0 THiS 34SY F0R3NSiCX}


##### 第二问


首先通过 filescan 查看文件列表,可以将输出内容保存至 file.txt 便于后续信息检索



volatility -f Target.vmem --profile=Win7SP1x64 filescan


搜索HUAWEI,找到相关信息如下



0x000000007d8c7d10 4 0 R–r-d \Device\HarddiskVolume1\Users\CTF\Desktop\HUAWEI P40_2021-aa-bb xx.yy.zz.exe



将对应偏移量处的文件通过 dumpfiles 命令 dump 下来



volatility -f Target.vmem --profile=Win7SP1x64 dumpfiles -Q 0x000000007d8c7d10 -D C:\Users\Hacker\Desktop


得到两个文件



![](https://img-blog.csdnimg.cn/img_convert/1d0d9e65441629fd782dd26200f1709d.png)



将 .dat 文件后缀名改为 .exe,发现是一个WinRAR自解压文件,进行自解压



![](https://img-blog.csdnimg.cn/img_convert/a29c3e52c4ae885da8b84644caa986c8.png)



然后,在解压后的 \HUAWEI P40\_2021-aa-bb xx.yy.zz\picture\storage\MediaTar\images 目录下得到一个加密文件 images0.tar.enc


使用开源工具 kobackupdec 进行手机备份文件解密



python kobackupdec.py -vvv “W31C0M3_T0_THiS_34SY_F0R3NSiCX” “D:\BaiduSyncdisk\CTF\CTFwork\NSSCTF\misc\陇剑杯 2021\内存分析\HUAWEI P40_2021-aa-bb xx.yy.zz” “D:\BaiduSyncdisk\CTF\CTFwork\NSSCTF\misc\陇剑杯 2021\内存分析\output”



在 \output\storage\MediaTar\images 目录下得到一个 images0.tar 压缩文件,解压得到flag



![](https://img-blog.csdnimg.cn/img_convert/1a995de7a9f39007c1edc6051b18d544.png)


flag{TH4NK Y0U FOR DECRYPTING MY DATA}



#### [蓝帽杯 2022 初赛]计算机取证


##### 第一问


首先,查看基本信息



volatility -f 1.dmp imageinfo


然后,使用 hashdump 查看各个用户的密码哈希值



volatility -f 1.dmp --profile=Win7SP1x64 hashdump



![](https://img-blog.csdnimg.cn/img_convert/195add7731f2c9b33d3cb7dfcee7bced.png)


在线查询,得到密码



![](https://img-blog.csdnimg.cn/img_convert/c704d0a20c28e86f0566ab7909f82e8c.png)



##### 第二问


查看进程树



volatility -f 1.dmp --profile=Win7SP1x64 pstree


发现 MagnetRAMCaptu 进程,MAGNET RAM Capture 是 MAGNET 取证公司出品的内存取证工具



![](https://img-blog.csdnimg.cn/img_convert/cf246fb8f30ff4f1dbb07310cd04ed46.png)


##### 第三问


(待更新)


##### 第四问


(待更新)



#### [羊城杯 2021]Baby\_Forenisc


重建 Internet Explorer 缓存/历史记录



volatility -f BIODOG-7711E93C-20210908-053022.raw --profile=WinXPSP2x86 iehistory



![](https://img-blog.csdnimg.cn/img_convert/40a9be82d43ff96a785971cebe834c65.png)


扫描文件,并按照文件名 ssh.txt 过滤



vol.py -f BIODOG-7711E93C-20210908-053022.raw --profile=WinXPSP2x86 filescan | grep ssh.txt



![](https://img-blog.csdnimg.cn/img_convert/a7ef68be1edfb9eef648f5727f6cd9a0.png)


将上述两个文件dump下来



vol.py -f BIODOG-7711E93C-20210908-053022.raw --profile=WinXPSP2x86 dumpfiles -Q 0x00000000020bf6a0 -D /home/kali/CTFwork/NSSCTF/misc/YangCheng_2021/Baby_Forenisc
vol.py -f BIODOG-7711E93C-20210908-053022.raw --profile=WinXPSP2x86 dumpfiles -Q 0x00000000021c01b0 -D /home/kali/CTFwork/NSSCTF/misc/YangCheng_2021/Baby_Forenisc


查看文件内容



![](https://img-blog.csdnimg.cn/img_convert/07c36e3998f66539fe1a9078589a067d.png)


base64解密后可以找到一个邮箱:song552085107@qq.com


在 GitHub 上查找,有一个相关用户



![](https://img-blog.csdnimg.cn/img_convert/f4cb892d936ecbb55b7ae9a17951f4ec.png)


进入项目,根据README.md文件提示,将\_\_APP\_\_文件下载下来



![](https://img-blog.csdnimg.cn/img_convert/51a4c3dfb3122c431d4e45d80abbb6c8.png)


在\_\_APP\_\_文件中可以找到一串字符串: U2FuZ0ZvcntTMF8zYXp5XzJfY3JhY2tfbm9vYl9wbGF5ZXJ9


base64解码后得到flag



![](https://img-blog.csdnimg.cn/img_convert/de3b07a88ea6ab8c11242be30ede614f.png)



#### [OtterCTF 2018]


##### What the password?



volatility -f OtterCTF.vmem --profile=Win7SP1x64 lsadump



![](https://img-blog.csdnimg.cn/img_convert/1f3c9fb78df31e5eb3307313ba7febc7.png)


##### General Info


可知,Windows系统的计算机名在注册表单元 \REGISTRY\MACHINE\SYSTEM 中的 ControlSet001\Control\ComputerName\ComputerName 条目中


首先,打印注册表配置单元列表



volatility -f OtterCTF.vmem --profile=Win7SP1x64 hivelist



![](https://img-blog.csdnimg.cn/img_convert/057586aad14244ff242d5757db0e12f7.png)


找到偏移量 0xfffff8a000024010 后,带有计算机名信息的注册表条目读取出来



volatility -f OtterCTF.vmem --profile=Win7SP1x64 -o 0xfffff8a000024010 printkey -K “ControlSet001\Control\ComputerName\ComputerName”



![](https://img-blog.csdnimg.cn/img_convert/e4bd099b931b78d965e4b5bb8258bfdd.png)


打印网络信息



volatility -f OtterCTF.vmem --profile=Win7SP1x64 netscan



![](https://img-blog.csdnimg.cn/img_convert/6f241dbff95f7259dbd1bbedc3a264b6.png)


##### Play Time



volatility -f OtterCTF.vmem --profile=Win7SP1x64 netscan



![](https://img-blog.csdnimg.cn/img_convert/7721467c03c5b6c90891d4a0a0a5d5c3.png)


##### Silly Rick



volatility -f OtterCTF.vmem --profile=Win7SP1x64 clipboard



![](https://img-blog.csdnimg.cn/img_convert/ad61e59702ffc93f3ecf40ca44796a98.png)


##### Name Game


可知游戏的的PID为708,将对应的内存文件dump下来



volatility -f OtterCTF.vmem --profile=Win7SP1x64 memdump -p 708 -D D:\Package


通过grep结合strings命令来全局查找 Lunar-3



strings 708.dmp | grep Lunar-3 -A 5 -B 5


显然,0tt3r8r33z3 应该是账户名



![](https://img-blog.csdnimg.cn/img_convert/5080b649a77003ff15b4943d1f0d709e.png)


##### Hide And Seek



volatility -f OtterCTF.vmem --profile=Win7SP1x64 pstree


vmware-tray.exe的父进程竟然是Rick And Morty,十分可疑,因此vmware-tray.exe有可能是恶意进程



![](https://img-blog.csdnimg.cn/img_convert/a17b0981cec03b11a51e120859466429.png)


##### Name Game 2


Linux下使用xxd工具查找十六进制



xxd 708.dmp | grep “5a0c 0000”



![](https://img-blog.csdnimg.cn/img_convert/a8c1876b02dbdfc0f917583cb47a9da9.png)


进一步查看该处内容



xxd -s 0x0c33a4a0 -l 32 708.dmp



![](https://img-blog.csdnimg.cn/img_convert/4219301187d8c9dfbca124f5224a1598.png)


因此Rick的角色名为M0rtyL0L


##### Path To Glory


查找与恶意软件的父进程名"Rick And Morty"相匹配的文件,通过查找结果基本可以判断恶意软件可能是通过种子下载下来的



vol.py -f OtterCTF.vmem --profile=Win7SP1x64 filescan | grep “Rick And Morty”



![](https://img-blog.csdnimg.cn/img_convert/4d624eef7b2abc3bb6199a8a80afcc65.png)


那么,可以将种子文件(.torrent)文件dump下来,逐个进行分析


经分析,可以在上述第四个文件中找到flag



vol.py -f OtterCTF.vmem --profile=Win7SP1x64 dumpfiles -Q 0x000000007dae9350 -D ./


为便于识别,可将种子文件重命名为Rick\_And\_Morty\_season\_1\_download.exe.1.torrent.dat



![](https://img-blog.csdnimg.cn/img_convert/18a40e0dd85fccf4724fdd90f0a54494.png)


在种子文件的最后可以找到flag为:M3an\_T0rren7\_4\_R!ck


##### Bit 4 Bit


首先,了解一下比特币地址


比特币地址以数字 1 开头,后面跟着的是公钥的哈希值,比特币地址使用 base58 编码,为27-34位,例如:1HLoFgMiDL3hvACAfbkDUjcP9r9veUcqAF


然后,我们将恶意软件先dump下来,便于分析



vol.py -f OtterCTF.vmem --profile=Win7SP1x64 procdump -p 3720 -D ./


然后,对 executable.3720.exe 使用IDA进行逆向分析,可以找到比特币地址



![](https://img-blog.csdnimg.cn/img_convert/ebe4284822da791710ab36621ee02057.png)


也可以使用如下命令,根据关键词 "ransomware"(勒索软件) 匹配查找到比特币地址



strings -e l OtterCTF.vmem | grep -i -A 5 “ransomware”



![](https://img-blog.csdnimg.cn/img_convert/e8fa61f0472e07b10e852281b5cdf281.png)


##### Graphic's For The Weak


直接使用 foremost 分离恶意程序 executable.3720.exe


有一张png图片,查看,得到flag



![](https://img-blog.csdnimg.cn/img_convert/8da7dc26f0c8a4e3b25a4b0c91040e94.png)


##### Path To Glory 2


种子文件需要借助浏览器进行下载,进程树中存在chrome进程,将有所与chrome.exe进程相关的文件dump下来



vol.py -f OtterCTF.vmem --profile=Win7SP1x64 memdump -n chrome.exe -D ./chrome



![](https://img-blog.csdnimg.cn/img_convert/9b6bc3f0b51eb4115a28c45a98c14a2c.png)


在所有dump下来的文件中,查找与"Rick And Morty season 1 download.exe"相关的字符串



strings ./chrome/* | grep ‘Rick And Morty season 1 download.exe’ -C 10


可以找到flag



![](https://img-blog.csdnimg.cn/img_convert/f4059bd7f3d493dd4d956ec3a3719f25.png)


##### Recovery


题目描述:Rick got to have his files recovered! What is the random password used to encrypt the files?


首先,我们将恶意进程 vmware-tray.exe 的内存映像 dump 下来



vol.py -f OtterCTF.vmem --profile=Win7SP1x64 memdump -p 3720 -D ./


随后,使用 ILSpy 反编译恶意程序 executable.3720.exe,查看 password 相关代码,可以在 SendPassword 函数中找到 text = 计算机名-用户名 密码



![](https://img-blog.csdnimg.cn/img_convert/9314dde3cd1052fc98729fbd8ef422bc.png)


前两个是已知的,计算机名为 WIN-LO6FAF3DTFE,用户名为 Rick,那么我们可以在3720.dmp 中使用 -el 参数全局匹配查找 "WIN-LO6FAF3DTFE-Rick"



strings -e l 3720.dmp | grep “WIN-LO6FAF3DTFE-Rick” -C 5



![](https://img-blog.csdnimg.cn/img_convert/6b851569cdae26b7a5b33b0a7d2f00ff.png)


因此,密码为 aDOBofVYUNVnmp7


##### Closure


题目描述:Now that you extracted the password from the memory, could you decrypt rick's files?


之前在Path To Glory 2一问中,在查找与"Rick And Morty season 1 download.exe"相关的字符串时,在排列靠前的结果中可以发现Rick的文件名为 Flag.txt



![](https://img-blog.csdnimg.cn/img_convert/ff487c5b6a4d1024a5c96ccf25d7d8a6.png)


可以在虚拟内存中进行文件扫描,并按照 "Flag.txt" 进行过滤匹配



vol.py -f OtterCTF.vmem --profile=Win7SP1x64 filescan | grep -i “Flag.txt”



![](https://img-blog.csdnimg.cn/img_convert/fc02c6d565084badda0a8b587ba372c3.png)


将文件dump下来



vol.py -f OtterCTF.vmem --profile=Win7SP1x64 dumpfiles -Q 0x000000007e410890 -D ./


便于后续识别,将dump下来的文件重命名为Flag.dat


根据如下知识,我们可以通过查看恶意软件的pdb信息来识别勒索软件类型



pdb文件主要存储了如下调试信息:
(1)public, private,和static函数地址。
(2)全局变量的名称和地址。
(3)参数和局部变量的名称及它们在栈中的偏移量。
(4)类型定义,包括class, structure,和 data definitions。
(5)源文件名称和行号。


查看恶意程序中关于pdb的内容



strings executable.3720.exe | grep pdb



![](https://img-blog.csdnimg.cn/img_convert/a8ef1d37e552f33c65eb73c972d8e46d.png)


可以发现 pdb 文件在hidden-tear目录下,因此可以识别为 HiddenTear 勒索软件


可以使用 HT Decrypter 软件来进行解密,在解密之前,需要移除文件后所有的十六进制 00,并修改文件的后缀为 .locked,放入一个文件夹里面


打开 HT Decrypter 软件,选择放入 .locked 文件的文件夹,输入密码 aDOBofVYUNVnmp7,解密文件



![](https://img-blog.csdnimg.cn/img_convert/4d2141042d93e2a175dadbba5be381cd.png)


打开解密后的文件,得到flag



![](https://img-blog.csdnimg.cn/img_convert/395fc3eae495120a3f44246137ca43c1.png)



#### [安洵杯 2020]王牌特工


file命令分析文件,是一个ext3文件系统数据



![](https://img-blog.csdnimg.cn/img_convert/ed649054f52c1aed35f85c4e4ef749fe.png)


使用mount命令进行挂载



在 /mnt 目录下创建挂载文件夹

mkdir /mnt/findme

挂载文件

mount findme /mnt/findme

查看文件

ls /mnt/findme -al



![](https://img-blog.csdnimg.cn/img_convert/f00f63532e52ef405330931d3a7e5f40.png)


查看 key.txt 文件,提示使用Veracrypt



![](https://img-blog.csdnimg.cn/img_convert/8cdfb6d4e2dc1b7863c76a61d333aa88.png)


使用挂载flagbox文件,密码为:a\_cool\_key



![](https://img-blog.csdnimg.cn/img_convert/41a1b7c770de7927a33cf753d4b4f592.png)


得到了一个flag,但并非真正的flag



![](https://img-blog.csdnimg.cn/img_convert/c989f5c9434f10ac280c7a35add3af2a.png)


回过头,使用 strings 命令过滤查找关键词 key,可以发现有一些之前未发现的文件,例如cool.key,因此可能某些文件被删除了,需要通过恢复找回



![](https://img-blog.csdnimg.cn/img_convert/5d552c44e4ac64f8775d5d63f085a6c1.png)


先取消挂载



umount /dev/loop0


然后安装 extundelete 工具



sudo apt-get install extundelete


再次挂载findme文件后,使用 extundelete 工具进行数据恢复



extundelete /dev/loop0 --inode 2



![](https://img-blog.csdnimg.cn/img_convert/fe46ba0b26ea36a2e61aecd1efbe26b1.png)


可以发现有一个swp文件,使用 extundelete 工具进行恢复



extundelete /dev/loop0 --restore-file .coolboy.swp


查看恢复后的 .coolboy.swp 文件



cd RECOVERED_FILES
strings .coolboy.swp



![](https://img-blog.csdnimg.cn/img_convert/a3ef5424247b8843b7e612b28237e90b.png)


base64解码,得到真正的密码



![](https://img-blog.csdnimg.cn/img_convert/008b92b2f2ce0a6a260388b762bd1c67.png)


再使用Veracrypt解密flagbox文件,得到flag



![](https://img-blog.csdnimg.cn/img_convert/7837550dda44fbec25f7662c5f11198d.png)



#### [红明谷CTF 2022]MissingFile


题目描述:好像被攻击者入侵了,但是赶到现场的时候,已经只剩下一个空的文件夹了,快照能找到攻击者留下的秘密吗?


首先,查看内存镜像中计算的的所有用户名,使用 hashdump 命令



![](https://img-blog.csdnimg.cn/img_convert/ee376e1781b69e98aba08c5e112f313b.png)


可以发现除默认用户外,有link3和NewGuest两个用户,由于计算机被攻击者入侵,因此 link3 更有可能是计算机已有用户,而 NewGuest 用户是入侵过程中产生的


根据关键词 NewGuest 扫描文件,可以发现一处可疑路径,同时还可以发现 mimikatz 工具使用的信息



vol.py -f memory --profile=Win7SP1x86_23418 filescan | grep -i NewGuest



![](https://img-blog.csdnimg.cn/img_convert/03ff8047f4bccc22dbbddbbb372a2977.png)


使用 mftparser 对内存中的 MFT 条目进行分析,并将结果保存至 mftparser.txt



volatility -f memory --profile=Win7SP1x86_23418 mftparser > mftparser.txt


根据关键词 Hacker,可以发现如下内容



![](https://img-blog.csdnimg.cn/img_convert/bbf7f9007ba4c78f72f7ef7271a936eb.png)


使用010editor,将上述十六进制数据保存为文件 S3cret


DPAPI技术是Windows提供的一种数据保护API,它本质上使用了Windows通过用户自己登录(sids,登录密码等),以及域登录后的一些数据生成的密钥,并且使用内置的算法,对用户指定的数据进行加密。通常Windows上的浏览器历史数据,邮件加密,wifi密码等等都会以这种方式进行数据加密。相关知识要点如下:



DPAPI:
全称Data Protection Application Programming Interface

DPAPI blob:
一段密文,可使用Master Key对其解密

Master Key:
64字节,用于解密DPAPI blob,使用用户登录密码、SID和16字节随机数加密后保存在Master Key file中

Master Key file:
二进制文件,可使用用户登录密码对其解密,获得Master Key


从文件魔数可以看出来,S3cret 文件采用 Windows 系统的 DPAPI 技术进行加密,是一个 DPAPI blob


对采用DPAPI技术加密的数据进行解密,需要获取当前操作系统登录用户对应的 Master Key,而获取 MasterKey 需要知道用户名、密码以及对应的SID,然后利用这些数据生成一个 blob 加密过程中使用的 MasterKey,从而对目标blob进行解密


那么,可以通过 hashdump 和 getsids 命令来查找相关信息



![](https://img-blog.csdnimg.cn/img_convert/b0dad58ab7ca3981d7168dc323317ce1.png)


从前述步骤可知用户名是 NewGuest,对密码哈希值进行在线查询(也可以使用Kali中的John)可知为123456



![](https://img-blog.csdnimg.cn/img_convert/89fcc42b4cfb06eeacc9938a61c86a10.png)


SID则是 S-1-5-21-206512979-2006505507-2644814589-1001



vol.py -f memory --profile=Win7SP1x86_23418 getsids | grep -i NewGuest



![](https://img-blog.csdnimg.cn/img_convert/1abea5ca0b3b3fe18e06b335f9cafa83.png)


使用 mimikatz 工具(以管理员身份运行)检查 S3cret 文件



mimikatz # privilege::debug
mimikatz # dpapi::blob /in:“S3cret”


可以得到 guidMasterKey 为 {470a5148-d8c9-4453-bf41-f0c09d158bfd}



![](https://img-blog.csdnimg.cn/img_convert/68ff7d2e4c7e800ac0fc2f9b1f56f8e5.png)


在之前导出的文件中查找,可以得到如下内容



![](https://img-blog.csdnimg.cn/img_convert/ff0139e9d5e37354024a5bb6ea17cb90.png)


使用010editor,将上述十六进制数据保存为 master.key 文件


然后,在mimikatz中,使用用户密码、SID以及 master.key 文件来生成最终用于解密的 Master Key



mimikatz # dpapi::masterkey /in:“master.key” /sid:S-1-5-21-206512979-2006505507-2644814589-1001 /password:123456



![](https://img-blog.csdnimg.cn/img_convert/2a4baac9f8425ad2fdefe60cd9c65ba3.png)


最后,使用 Master Key 来解密 S3cret 文件



mimikatz # dpapi::blob /in:“S3cret” /masterkey:092c4220064c30bc7f8b15d2d48957c4926af0632149b9c08cd87f34fc43aa1204d775bdc6ab429a0d4d0826fb80b08250b125d92913e2f7578cf778073bfe38



![](https://img-blog.csdnimg.cn/img_convert/e981f1a54500c4f223bdada517896958.png)


十六进制转字符,得到flag


flag{Hide\_Behind\_Windows}



#### [鹏城杯 2022]简单取证


对内存镜像进行filescan,按照.zip.jpg.png.txt依次对结果进行过滤



vol.py -f file.raw --profile=WinXPSP2x86 filescan | grep -i .zip
vol.py -f file.raw --profile=WinXPSP2x86 filescan | grep -i .jpg
vol.py -f file.raw --profile=WinXPSP2x86 filescan | grep -i .png
vol.py -f file.raw --profile=WinXPSP2x86 filescan | grep -i .txt


有一个 secret.jpg 文件值得注意



![](https://img-blog.csdnimg.cn/img_convert/ba432541e098a0884e592982210fc694.png)


将上述文件 dump 下来,并重命名为 secret.jpg.dat



vol.py -f file.raw --profile=WinXPSP2x86 dumpfiles -Q 0x0000000002325028 -D ./


查看文件内容,是一段base64编码,对文件开头的一段内容进行base64解码,可以发现解码后的内容是zip文件的数据逆序



![](https://img-blog.csdnimg.cn/img_convert/9c1bc20dff0c9e6df538ddeb15b0d4ac.png)


将 secret.jpg.dat 文件重命名为 secret.jpg 编写脚本,将 secret.jpg 文件中的数据进行base64解码后逆序,然后写入 flag.zip 文件中



import base64
import struct

with open(“secret.jpg”, “r”) as f:
r = f.read()

lst = list(base64.b64decode®)

将字节列表lst逆序

lst.reverse()

with open(“flag.zip”, “wb”) as f:
for i in lst:
# 使用struct模块的pack函数将字节i打包为一个单字节的二进制字符串s
s = struct.pack(‘B’, i)
f.write(s)


得到的压缩包需要密码,查看进程树可以发现执行过 cmd,因此,尝试检查 cmd 命令执行历史



![](https://img-blog.csdnimg.cn/img_convert/df61d6c359f1519f3376eb29e63261aa.png)



vol.py -f file.raw --profile=WinXPSP2x86 cmdscan


得到压缩包密码为:62b041223bb9a



![](https://img-blog.csdnimg.cn/img_convert/05acdd26f315272f6392f3c1280d5534.png)


解压 flag.zip 得到 flag.txt 文件,打开其内容类似坐标,猜测可能是二维码中白色颜色快的坐标



![](https://img-blog.csdnimg.cn/img_convert/554a3a001454ffd0581aa9b957e6eecf.png)


编写如下脚本,处理 flag.txt 文件中的(x,y)坐标,生成二维码图片 flag.png



from PIL import Image

创建一个新的350x350像素的RGB图像,背景颜色为黑色(0,0,0)

im = Image.new(“RGB”, (350, 350), (0, 0, 0))

with open(“flag.txt”, “r”) as f:
# 此时,r包含了一个字符串,这个字符串是"flag.txt"文件的内容
r = f.read()

将字符串r按换行符(“\n”)分割,得到一个列表lst,列表中的每个元素是文件中的一行

lst = r.split(“\n”)
for i in lst:
# 将字符串i按空格分割,取第一个元素并将其转换为整数,赋值给变量x
x = int(i.split(" “)[0])
# 将字符串i按空格分割,取第二个元素并将其转换为整数,赋值给变量y
y = int(i.split(” ")[1])
# 在图像im的(x, y)位置上设置一个像素点,颜色为白色(255,255,255)
im.putpixel((x, y), (255, 255, 255))

im.save(“flag.png”)


执行脚本,生成二维码png图片



![](https://img-blog.csdnimg.cn/img_convert/66b89d5a7a7d50687ffd97f0f222d0c1.png)


扫码得到flag:flag{a6b93e36-f097-11ec-a9b2-5254002d2b31}



#### [HUBUCTF 2022 新生赛]vmem


对内存镜像进行filescan,按照.zip/.jpg/.png/.txt依次对结果进行过滤



vol.py -f Windows7.vmem --profile=Win7SP1x64 filescan | grep -i .zip
vol.py -f Windows7.vmem --profile=Win7SP1x64 filescan | grep -i .jpg
vol.py -f Windows7.vmem --profile=Win7SP1x64 filescan | grep -i .png
vol.py -f Windows7.vmem --profile=Win7SP1x64 filescan | grep -i .txt


发现3个flag



![](https://img-blog.csdnimg.cn/img_convert/f587442c57e4f6fdae6a0f7f0a00a08f.png)



![](https://img-blog.csdnimg.cn/img_convert/93f119ab68d345bfc6d85b6d205e35fa.png)


按照 flag 对结果进行过滤,确认只有3个 flag



![](https://img-blog.csdnimg.cn/img_convert/85b4d74c1181d6594138bcfed6abe3cd.png)


将上述三个文件dump下来



dump flag.txt

vol.py -f Windows7.vmem --profile=Win7SP1x64 dumpfiles -Q 0x000000005eb84f20 -D ./

重命名

mv file.None.0xfffffa801418b160.dat flag.txt

dump flag2.png

vol.py -f Windows7.vmem --profile=Win7SP1x64 dumpfiles -Q 0x000000005d98ecd0 -D ./

重命名

mv file.None.0xfffffa80145fb770.dat flag2.png

dump flag3.txt

vol.py -f Windows7.vmem --profile=Win7SP1x64 dumpfiles -Q 0x000000005e7f5070 -D ./

重命名

mv file.None.0xfffffa801323c7d0.dat flag3.txt


查看flag.txt,得到flag第一部分:NSSCTF{W0w\_y0u\_G3t



![](https://img-blog.csdnimg.cn/img_convert/15645c1634cda6a702a7b8b2608affd9.png)


查看flag2.png,得到flag第二部分:\_th3\_P4sSWd



![](https://img-blog.csdnimg.cn/img_convert/90a061969c22750268a67e9451183c88.png)


查看flag3.txt,得到一段python脚本,且已知输出,需要进行逆向来得到flag的第三部分



flag3 = open(‘flag3.txt’).read()
flag_enc = “”
for i in range(len(flag3)):
flag_enc += chr(ord(flag3[i]) ^ 0xf - 6)
print(flag_enc)

}al):{m)yh{})fo)oehn)`z)3)VPF|V^hg](t


编写如下脚本得到flag第三部分:\_YOu\_WanT!}



flag_enc = “}al):{m)yh{})fo)oehn)`z)3)VPF|V^hg](t”
flag = “”
for i in flag_enc:
flag += chr(ord(i) ^ 9)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值