evilginx2 icon indicating copy to clipboard operation
evilginx2 copied to clipboard

HTTP Proxy Logic Could Be Improved For JSON Credential Harvesting

Open fin3ss3g0d opened this issue 2 years ago • 1 comments

Currently, in line 436 of core/http_proxy.go the logic checks if a HTTP request's Content-Type header matches application-json exactly before checking for submitted credentials. If this check fails, any checks for the credential regex will not be performed. This creates an issue for websites that let's say send a application/json;charset=utf-8 as the Content-Header in the request containing credentials. Below is the current code:

if contentType == "application/json" {
...
}

json credential harvesting could be expanded and applied to more use cases with the following check:

if strings.Contains(strings.ToLower(contentType), "application/json")  {
...
}

Or even the below to ensure it will never get missed:

if strings.Contains(strings.ToLower(contentType), "json")  {
...
}

fin3ss3g0d avatar Aug 27 '22 05:08 fin3ss3g0d

#761

M41KL-N41TT avatar Aug 29 '22 12:08 M41KL-N41TT

Hello! If you were already able to resolve your doubts and achieve your goals, close the issue so that we know which ones are pending.

Thank you!

Support-1535 avatar Oct 26 '22 22:10 Support-1535

This hasn't been resolved in the current code and impacts credential harvesting. If there is no plan to fix it or a refusal to, that can be stated here and this can be closed. Until then, this is still an open issue.

fin3ss3g0d avatar Oct 27 '22 03:10 fin3ss3g0d

If you want to suggest any changes in the code, you can open a pull request https://github.com/kgretzky/evilginx2/pulls

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request

Support-1535 avatar Nov 03 '22 19:11 Support-1535

This issues section is so large that bots needed to be created for it smh. Just fix the code with a commit, it's one line that needs to be changed.

fin3ss3g0d avatar Nov 03 '22 19:11 fin3ss3g0d