DVWA: Brute Force login low

From OnnoWiki
Jump to navigation Jump to search

Tutorial bagaimana caranya melakukan brute force attack untuk memperoleh passsword di DVWA dengan low securiry.

Kebutuhan Alat

  • Kali Linux
  • DVWA x1.9 jalan di mesin yang terpisah

Langkah 1: intelejen

Pekerjaan rumah yang harus di selesaikan:

  • apa yang terjadi saat user submit form?
  • apakah GET atau POST request?
  • kemana request tersebut di kirim?
  • bentuk data yang dikirim?

Kita akan menggunakan Burp Suite sebagai proxy.

HTTP request now:
Our browser -> Target server
HTTP request through a proxy:
Our browser -> Proxy server -> Target server


Dengan Burp Suite bekerja sebagai proxy, kita bisa melihat / inspect HTTP request yang terjadi.

Siapkan DVWA

  • login ke DVWA
  • Klik DVWA Security (di bagian bawah)
  • Ubah Security Level > Low
  • Klik Submit


Setup Proxy

Masuk ke

Applications > Favorites > burpsuite

Cek proxy running

Klik Proxy (Tap Kiri Atas) > Options

lihat bahwa:

  • proxy berjalan di 127.0.0.1:8080
  • kondisi running


Setup browser, di Kali Linux kita menggunakan Iceweasel. Pastikan proxy menggunakan burpsuite, caranya,

  • Klik kanan pada Iceweasel > aktifkan menu - supaya hidup kita mudah.
  • Klik Edit > Preferences > Advanced > Network > Settings
  • Pindahkan dari
 use system proxy settings > manual proxy configuration
  • Pastikan proxy di set ke burpsuite 127.0.0.1 port 8080

Silahkan browse ke sasaran dengan kondisi brupsuite interceptor on.

Analisa login request

Dengan interceptor enabled. Browse ke sasaran, misalnya,

http://target.site/DVWA-1.0/vulnerabilities/brute/
http://192.168.0.100/DVWA-1.0/vulnerabilities/brute/

Semua request dari browser akan di tahan oleh brupsuite. Kita dapat inspect, modify, drop, atau forward request tersebut.

Tanpa memasukan username / password, tekan tombol login. Lihat reqest yang ada di brupsuite. Kita harusnya melihat beberapa key info,

  • Ini adalah GET request
  • login paramater (username=&password=&Login=Login)
  • cookie (security=low; PHPSESSID=ahs8eugnukjkh9auegathrbfg5)

Dengan informasi ini kita dapat mebuat request yang sama, dan menggunakannya untuk brute force attack.

Step 2, the attack.

Our weapon of choice is THC Hydra. Hydra can perform rapid dictionary attacks against an authentication service.

Hydra has a bunch of options, to learn more about them just type hydra -h in the terminal for more info and examples.

Here’s the info we’re going to providing Hydra for our attack:

target server
URL path
username
password dictionary
cookie
failure message

For the username, we’re going to cheat a bit and assume we know the username is admin. You can also provide Hydra with username dictionary, but for now, we’ll just focus on the password.

The failure message is the response we get from the login form when submit a bad login. It’s just a string that Hydra searches the response HTML for to see if the login succeeded or failed. For instance, the message we get in red under the login form after a bad login attempt is “Username and/or password incorrect.”.

The complete command will look like this:

hydra 192.168.0.11 -l admin -P /usr/share/set/src/fasttrack/wordlist.txt http-get-form “dvwa/vulnerabilities/brute/index.php:username=^USER^&
password=^PASS^&Login=Login:Username and/or password incorrect.:H=Cookie: security=Low;PHPSESSID=eogppved743ckngeo0so6tnp87"

In action:

The tutorial for brute forcing on medium and high security will follow soon. If you got stuck or have any questions, leave a comment, I’ll do my best to get back to you.

If you’re ready, move on to the next tutorial for the medium security level.

Happy hacking,

Danny

Referensi