Plethora
we will start with enumeration we ganna use Nmap to see what ports and services are running
as we can see we have a lot keep them in txt file we ganna use some of them later but for now
we have port 80 is open which means wh have a web service up and running
as we can see we have a web page
let's take a look at the source page
ok let's open one by one of that machines let's start with DVWA
------------------------------------
DVWA
DVWA is a well-known vul machine with username: admin and password: password
log in and go to command injection tap this vulnerability is about running a command on the server side so
we ganna use it to capture our flag
use: ping bing.com;cat /flag.txt
flag 1 Done! ✌
------------------------------------
XVWA
as we did with DVWA we ganna do it here navigate to OS Command injection tap
and run this
use: ping bing.com;cat /flag.txt
flag 2 Done! ✌
------------------------------------
Mutillidae
Mutillidae also is a well-known vul web app so we ganna navigate to command injection tap and
use: ping bing.com;cat /flag.txt
flag 3 Done! ✌
------------------------------------
JuiceShop
is this flag made me mad 👿
I tried everything but none of them work and suddenly something hit my head whatttt ! if I was able to get root access
then I will get this flag from inside the system!!!!!
so I moved on and get root access I searched for flags using this
use: find / -type f -name '*.txt' | grep flag
and bingo I found it
flag 4 Done! ✌
------------------------------------
Vulnbank
Vulnbank is a vuln web app you can download from Github
if you take a look at the project you ganna see that web app have a Remote Code Execution (ImageTragick, CVE-2016-3714)
vulnerability
first, you need to read robots.txt and you will found that /vulnbank/online/ is your way to get in do gobuster and you will
found login page at /vulnbank/online/login.php after a bit search on project repo the
default user name and password for that machine is j.doe:password so let's log in
we know that web app vulnerable to Remote Code Execution (ImageTragick, CVE-2016-3714) so let's navigate to
user profile to upload our payload
after a bit of search, I found all we need here imagetragick
so our payload will be
push graphic-context
viewbox 0 0 640 480
fill 'url(https://127.0.0.1/image.jpg";|cat /flag.txt > hack.txt")'
pop graphic-context
take this and save it into a file and name it as pic.png
and upload it as a profile pic
after upload, it navigates to this URL /vulnbank/online/hack.txt and you will found the flag!
flag 5 Done! ✌
------------------------------------
User flag
Now time to get into that machine
as we know we have a lot of ports open ssh is there so we need to get username and password
we ganna use enum4linux
use: enum4linux machine-IP
after a not long time we ganna see users enumeration popup
we have got two names and root user so we need to brute-force this user to get password we ganna use hydra for that
use: hydra -l username-you-found -P /location-to-rockyou.txt ssh://machine-IP
so we now have user name and password go and use it with ssh
and boom we are in and we cat user.txt
user flag Done! ✌
------------------------------------
Root flag
after we get user login we need to escalate our privilege to read root flag
first thing I search for is what command can that user do as root so run " sudo -l " as you can see this user
can run a lot of commands so I run
use: sudo /bin/bash
and here we goooo we are root
go to root folder and cat root.txt
Root flag Done! 😎
Comments
Post a Comment