opsec
它能做什么
本指南讲解获得授权的安全测试的运行安全,包括范围检查、扫描节奏和证据处理。适合需要让工作保持可控并有文档记录的安全测试人员。
适用场景
- ✓当团队准备获得授权的测试,需要范围和节奏清单时。
- ✓当扫描可能触发告警或影响生产系统,应当放慢速度时。
- ✓当测试必须有足够的文档记录,以证明其已获授权时。
技能链接
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/shared/opsec/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“在我们开始获得授权的测试之前,你能检查一下我们的范围、扫描节奏和文档计划吗?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会逐项核对交战规则、范围和测试时间窗口的清单,然后建议适合目标的扫描速率和文档记录做法。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Operational Security (OPSEC) Knowledge Base
OPSEC ensures the red team engagement remains covert, controlled, and within authorized scope. Poor OPSEC burns the engagement — detected scans alert the blue team, taint findings, and waste client resources. This skill applies across all recon phases.
1. Core OPSEC Principles
The OPSEC Mindset
- Every packet is a signal — assume the target has IDS/IPS, SIEM, and SOC analysts
- Minimize footprint — collect only what you need, no more
- Blend with normal traffic — timing, volume, and patterns should look legitimate
- Know your tools' signatures — every scanner has a fingerprint
- Document everything — if you can't prove it was authorized, it wasn't
Engagement Scope Awareness
Before ANY active operation:
- Written Rules of Engagement (ROE) on file
- Target IP ranges and domains explicitly listed
- Out-of-scope assets clearly identified
- Testing window defined (dates, times)
- Emergency contact for the client (for accidental impact)
- Get-out-of-jail letter accessible
2. Network OPSEC
Scan Rate Limiting
| Target Type | Recommended Rate | Timing Flag |
|---|---|---|
| Production web server | 5-10 req/sec | nmap -T2 |
| Internal network | 50-100 req/sec | nmap -T3 |
| Development/staging | 100+ req/sec | nmap -T4 |
| High-security target | 1-2 req/sec | nmap -T1 |
| WAF-protected | 1-5 req/sec | Custom delays |
Traffic Shaping
# nmap with specific rate limiting
nmap -sS --max-rate 10 --max-retries 1 -p 80,443 <target>
# ffuf with rate limiting
ffuf -u https://<target>/FUZZ -w wordlist.txt -rate 5
# nuclei with rate limiting
nuclei -u https://<target> -rl 5 -c 2
# curl with delay between requests
for url in $(cat urls.txt); do
curl -s -o /dev/null -w "%{http_code} $url\n" "$url"
sleep 2
done
Timing Considerations
- Business hours (9am-5pm target timezone): Higher baseline traffic → scanning blends in
- Weekends/holidays: Lower baseline → scans stand out more
- Maintenance windows: If known, ideal for aggressive scanning
- Burst vs sustained: Short bursts with long pauses are less detectable than sustained scanning
3. HTTP OPSEC
User-Agent Management
Important: User-Agent strings become stale quickly. Always use current browser version strings that match real-world traffic at the time of engagement. Check your own browser's UA or query a live UA database before starting.
# Step 1: Get a current, real User-Agent from your own browser or a live source
# Option A: Copy from your browser's DevTools (Network tab → Request Headers)
# Option B: Use a curated list — update version numbers to match current releases
# Step 2: Build a rotation list with CURRENT versions
# Template — replace <CHROME_VER> and <FIREFOX_VER> with latest stable versions
UA_LIST=(
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<CHROME_VER> Safari/537.36"
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<CHROME_VER> Safari/537.36"
"Mozilla/5.0 (X11; Linux x86_64; rv:<FIREFOX_VER>) Gecko/20100101 Firefox/<FIREFOX_VER>"
"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:<FIREFOX_VER>) Gecko/20100101 Firefox/<FIREFOX_VER>"
)
UA="${UA_LIST[$RANDOM % ${#UA_LIST[@]}]}"
curl -s -A "$UA" https://<target>/
# ffuf with custom user agent
ffuf -u https://<target>/FUZZ -w wordlist.txt -H "User-Agent: $UA"
Header Hygiene
# Avoid tool-specific headers that reveal scanner identity
# BAD: Default tool user agents
# - "Nmap Scripting Engine"
# - "nikto"
# - "gobuster"
# - "sqlmap"
# GOOD: Mimic real browser headers (use current browser versions!)
curl -s https://<target>/ \
-H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 Chrome/<CURRENT_VER> Safari/537.36" \
-H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8" \
-H "Accept-Language: en-US,en;q=0.9" \
-H "Accept-Encoding: gzip, deflate, br"
4. Tool Signature Awareness
Common IDS/WAF Signatures
| Tool | Detection Signature | Mitigation |
|---|---|---|
| nmap | SYN scan pattern, probe ordering | Use -T2, --data-length |
| nikto | Default User-Agent, predictable paths | Custom UA, selective tuning |
| sqlmap | Parameter tampering patterns | Not applica |
常见问题
测试前应确认什么?
指南列出:书面的交战规则、明确的范围、范围外资产、测试时间窗口以及客户联系人。
为什么要限制扫描速率?
快速扫描可能触发告警并影响生产系统,因此指南建议对敏感目标使用较慢的速率。
为什么要记录一切?
指南称,如果无法证明测试已获授权,就不应将其视为已获授权。
详情
作者的原始描述
Operational security management — traffic shaping, scan rate limiting, source IP management, tool signature avoidance, evidence handling, anti-detection patterns.
热度
- GitHub 星标
- 6.5k
- 排名
- #13931
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/1
评论
- …