LoginSignup
0
0

More than 3 years have passed since last update.

certutil使用PowerShell快速落地文件

Posted at

碰到一些极限环境,比如站库分离只出dns的时候,想上线cs的马,但是文件迟迟不能落地,相信很多人都会想到certutil等工具。

而在使用certutil base64通过echo写文件时,echo会在每行的末尾追加一个空格,加上http传输的URL编码问题,有一些傻逼环境总是decode时候出错,而且一些几十几百k的文件,一行一行echo实在是拉跨。所以用powershell配合bp的爆破模块来写文件,然后 certutil -decode 就完事了,轻松省心。

powershell -c "'a' | Out-File C:\1.txt -Append"

写文件的时候通过bp的爆破模块去单线程写入文件,举一个请求包的例子。

/login HTTP/1.1
Host: baidu.com

cmd=powershell -c "'§§' | Out-File C:\1.txt -Append"

设置参数
image.png

设置certutil encode的txt字典
image.png

勾上URL编码
image.png

设置单线程,你也可以设置每次请求之后sleep 1秒。
image.png

冲完之后落地到目标的txt文件和本地的txt文件hash一致,decode之后的文件hash仍然一致。

本地还原文件的hash
image.png

落地到目标还原之后的文件hash
image.png

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