返回顶部
c

ctf-malwareCTF恶意软件分析

Provides malware analysis and network traffic techniques for CTF challenges. Use when analyzing obfuscated scripts, malicious packages, custom crypto protocols, C2 traffic, PE/.NET binaries, RC4/AES encrypted communications, YARA rules, shellcode analysis, memory forensics for malware (Volatility malfind, process injection detection), anti-analysis techniques (VM/sandbox detection, timing evasion, API hashing, process injection, environment checks), or extracting malware configurations and indic

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
130
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

ctf-malware

CTF 恶意软件与网络分析

针对恶意软件分析CTF挑战的快速参考。每种技术在此提供一行命令;完整代码详见支持文件。

前置条件

Python包(全平台):
bash
pip install yara-python pefile capstone oletools unicorn pycryptodome \
volatility3 dissect.cobaltstrike

Linux(apt):
bash
apt install strace ltrace tshark binwalk binutils

macOS(Homebrew):
bash
brew install wireshark binwalk binutils ghidra

手动安装:

  • - dnSpy — GitHub,.NET反编译器(Windows)

其他资源

  • - scripts-and-obfuscation.md - JavaScript去混淆、PowerShell分析、eval/base64解码、垃圾代码检测、十六进制载荷、Debian包分析、动态分析技术(strace/ltrace、网络监控、内存字符串提取、自动化沙箱执行)、恶意软件检测YARA规则、Shellcode分析(Unicorn Engine、Capstone)、恶意软件内存取证(Volatility 3 malfind、进程注入检测)、反分析技术(VM检测、定时规避、API哈希、进程注入)
  • c2-and-protocols.md - C2流量模式、自定义加密协议、RC4 WebSocket、基于DNS的C2、网络指标、PCAP分析、AES-CBC、加密标识、Telegram机器人恢复、Poison Ivy RAT Camellia解密
  • pe-and-dotnet.md - PE分析(peframe、pe-sieve、pestudio)、.NET分析(dnSpy、AsmResolver)、LimeRAT提取、沙箱规避、恶意软件配置提取、PyInstaller+PyArmor

何时切换

  • - 如果样本实际上只是普通的crackme、打包的挑战二进制文件或自定义虚拟机,没有恶意软件行为,请切换到/ctf-reverse。
  • 如果主要任务是网络重建、磁盘刻录或主机工件恢复,请切换到/ctf-forensics。
  • 如果挑战转向公开归因或基础设施追踪,请切换到/ctf-osint。

快速启动命令

bash

静态分析


file suspicious_file
strings -n 8 suspicious_file | head -50
xxd suspicious_file | head -20

PE分析

python3 -c import pefile; pe=pefile.PE(mal.exe); print(pe.dump_info()) | head peframe mal.exe

动态分析(沙箱环境!)

strace -f -s 200 ./suspicious 2>&1 | head -100 ltrace ./suspicious 2>&1 | head -50

网络指标

strings suspicious_file | grep -E [0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3} strings suspicious_file | grep -iE http|ftp|ws://

YARA扫描

yara -r rules.yar suspicious_file

混淆脚本

  • - 将eval/bash替换为echo以打印底层代码;提取base64/十六进制数据块并使用file分析。详见scripts-and-obfuscation.md

JavaScript与PowerShell去混淆

  • - JS:将eval替换为console.log,解码unescape()、atob()、String.fromCharCode()。
  • PowerShell:解码-enc base64,将IEX替换为输出。详见scripts-and-obfuscation.md

垃圾代码检测

  • - NOP滑板、push/pop配对、死写入、无条件跳转到下一条指令。过滤提取真实的call目标。详见scripts-and-obfuscation.md

PCAP与网络分析

bash
tshark -r file.pcap -Y tcp.stream eq X -T fields -e tcp.payload

在非常用端口上寻找C2。使用strings | grep提取IP/域名。详见c2-and-protocols.md

自定义加密协议

  • - 流密码在双向通信中共享密钥流状态;按时间顺序连接所有载荷。
  • ChaCha20密钥流提取:发送空字节(0 XOR 任何内容 = 任何内容)。详见c2-and-protocols.md

