建设个读书网站大约需要投入多少钱,安康市相亲平台,国外电商网站设计欣赏,网站开发的工具今天的场景依然是windows场景#xff0c;只不过此次场景分为两个镜像#xff0c;本次学习主要学习如何晒别钓鱼邮件、如何提取钓鱼邮件、如何修复损坏的恶意文件、如何提取DLL动态链接库文件
本次需要使用的工具#xff1a; volatility_2.6_lin64_standalone readpst clams…今天的场景依然是windows场景只不过此次场景分为两个镜像本次学习主要学习如何晒别钓鱼邮件、如何提取钓鱼邮件、如何修复损坏的恶意文件、如何提取DLL动态链接库文件
本次需要使用的工具 volatility_2.6_lin64_standalone readpst clamscan olevba
本次实验使用的映像文件 win7ecorpoffice2010-36b02ed3.vmem ecorpwin7-e73257c4.vmem
Q1
File-ecorpoffice What is the PID the malicious file is running under? 恶意文件运行的PID是什么 老规矩先看一下当前映像的系统信息
./volatility_2.6_lin64_standalone -f c74-TeamSpy/ecorpoffice/win7ecorpoffice2010-36b02ed3.vmem imageinfo 这里使用两种方式获取进程列表
./volatility_2.6_lin64_standalone -f c74-TeamSpy/ecorpoffice/win7ecorpoffice2010-36b02ed3.vmem --profileWin7SP1x64 pslist或者
./volatility_2.6_lin64_standalone -f c74-TeamSpy/ecorpoffice/win7ecorpoffice2010-36b02ed3.vmem --profileWin7SP1x64 psscan在 Volatility 2.6 版本中psscan 指令和 pslist 指令都是用于扫描系统中的 PID(进程标识符) 的指令。但是它们有一些重要的区别。 1.psscan 指令会一次性扫描系统中的所有 PID而 pslist 指令只会列出当前正在运行的进程列表。 2.psscan 指令使用默认参数时会列出所有检测到的进程及其相关信息包括进程名称、PID、进程所有者、进程类型等。而 pslist 指令则只显示当前正在运行的进程列表。 3.psscan 指令支持使用多个参数例如 -U 用于指定进程所有者-o 用于指定输出格式等。而 pslist 指令不支持使用多个参数。 4.psscan 指令的安全性更高因为它不会直接访问系统资源而是通过 Volatility 提供的 API 进行进程扫描。这意味着 psscan 指令更加安全并且不会泄漏敏感信息。
使用getsids命令统计 PID 为 1364 的进程或进程组
./volatility_2.6_lin64_standalone -f c74-TeamSpy/ecorpoffice/win7ecorpoffice2010-36b02ed3.vmem --profileWin7SP1x64 getsids -p 1364 这里其实也可以执行cmdline命令查看一下该进程该进程其实是在temp目录下走的很多病毒也都是在temp目录下走的
Q2
File-ecorpoffice What is the C2 server IP address? C2服务器的IP地址是什么
./volatility_2.6_lin64_standalone -f c74-TeamSpy/ecorpoffice/win7ecorpoffice2010-36b02ed3.vmem --profileWin7SP1x64 netscanQ3
File-ecorpoffice What is the Teamviewer version abused by the malicious file? 被恶意文件滥用的Teamviewer版本是什么
strings win7ecorpoffice2010-36b02ed3.vmem| grep -F 54.174.131.235strings 命令用于在内存中查找字符串而 grep 命令用于在文件中查找指定的字符串。在这里grep 命令的参数 -F 表示使用正则表达式进行查找并且指定要查找的字符串是在内存中的行中包含的。 -F加不加都行
Q4
File-ecorpoffice What password did the malicious file use to enable remote access to the system? 恶意文件使用了什么密码来启用对系统的远程访问
./volatility_2.6_lin64_standalone -f c74-TeamSpy/ecorpoffice/win7ecorpoffice2010-36b02ed3.vmem --profileWin7SP1x64 editbox“editbox” 是该配置文件中与 “Win7SP1x64” 相关的编辑框数据的名称。
Q5
File-ecorpoffice What was the sender’s email address that delivered the phishing email? 发送钓鱼电子邮件的发件人的电子邮件地址是什么
我们将找到扩展名为*.eml或*.pst的文件Outlook和Microsoft Exchange文件具有这样的扩展名它们可以包含信件本身和文件夹联系人地址附件等。
./volatility_2.6_lin64_standalone -f c74-TeamSpy/ecorpoffice/win7ecorpoffice2010-36b02ed3.vmem --profileWin7SP1x64 filescan | grep pst$这段命令是使用 Volatility 工具来读取一个名为 “c74-Team Spy/ecorpoffice/win7ecorpoffice2010-36b02ed3.vmem” 的虚拟内存文件并将其中与 “Win7SP1x64” 相关的文件扫描数据输出到标准输出 (stdout) 上并通过 grep 命令筛选输出结果只保留以 “pst$” 开头的行。 或者
./volatility_2.6_lin64_standalone -f c74-TeamSpy/ecorpoffice/win7ecorpoffice2010-36b02ed3.vmem --profileWin7SP1x64 filescan | grep -F .psteml并没有搜索结果所以结果就是以pst为准 接下来是将这些文件转储出来以便于我们取证 首先创建一个名为pst的文件夹 mkdir pst
./volatility_2.6_lin64_standalone -f c74-TeamSpy/ecorpoffice/win7ecorpoffice2010-36b02ed3.vmem --profileWin7SP1x64 dumpfiles -n -u -r pst$ -D pst该命令将 pst相关的文件转储在 pst目录下 dumpfiles:提取内存映射和缓存的文件包括-n(不覆盖已有的 dump 文件)、-u(只创建新的 dump 文件不覆盖已有的 dump 文件) 和-r(指定 dump 文件的根目录)。 -D:指定要存储 dump 文件的路径和文件名是 --dump-dir的简写 此时使用readpst工具进行读取该工具需要手动安装
sudo apt-get updatesudo apt-get install pst-utils 为什么说要使用readpst 工具呢因为我们转储的文件是不便于我们阅读的我们需要把他们转换成我们可以直接打开的文件格式大家可以理解为“解压缩”
我们重点关注一下file.2692.0xfffffa80042dcf10.phillip.pricee-corp.biz.pst.dat数据
readpst -S file.2692.0xfffffa80042dcf10.phillip.pricee-corp.biz.pst.dat此处已经成功将邮件解开我们回到存放目录发现已经可以阅读了 而后我们查看最后一个包的文件内容因为这个带附件了
其实这里的题我是没答出来的偷看了一下国外大佬的过程也是看的云里雾里的其实在这里是一封钓鱼邮件按理说这个邮件里应该会显示出邮件的名称但是我这里却没有 这里的意思其实就是尊敬的xxx这是您的发票 xxx银行 网上大佬的教程里是有发票的名字的 但是解出来的文件确实有个恶意钓鱼文件 我们去解开另外一个pst文件 几乎是如出一辙至于为什么主要关注phillip.price用户请回看Q1C2木马运行的用户就是该用户
Q6
File-ecorpoffice What is the MD5 hash of the malicious document? 恶意文档的MD5哈希是什么
md5sum 13-bank_statement_088452.docc2dbf24a0dc7276a71dd0824647535c9
Q7
File-ecorpoffice What is the bitcoin wallet address that ransomware was demanded? 勒索软件被要求提供的比特币钱包地址是什么 这里可以使用检索的方式也可以翻垃圾桶哈
grep -r -i bitcoin pst该命令直接在解出来的邮件里全局所有bitcoin 关键字 可以看出来人家威胁你要不不给我5比特币我就天天攻击你
Q8
File-ecorpoffice What is the ID given to the system by the malicious file for remote access? 恶意文件为系统提供的用于远程访问的ID是什么
strings win7ecorpoffice2010-36b02ed3.vmem| grep 54.174.131.235与Q3问题一个玩法 如果观察细致的朋友可能在上面看到过这个数字
./volatility_2.6_lin64_standalone -f c74-TeamSpy/ecorpoffice/win7ecorpoffice2010-36b02ed3.vmem --profileWin7SP1x64 editbox好吧在这里引用一下其实也可以将以上的 部分流量包导出来
./volatility_2.6_lin64_standalone -f c74-TeamSpy/ecorpoffice/win7ecorpoffice2010-36b02ed3.vmem --profileWin7SP1x64 memdump -p 1364 -D ./上述命令其实是使用memdump命令捕获 pid 为 1364的内存状态生成一个名为1364.dmp的文件同时将生成的1364.dmp文件保存在当前目录下以便于后续的分析
strings -el 1364.dmp | grep -A10 -B10 54.174.131.235这条命令的作用是查找指定文件中包含字符串 “54.174.131.235” 的位置并输出所有匹配的行。其中string -el 1364.dmp 的作用是指定要查找的文件grep -A10 -B10 “54.174.131.235” 的作用是指定要查找的字符串和显示匹配行的位置。
Q9
File-ecorpoffice What is the IPv4 address the actor last connected to the system with the remote access tool? 参与者最后一次使用远程访问工具连接到系统的IPv4地址是什么
strings 1364.dmp| grep -B10 -A10 -E ([0-9]{1,3}[\.]){3}[0-9]{1,3} | grep team -B10 -A10 可以把 B10 A10 给大点 验证一下
strings -el 1364.dmp | grep -F 31.6.13.155 -B 10 -A 10Q10
File-ecorpoffice What Public Function in the word document returns the full command string that is eventually run on the system? word文档中的哪个公共函数返回最终在系统上运行的完整命令字符串
先安装个工具用于分析Microsoft OLE2文件也称为结构化存储复合文件二进制格式或复合文档文件格式例如Microsoft Office文档或Outlook消息主要用于恶意软件分析取证和调试。它基于olefile解析器
sudo pip3 install -U oletools这里需要回过头去分析Q6拿到的恶意文件 13-bank_statement_088452.doc olevba -c 13-bank_statement_088452.doc 我虽然上学的时候学过VB但是早就忘光了这里我确实没本事解密但是此处执行的其实是一条powershell加密过的命令
Q11
File-ecorpwin7 What is the MD5 hash of the malicious document? 恶意文档的MD5哈希是什么 从此题开始进入到下一个映像
./volatility_2.6_lin64_standalone -f c74-TeamSpy/ecorpwin7/ecorpwin7-e73257c4.vmem imageinfo./volatility_2.6_lin64_standalone -f c74-TeamSpy/ecorpwin7/ecorpwin7-e73257c4.vmem --profileWin7SP1x64 filescan | grep pst$创建新的存放路径 导出
./volatility_2.6_lin64_standalone -f c74-TeamSpy/ecorpwin7/ecorpwin7-e73257c4.vmem --profileWin7SP1x64 dumpfiles -n -u -r pst$ -D pst2readpst -S file.2496.0xfffffa80034e9850.Outlscott.knowlese-corp.biz-00000004.pst.dat 解压邮件文件 但是导出来的时候该RTF文件损坏了我是看不出来的
xxd 10-Important_ECORP_Lawsuit_Washington_Leak.rtf全是GGG
./volatility_2.6_lin64_standalone -f c74-TeamSpy/ecorpwin7/ecorpwin7-e73257c4.vmem --profileWin7SP1x64 filescan | grep rtf$ 我们去重新筛选一下该文件通过获取内存地址的方式进行导出这样就不会损坏文件了
./volatility_2.6_lin64_standalone -f c74-TeamSpy/ecorpwin7/ecorpwin7-e73257c4.vmem --profileWin7SP1x64 dumpfiles -Q 0x000000007d6b3850 -u -n -D pst2其实就是加了一个-Q用来指定文件的内存地址 这个时候依然不能直接用文件末尾很多0 这段命令行的作用是将文件 xxxLeak.rtf.dat 中的特定字节删除并将文件中的特定字符串替换为另一个字符串最后将修改后的二进制文件写入新文件 xxxLeak.rtf。
xxd -p file.None.0xfffffa80040b3260.Important_ECORP_Lawsuit_Washington_Leak.rtf.dat | sed /000000000000000000000000000000000000000000000000000000000000/d | sed /0000000000000000000000000000000000000000000000000000/d | sed s/6131376136616631303365316533616437657d7d7d7d0000000000000000/6131376136616631303365316533616437657d7d7d7d/g | xxd -r -p Important_ECORP_Lawsuit_Washington_Leak.rtf 或者 使用 Sed 命令将文件中的任意空字符 (0x0) 替换为空字符串 (即删除所有空字符)。
sed s/\x0//g file.None.0xfffffa80040b3260.Important_ECORP_Lawsuit_Washington_Leak.rtf.dat Important_ECORP_Lawsuit_Washington_Leak.rtf计算MD5
md5sum Important_ECORP_Lawsuit_Washington_Leak.rtf使用clamscan工具扫一下也是告诉我们别人利用的是CVE_2010_3333-5 Microsoft RTF栈溢出漏洞
Q12
File-ecorpwin7 What is the common name of the malicious file that gets loaded? 被加载的恶意文件的通用名称是什么 首先我们看一下网络连接状态
./volatility_2.6_lin64_standalone -f c74-TeamSpy/ecorpwin7/ecorpwin7-e73257c4.vmem --profileWin7SP1x64 netscan这个其实就挺可疑的
./volatility_2.6_lin64_standalone -f c74-TeamSpy/ecorpwin7/ecorpwin7-e73257c4.vmem --profileWin7SP1x64 pstree | grep 288我们查看一下该进程的进程树
./volatility_2.6_lin64_standalone -f c74-TeamSpy/ecorpwin7/ecorpwin7-e73257c4.vmem --profileWin7SP1x64 cmdline | grep rundll -A 10 -B 10转储 test.dll
mkdir dll./volatility_2.6_lin64_standalone -f c74-TeamSpy/ecorpwin7/ecorpwin7-e73257c4.vmem --profileWin7SP1x64 dumpfiles -n -i -r test.dll -D dll 使用clamscan 进行扫描 Clamscan 是一个免费的开源杀毒软件它使用 clamav 软件包来检测文件是否包含恶意软件。Clamscan 最初是由加州大学伯克利分校开发的并在其 BSD 授权条款下免费提供。它支持多种文件格式和平台并且可以在多个平台上运行。Clamscan 可以用于扫描本地计算机或远程服务器上的文件并且可以自动检测和清除恶意软件。
clamscan -r . md5sum file.288.0xfffffa8003791f10.test.DLL.dat Malpedia 是一个在线的恶意软件数据库提供有关各种恶意软件、病毒、黑客攻击和网络犯罪的信息。Malpedia 官网是 链接: https://malpedia.caad.fkie.fraunhofer.de/library 。在该网站上您可以找到有关各种恶意软件和攻击的详细信息包括它们的特征、传播方式、攻击目标、预防和应对措施等。Malpedia 是由 OpenDNS 和安全公司 ESET 共同开发的旨在为网络安全专业人士和普通人提供有关恶意软件的详细信息。
Q13
File-ecorpwin7 What password does the attacker use to stage the compressed file for exfil? 攻击者使用什么密码来暂存压缩文件以进行exfil ./volatility_2.6_lin64_standalone -f c74-TeamSpy/ecorpwin7/ecorpwin7-e73257c4.vmem --profileWin7SP1x64 memdump -p 288 -D ./ 继续上一题我们把svchost 进程的内存镜像导出来 一发定魂
strings -el 288.dmp| grep password -A10 -B10但是东西总是少一节我们再次精确一下
strings -el ecorpwin7-e73257c4.vmem| egrep -A5 -B5 password1234egrep是筛选 password1234的字符串而不是当做正则来筛选
strings -el ecorpwin7-e73257c4.vmem| egrep reports.rar我们发现 reports.rar用过之后就被删除了
Q14
File-ecorpwin7 What is the IP address of the c2 server for the malicious file? 恶意文件的c2服务器的IP地址是什么
./volatility_2.6_lin64_standalone -f c74-TeamSpy/ecorpwin7/ecorpwin7-e73257c4.vmem --profileWin7SP1x64 netscan回归到Q12问题我们的所有推断都是没问题的所以C2地址应该就是下图所示了
Q15
File-ecorpwin7 What is the email address that sent the phishing email? 发送钓鱼电子邮件的电子邮件地址是什么 回顾Q11 我们发现了rtf恶意文件发件人也在其中 或者
./volatility_2.6_lin64_standalone -f c74-TeamSpy/ecorpwin7/ecorpwin7-e73257c4.vmem --profileWin7SP1x64 yarascan -Y From: | grep -B3 -A3 这段命令行的目的是扫描指定的内存文件并使用 Yarascan 扫描内存以查找可能的病毒或恶意软件-Y From::在 Yarascan 扫描期间忽略扫描指定字符串的内存块
Q16
File-ecorpwin7 What is the name of the deb package the attacker staged to infect the E Coin Servers? 攻击者用来感染E Coin服务器的deb包的名称是什么
strings -el ecorpwin7-e73257c4.vmem | grep -F .deb其实我也不知道是不是但是这下的都是一个还是用wget下载的
最难受的就是我想导出来看一下但是并没有成功导出来的时候是一大堆乱七八糟的文件。。。。。。
此次演示就告一段落了因为此次篇幅较长难度较高建议大家多实践多操作下期将会为大家介绍一下linux的内存取证的基础文章敬请期待
如果觉得学到东西了请转发蟹蟹