HachTheBox, web challenges: Lernaean walkthrough

Nouf
2 min readMar 27, 2020

--

Hello Hackers!

Today I am going to talk about Lernaean Web Challenge in HTB.

As it is written “Don not guess the password”, I thought the flag could be the reverse of this statement, so I just tried to guess the password by trying the common passwords eg admin, password but it did not work, and keep in mind the error message that appears “Invalid password!”

figure 1

As the field does not have an input validation and the error message appears, I tried to do SQL injection using burp suite, but it did not work

figure 2 captured request

I just googled the name of the website “Lernaean” and look what appeared!

Hydra sounds familiar right? lets go to it

I ran hydra using the per-installed world list

lets break what I wrote hydra -l admin -P /usr/share/wordlists/rockyou.txt docker.hackthebox.eu http-post-form ‘/:password=^PASS^:Invalid password!’ -s 30401

  • -l for the username which is admin
  • -p for the password worldlist
  • then the website’s address
  • http-post-form means the type of the request
  • ‘/:password=^PASS^ means i want hydra to brute force the password
  • :Invalid password! is the error message that appears when you entered a wrong password
  • -s means the port

as it appears, the password is leonardo so I put this password in the captured request and the flag appeared

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Nouf
Nouf

Written by Nouf

PenTester & Challenges Solver

No responses yet