agentsclimarketplace

Defensive malware analyst

Skill findscripter/everything-skills/08-security/defensive-malware-analyst

当需要在隔离环境中对可疑样本做防御性分析(事件响应、威胁情报、检测规则开发)时使用;做静态/动态分析并产出 IOC、YARA 规则与分析报告;不适用于编写/分发恶意代码、未授权攻击或任何攻击性用途;触发词:恶意软件分析、样本分析、IOC 提取、YARA、沙箱、C2From its SKILL.md

Install
npx -y skills add findscripter/everything-skills --skill defensive-malware-analyst

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its file declares

Copied from the file, not written here

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

5.9 KB, ~1.8k tokens by cl100k_base, as published. Nobody here has run it

何时使用

用于防御目的的可疑样本分析,典型场景:事件响应与取证、威胁情报研究、安全产品(检测规则)开发、学术研究、CTF。目标是理解样本行为、提取 IOC、产出检测规则与分析报告。

不该用(负边界,硬约束): 编写或分发恶意代码;未授权攻击或渗透;恶意绕过安全产品;搭建 botnet / C2 基础设施;任何未经授权的攻击性操作。开始前必须确认是防御/已授权用途,否则停下并询问。

步骤

按四个阶段递进,先静态后动态,全程在隔离实验环境(断网/仿真网络的虚拟机、可回滚快照)中操作。

阶段 1 — 识别与分类(triage)

file sample.exe                 # 文件类型
sha256sum sample.exe            # 哈希(同时记录 MD5/SHA1)

阶段 2 — 表层信息提取

strings -a sample.exe | head -100   # 明文字符串
FLOSS sample.exe                    # 提取混淆/加密字符串
diec sample.exe                     # Detect It Easy:识别壳
exeinfope sample.exe
rabin2 -i sample.exe                # 导入表
dumpbin /imports sample.exe         # Windows 下导入分析

阶段 3 — 静态分析

  1. 用反汇编器加载:Ghidra / IDA Pro / Binary Ninja。
  2. 定位入口:Entry point、WinMain、DllMain。
  3. 梳理执行流:关键分支与循环。
  4. 识别能力:网络、文件、注册表、进程操作。
  5. 提取 IOC:C2 地址、文件路径、互斥体(mutex)名。

阶段 4 — 动态分析

1. 环境准备:
   - 安装常见软件的 Windows VM(带快照)
   - Process Monitor、Wireshark、Regshot
   - API Monitor 或 x64dbg(开日志)
   - INetSim / FakeNet 模拟网络(避免真实外连)
2. 执行:
   - 先启动监控工具,再运行样本
   - 观察 5-10 分钟,触发功能(如联网)
3. 记录:网络连接、文件增改、注册表变化、派生进程、持久化机制

指令

  • 先澄清目标、约束与必需输入(样本、授权、安全边界、成功标准);缺失则停下询问。
  • 静态优先、动态在隔离环境兜底;先启动监控再执行样本。
  • 重点排查三类常见技术并对照提取证据:
    • 持久化:注册表 Run 键(HKCU/HKLM\...\CurrentVersion\Run)、计划任务(schtasks)、服务(CreateService/sc.exe)、WMI 订阅、DLL/COM 劫持、启动文件夹、MBR/VBR。
    • 逃逸:反虚拟机(CPUID/计时)、反调试(IsDebuggerPresent、NtQueryInformationProcess)、反沙箱(Sleep 加速、鼠标活动)、加壳(UPX/Themida/VMProtect)、混淆、进程镂空(process hollowing)、就地取材(PowerShell/certutil)。
    • C2 通信:HTTP(S) 混入、DNS 隧道、DGA、fast flux、Tor/I2P、社交媒体/云服务作信道。
  • 脱壳工具:Unipacker、x64dbg+Scylla(重建 IAT)、PE-sieve(检测镂空)、UPX。
  • 产出可验证结果:IOC 清单、YARA 规则、结构化报告。输出不替代环境特定的验证与专家复核。

示例

IOC 提取清单(YAML)

Network: { IP(C2服务器), 域名, URL, User-Agent, JA3/JA3S 指纹 }
FileSystem: { 创建的文件路径, 哈希(MD5/SHA1/SHA256), 文件名, mutex 名 }
Registry: { 被改键, 持久化位置 }
Process: { 进程名, 命令行参数, 被注入进程 }

最小 YARA 规则

rule Malware_Generic_Packer
{
    meta:
        description = "Detects common packer characteristics"
        author = "Security Analyst"
    strings:
        $mz = { 4D 5A }
        $upx = "UPX!" ascii
        $section = ".packed" ascii
    condition:
        $mz at 0 and ($upx or $section)
}

报告结构(Markdown):执行摘要(识别/关键发现/威胁等级)→ 样本信息(哈希、类型大小、编译时间、壳)→ 静态分析(导入导出、可疑字符串、代码发现)→ 动态分析(行为、网络、持久化、逃逸)→ IOC(网络/文件/注册表)→ 建议(检测规则、缓解、修复)。

注意事项

  • 始终在隔离环境操作:断网或仿真网络(INetSim/FakeNet)、虚拟机快照、执行后回滚,避免感染扩散或真实外连。
  • 动态分析前务必先启动监控工具,否则会漏掉早期行为。
  • 样本可能含反沙箱/反调试,行为不触发时考虑触发条件(联网、特定时间、用户交互)。
  • 输出仅供防御参考,不替代环境特定的测试与专家复核。
  • 始终确认防御/授权用途;触及负边界即拒绝并说明。

互见

  • 威胁情报与 IOC 管理、事件响应流程类技能(如有)。
  • 逆向工程 / 二进制分析、网络流量取证类技能(如有)。

采编自 sickn33/antigravity-awesome-skills(MIT 许可)。

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,736. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.