How hangetzzu/saycheese works
Project type and purpose (from README + tree)
Type: Small “toolkit” combining shell + PHP + static HTML/JS to host a web page that requests camera permissions and then sends captured data back to the server.
Purpose (as described): Drive-by camera capture through a link; the README explicitly frames it as malicious.
Architecture style: Single-node web “collector” + public tunneling/port-forwarding to expose it to the internet.
Top-level files strongly imply the runtime components:
• saycheese.sh
Orchestration script. Likely: starts a local web server, sets up a tunnel (Serveo/Ngrok), prints the public URL, and tails logs.
• saycheese.html
Client page (browser) that triggers camera permission and captures frames.
• post.php
Server endpoint that receives uploaded frames/data from the client.
• ip.php
Server endpoint that logs/collects visitor IP/user-agent (often used for “who clicked” tracking).
• template.php
Probably server-side template to generate the delivered page (or customize payload/redirects).
• README.md, LICENSE
Documentation/legal.
Operator environment (attacker/runner)
• Operator workstation (Kali/Termux)
• Runs saycheese.sh
• Stores outputs (captured images/logs)
Exposure layer (public ingress)
• Tunnel / Port-forwarding service
• “Public URL” entry point
• Routes inbound HTTPS traffic to the local machine
• This is a major trust-boundary crossing
Web server (local collector)
• Local HTTP server / PHP runtime
• Serves saycheese.html (possibly via template.php)
• Receives uploads via post.php
• Logs metadata via ip.php
Victim client (browser execution environment)
• Target device browser
• Loads page
• Runs client-side JS
• Requests camera permission via browser APIs
• Captures media stream and sends data back
Data stores / artifacts
Even if they’re just files on disk, model them explicitly:
• Filesystem storage
• Captured images (frames)
• IP logs / request logs
Operator → Tunnel Service
• Establishes tunnel / registers endpoint
Target Browser → Tunnel Service (HTTPS request)
• Requests the hosted page
Tunnel Service → Local Web Server
• Forwards inbound requests to local server
Local Web Server → Target Browser
• Responds with HTML/JS content
Target Browser → Local Web Server
• Sends telemetry (IP/user-agent gets logged)
Target Browser → Local Web Server
• Sends uploaded media/captured frames
Local Web Server → Filesystem
• Persists captured artifacts/logs
Operator → Filesystem
• Views/exports collected artifacts
Architectural patterns to highlight
• Client-driven capture: browser is the execution/runtime for media access; server mainly collects.
• Reverse tunneling as ingress: external service introduces a large attack surface and trust boundary.
• Minimal “backend”: PHP endpoints are thin collectors; state is typically files-on-disk.
• Trust boundaries:
• Public internet ↔ tunneling provider ↔ operator machine
• Browser sandbox ↔ device camera permissions
• Web server ↔ local filesystem
• Nodes: Operator device, Tunnel service, Target device
• Inside operator device: “Web server + PHP scripts” and “Storage”
• Processes: “Serve page”, “Log visitor metadata”, “Receive media upload”
• Data stores: “Captured images”, “IP logs”
• External entities: “Target browser”, “Tunnel service”, “Operator”
What “very detailed” means here (without being operational)
To be thorough, add annotations next to flows/components:
• Authentication: none / unknown (if not present)
• Transport: HTTPS terminated at tunnel vs local (trust implication)
• Data sensitivity: captured images, IPs, user-agent
• Retention: stored on disk (location/rotation if known)
• Abuse risks: unauthorized collection, privacy violations
• Mitigations (if this is a defensive review):
• Browser permission UX, enterprise policies disabling camera access
• Network egress controls / blocking known tunneling domains
• Server-side hardening if running in a lab (isolated VM, no public exposure)
• [Target Browser] → (HTTPS) → [Tunnel Service] → (forward) → [Local Web Server (PHP)]
• [Local Web Server] → [Filesystem: Captured Media]
• [Local Web Server] → [Filesystem: IP/Access Logs]
• [Operator] ↔ [Local Web Server/Filesystem] (view results, manage runtime)
That’s the “as many components as possible” decomposition, grounded in the actual repo files, but framed for architecture clarity and security assessment rather than operational misuse.