npx skills add ...
npx skills add yaklang/hack-skills --skill hack
Entry P0 primary router and operating doctrine for HackSkills. Use when the task involves web application testing, API security assessment, recon, vulnerability triage, exploit path planning, authorized pentest, code audit, source-leak mining, middleware audit, SOC triage, detection engineering, incident response, or choosing the right next category skill before any deep topic skill. Also use when the user mentions 安全工程师, 渗透测试, 红队, 蓝队, 代码审计, 源码泄露, SRC. Enforce impact-first testing, finish the current asset cluster before expanding, follow half-chains to real control, and require live verification of secrets.
npx skills add yaklang/hack-skills --skill hack
This is the master quality gate and technical router for authorized bug bounty, web/API security, pentest, code audit, source-leak work, and (when the task is blue) SOC / detection / IR.
It does not replace specialized techniques. It makes the agent:
This file is a quality gate, not a capability ceiling. Surfaces not listed here stay in play if field evidence exists.
This file is not an exploit cookbook. Weaponized details live in deep topic skills and are used only on authorized targets.
Load on demand:
Complete in order. Stop if any item is missing:
assets/ (URLs, API inventory, script excerpts), evidence/ (requests, diffs, screenshots), reports/ (confirmed findings only).Do not expand onto unauthorized assets.
| User intent | Primary flow | Load |
|---|---|---|
| Pentest / red team / foothold / SRC | §§3–5 | RED_TEAM.md, TEST_MATRIX.md |
| Code audit / whitebox / find sinks | §3 R6 | CODE_AUDIT.md |
| Source leak / Git leak / secret leak | §3 R5 | SOURCE_LEAK.md, insecure-source-code-management |
| Middleware / gateway / component audit | §3 R7 | RED_TEAM.md middleware section, unauthorized-access-common-services |
| Alert triage / SOC / hunting | Blue quality gate | BLUE_TEAM.md |
| Detection rules | Blue B6 | BLUE_TEAM.md, template in EVIDENCE_REPORT.md |
| IR / forensics / containment | Blue B7 | BLUE_TEAM.md, memory-forensics-volatility, traffic-analysis-pcap |
| Write the report | §6 | EVIDENCE_REPORT.md |
When a task crosses red and blue, freeze evidence for the current phase before switching role.
With a URL or an application in hand, map the surface first: attack-surface-mapping. Portrait, business plane, JS/traffic inventory (keys not just paths), response classes, object graph. Do not scan into a blank portrait. Do not open with directory brute or payload spray.
| Signal | First direction | Load |
|---|---|---|
| Input reflects into HTML / JS | XSS / SSTI | injection-checking |
| Server fetches a URL / hostname | SSRF | ssrf-server-side-request-forgery |
| Accepts XML / Office / SVG | XXE | xxe-xml-external-entity |
| Path, filename, or download is controllable | Path Traversal / LFI | path-traversal-lfi |
| Many object IDs in APIs | IDOR / BOLA / BFLA | auth-sec, idor-broken-object-authorization |
| Login, reset, 2FA, sessions | Auth bypass / JWT / OAuth | auth-sec |
| Multi-step money, coupons, inventory, approval | Business logic / race | business-logic-vuln |
| MongoDB / JSON query syntax | NoSQL | nosql-injection |
| CLI tools, image processing, importers | Command injection | cmdi-command-injection |
| HTTP parse / front-back framing mismatch | Request smuggling | request-smuggling |
Node JSON / controllable __proto__ | Prototype pollution | prototype-pollution |
PHP weak compare / 0e hash | Type juggling | type-juggling |
| Repeated param names / WAF-app parse mismatch | HPP | http-parameter-pollution |
| One-time coupon / inventory / reset / invite | Race | race-condition |
| XML/XSLT templates | XSLT | xslt-injection |
.git / .svn / .env / backups / public buckets | Source leak | SOURCE_LEAK.md |
| CSV/Excel export | CSV formula | csv-formula-injection |
| WebSocket upgrade | WebSocket | websocket-security |
| Internal package names | Dependency confusion | dependency-confusion |
| Business API returns 401/403 | Path / method / header bypass | 401-403-bypass-techniques |
| Public middleware admin / default ports | Default creds, debug, version defects | unauthorized-access-common-services |
| Chat assistant with command tools | Does the tool actually execute | llm-prompt-injection |
| File upload / preview / convert | Upload chain — do not stop at store+download | upload-insecure-files |
| GraphQL / OAuth JWT / gateway | Matching specialty; tick done or write N/A | api-sec, jwt-oauth-token-attacks |
Opening one check class does not mean firing only that one shot. Walk the rest of the matrix.
Full pass/fail rules: TEST_MATRIX.md. Default order:
id / userId / tenantId / fileKey / openid / ciphertext PK)Do not stop on a half-chain. Upload that stores, OTP that sends, or a copied secret string is not done. Confirmed medium on an object: follow it to write / cross-user / takeover / execution before changing targets.
A full "please log in" with no business fields is not an injection surface. Empty list, error, and timeout are not "please log in".
Finish the current asset cluster before expanding.
Shortest path to influential control first. Each candidate: can the attacker harm a real user or system now? The report narrative is the attack chain; CVSS is an appendix. Tenant-admin "allowed in role" is still a finding if it reaches platform admin, other tenants, or other users. Rank findings with the impact ladder in RED_TEAM.md; layer 7 (pure compliance) is appendix-only.
Do not stop at ".git exposed" or "repo is public". SOURCE_LEAK.md: full tree plus history → inventory secrets and hidden surface → live-verify still-valid secrets with minimal read-only calls → treat the leak as a new attack-surface list.
CODE_AUDIT.md. No complete taint path, or sanitizer proven effective → do not file as confirmed.
Read official docs for the exact major version, build a checklist, leave a trace per item. A middleware conclusion with no comparison table is unfinished.
Success is shorter dwell time, not close-rate. Details: BLUE_TEAM.md.
If the full repository is present, prefer these together. Previously separate mini skills (payload-selection, brute-selection) were merged back into their main skills.
Points baseline models miss that hit often in real bounty work:
alg, kid, JWKS, key source — do not blindly spray.Default three layers by audience:
Use templates in EVIDENCE_REPORT.md. Medium and above: write to disk immediately. Severe: notify the authorized contact immediately.
Two gates before a finding is "confirmed":
.git or a secret string as mere info-leak; code audit that lists dangerous function names without source→sink.git is exposed: mine history and live-verify secrets, then treat it as a new surface list."Recommended skill name: hack
Search keywords: HackSkills, HACKING SKILLS, bug bounty, security engineer ops