บทนำ (Overview)
บทความนี้ต่ออธิบายวิธีการค้นหาช่องโหว่ Directory listing ดังต่อไปนี้
ขั้นตอน (Steps)
Setup the lab
- ดาวน์โหลด และติดตั้ง Sedna บน VirtualBoxVM https://download.vulnhub.com/hackfest2016/Sedna.ova
Download and install Sedna on VirtualBoxVM.
- ค้นหา IP เป้าหมาย โดยตัว VM คือ Ubantu
Find the assigned IP.
Gather information
- เมื่อทราบ IP เป้าหมายแล้วให้ทำการค้นหา port และรายละเอียดเพิ่มเติมของ port ตั้งแต่ port หมายเลข 1 ถึง 65535 ดังนี้
When we known the target IP, tried to scan ports from number 1 to 65535.nmap -A -v -p 1-65535 192.168.1.49
- จากผลการค้นหา port เราพบว่ามี port หมายเลข 80 อยู่นั้นหมายความว่าสามารถเข้าถึง port โดยผ่าน Web browser ดังนี้
From the scanning result, we found that the port number 80 is opened (HTTP). Tried to access the mentioned port through a web browser.http:// 192.168.1.49
- เราสามารถหาหน้าเว็บเพจเพิ่มเติมโดยใช้โปรแกรม ดังนี้
We can find the other web pages from the IP we found as the followings:nikto nikto -host http://192.168.1.49/
- หรือใช้โปรแกรม Dirbustor
Sample of using DirbustorDirbustor dirb http://192.168.1.49/ /usr/share/wordlists/dirb/big.txt
- หรือใช้โปรแกรม WFUZZ
Sample of using WFUZZWFUZZ wfuzz --hc 404,405 -w /usr/share/seclists/Discovery/Web_Content/big.txt http://192.168.1.49/FUZZ
- ผลจากการใช้งานโปรแกรมดังกล่าวเราสามารถค้นไดเรกทอรีเพิ่มเติม และทดลองเข้าถึงผ่านเว็บบราวเซอร์ดังนี้ จากตัวอย่างเราพบช่องโหว่ของ Directory listing
From the scanning result, we could discover the interesting files and directories as the followings: