Web Pentesting Course Slides
Web Pentesting Course Slides
Application
Pen-Testing
Course
Who am i?
● HTTP / HTTPS
● What is Headers
HTTP / HTTPS
Port 80 443
Headers HTTP
• Types of XSS.
• Solve Lab.
• Solve lab.
• Solve Lab
• Solve lab.
• Solve lab.
• Solve lab.
• Types of XXE.
• Solve lab.
Not Allowed:
● Parameter
This type only in DTD and useful for creating entity have value another entity.
● Predefined
This type is used predefined values which could break the syntax like using (<)
which is (<)
Features we can use
1. Using System Keyword we can use External Entity.
• Error Based
• This type is parsing the XML and you can see just Errors.
• This type is Blind without any errors or results, you can do some requests to check
it.
Exploit
Inband Type
Vulnerable
Send payload in function parsing Print the result
request payload
Error Based
Vulnerable
Send payload in function parsing No result printed
request payload
The payload is
executed
Vulnerabilities
Clickjacking
Vulnerabilities (Clickjacking)
• What is Clickjacking?
• Solve lab.
• Patch bug.
Vulnerabilities
JSONP
Vulnerabilities (JSONP)
• What is JSONP?
• Solve lab.
• Patch bug.
Vulnerabilities
ATO
Vulnerabilities (ATO)
• What is ATO?
• Patch bugs.
How to gain ATO
• CSRF
• IDOR
Send request
Change Email when receive a request
How to gain ATO (IDOR)
User 1000
200 OK 200 OK
How to gain ATO (Host Header Injection)
OAuth service provider application that control user’s data and access to it.
OAuth
Client App User-Agent OAuth
Auth request
service API
1
Resource 2
Owner User Login & consent
/Auth
Access Token
/oauth-login
3
API Call
4
/info
5
Data
How to gain ATO (Open redirect with OAuth)
How to gain ATO (CSRF with OAuth)
Client App User-Agent OAuth
Auth request
service API
1
Resource 2
Owner User Login & consent
/Auth
Access Token & connect
Social account
/oauth-login
3
API Call
4
/info
5
Data
Vulnerabilities
PostMessage
Vulnerabilities (PostMessage)
• What is PostMessage?
• Solve lab.
• Patch bug.
Explain
We can use it postMessage with iframe or pop-up
We can use the following like to check and validate the origins before take the value
but the check have an issue and could be
bypassed.
Exploit
Vulnerable page Have a listener
Exploit Page
Exploit Page send postMessage with
malicious value like XSS payload
• Bypass Filter.
• Solve Labs.
• Patch Bug.
Vulnerabilities
Chaining Bugs
Vulnerabilities (Chaining Bugs)
• XSS to ATO
Vulnerable page
Exploit page
un-exploitable CORS
Exploit Server Vulnerable Endpoint
Vulnerable Endpoint
Send Request
XMLHttpReqeuest
Backend Server
Code
● Explain Finding.
● Recommendations
● Proof-of-Concept
● References
● Ref [https://github.com/juliocesarfort/public-pentesting-reports]
Skills
● Write reports
○ Protocols
○ Html / Html5
○ Web Framework
● PortSwigger
● PentesterLab
● Practice
Thank you
• Facebook: @flex0geek
• Twitter: @flex0geek
• Linkedin: @flex0geek
• Blog: https://flex0geek.blogspot.com/
• Youtube: http://youtube.com/c/HackWizFlEx/