Disclaimer:
Educational Use Only:
The website links provided are to be used strictly for educational and knowledge-gaining purposes only.
No Misuse:
Do not misuse the links or the information contained therein for any commercial, illegal, or unethical activities.
Respect for Websites and Businesses:
Respect the intellectual property and business interests of the websites and their owners. Do not attempt to alter, copy, or redistribute content without proper authorization.
Acknowledge Value of Knowledge:
Recognize and value the knowledge and resources shared by these websites. Use the information responsibly and ethically.
No Endorsement:
The provision of these links does not imply endorsement of the linked sites, their content, or their products and services. Users are responsible for evaluating the suitability and accuracy of the information.
User Responsibility:
By accessing these links, you agree to use the information at your own risk and to comply with all applicable laws and website terms of use.
- What is a directory traversal attack?
a. A method to improve server speed
b. A way to gain unauthorized access to files outside intended directories
c. A tool for data encryption
d. A network routing technique
Answer: blearn.snyk+2 - What is another common name for directory traversal?
a. Command injection
b. Path traversal
c. SQL injection
d. Cookie poisoning
Answer: bportswigger+2 - Which HTTP element is often manipulated in a directory traversal attack?
a. Cookie value
b. File path parameter
c. Page title
d. HTML tag
Answer: bbrightsec+2 - In a Linux environment, what does the ‘../’ sequence do?
a. Moves up one directory
b. Executes a script
c. Encrypts a file
d. Makes a new directory
Answer: averacode+1 - Which file might attackers try to access on a Linux system using directory traversal?
a. /etc/passwd
b. /usr/bin/java
c. /var/log/httpd
d. /tmp/newfile
Answer: ageeksforgeeks+2 - What file could be a target for directory traversal on a Windows server?
a. win.ini
b. hostsx
c. passwd
d. query.conf
Answer: aacunetix+1 - What is the default root directory for web documents on IIS (Windows)?
a. C:\Users\Default
b. C:\Inetpub\wwwroot
c. C:\Program Files\Website
d. C:\Root\Web
Answer: bacunetix - Why are directory traversal vulnerabilities dangerous?
a. They allow attackers to shut down the web server
b. Attackers can access sensitive files outside the web root
c. Only slow down the application
d. Only work on outdated systems
Answer: blearn.snyk+2 - What programming languages can have directory traversal flaws?
a. Only PHP
b. Python and PHP
c. Any language handling file paths
d. Only compiled languages
Answer: cveracode - What is a common prevention method for directory traversal?
a. Disabling cookies
b. Validating user input
c. Enabling JavaScript
d. Minimizing URL length
Answer: bimperva+2 - Which character sequence is commonly used in directory traversal attacks?
a. ///
b. ../
c. ::
d. **
Answer: bportswigger+2 - If a web app appends user input to a file path, what should it do to prevent traversal?
a. Trust the input
b. Sanitize and validate the input
c. Compress the file
d. Encrypt all content
Answer: bbrightsec+2 - What is the goal of many directory traversal attacks?
a. Access user credentials or configuration files
b. Crash the browser
c. Redirect traffic
d. Log users out
Answer: abrightsec+1 - What is one risk of exposing application logs via directory traversal?
a. Performance boost
b. Information disclosure
c. Data compression
d. Automatic patching
Answer: bimperva+1 - Which URL could be a directory traversal attempt?
a. /download.php?file=report.txt
b. /download.php?file=../../etc/passwd
c. /index.php?page=home
d. /home/user
Answer: binvicti+2 - What does ‘path normalization’ do?
a. Makes all file paths lowercase
b. Converts all slashes to backslashes
c. Cleans up file paths to remove traversal characters
d. Encrypts file paths
Answer: cacunetix+1 - What is ‘URL encoding’ in context of traversal attacks?
a. Compresses the content
b. Hides traversal strings using codes like %2e%2e/
c. Optimizes website speed
d. Creates new files
Answer: bveracode+1 - Which HTTP method is commonly involved in traversal vulnerabilities?
a. POST
b. GET
c. PUT
d. TRACE
Answer: blearn.snyk+1 - Directory traversal can be detected by observing which log activity?
a. Repeated failed logins
b. Unusual file access patterns with ‘../’
c. Session timeouts
d. Slow response times
Answer: bimperva+1 - Which access control is bypassed by directory traversal?
a. Role-based access
b. IP filtering
c. Root directory restriction
d. BitLocker encryption
Answer: cveracode+1 - Directory traversal can lead to which additional vulnerability?
a. Cross-site scripting
b. File inclusion (LFI/RFI)
c. SQL tuning
d. DLL injection
Answer: bowasp+1 - What is one way to detect directory traversal flaws during development?
a. Conduct code reviews for path handling
b. Only use GET requests
c. Log all access attempts
d. Disable log files
Answer: ahackerone+2 - What does the term ‘web root’ mean?
a. The root file on a user’s PC
b. The top-most directory on a web server serving files to users
c. The location of user passwords
d. The main page of a site
Answer: bacunetix+1 - Which user-supplied data should be sanitized for traversal risks?
a. Only image uploads
b. Any file path or filename in input, URL, or cookie
c. Only admin fields
d. Email addresses only
Answer: bportswigger+1 - Why do attackers try multiple ‘../’ in their attempts?
a. To open more files in one request
b. To determine the depth needed to reach sensitive files
c. To speed up the server
d. To close sessions
Answer: bimperva+1 - What is one sign of a vulnerable web application?
a. Shows error messages with file paths
b. Rejects all user input
c. Only supports PDFs
d. Requires two-factor authentication
Answer: ahelpcenter.trendmicro+2 - Which response code might indicate successful directory traversal?
a. 404 Not Found
b. 200 OK and file download
c. 302 Redirect
d. 403 Forbidden
Answer: bgeeksforgeeks - A well-secured web server should prevent which outcome?
a. Normal file downloads by users
b. Reading system files via URL manipulation
c. Displaying a homepage
d. Showing public content to all users
Answer: blearn.snyk+1 - Directory traversal attacks can exploit vulnerabilities in which server elements?
a. Only database servers
b. Application code and web server software
c. Network switches
d. Load balancers
Answer: bveracode+1 - Changing which property can mitigate traversal?
a. Disabling root directory
b. Keeping strict file path whitelisting
c. Increasing disk space
d. Reducing RAM usage
Answer: bhackerone+1 - What real-world case involved over 700,000 routers with a directory traversal bug?
a. IIS web exploit
b. Shenzhen Gongjin Electronics firmware flaw
c. Linux kernel bug
d. Microsoft Edge browser flaw
Answer: binvicti - What does ‘LFI’ stand for in cyber security?
a. Large File Inclusion
b. Local File Inclusion
c. Linux File Injection
d. List File Information
Answer: bbrightsec - On Windows, which character can separate directories in traversal?
a. \
b. /
c. Both a and b
d. :
Answer: cacunetix+1 - What is ‘percent encoding’ and its use in traversal?
a. Using % symbols to denote non-standard characters in URLs
b. Compressing data
c. Setting permissions
d. Disabling cookies
Answer: aimperva+1 - To protect against traversal, input should be:
a. Explicitly checked against expected file names and locations
b. Ignored
c. Handled only on user side
d. Kept unencrypted
Answer: ahackerone+1 - Which of these is a famous directory traversal CVE?
a. CVE-2017-5638
b. CVE-2021-41773
c. CVE-2011-2462
d. CVE-2014-6271
Answer: binvicti - What directory might contain user password hashes on Linux?
a. /usr/local
b. /etc
c. /var/tmp
d. /opt
Answer: bveracode+1 - What might attackers do after finding a traversal bug?
a. Attempt to escalate privileges or pivot to other attacks
b. Abandon the attack
c. Close all files
d. Increase memory usage
Answer: abrightsec+1 - Which access list prevents unauthorized file access?
a. ACL (Access Control List)
b. URL list
c. Log file
d. Registry key
Answer: aacunetix+1 - Why can even old traversal vulnerabilities still be dangerous?
a. Modern software is never vulnerable
b. Vulnerabilities may be unpatched and used repeatedly
c. They require expensive tools
d. They only affect mobile devices
Answer: binvicti - What is ‘dot-dot-slash’ attack?
a. Using ../ repeatedly to move up directories
b. Compressing log files
c. Filling up disk space
d. Injecting into SQL statements
Answer: alearn.snyk+1 - Why should error messages be vague on file access?
a. To help attackers locate files
b. To avoid disclosing directory structure
c. To increase speed
d. To reduce CPU load
Answer: bhelpcenter.trendmicro - Directory traversal is categorized under which CWE?
a. CWE-78
b. CWE-22
c. CWE-89
d. CWE-119
Answer: bimperva - What does ‘absolute path’ mean?
a. Path from current directory
b. Full file path from the root directory
c. Relative path
d. Compressed path
Answer: bgeeksforgeeks+1 - What is a ‘brute-force’ aspect of directory traversal attacks?
a. Trying multiple possible filenames and directories
b. Guessing user passwords
c. Encrypting files rapidly
d. Restarting the server
Answer: ageeksforgeeks - Why might attackers target backup files using traversal?
a. They are slower to access
b. Might contain sensitive configuration and old credentials
c. To compress data
d. To update them
Answer: bbrightsec+1 - Which HTTP header could possibly be manipulated in a traversal attack?
a. Host
b. Referer
c. Cookie
d. Content-Type
Answer: cbrightsec - Which web server suffered from a 2021 directory traversal CVE?
a. Nginx
b. Apache HTTP Server
c. OpenSSH
d. MySQL Server
Answer: binvicti - Why is restricting file extensions helpful for traversal security?
a. Only denies files with .exe
b. Blocks potential execution of malicious or unwanted file types
c. Shortens URL
d. Reduces load on server
Answer: bhackerone+1 - What is an effective last-resort for containing directory traversal attacks?
a. Application firewall and intrusion detection system (IDS)
b. Disabling all file access
c. Increasing password length
d. Compressing all files
Answer: ahackerone+1
- https://learn.snyk.io/lesson/directory-traversal/
- https://portswigger.net/web-security/file-path-traversal
- https://owasp.org/www-community/attacks/Path_Traversal
- https://brightsec.com/blog/directory-traversal/
- https://www.geeksforgeeks.org/computer-networks/what-is-a-directory-traversal-attack/
- https://www.veracode.com/security/directory-traversal/
- https://www.acunetix.com/websitesecurity/directory-traversal/
- https://www.imperva.com/learn/application-security/directory-traversal/
- https://www.invicti.com/learn/directory-traversal-path-traversal/
- https://www.hackerone.com/blog/preventing-directory-traversal-attacks-techniques-and-tips-secure-file-access
- https://helpcenter.trendmicro.com/en-us/article/tmka-18751
- https://aimcqs.com/data-structures
- https://www.sumologic.com/glossary/directory-traversal
- https://www.geeksforgeeks.org/quizzes/top-mcqs-on-graph-traversals-with-answers/
- https://www.youtube.com/watch?v=99yJtmmtrJU
- https://www.geeksforgeeks.org/quizzes/top-mcqs-on-tree-traversal-with-interview-question-and-answers/
- https://testbook.com/objective-questions/mcq-on-tree-traversal–5eea6a1139140f30f369eb98
- https://en.wikipedia.org/wiki/Directory_traversal_attack
- https://blog.hackxpert.com/2024/03/directory-traversal-quick-guide
- https://www.sanfoundry.com/postorder-traversal-multiple-choice-questions-answers-mcqs/