Prerequisites
Before beginning installation, ensure you have:- A Debian 11 (Bullseye) server with public IP address
- Root or sudo access
- A registered domain name with DNS control
- API credentials for your DNS provider (for automatic TLS certificates)
- x64 architecture (ARM is not fully supported)
ARM Warning: Chromium is not supported on ARM architectures. While technically possible to force ARM Chromium binaries, you will lose additional features and protections provided by puppeteer-extra.
Step 1: Clone Repository
Clone the CuddlePhish repository to your server:Step 2: Install Dependencies
Run the dependency installation script to install Docker, Node.js, Xvfb, and required system libraries:What Gets Installed
The installation script installs the following components: Docker Components- docker-ce
- docker-ce-cli
- containerd.io
- docker-buildx-plugin
- docker-compose-plugin
- nodejs
- npm
- xvfb (X Virtual Frame Buffer)
- libnss3
- libasound2
- libgbm-dev
- libgtk-3-0
Additional Dependencies for Kali Linux
Additional Dependencies for Kali Linux
If running on Kali Linux, you may need additional libraries. Uncomment the last line in
install_deps.sh:Step 3: Install Node.js Dependencies
Install the required Node.js packages:- fastify: Web framework for the HTTP server
- fastify-socket.io: WebSocket support for real-time communication
- puppeteer: Headless Chrome automation
- puppeteer-extra and puppeteer-extra-plugin-stealth: Stealth plugins to evade detection
- xvfb: Node.js wrapper for X Virtual Frame Buffer
- bootstrap and jquery: Frontend UI dependencies
Step 4: Configure Caddy Reverse Proxy
Caddy handles TLS certificate management, reverse proxying, and basic security filtering.Build Caddy with DNS Provider Plugin
The Dockerfile builds Caddy with the Gandi DNS provider plugin. If using a different DNS provider, modify the Dockerfile:Configure Caddyfile
Edit theCaddyfile to configure your domain and DNS provider credentials:
- Replace
your-phishing-domain.comwith your actual domain - Replace
YOUR_PROVIDERwith your DNS provider (e.g., gandi, cloudflare, route53) - Replace
YOUR_API_KEYwith your DNS provider API credentials
Start Caddy
Run Caddy in a screen or tmux session for persistence:Ctrl+A then D to detach from the screen session.
Alternative Reverse Proxies: You can use nginx or Apache instead of Caddy. The key requirements are TLS termination and passing the
X-Real-IP header to the backend.Step 5: Configure CuddlePhish
Edit config.json
CRITICAL: Configure the admin access controls and socket key:- default_user_agent: User-Agent string sent by automated browsers to target sites
- socket_key: Shared secret for admin WebSocket authentication (change from default!)
- admin_ips: Array of public IP addresses allowed to access /admin interface
Optional: Configure Proxy
If your target requires traffic to route through a proxy, add a proxy configuration:Optional: Configure Phishmonger Integration
For logging integration with a phishing campaign management server, createpm.json:
- Victim clicks
- POST request data matching the URL pattern
- Victim IP addresses and tracking IDs
Step 6: Add Target Services
Use theadd_target.js script to configure target login pages:
- Launches a headless browser and navigates to the URL
- Extracts the page title for use with
--auto-select-desktop-capture-source - Attempts to download the favicon for spoofing
- Creates an entry in
targets.jsonwith configuration
- login_page: URL of the target login page
- boot_location: URL to redirect victim when using “Boot User” feature
- tab_title: Browser tab title used for WebRTC screen capture selection
- favicon: Filename of the favicon saved in
favicons/directory - payload: Default payload file to send to victims
Troubleshooting Favicon Extraction
Troubleshooting Favicon Extraction
If the script fails to extract the favicon automatically:
- Manually download the target’s favicon
- Save it as
favicons/servicename.ico - Update the
faviconfield intargets.json
- Passive capture from network responses
- Active extraction from
<link rel="icon">elements - Desperate fallback attempts with broader MIME type matching
Add Multiple Targets
Runadd_target.js multiple times to configure multiple services. Each target is identified by its shortened domain name (e.g., “example” for “example.com”).
Step 7: Configure STUN/TURN Servers
CuddlePhish uses STUN servers to establish WebRTC connections. The default configuration uses Google’s public STUN server.Default STUN Configuration
The default STUN configuration incuddlephish.html and broadcast.html:
TURN Server Configuration (Optional)
For better reliability and to support more network configurations, configure a TURN server:cuddlephish.html(victim-side)broadcast.html(browser-side)
TURN Server Requirement: TURN servers provide the highest success rate for establishing WebRTC connections, especially when victims are behind restrictive NATs. However, they require hosting your own server or purchasing access to a TURN service.
Network Requirements
WebRTC requires specific NAT types:- Supported: Full-cone NAT, Address-restricted-cone NAT, Port-restricted cone NAT
- Not Supported: Symmetric NAT
Step 8: Launch CuddlePhish
Start the Node.js server, specifying which target service to use:example with the service name (key) from your targets.json.
Press Ctrl+A then D to detach from the screen session.
Startup Process
When launched, CuddlePhish:- Loads configuration from
config.jsonand target fromtargets.json - Starts Fastify web server on port 58082
- Spawns an initial “empty phishbowl” Chrome instance with Xvfb
- Navigates the browser to the target login page
- Loads
broadcast.htmlin a second tab to initialize WebRTC - Browser checks in via WebSocket
- Server waits for victim connections
Expected Console Output
Successful startup shows:Verification
Test Admin Interface
-
From an IP address in your
admin_ipswhitelist, navigate to: - You should see the CuddlePhish admin interface (no sessions will be visible until victims connect)
Test Victim Interface
From any browser, navigate to:- The spoofed favicon in the browser tab
- The spoofed page title from your target
- A video stream of the target login page
File Structure
After installation and configuration, your directory structure should include:Next Steps
After successful installation:- Review the Usage Guide for operational procedures
- Familiarize yourself with Admin Features
- Review Troubleshooting for common issues
- Understand Credential Extraction methods