In this step, we will carefully examine the output from Hydra to identify which username and password combinations were successful in our SSH brute-force attack. Understanding these results helps demonstrate how weak credentials can be easily exploited.
-
First, let's navigate to our working directory where Hydra stored its output files:
cd ~/project
This ensures we're in the right location to access our results.
-
View the raw Hydra output file that was generated during the attack:
cat results.txt
You should see output similar to this, showing any successful credential pairs:
[22][ssh] host: localhost login: testuser password: password123
Each line represents a successful login attempt with the corresponding credentials.
-
To get an overview of the attack's effectiveness, check the summary statistics:
grep "successfully completed" results.txt
This command filters out just the summary line that shows total attempts made and how long the attack took.
-
Let's verify these credentials actually work by attempting an SSH login:
ssh testuser@localhost -o StrictHostKeyChecking=no
When prompted, enter the password password123
. After successful login, type exit
to return to your main terminal. This practical test confirms the credentials are valid.
-
Create a simple security report documenting our findings:
echo "Security Test Report" > report.txt
date >> report.txt
echo "Compromised Credentials:" >> report.txt
grep -A 2 "successfully completed" results.txt >> report.txt
This creates a timestamped document containing the vulnerable credentials and attack statistics.
-
Finally, view the completed security report:
cat report.txt
This gives you a clean, organized view of the security vulnerabilities discovered during the test.