Skip to content

Commit 63b5ac7

Browse files
authored
Update wsgi.md
1 parent 3d0de68 commit 63b5ac7

File tree

1 file changed

+10
-0
lines changed
  • src/network-services-pentesting/pentesting-web

1 file changed

+10
-0
lines changed

src/network-services-pentesting/pentesting-web/wsgi.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,16 @@ Combine `UWSGI_CHDIR` with a file-serving helper to browse sensitive directories
181181
- If uWSGI runs with elevated privileges and writes sockets/pids owned by root, abusing env and directory changes may help you drop files with privileged owners or manipulate runtime state.
182182
- Overriding configuration via environment (`UWSGI_*`) inside a file loaded through `UWSGI_FILE` can affect process model and workers to make persistence stealthier.
183183

184+
```python
185+
# malicious_config.py
186+
import os
187+
188+
# Override uWSGI configuration
189+
os.environ['UWSGI_MASTER'] = '1'
190+
os.environ['UWSGI_PROCESSES'] = '1'
191+
os.environ['UWSGI_CHEAPER'] = '1'
192+
```
193+
184194
## Reverse-proxy desync issues relevant to uWSGI chains (recent)
185195

186196
Deployments that use Apache httpd with `mod_proxy_uwsgi` have faced recent response-splitting/desynchronization bugs that can influence the frontend↔backend translation layer:

0 commit comments

Comments
 (0)