mcpField
M
malware-analyst

malware-analyst

github.com/rmyndharis安全1.9k36 次安装2 周前更新
代码仓库

关于 malware-analyst

malware-analyst 是供安全分析人员检查可疑文件的防御性技能,涵盖静态与动态分析、IOC 提取和报告,并强调授权使用与安全操作。

主要功能

  1. 01文件初步分诊与识别
  2. 02静态及动态分析指导
  3. 03IOC 提取
  4. 04YARA 规则示例
  5. 05结构化分析报告
  6. 06伦理与安全指引

适用场景

  1. 01调查可疑可执行文件
  2. 02在隔离环境观察样本行为
  3. 03收集用于检测的指标
  4. 04记录事件响应发现

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/rmyndharis/antigravity-skills --skill malware-analyst

安装后在 Claude Code 中输入/malware-analyst确认已加载。

详细介绍

文件识别

file sample.exe sha256sum sample.exe

字符串提取

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


### Phase 3: Static Analysis
1. **Load in disassembler**: IDA Pro, Ghidra, or Binary Ninja
2. **Identify main functionality**: Entry point, WinMain, DllMain
3. **Map execution flow**: Key decision points, loops
4. **Identify capabilities**: Network, file, registry, process operations
5. **Extract IOCs**: C2 addresses, file paths, mutex names

### Phase 4: Dynamic Analysis
  1. 环境设置:

    • 安装了常用软件的 Windows 虚拟机
    • Process Monitor、Wireshark、Regshot
    • API Monitor 或启用了日志记录的 x64dbg
    • 用于网络模拟的 INetSim 或 FakeNet
  2. 执行:

    • 启动监控工具
    • 运行样本
    • 观察行为 5-10 分钟
    • 触发相关功能(连接网络等)
  3. 记录:

    • 尝试建立的网络连接
    • 创建或修改的文件
    • 注册表更改
    • 启动的进程
    • 持久化机制

## Use this skill when

- Working on file identification tasks or workflows
- Needing guidance, best practices, or checklists for file identification

## Do not use this skill when

- The task is unrelated to file identification
- You need a different domain or tool outside this scope

## Instructions

- Clarify goals, constraints, and required inputs.
- Apply relevant best practices and validate outcomes.
- Provide actionable steps and verification.

## Common Malware Techniques

### Persistence Mechanisms

注册表 Run 键 - HKCU/HKLM\Software\Microsoft\Windows\CurrentVersion\Run 计划任务 - schtasks、任务计划程序 服务 - CreateService、sc.exe WMI 订阅 - 用于执行的事件订阅 DLL 劫持 - 在搜索路径中植入 DLL COM 劫持 - 注册表 CLSID 修改 启动文件夹 - %APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup 引导记录 - 修改 MBR/VBR


### Evasion Techniques

反虚拟机 - CPUID、注册表检查、计时 反调试 - IsDebuggerPresent、NtQueryInformationProcess 反沙箱 - 检测休眠加速、鼠标移动 加壳 - UPX、Themida、VMProtect、自定义加壳程序 混淆 - 字符串加密、控制流扁平化 进程空洞化 - 注入合法进程 借地生存 - 使用内置工具(PowerShell、certutil)


### C2 Communication

HTTP/HTTPS - 通过 Web 流量隐藏通信 DNS 隧道 - 通过 DNS 查询窃取数据 域名生成 - 使用 DGA 构建弹性 C2 快速通量 - 快速变化的 DNS Tor/I2P - 匿名网络 社交媒体 - 使用 Twitter、Pastebin 作为 C2 通道 云服务 - 使用合法服务作为 C2


## Tool Proficiency

### Analysis Platforms

Cuckoo Sandbox - 开源自动化分析 ANY.RUN - 交互式云沙箱 Hybrid Analysis - VirusTotal 的替代方案 Joe Sandbox - 企业级沙箱解决方案 CAPE - 增强版 Cuckoo 分支


### Monitoring Tools

Process Monitor - 文件、注册表和进程活动 Process Hacker - 高级进程管理 Wireshark - 网络数据包捕获 API Monitor - Win32 API 调用日志记录 Regshot - 注册表更改对比


### Unpacking Tools

Unipacker - 自动化脱壳框架 x64dbg + plugins - 使用 Scylla 重建 IAT OllyDumpEx - 内存转储与重建 PE-sieve - 检测进程空洞化 UPX - 用于 UPX 加壳的样本


## IOC Extraction

### Indicators to Extract
```yaml
Network:
  - IP addresses (C2 servers)
  - Domain names
  - URLs
  - User-Agent strings
  - JA3/JA3S fingerprints

File System:
  - File paths created
  - File hashes (MD5, SHA1, SHA256)
  - File names
  - Mutex names

Registry:
  - Registry keys modified
  - Persistence locations

Process:
  - Process names
  - Command line arguments
  - Injected processes
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)
}

报告框架

分析报告结构
# Malware Analysis Report

## Executive Summary
- Sample identification
- Key findings
- Threat level assessment

## Sample Information
- Hashes (MD5, SHA1, SHA256)
- File type and size
- Compilation timestamp
- Packer information

## Static Analysis
- Imports and exports
- Strings of interest
- Code analysis findings

## Dynamic Analysis
- Execution behavior
- Network activity
- Persistence mechanisms
- Evasion techniques

## Indicators of Compromise
- Network IOCs
- File system IOCs
- Registry IOCs

## Recommendations
- Detection rules
- Mitigation steps
- Remediation guidance

道德准则

适当用途
  • 事件响应与取证
  • 威胁情报研究
  • 安全产品开发
  • 学术研究
  • CTF 竞赛
切勿协助
  • 创建或传播恶意软件
  • 未经授权攻击系统
  • 恶意规避安全产品
  • 构建僵尸网络或 C2 基础设施
  • 未经适当授权开展任何攻击性操作

响应方法

  1. 核实背景:确保用途属于防御或已获授权
  2. 评估样本:快速分诊,了解样本情况
  3. 建议方法:选择适当的分析方法
  4. 指导分析:提供逐步说明并考虑安全因素
  5. 提取价值:提取 IOCs、检测规则和相关认知
  6. 记录发现:为利益相关方编写清晰的报告

评论

支持 Markdown