How h4ckzu5/ransomware works
Project type and purpose
• This is a small, web-based ransomware tool written in PHP.
• Its goal is to encrypt files on a target host via a PHP script (RansomWare.php), display a ransom note in the browser, and later restore files once payment instructions are followed.
File structure
• Top level:
• README.md – project description and basic instructions
• RansomWare.php – the core PHP script that performs encryption, notes, and decryption
• The README mentions auxiliary files (.htaccess, shor7cut.php) that are auto-created or should be deleted after restoration.
• No frameworks or databases—pure PHP plus the web server’s file system.
Extract insights from the README
• Open-source PHP ransomware, intended to be deployed on any PHP-enabled web host.
• After decrypting files, the operator must remove the .htaccess and shor7cut.php “shortcut” drop-off script.
Main components
a. Web Server
– Apache or Nginx with PHP-FPM
b. PHP RansomWare Module (RansomWare.php)
– Scans filesystem, encrypts files (OpenSSL or built-in PHP functions), drops ransom note in HTML
– Creates .htaccess to force all requests to a “payment” landing page
– Generates shor7cut.php for decrypt routine
c. Victim File System
– The directory tree containing target documents/images/etc.
d. Victim Browser UI
– The ransom note page where payment instructions are shown
e. Attacker Key Management (external, conceptual)
– Could be an external API or email mechanism to deliver decryption keys once payment is confirmed
Relationships and interactions
• Victim’s browser → HTTP GET to Web Server → PHP script executes
• RansomWare.php ↔ Victim FS: encrypt()/decrypt() calls
• RansomWare.php → drops ransom-note.html + .htaccess + shor7cut.php
• After payment, victim invokes shor7cut.php → PHP decrypt routine uses stored key to restore files
• (Optional) PHP script sends payment confirmation to Attacker Key Management → returns decryption key
Architectural patterns and design principles
• Single-tier, server-centric application (no separate backend service or database)
• Script-driven lifecycle:
• Initialization (scan & encrypt)
• Ransom note display (UI)
• Decryption stage (triggered by shor7cut.php)
• Minimal external dependencies: relies on PHP’s encryption extensions and the web server.
Relevant technologies, frameworks, or libraries
• PHP (core language)
• PHP OpenSSL or Mcrypt (for symmetric/asymmetric encryption)
• .htaccess (Apache config) or equivalent rewrite rules
• shor7cut.php (decryption entry point)
Elements
• Clear labels for each component (Web Server, PHP Script, File System, Browser, Attacker Service)
• HTTP requests/responses
• File read/write (encryption/decryption)
• Key exchange to Attacker Service
• Local FS and encryption routines in another
• External/attacker elements in a third