INE CTF Web Application
π Initial Information
- Target:
http://target.ine.local - Environment: Kali Linux (GUI access provided).
- Provided Wordlists:
/usr/share/wordlists/dirb/common.txt/usr/share/seclists/Usernames/top-usernames-shortlist.txt/root/Desktop/wordlists/100-common-passwords.txt
π© Flag 1: Local File Inclusion (LFI)
Hint: βSometimes, important files are hidden in plain sight. Check the root (β/β) directory for a file named βflag.txtββ¦β
Explanation: The web application allows users to view files by passing a filename in the URL parameter, which is vulnerable to LFI.
Steps:
- Open your browser and navigate to
http://target.ine.local. - Browse the site and click on any file viewing links. You will notice the URL looks something like this:
http://target.ine.local/view.php?file=about.txt. - To exploit the LFI and read the file in the root directory, modify the
fileparameter to traverse up the directory tree:
(Note: You may need to add more ../ depending on the server's directory depth, or you can simply try the absolute path: ?file=/flag.txt).
4. The contents of flag.txt will be displayed on the screen. Copy this value into the Flag 1 submission box.
β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β -
π© Flag 2: Directory Enumeration
Hint: βExplore the structure of the serverβs directories. Enumeration might reveal hidden treasures.β
Explanation: We need to use a directory brute-forcing tool to find hidden directories on the web server.
Steps:
- Open a Terminal in your Kali Linux machine.
- Use the
dirbtool with the provided wordlist to scan for hidden directories:
dirb http://target.ine.local /usr/share/wordlists/dirb/common.txt
3. Wait for the scan to complete. Look through the output for interesting directories (e.g., /secured, /hidden, /admin).
Get Scorpionβs stories inΒ yourΒ inbox
Join Medium for free to get updates fromΒ thisΒ writer.
4. Navigate to the discovered directory in your browser. For example:
5. Look inside this directory. You will likely find a flag.txt file or the flag itself displayed on the page. Copy it into the Flag 2 submission box.
β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β
π© Flag 3: Weak Login Form (Brute Force)
Hint: βThe login form seems a bit weak. Trying out different combinations might just reveal the next flag.β
Explanation: The login page lacks rate-limiting or lockout mechanisms. We will use Hydra with the provided lists to brute-force the credentials.
Steps:
- Navigate to the login page in your browser (e.g.,
http://target.ine.local/login). - Try a dummy login (e.g., admin:admin) and note the exact error message (e.g., βInvalid username or passwordβ).
- Open your terminal and use
Hydra. Assuming the form usesPOSTwith the fieldsusernameandpassword:
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^:F=Invalid username or passwordβ
(Note: Adjust the /login path and the exact error message F=... if they differ on the actual page).
4. Hydra will output the valid credentials (e.g., guest:password123)
5. Go back to the browser, log in with these credentials, and the Flag 3 will be visible on your dashboard. Submit it.
β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β
π© Flag 4: SQL Injection (SQLi)
Hint: βThe login form behaves oddly with unexpected inputs. Think of injection techniques to access the βadminβ account and find the flag.β
Explanation: The login form is vulnerable to SQL Injection, allowing us to bypass authentication and log in as the admin user without knowing the password.
Steps:
- Go back to the login page.
- In the Username field, enter the following payload:
admin'--
' OR 1=1--
(Alternative payloads if the first one doesnβt work: admin' OR 1=1-- - or admin'#)
3. In the Password field, type anything random (e.g., 123456). The SQL comment -- will cause the database to ignore the password check.
4. Click the Login button. You will bypass authentication and be logged in directly as the administrator (admin).
5. The Flag 4 will be displayed on the admin dashboard. Copy and submit it.
β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β
Author: Scorpion
Cybersecurity | Penetration Testing | Linux Security | Red Teaming
Learning, practicing, and documenting one lab at a time.








