we can read any file mention above , so when i read the file "listfiles.php" i get this :-
Array ( [0] => . [1] => .. [2] => browse.php [3] => index.php [4] => info.php [5] => ini.php [6] => listfiles.php [7] => phpinfo.php [8] => pwdbackup.txt )
Not only this , the parameter is also vulnerable to LFI
Initial access points
there are 3 ways through which we can get inside the machine :-
ssh as charix
race condition in phpinfo
log poisoning
shell as charix
pwdbackup.txt
After reading the file i got a password which is 13 times base64 encoded , so after decoding it i got it and i used it for ssh as "charix" user , as this user is also listed in "/etc/passwd" and also the password also start with the name , so i just gave SSH a try
privesc charix => root
i got a secret.zip file in home directory of charix , after transfer it to my machine i try to read it but i fot this :-
ps auxw
i check services on target machine , and this got my attention
VNC is running on target , on port 5901 and as root
Letβs examine the command line options:
:1 - display number 1
-rfbauth /root/.vnc/passwd - specifies the file containing the password used to auth viewers
-rfbport 5901 - tells us which port to connect to
localhost - only listen locally
confirming the service (on target machine)
i just want to confirm the vnc service
ssh local port forwarding
we can't access vnc server , as it is running on localhost so we have to forward this server on our localhost :-
confirming the service (on my machine)
i downloaded vncviewer on my machine , but when i try to access , it ask for password
secret
Maybe , the secret file conatain the vnc server password
i downloaded a py script to decrypt the password and i got successfull
script :-