Darkly is an educational exercise in the 42 curriculum aimed at understanding common vulnerabilities in web applications. By auditing a deliberately vulnerable application, this project aims to teach how to recognize and exploit flaws (XSS, injections, poor authentication management, etc.), understand OWASP recommendations, and propose corrective measures. This repository contains my notes, testing methods, and write-ups of the flags collected during the project.
Download the Darkly ISO, create a VirtualBox VM, attach the ISO, and configure a bridged network so the VM and your host appear on the same LAN (same subnet) and can reach each other directly.
To download Darkly iso: https://cdn.intra.42.fr/isos/Darkly_i386.iso
Follow these steps to place the VM and host on the same LAN/subnet.
-
Open VirtualBox → Settings (for your VM where you installed darkly.iso image) → Network
-
Adapter 1 → Enable Network Adapter
- Attached to: Bridged Adapter
- Name: Select your host's physical interface (e.g., eth0, enp3s0, Wi-Fi)
- Promiscuous Mode: Deny (or Allow VMs if needed)
- Cable Connected: Checked
-
Click OK/Save
-
Start the VM
-
Access the darkly_IP_Adress in your web browser
- If the VM uses DHCP, it should obtain an IP from the same network as the host.
- If necessary, configure a static IP in the VM (gateway and netmask must match the host network).
Tip
Use the exact same network for the local machine and the VM. Don't use a VPN.
Access the site in HTTP.
Refs:
Web_Parameter_Tampering
Refs:
Review_Webserver_Metafiles_for_Information_Leakage
Insecure_Direct_Object_References
Refs:
Session_Management_Cheat_Sheet
Cookie_Theft_Mitigation_Cheat_Sheet
Refs:
examining-the-database
SQL_Injection_Prevention_Cheat_Sheet
Refs:
examining-the-database
SQL_Injection_Prevention_Cheat_Sheet
Flag 06 - Directory Traversal - URL Route http://darklyIPaddress/../../
Refs:
Path_Traversal
01-Testing_Directory_Traversal_File_Include
Refs:
File_Upload_Cheat_Sheet
Tip
Use the most famous password's dictionnary
Refs:
Brute_force_attack
Intruder_getting_started - Useful only if you want to use Burp Suite Tool
Refs:
02-Testing_for_Stored_Cross_Site_Scripting
Refs:
Testing_for_Client_Side_URL_Redirect
Unvalidated_Redirects_and_Forwards_Cheat_Sheet
Flag 11 - Directory Enumeration - /.hidden
Refs:
Forced_browsing
Refs:
HTTP_Headers_Cheat_Sheet
bypassing-referer-based-defenses
Refs:
Preventing_cross-site-scripting
DOM_based_XSS_Prevention_Cheat_Sheet
Refs:
Web_Parameter_Tampering
