reverser-fileless-malware
できること
このスキルは、ハードディスクではなくメモリ内に存在するマルウェアを見つけて調べる方法を説明します。Windowsシステムでインシデントを調査するセキュリティアナリスト向けです。
使う場面
- ✓セキュリティチームが、ディスク上にファイルとして現れないマルウェアを疑うとき。
- ✓分析者が、注入されたコードがないか実行中のプロセスをスキャンする必要があるとき。
- ✓インシデント対応者が、イベントログから最近のPowerShellの活動を読みたいとき。
スキルのリンク
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/reverser/fileless-malware/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“このPCで、ファイルがないのにメモリ上で何かが動いているようです。どう確認すればよいですか?”
毎週5つの新しいスキル。1分で読めます。
仕組み
このスキルは、実行中のプログラムに注入されたコードがないかスキャンし、分析用にメモリダンプを保存し、スクリプトの活動ログを確認する手順を示します。AIは、どのプロセスが不自然に見えるかを報告します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Fileless Malware Analysis
Detect, extract, and analyze malware that lives entirely in memory — no files on disk. Covers AMSI bypass techniques, reflective loading, process injection variants, and LOLBin abuse chains.
Quick Reference
# Scan for injected code in running processes
pe-sieve.exe /pid <PID> /dir ./dump/ /shellc /iat 3
# Scan ALL processes at once
hollows_hunter.exe /dir ./hunt_results/
# Dump suspicious process memory
procdump.exe -ma <PID> process.dmp
# Search memory dump for PE headers
python3 -c "
d=open('process.dmp','rb').read()
import re
for m in re.finditer(b'MZ',d):
off=m.start()
if d[off+0x3c:off+0x40] != b'\x00'*4:
print(f'PE header at offset 0x{off:x}')
"
# Extract PowerShell from event logs
wevtutil qe Microsoft-Windows-PowerShell/Operational /f:text /c:50
MITRE ATT&CK Mapping
| Technique | ID | How It Appears |
|---|---|---|
| PowerShell | T1059.001 | Encoded cradles, AMSI bypass, download-execute chains |
| Reflective Code Loading | T1620 | Assembly.Load(byte[]), ReflectiveLoader in shellcode, Donut payloads |
| Process Injection | T1055 | Classic injection, process hollowing (T1055.012), thread hijacking |
| Impair Defenses: AMSI | T1562.001 | Patching AmsiScanBuffer, CLR hooking, registry disable |
| WMI Event Subscription | T1546.003 | Fileless persistence via WMI consumers |
| Signed Binary Proxy | T1218 | mshta, rundll32, regsvr32, msbuild LOLBin execution |
1. Detect In-Memory Artifacts
Identify processes with injected or hollowed code regions.
# pe-sieve — scan single process for implants
pe-sieve.exe /pid <PID> /shellc /threads /iat 3 /dir ./pe_sieve_out/
# Output: report.json with findings per memory region
# hollows_hunter — system-wide sweep
hollows_hunter.exe /dir ./hh_out/ /shellc /loop
# Scans every process; reports: hollowed, implanted, unreachable
# Process Hacker — manual inspection (GUI)
# 1. Open Process Hacker → Properties on suspect process
# 2. Memory tab → look for:
# - RWX regions (should be rare in legit processes)
# - Private regions with PE headers (MZ signature)
# - Mapped regions not backed by a file
# 3. Threads tab → look for:
# - Threads with start address in unbacked memory
# - Threads in ntdll!RtlUserThreadStart pointing to RWX region
# Volatility 3 — analyze memory image
vol3 -f memory.raw windows.malfind
vol3 -f memory.raw windows.vadinfo --pid <PID>
vol3 -f memory.raw windows.hollowfind
2. AMSI Bypass Analysis
Understand and detect AMSI patching techniques.
# Common AMSI bypass: patching AmsiScanBuffer in amsi.dll
# The bypass writes 0xC3 (RET) or specific bytes to the function prolog
# Detection: compare amsi.dll in-memory vs on-disk
# Check if AMSI is patched in a process
python3 << 'EOF'
import ctypes, ctypes.wintypes
# Load amsi.dll and get AmsiScanBuffer address
amsi = ctypes.windll.LoadLibrary("amsi.dll")
addr = ctypes.windll.kernel32.GetProcAddress(amsi._handle, b"AmsiScanBuffer")
# Read first bytes — should NOT be 0xC3 (ret) or 0x80 (cmp byte patched)
buf = (ctypes.c_byte * 8)()
ctypes.memmove(buf, addr, 8)
first_bytes = bytes(buf)
print(f"AmsiScanBuffer prolog: {first_bytes.hex()}")
if first_bytes[0] == 0xC3 or first_bytes[:3] == bytes([0x48, 0x31, 0xC0]):
print("[!] AMSI IS PATCHED — bypass active")
else:
print("[+] AMSI appears intact")
EOF
# ETW-based AMSI logging analysis
# Check for disabled ETW providers (another bypass vector)
logman query providers | findstr /i "amsi\|antimalware"
# Scan PowerShell scriptblock logs for bypass patterns
# Event Log: Microsoft-Windows-PowerShell/Operational, Event ID 4104
wevtutil qe "Microsoft-Windows-PowerShell/Operational" /q:"*[System[EventID=4104]]" /f:text /c:100 > scriptblocks.txt
grep -iE "AmsiScanBuffer|amsiInitFailed|AmsiUtils|Reflection\.Assembly|VirtualProtect|Marshal\.Copy" scriptblocks.txt
# Known AMSI bypass signatures to hunt
# 1. Matt Graeber's reflection: [Ref].Assembly.GetType('System.Management.Automation.AmsiUtils')
# 2. Direct patch: VirtualProtect + Marshal.Copy on AmsiScanBuffer
# 3. amsiInitFailed field set to $true
# 4. CLR hooking via profiler DLL
# 5. Registry disable: HKCU\Software\Microsoft\Windows Script\Settings\AmsiEnable=0
3. Reflective DLL Injection Analysis
Detect and extract reflectively loaded DLLs.
# Reflective loaders don't use LoadLibrary — they parse PE headers manually
# Key indicators:
# - RWX memory region with PE header
# - No corresponding
よくある質問
ファイルレスのマルウェアとは何ですか?
メモリ内で動く悪意のあるコードのことで、スキャンすべき通常のファイルがありません。
どのツールを挙げていますか?
PE-sieveなどのメモリスキャナーと、PowerShellのイベントログなどのWindowsのログを挙げています。
誰が使うべきですか?
稼働中のシステムを調べるインシデント対応者とマルウェア分析者です。
詳細
作者による元の説明
In-memory and fileless malware detection — AMSI bypass analysis, reflective DLL injection, CLR-hosted payloads, process hollowing, PowerShell cradle chains, WMI/COM persistence, and registry-resident payloads. Covers detection, memory forensics, and payload extraction.
人気
- GitHubのスター
- 6.5k
- ランキング
- #14165
- ライセンス
- Apache-2.0
- 更新日
- 2026/11/1
コメント
- …
このリポジトリの他のスキル
detector-overview
6.5kエージェントが、スキャナーが指摘したコードを読み、本物のセキュリティバグと誤検知を見分けられるよう支援します。
exploiter-overview
6.5kエージェントが、確認済みの複数のセキュリティ上の弱点を一つのテストの連鎖にまとめ、その影響がどこまで及ぶかを確認できるよう支援します。
llm-redteam-overview
6.5kエージェントが、プロンプトインジェクションからモデルの悪用まで、15の戦術グループの中から適切なAIレッドチーム用ガイドを見つけられるよう支援します。
aatmf-t01-prompt-injection
6.5kプロンプトインジェクションを説明します。隠された指示でAIシステムを乗っ取ろうとする手口を、セキュリティテスターが確認できるようにします。
似ているスキル
reverse-engineer-anything
422kREAツールを使って、出荷済みのアプリやパッケージの中身を調べ、機能の説明、版の比較、再構築の手順をエージェントが支援します。
1password
394k1Password CLIをセットアップし、サインインして、秘密情報の値を会話に表示せずに読み取ったり注入したりするようエージェントを支援します。
healthcheck
394kOpenClawを動かすコンピューターやサーバーを、SSH、ファイアウォール、更新、バックアップなどのセキュリティリスクについて監査し、安全な修正案を提案するようエージェントを支援します。