A walkthrough from VULHUB -- > Skytower

A walkthrough from VULHUB -- > Skytower 

Credit goes to Telspace Systems who made this machine..  :)

Task: To Enumerate the Target Machine and Get the Root flag.txt

Penetration Methodologies

  • Network Scanning
    • Netdiscover
    • Nmap Scan
  • Enumeration
    • Browsing HTTP Service
    • Sql-Injection
    • Setting proxychains to connect to ssh
    • Getting ssh connection using credentials
  • Exploitation
    • Enumerating login page -> getting login credentials
  • Privilege Escalation
    • Using su permissions (accounts) 

Walkthrough

IP address discover 

Using nmap i found the host IP :







Now we have the target machine IP.It's time to have fun penetrating this box using our mindblowing skills...ohhh yes ... :)

using Nmap :

:: nmap -sSVC -S 192.168.1.9 -o nmap

nmap  is the output file of nmap and SVC and A you can be guided by nmap




As, the nmap run it's script let's surf the in browser whether it have server or it



There was nothing interesting in source code.
That's login page and quite interesting .hmmm.I tried sql injection and got access to john account BOOOOOOOOOOOOM....
sql injection
for user name = '*'
and password also same ='*'








That's fast Woooooow
let's see the nmap result




















Hmmmm ... ssh http and proxychains port detected

Let's try SSH to access the server account john using credentials that we found using using SQL injection





Seems like we cannot connect to the ssh .Let's try using proxychains but first of all we have to add config the proxy

use your favrouite text editor and go to /etc/proxychains.config




and add in last line

http 192.168.1.9 3128



Now try login to ssh john usng
proxychains ssh john@192.168.1.9 /bin/bash
and password hereisjohn

BoooooooM we got the ssh connection.quite easy now we have to enumerate the box



I tried to exploit box but that was not the method.Therefore, i go to /var/www/
and i found a login.php where i found the msql login credential


So, i quickly login to mysql.



and got the Table SkyTech database
show database;



So, i select the SkyTech and then ,



List the tables using 
show tables;


I found the unencrypted credentials for sara and william and without wasting time i login to sara using ssh but using proxychains

As , i login into the sara account using credentials



Then i enumerate and did not found anything interesting and then i check the permission and sudo -l and found some accounts which can be run as sudo without password


 Finally the flag.txt
wow that's pretty easy box




Author: Codiebruh is an Tech guy and has a keen interest in technology. contact Contact here

Comments

Popular posts from this blog

Wordpress Reverse Shell

EVM: 1 Vulnhub Walkthrough

Chanakya Vulnhub Walkthrough