Certified Ethical Hacker Ethical Hacker Security — Questions and Answers
Question 1: Which phase of ethical hacking involves actively probing a target to find open ports and live hosts?
- Reconnaissance
- Scanning (Correct answer)
- Covering tracks
- Reporting
Correct answer: Scanning
Scanning actively probes the target to discover live hosts, open ports, and services.
Question 2: A penetration tester is given no prior knowledge of the target environment. What type of test is this?
- White-box
- Gray-box
- Black-box (Correct answer)
- Crystal-box
Correct answer: Black-box
Black-box testing simulates an external attacker with zero internal knowledge of the system.
Question 3: Which tool is most commonly used for network discovery and port scanning?
- Wireshark
- Nmap (Correct answer)
- John the Ripper
- Metasploit
Correct answer: Nmap
Nmap is the standard tool for host discovery, port scanning, and service/version detection.
Question 4: What does a TCP SYN scan rely on to avoid completing the full handshake?
- Sending RST after SYN-ACK (Correct answer)
- Sending a FIN packet first
- Spoofing the MAC address
- Encrypting the payload
Correct answer: Sending RST after SYN-ACK
A SYN scan sends a RST after receiving SYN-ACK, never completing the three-way handshake (half-open scan).
Question 5: Which document legally authorizes a penetration test and defines its scope?
- NDA
- Rules of Engagement (Correct answer)
- Bug bounty policy
- Acceptable Use Policy
Correct answer: Rules of Engagement
The Rules of Engagement document defines scope, timing, and authorized actions for a test.
Question 6: What is the primary goal of the 'covering tracks' phase for a malicious attacker?
- Escalate privileges
- Hide evidence of intrusion (Correct answer)
- Map the network
- Establish persistence
Correct answer: Hide evidence of intrusion
Covering tracks involves deleting logs and hiding artifacts to evade detection.
Question 7: Which type of footprinting collects data without directly interacting with the target system?
- Active footprinting
- Passive footprinting (Correct answer)
- Vulnerability scanning
- Banner grabbing
Correct answer: Passive footprinting
Passive footprinting gathers information from public sources without touching the target directly.
Question 8: Which attack intercepts communication between two parties without their knowledge?
- Phishing
- Man-in-the-middle (Correct answer)
- Brute force
- SQL injection
Correct answer: Man-in-the-middle
A man-in-the-middle attack secretly relays and possibly alters traffic between two endpoints.
Question 9: What technique poisons a switch's CAM table to capture traffic on a LAN?
- ARP spoofing
- MAC flooding (Correct answer)
- DNS poisoning
- Session fixation
Correct answer: MAC flooding
MAC flooding overflows the CAM table, forcing the switch to broadcast frames like a hub.
Question 10: Which encryption protocol is considered insecure for Wi-Fi and easily cracked?
- WPA3
- WPA2
- WEP (Correct answer)
- AES-CCMP
Correct answer: WEP
WEP uses weak RC4 keying and is trivially cracked, making it obsolete.
Question 11: A user receives a fraudulent email impersonating their bank to steal credentials. This is an example of:
- Smishing
- Phishing (Correct answer)
- Vishing
- Pharming
Correct answer: Phishing
Phishing uses deceptive emails to trick victims into revealing sensitive information.
Question 12: Which tool captures and analyzes network packets in real time?
- Nessus
- Wireshark (Correct answer)
- Hydra
- Nikto
Correct answer: Wireshark
Wireshark is a packet analyzer used to capture and inspect network traffic.
Question 13: What does DNS cache poisoning achieve for an attacker?
- Encrypts DNS traffic
- Redirects users to malicious sites (Correct answer)
- Blocks port scanning
- Disables firewalls
Correct answer: Redirects users to malicious sites
DNS poisoning inserts false records so victims are redirected to attacker-controlled servers.
Question 14: Which attack targets the human element rather than technical vulnerabilities?
- Buffer overflow
- Social engineering (Correct answer)
- Cross-site scripting
- Privilege escalation
Correct answer: Social engineering
Social engineering manipulates people into divulging information or performing actions.
Question 15: Which web vulnerability allows an attacker to inject malicious SQL into a query?
- XSS
- SQL injection (Correct answer)
- CSRF
- Clickjacking
Correct answer: SQL injection
SQL injection inserts malicious SQL into input fields to manipulate the backend database.
Question 16: Stored cross-site scripting (XSS) is dangerous primarily because:
- It only affects the attacker
- The payload persists and affects many users (Correct answer)
- It requires physical access
- It cannot run JavaScript
Correct answer: The payload persists and affects many users
Stored XSS saves the malicious script on the server, executing for every user who views the page.
Question 17: Which attack forces an authenticated user to execute unwanted actions on a web app?
- CSRF (Correct answer)
- SSRF
- IDOR
- RCE
Correct answer: CSRF
Cross-Site Request Forgery tricks a logged-in user's browser into sending forged requests.
Question 18: What is the best defense against SQL injection?
- Disabling cookies
- Parameterized queries (Correct answer)
- Using HTTP instead of HTTPS
- Longer passwords
Correct answer: Parameterized queries
Parameterized (prepared) statements separate code from data, preventing injection.
Question 19: Which tool is a web server vulnerability scanner that checks for outdated software and misconfigurations?
- Nikto (Correct answer)
- Aircrack-ng
- Hashcat
- Burp Suite
Correct answer: Nikto
Nikto scans web servers for known vulnerabilities, dangerous files, and outdated versions.
Question 20: An attacker manipulates a URL parameter to access another user's record without authorization. This is:
- Directory traversal
- Insecure Direct Object Reference (IDOR) (Correct answer)
- Session hijacking
- DNS spoofing
Correct answer: Insecure Direct Object Reference (IDOR)
IDOR occurs when an app exposes references to internal objects without proper access checks.
Question 21: Which header helps mitigate cross-site scripting by restricting script sources?
- X-Frame-Options
- Content-Security-Policy (Correct answer)
- Cache-Control
- Set-Cookie
Correct answer: Content-Security-Policy
Content-Security-Policy restricts which sources can load scripts, limiting XSS impact.