Ethical Hacking Web Application Security 2 — Questions and Answers
Question 1: Which tool is commonly used by penetration testers for automated SQL injection detection and exploitation?
- Nikto
- SQLMap (Correct answer)
- Hydra
- Dirb
Correct answer: SQLMap
SQLMap is an open-source tool that automatically detects and exploits SQL injection vulnerabilities in web applications, supporting various database backends.
Question 2: What is 'clickjacking' in web application security?
- Stealing clicks via malicious advertisements
- Embedding a target page in an iframe to trick users into clicking hidden elements (Correct answer)
- Intercepting click events with JavaScript
- Brute forcing login buttons
Correct answer: Embedding a target page in an iframe to trick users into clicking hidden elements
Clickjacking overlays an invisible iframe of a legitimate site over a decoy page, tricking users into clicking elements on the target site without their knowledge.
Question 3: Which type of XSS permanently stores malicious script in the target server's database?
- Reflected XSS
- DOM-based XSS
- Stored XSS (Correct answer)
- Blind XSS
Correct answer: Stored XSS
Stored XSS (persistent XSS) saves malicious scripts in server-side storage like databases, which are then served to all users who view the affected page.
Question 4: What does IDOR stand for in web security testing?
- Insecure Data Object Reference
- Indirect Data Object Retrieval
- Insecure Direct Object Reference (Correct answer)
- Internal Directory Object Redirect
Correct answer: Insecure Direct Object Reference
Insecure Direct Object Reference (IDOR) occurs when an application exposes internal object references (IDs) without access control checks, allowing unauthorized data access.
Question 5: Which tool is used to brute force hidden directories and files on a web server?
- Sqlmap
- Gobuster (Correct answer)
- Wireshark
- Metasploit
Correct answer: Gobuster
Gobuster performs brute-force enumeration of directories, files, and DNS subdomains using wordlists, helping testers find hidden content on web servers.
Question 6: What is an 'open redirect' vulnerability?
- A server that allows unrestricted outbound connections
- An application that redirects users to attacker-controlled URLs via unvalidated parameters (Correct answer)
- An FTP server with anonymous login enabled
- A misconfigured CORS policy
Correct answer: An application that redirects users to attacker-controlled URLs via unvalidated parameters
Open redirects allow attackers to craft URLs that redirect victims from a trusted domain to a malicious site, often used in phishing attacks to increase credibility.
Which tool is commonly used by penetration testers for automated SQL injection detection and exploitation?