This repository documents how I hosted a PHP-based ransomware C2 dashboard on the dark web using Tor Hidden Services and Apache2, as part of my graduation project.
π¨βπ» Developed by: Yazan Al-Balawi
π« An-Najah National University β Cybersecurity Graduation Project (2025)
This setup uses:
- Apache2 to serve a PHP-based dashboard (
/var/www/html/prjrans/public) - Tor to expose it as a
.onionservice - Configuration of
.htaccessandVirtualHostto route URLs and allow clean access
/var/www/html/prjrans/public/ --> C2 Dashboard files (PHP)
βββ login.php, dashboard.php, ...
/var/lib/tor/hidden\_service/ --> Tor hidden service data
/etc/apache2/sites-available/000-default.conf --> Apache virtual host config
/etc/tor/torrc --> Tor config for .onion site
sudo nano /etc/apache2/sites-available/000-default.confSet DocumentRoot:
DocumentRoot /var/www/html/prjrans/public
Add directory access rules:
<Directory /var/www/html/prjrans/public>
AllowOverride All
Require all granted
</Directory>Then restart:
sudo systemctl restart apache2π 2. Enable .onion Hidden Service via Tor
Edit:
sudo nano /etc/tor/torrcUncomment or add:
HiddenServiceDir /var/lib/tor/hidden_service/
HiddenServicePort 80 127.0.0.1:80
Then restart Tor:
sudo systemctl restart torsudo cat /var/lib/tor/hidden_service/hostnameThis will show something like:
xj37cxuv4ghodd54jxrmamhy5gv3ngloco4u26yy3gbttahnx5rfhad.onion
Access it via Tor Browser.
Inside /var/www/html/prjrans/public/.htaccess
Options -Indexes
DirectoryIndex login.php
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php [L]This setup is part of an educational project that demonstrates how real-world ransomware C2 infrastructure can be stealthily hosted on the darknet for security research and awareness.
For educational and ethical research purposes only. Do not use in unauthorized systems or real-world environments.
