hash3liZer / evilginx2

Standalone man-in-the-middle attack framework used for phishing login credentials along with session cookies, allowing for the bypass of 2-factor authentication
GNU General Public License v3.0
101 stars 40 forks source link

Problem with Cookie and DNT headers #11

Closed physics-sec closed 3 years ago

physics-sec commented 3 years ago

PLEASE READ THE POSTING GUIDELINES AND ANSWER THE QUESTION BEFORE POSTING, OTHERWISE ISSUE WILL BE CLOSED AND MARKED AS INVALID

Please type in "I CONFIRM" below if you confirm the sentences above or otherwise make some funny remark:

I CONFIRM

Thanks!

Hi! When a request is sent without cookies, the Cookie header is sent anyways with no cookies. Also, the DNT (Do Not Track) header is not capitalized correctly. Example:

GET /bar HTTP/1.1
Host: foo.com
Connection: close
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Cookie: 
Dnt: 1

The above request should look like this:

GET /bar HTTP/1.1
Host: foo.com
Connection: close
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
DNT: 1

Thanks!

hash3liZer commented 3 years ago

So, the Cookie header is sent anyways?

physics-sec commented 3 years ago

Yep, even if it is the first request and there are no cookies saved for that domain

hash3liZer commented 3 years ago

Ok, on it.

MikeTrust commented 3 years ago

Send me a message on Whatapp I will solve the issue +1 469-214-5180

JamesCullum commented 3 years ago

@physics-sp Can you use the latest version and retry if this fixes the issue?

The DNT header is not managed by the tool, so I will need to know more details (eg which website are you proxying) to see what exactly is the reason.

EDIT: Saw that you investigated and reported the DNT one as out-of-scope here

physics-sec commented 3 years ago

Yep, turns out that the capitalization thing is an "issue" with the proxy library, so there is not much to do about it I will test the Cookie thing and let you know.

physics-sec commented 3 years ago

Well, I'm kinda confused The Cookie header is no longer sent empty (so, is fixed?) The thing is that a cookie named aczP is sent in every request to the phihsing domin (and subdomains), which is set in the first request (to the lure url) Not sure what this cookie is used for, I don't see it in the real page.

JamesCullum commented 3 years ago

Hey physics,

great to hear that it's solved now. Evilginx creates session cookies to make sure that you are a visitor coming from a lure URL and not unauthorized. The name looks like this could be the randomly chosen name.

physics-sec commented 3 years ago

ooh ok, that makes sense, great then 😃