Portswigger - Cross-origin resource sharing - Lab #2 CORS vulnerability with trusted null origin
Hello Hackers, in this video of CORS vulnerability with trusted null origin you will see how to exploit and discover Cross-origin resource sharing (CORS) in a lab from Web Security Academy powered by Portswigger
⚠️ Subscribe to my channel ➡️ @popo_hack ⚠️
0:00 - About the Lab
0:44 - Exploit vulnerable endpoint
3:18 - Exploit CORS vulnerability using Origin header
4:47 - Write milicous JavaScript code uses CORS to retrieve the administrator's API key
9:03 - Check Exploit server's Access log
🔍 About the Lab
Lab: CORS vulnerability with basic origin reflection
Level: Apprentice
This lab has an insecure CORS configuration in that it trusts null origin. To solve the lab, craft some JavaScript that uses CORS to retrieve the administrator's API key and upload the code to your exploit server. The lab is solved when you successfully submit the administrator's API key.
✅ What to do ?
1. Check intercept is off, then use Burp's browser to log in to your account. Click "My account".
2. Review the history and observe that your key is retrieved via an AJAX request to /accountDetails, and the response contains the Access-Control-Allow-Credentials header suggesting that it may support CORS.
3. Send the request to Burp Repeater, and resubmit it with the added header Origin: null.
4. Observe that the "null" origin is reflected in the Access-Control-Allow-Origin header.
5. In the browser, go to the exploit server and enter the following HTML, replacing YOUR-LAB-ID with the URL for your unique lab URL and YOUR-EXPLOIT-SERVER-ID with the exploit server ID: watch the video to get the milicous code
6. Click "View exploit". Observe that the exploit works - you have landed on the log page and your API key is in the URL.
7. Go back to the exploit server and click "Deliver exploit to victim".
8. Click Access log, retrieve and submit the victim's API key to complete the lab.
Thank you for watching my video, if you have any questions or any topics recommendation feel free to write them on the comment below 🙋
#WebSecurityAcademy #portswigger #CORS #vulnerability
Видео Portswigger - Cross-origin resource sharing - Lab #2 CORS vulnerability with trusted null origin канала Popo Hack
⚠️ Subscribe to my channel ➡️ @popo_hack ⚠️
0:00 - About the Lab
0:44 - Exploit vulnerable endpoint
3:18 - Exploit CORS vulnerability using Origin header
4:47 - Write milicous JavaScript code uses CORS to retrieve the administrator's API key
9:03 - Check Exploit server's Access log
🔍 About the Lab
Lab: CORS vulnerability with basic origin reflection
Level: Apprentice
This lab has an insecure CORS configuration in that it trusts null origin. To solve the lab, craft some JavaScript that uses CORS to retrieve the administrator's API key and upload the code to your exploit server. The lab is solved when you successfully submit the administrator's API key.
✅ What to do ?
1. Check intercept is off, then use Burp's browser to log in to your account. Click "My account".
2. Review the history and observe that your key is retrieved via an AJAX request to /accountDetails, and the response contains the Access-Control-Allow-Credentials header suggesting that it may support CORS.
3. Send the request to Burp Repeater, and resubmit it with the added header Origin: null.
4. Observe that the "null" origin is reflected in the Access-Control-Allow-Origin header.
5. In the browser, go to the exploit server and enter the following HTML, replacing YOUR-LAB-ID with the URL for your unique lab URL and YOUR-EXPLOIT-SERVER-ID with the exploit server ID: watch the video to get the milicous code
6. Click "View exploit". Observe that the exploit works - you have landed on the log page and your API key is in the URL.
7. Go back to the exploit server and click "Deliver exploit to victim".
8. Click Access log, retrieve and submit the victim's API key to complete the lab.
Thank you for watching my video, if you have any questions or any topics recommendation feel free to write them on the comment below 🙋
#WebSecurityAcademy #portswigger #CORS #vulnerability
Видео Portswigger - Cross-origin resource sharing - Lab #2 CORS vulnerability with trusted null origin канала Popo Hack
web security bug bounty web security academy cross origin resource sharing CORS bug bounty poc owasp top 10 offsec proving grounds api security owasp cyber security portswigger burp suite burp suite tutorial open web application security project api vulnerability security testing web security academy idor web security academy labs web security academy portswigger web security academy rana khalil web security academy series same-origin policy hacking
Комментарии отсутствуют
Информация о видео
5 октября 2023 г. 1:00:19
00:10:40
Другие видео канала