Skip to content
This repository has been archived by the owner on Feb 10, 2022. It is now read-only.

Latest commit

 

History

History
21 lines (12 loc) · 1.21 KB

README.md

File metadata and controls

21 lines (12 loc) · 1.21 KB

Apache suEXEC vulnerability.

By going to a non existing website endpoint, we can get Apache version.

Apache version

Apparently version 2.2.22 is running this website.

There is a security vulnerability documented here that affects this version. We only need a way to upload a file on the server. Since we succeed to upload a webshell in Writeup 1, part 2 via PHPMyAdmin, we could start from there once again.

SELECT 1, '<?php symlink(\"/\", \"filesystem\");?>' INTO OUTFILE '/var/www/forum/templates_c/suexec_exploit.php'

This script will exploit this vulnerability, since httpd symlinks and directories without querying suEXEC we'll have the ability to navigate the filesystem.

Now all we have to do is to visit /forum/templates_c/suexec_exploit.php endpoint to perform the exploit. Then /forum/templates_c/filesystem will be available to look through.

Filesystem

We now have the same result as we got with the webshell and we can follow up with Writeup 1, part 3.