Red Team Hands-On Lab: Bruteforce attack admin portal.
- Get link
- X
- Other Apps
Bruteforce attack admin portal
Introduction
A Red Team hands-on lab for brute-forcing an admin portal is a controlled exercise that simulates an attacker testing weak credentials, account lockout policies, MFA implementation, and logging/alerting set up an isolated test environment (or a purposely vulnerable app), seed it with varied user accounts and passwords, and capture telemetry so you can observe how defenses respond; use tools like Burp Intruder or Hydra with slow, measured attacks (or password-spraying techniques) while avoiding harm, validate success signatures on test accounts, and document every step and finding so defenders can tune rate limits, anomaly detection, and incident response and always run these exercises only with explicit written authorization.
In this blog we will make use of: nmap,hydra, docker/docker compose to simulate our exercise.
We firstly need to setup the vuln app using docker in our ubuntu vm.
Make sure to check the docker docs if u don't have it installed 👉 click here
hydra -l admin -P passwords.txt -f [The Target IP address] -s 5000 http-post-form "/login:username=^USER^&password=^PASS^:Login"
What each piece means:
-
hydra
— the program (a parallelized login cracker). -
-l admin
— use a single username (admin
). (-L
would be a file of usernames.) -
-P passwords.txt
— use the wordlist filepasswords.txt
for candidate passwords. (-p
would be a single password.) -
-f
— stop/exit as soon as a valid credential is found (fail-fast). -
<target-ip>
— the target host (replace with the real IP or hostname). -
-s 5000
— use TCP port5000
. -
http-post-form
— the Hydra module for submitting an HTTP POST form. Its argument is a triple with three parts separated by colons:-
the URL path to the login handler (e.g.
/login
), -
the POST body with placeholders
^USER^
and^PASS^
(hereusername=^USER^&password=^PASS^
), and -
a failure indicator string or pattern that Hydra looks for in the response to know the attempt failed (for example an “Invalid credentials” message). If that string is not present Hydra may treat the attempt as successful.
-
A few important notes: the exact http-post-form
triple must match the real form parameters and the web app’s failure message; incorrect values make the attack noisy + ineffective.
From a defensive point of view, look for many rapid login attempts from the same IP/username, spikes in authentication failures, and enforce rate-limiting, lockouts, MFA, and good logging to detect and block this behavior.
- Get link
- X
- Other Apps
Comments