C2流量模式

  • - 信标行为、DGA、DNS隧道、带自定义头的HTTP(S)、编码载荷。详见c2-and-protocols.md

RC4加密的WebSocket C2

  • - 使用tcprewrite重新映射端口,添加RSA密钥进行TLS解密,在二进制文件中查找RC4密钥。详见c2-and-protocols.md

识别加密算法

  • - AES:0x637c777b S盒;ChaCha20:expand 32-byte k;TEA/XTEA:0x9E3779B9;RC4:顺序S盒初始化。详见c2-and-protocols.md

恶意软件中的AES-CBC

  • - 密钥 = 硬编码字符串的MD5/SHA256;IV = 密文的前16字节。详见c2-and-protocols.md

PE分析

bash
peframe malware.exe # 快速分类
pe-sieve # 运行时分析
pestudio # 静态分析(Windows)

详见pe-and-dotnet.md

.NET恶意软件分析

  • - 使用dnSpy/ILSpy进行反编译;使用AsmResolver进行程序化分析。LimeRAT C2:使用MD5派生密钥的AES-256-ECB。详见pe-and-dotnet.md

恶意软件配置提取

  • - 检查.data段、PE/.NET资源、注册表键、加密配置文件。详见pe-and-dotnet.md

沙箱规避检测

  • - VM检测、调试器检测、定时检测、环境检测、分析工具检测。详见pe-and-dotnet.md

反分析技术

VM检测(CPUID、MAC前缀、注册表、磁盘大小)、定时规避(sleep/RDTSC沙箱检测)、API哈希(ROR13/DJB2/CRC32 + hashdb查找)、进程注入(进程空心化、APC、CreateRemoteThread)、环境检测。详见scripts-and-obfuscation.md

PyInstaller + PyArmor解包

  • - 使用pyinstxtractor.py提取,使用PyArmor-Unpacker处理受保护代码。详见pe-and-dotnet.md

Telegram机器人证据恢复

  • - 使用恶意软件源码中的机器人令牌调用getUpdates和getFileAPI。详见c2-and-protocols.md

Debian包分析

bash
ar -x package.deb && tar -xf control.tar.xz # 检查postinst脚本

详见scripts-and-obfuscation.md

恶意软件检测YARA规则

编写YARA规则,匹配文件或内存转储中的字节模式、字符串和正则表达式。检测XOR循环({31 ?? 80 ?? ?? 4? 75})、base64数据块、编码的PowerShell。使用yarac编译以加快扫描速度。详见scripts-and-obfuscation.md

Shellcode分析

使用objdump -b binary -m i386:x86-64反汇编,使用Unicorn Engine模拟(安全挂钩系统调用),或使用Capstone进行程序化反汇编。查找XOR解码器存根。详见scripts-and-obfuscation.md

恶意软件内存取证

vol3 windows.malfind检测注入代码(无映射文件的PAGEEXECUTEREADWRITE)。windows.pstree揭示可疑的父子关系。使用yarascan.YaraScan进行YARA内存扫描。详见scripts-and-obfuscation.md

网络指标快速参考

bash
strings malware | grep -E [0-9]{1,3}\.[0-9]{1,3

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 ctf-malware-1775936243 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 ctf-malware-1775936243 技能

通过命令行安装

skillhub install ctf-malware-1775936243

下载

⬇ 下载 ctf-malware v1.0.0(免费)

文件大小: 15.35 KB | 发布时间: 2026-4-12 09:38

v1.0.0 最新 2026-4-12 09:38
Initial release of the ctf-malware skill.

- Provides quick-reference techniques and tool commands for malware analysis in CTF challenges.
- Covers static/dynamic analysis, obfuscated scripts, shellcode, PE/.NET files, network/PCAP analysis, C2 protocols, memory forensics, and anti-analysis techniques.
- Includes prerequisites and installation commands for required tools and libraries.
- Offers step-by-step quick start, tool usage, and pivot guidance to related skills.
- Links to supporting files for in-depth technique explanations and code examples.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部