How cybsam/blackeye-v2 works
Project type and purpose
• This is a command-line phishing toolkit (“BlackEye”) written as a Bash script (blackeye.sh) that automates the deployment of prebuilt phishing site templates.
• Its purpose is to present a fake login page for a selected brand, capture visitor IP and credentials via PHP scripts, log them locally, and optionally expose the local server to the Internet via a tunneling service (ngrok, serveo, etc.).
File structure
• Top-level:
• blackeye.sh – the main orchestration script (CLI menu, environment setup, server launch, tunnel setup)
• package.json – (likely defines any Node-based helper dependencies, e.g. local HTTP-server)
• sites/ – directory of one subfolder per target brand. Each subfolder contains:
– static assets (HTML, CSS, JS, images) for the phishing page
– ip.php – captures/logs visitor IP
– login.php – captures/logs credentials
– auxiliary files (e.g. contentscript.js, themes, upload folders)
• No database layer – logs are flat files under each sites/<brand>/ folder.
• No external backend besides the optional tunneling endpoint.
README for additional insights
• Describes version history and lists supported sites.
• Usage is strictly “git clone; cd blackeye; bash blackeye.sh”.
• Relies on PHP’s built-in web server and 3rd-party tunnel service to expose port 8080/4444.
Main components
a. Orchestration Layer (CLI)
• Component: blackeye.sh (Bash)
• Responsibilities: show menu, select template, start PHP server, start tunnel, monitor logs.
b. Web Server Layer
• Component: PHP built-in server (php -S) and/or local HTTP-server (if package.json used)
• Responsibilities: serve static assets, process ip.php and login.php.
c. Template Store
• Component: sites/<brand>/ directories
• Responsibilities: host phishing pages (HTML, CSS, JS, images) and capture scripts.
d. Tunneling Service (External)
• Component: ngrok / serveo / LocalXpose
• Responsibilities: map local port to a public URL for victim access.
e. Victim Browser (External User)
• Component: End-user accessing the phishing URL
• Flow: requests page → served by local PHP server via tunnel → submits form → PHP logs data.
f. Data Store (Local Files)
• Component: files under sites/<brand>/ (e.g. usernames.txt, ip.txt)
• Responsibilities: persist captured IPs and credentials.
Relationships and interactions
• blackeye.sh → launches → PHP server
• blackeye.sh → launches → Tunnel service (binds to PHP server port)
• Victim Browser → HTTP(S) request → Tunnel service → local PHP server → serves phishing page
• Victim Browser → POST credentials → PHP scripts → write to local log files
• blackeye.sh monitors log files and prints captured data to console
Architectural patterns and principles
• Modular template storage: each site is a plug-and-play folder.
• Orchestration ‑- single point of control (the shell script).
• File-based logging: no database → simplifies dependency management.
• Stateless web server for assets + minimal dynamic endpoints for capture.
Key technologies, frameworks, and libraries
• Bash (blackeye.sh)
• PHP built-in web server (no Apache/nginx required)
• Optional Node HTTP-server (per package.json)
• 3rd-party tunnel services (ngrok, serveo)
• Static assets: HTML, CSS, JavaScript templates
Detail without overcomplication
• Of the sub-components (CLI, Web Server, Tunnel, Capture Endpoints, Logs).
• Essential interactions so that a reader can trace how a phishing session is bootstrapped, served, and data recorded.