How nextkool/zphisher works
Main Components
• CLI/Orchestration Layer – This is driven by the main script (zphisher.sh), which is the entry point for launching the toolkit. It handles user inputs, dependency checks, and routing to the proper modules.
• Template Manager – Represented by the “.sites” directory. Each subdirectory (e.g., adobe, facebook, google, etc.) is a distinct phishing template with its own index.php, login pages, and additional resources. This layer encapsulates the various phishing page “modules.”
• Web Server/Runtime Environment – When a template is selected, the script initiates a PHP built-in server to serve the phishing pages.
• Tunneling/Exposure Module – This part manages the tunneling options (localhost, Ngrok, Cloudflared, etc.), which are used to expose the locally served pages to the public.
• Packaging & Deployment – Indicated by directories like “.package” (with DEBIAN and TERMUX subfolders), the Dockerfile, and make-deb.sh script. They handle the creation of installation packages or containers, ensuring the toolkit is easily distributable across platforms.
• Dependencies & External Tools – The README explicitly notes dependencies such as PHP, wget, curl, and git; these are external components that the system requires to operate.
Relationships and Interactions
• The user interacts with the CLI (zphisher.sh), triggering the main flow.
• The main script then allows the user to choose a phishing target/template from those available in the “.sites” directory.
• Once a template is selected, zphisher.sh configures and launches a local PHP server that serves the selected phishing page.
• Simultaneously, the script can initiate a tunnel (via Ngrok, Cloudflared, or localhost) using installed utilities, which then routes external requests to the local server.
• The packaging scripts (and Dockerfile) enable deployment or installation on different platforms; they can be shown as separate nodes that interact with the main script for building or deploying the package.
Architectural Patterns and Design Principles
• Modular Design: The separation between the main orchestrator (zphisher.sh), the phishing templates (.sites), and packaging components (.package, Dockerfile) indicates a modular approach.
• Layered Architecture: There is a clear division into layers – the user interface/CLI layer, the application logic (template selection and server launch), and the infrastructure (dependencies and tunneling exposure).
Detailing Essential Elements
• Core components:
• CLI Phase (zphisher.sh)
• Template Selection (each site under the “.sites” folder)
• Runtime PHP Server (index.php and supporting scripts in each template)
• Tunneling and URL masking mechanism (for Ngrok, Cloudflared, etc.)
• Configuration and packaging steps:
• The .package directory, make-deb.sh, and Dockerfile indicate different methods for distribution.