<aside> 💡 Turn on dark 🌒 mode with cmd/ctrl + shift + L

</aside>



1. Brute Force

Objective: Your goal is to get the administrator’s password by brute forcing. Bonus points for getting the other four user passwords!

觀察

可以發現多了一組 user_token 來阻礙你,每次重整或送出後會改變

Untitled

跟被埋在前端的 CSRF token 的概念一樣,所以只要想辦法將它一起送出就 ok 了

Untitled

只要在腳本從 DOM 中擷取這段 token 後,送出就行了,接下來就跟 medium 難度一樣,慢慢等待

加上 token 的 request

# try apssword
curl -v -c cookies.txt -b cookies.txt \\
"<http://dvwa.localtest/vulnerabilities/brute/index.php?username=${USER}&password=${LOGIN_PASSWORD}&Login=Login&user_token=${TOKEN}#>"

驗證分別送兩次 curl requst 是可行的,第二個 request (# try apssword 這段) 不加上 -L 的跳轉參數,以及直接 GET 更新密碼的 endpoint ( "<http://dvwa.localtest/vulnerabilities/brute/index.php?username=${USER}&password=${LOGIN_PASSWORD}&Login=Login&user_token=${TOKEN}#>)

test script