Ethical Hacking MCQs with Answers & Explanations
Are you preparing for a cyber security exam, Certified Ethical Hacker (CEH) test, or an IT job interview? Practicing Ethical Hacking MCQs is one of the smartest ways to test your knowledge and master core security concepts quickly.
In this comprehensive guide, we have compiled the most frequently asked Ethical Hacking MCQs covering reconnaissance, scanning, cryptography, malware, network security, and penetration testing. Each question includes four options, the correct answer, and a clear explanation to help you understand the logic behind every concept.
Why Practice Ethical Hacking MCQs?
Cyber security is one of the fastest-growing fields in information technology. Organizations hire ethical hackers to find vulnerabilities before malicious attackers exploit them.
Solving Ethical Hacking MCQs helps students and professionals strengthen their fundamentals in network defense, system hacking, and web application security. Whether you are preparing for university exams, PPSC/FPSC IT tests, or international certifications, these questions cover all essential topics.
Top 30 Ethical Hacking MCQs (Basic to Advanced)
Below is a carefully structured list of Ethical Hacking MCQs divided into key cyber security domains for easy learning.
1. Fundamentals of Ethical Hacking MCQs
Q1. What is the primary goal of an ethical hacker?
A) To steal sensitive company data
B) To identify and fix security vulnerabilities legally
C) To disrupt network services
D) To spread malware across servers
- Correct Answer: B) To identify and fix security vulnerabilities legally
- Explanation: An ethical hacker (White Hat) has official permission from the system owner to test defenses and patch security weaknesses before malicious hackers find them.
Q2. Which type of hacker has authorization to test a system’s security?
A) Black Hat Hacker
B) Gray Hat Hacker
C) White Hat Hacker
D) Script Kiddie
- Correct Answer: C) White Hat Hacker
- Explanation: White Hat hackers are certified security professionals who perform authorized penetration testing to protect organizations.
Q3. What is a “Zero-Day Vulnerability”?
A) A bug that has been patched for zero days
B) A security flaw unknown to the software vendor with no available patch
C) A virus that deletes data at midnight
D) An expired SSL certificate
- Correct Answer: B) A security flaw unknown to the software vendor with no available patch
- Explanation: A zero-day vulnerability is a newly discovered flaw that developers have not yet fixed, making it highly dangerous if exploited.
Q4. Which phase comes first in the standard Ethical Hacking lifecycle?
A) Gaining Access
B) Maintaining Access
C) Reconnaissance
D) Covering Tracks
- Correct Answer: C) Reconnaissance
- Explanation: Reconnaissance (footprinting) is the first phase where the ethical hacker gathers preliminary information about the target system.
Q5. What is the difference between Penetration Testing and Vulnerability Assessment?
A) They are completely identical
B) Vulnerability assessment only identifies flaws, while penetration testing actively exploits them
C) Penetration testing is illegal
D) Vulnerability assessment fixes all bugs automatically
- Correct Answer: B) Vulnerability assessment only identifies flaws, while penetration testing actively exploits them
- Explanation: A vulnerability scan lists potential weaknesses, whereas penetration testing proves whether an attacker can actually exploit those flaws.
2. Footprinting, Reconnaissance & Scanning Ethical Hacking MCQs
Q6. Gathering information about a target without directly interacting with its servers is called:
A) Active Reconnaissance
B) Passive Reconnaissance
C) Port Scanning
D) Session Hijacking
- Correct Answer: B) Passive Reconnaissance
- Explanation: Passive reconnaissance uses public sources like WHOIS, search engines, and social media without sending packets directly to the target.
Q7. Which popular open-source tool is widely used for network discovery and port scanning?
A) Wireshark
B) Nmap
C) Burp Suite
D) John the Ripper
- Correct Answer: B) Nmap
- Explanation: Nmap (Network Mapper) scans networks to discover live hosts, open ports, running services, and operating systems.
Q8. Which Nmap scan type performs a stealthy half-open TCP scan?
A) -sT (TCP Connect Scan)
B) -sS (SYN Scan)
C) -sU (UDP Scan)
D) -sP (Ping Scan)
- Correct Answer: B) -sS (SYN Scan)
- Explanation: A SYN scan sends a SYN packet and waits for a SYN-ACK without completing the three-way handshake, making it faster and stealthier.
Q9. What does a WHOIS lookup reveal during footprinting?
A) Internal database passwords
B) Domain registration details, name servers, and registrar info
C) Encrypted user emails
D) Firewall rule configurations
- Correct Answer: B) Domain registration details, name servers, and registrar info
- Explanation: WHOIS databases store public registration records of domain names, including creation dates and DNS servers.
Q10. Which protocol does the ping utility use to check if a host is reachable?
A) TCP
B) UDP
C) ICMP
D) ARP
- Correct Answer: C) ICMP
- Explanation: Ping sends Internet Control Message Protocol (ICMP) Echo Request packets and waits for Echo Reply packets.
3. Network Security & Sniffing Ethical Hacking MCQs
Q11. Which tool is best known for capturing and analyzing network packets in real time?
A) Metasploit
B) Wireshark
C) SQLmap
D) Hydra
- Correct Answer: B) Wireshark
- Explanation: Wireshark is a packet analyzer that captures live network traffic and inspects protocol details down to the packet level.
Q12. What is ARP Spoofing (ARP Poisoning)?
A) Flooding a web server with HTTP requests
B) Sending fake ARP messages to link an attacker’s MAC address with a legitimate IP address
C) Guessing Wi-Fi passwords using a wordlist
D) Encrypting files for ransom
- Correct Answer: B) Sending fake ARP messages to link an attacker’s MAC address with a legitimate IP address
- Explanation: ARP spoofing allows an attacker on a local network to intercept, modify, or block traffic (Man-in-the-Middle attack).
Q13. Which port number is used by HTTPS by default?
A) 21
B) 22
C) 80
D) 443
- Correct Answer: D) 443
- Explanation: Port 443 is the standard port for secure, encrypted web traffic over HTTPS (TLS/SSL).
Q14. What is the main purpose of a Firewall in network security?
A) To speed up internet downloads
B) To monitor and filter incoming and outgoing network traffic based on security rules
C) To store website backups
D) To assign IP addresses automatically
- Correct Answer: B) To monitor and filter incoming and outgoing network traffic based on security rules
- Explanation: Firewalls act as a barrier between trusted internal networks and untrusted external networks like the internet.
Q15. Which attack overwhelms a server with massive traffic to make it unavailable to legitimate users?
A) Phishing
B) DDoS (Distributed Denial of Service)
C) SQL Injection
D) Shoulder Surfing
- Correct Answer: B) DDoS (Distributed Denial of Service)
- Explanation: A DDoS attack uses multiple compromised systems (botnets) to flood a target server, exhausting its bandwidth and resources.
4. Web Application Hacking & Malware Ethical Hacking MCQs
Q16. Which vulnerability occurs when untrusted user input is directly executed inside a database query?
A) Cross-Site Scripting (XSS)
B) SQL Injection (SQLi)
C) Buffer Overflow
D) Clickjacking
- Correct Answer: B) SQL Injection (SQLi)
- Explanation: SQL Injection allows attackers to manipulate database queries to bypass login authentication or extract sensitive data.
Q17. Which automated tool is specifically designed to detect and exploit SQL Injection flaws?
A) Nmap
B) SQLmap
C) Aircrack-ng
D) Nikto
- Correct Answer: B) SQLmap
- Explanation: SQLmap is an open-source penetration testing tool that automates the process of detecting and exploiting SQL injection vulnerabilities.
Q18. What is Cross-Site Scripting (XSS)?
A) Injecting malicious scripts into trusted websites viewed by other users
B) Hacking a router’s firmware
C) Stealing physical hard drives
D) Brute-forcing SSH credentials
- Correct Answer: A) Injecting malicious scripts into trusted websites viewed by other users
- Explanation: XSS attacks inject malicious JavaScript into web pages, allowing attackers to steal session cookies or redirect users.
Q19. Which type of malware disguises itself as legitimate software to trick users into installing it?
A) Worm
B) Trojan Horse
C) Rootkit
D) Adware
- Correct Answer: B) Trojan Horse
- Explanation: Unlike viruses or worms, a Trojan does not self-replicate; instead, it hides inside seemingly useful programs.
Q20. What does Ransomware do once it infects a computer system?
A) Displays pop-up advertisements
B) Encrypts the victim’s files and demands payment for the decryption key
C) Improves CPU performance
D) Cleans temporary browser cache
- Correct Answer: B) Encrypts the victim’s files and demands payment for the decryption key
- Explanation: Ransomware locks access to critical files or entire systems using strong encryption until a ransom is paid.
Q21. Which proxy tool is most commonly used by ethical hackers to intercept and modify HTTP/HTTPS web requests?
A) Burp Suite
B) PuTTY
C) FileZilla
D) Nessus
- Correct Answer: A) Burp Suite
- Explanation: Burp Suite acts as an intercepting proxy between the browser and web server, making it essential for web application security testing.
5. Cryptography, Wireless & System Hacking Ethical Hacking MCQs
Q22. Which encryption method uses the same secret key for both encryption and decryption?
A) Asymmetric Encryption
B) Symmetric Encryption
C) Hashing
D) Digital Signature
- Correct Answer: B) Symmetric Encryption
- Explanation: Symmetric encryption algorithms like AES and DES use a single shared key to encrypt and decrypt data.
Q23. Which of the following is a one-way cryptographic function used to verify data integrity?
A) AES
B) RSA
C) SHA-256
D) Blowfish
- Correct Answer: C) SHA-256
- Explanation: SHA-256 is a cryptographic hash function that converts input data into a fixed-length hash value and cannot be reversed.
Q24. Which wireless security protocol is currently considered the strongest for modern Wi-Fi networks?
A) WEP
B) WPA
C) WPA2-TKIP
D) WPA3
- Correct Answer: D) WPA3
- Explanation: WPA3 offers stronger encryption and protection against offline dictionary attacks compared to WEP, WPA, and older WPA2 setups.
Q25. What is “Social Engineering” in cyber security?
A) Writing secure Python code
B) Manipulating people psychologically into revealing confidential information
C) Configuring Linux servers
D) Building hardware firewalls
- Correct Answer: B) Manipulating people psychologically into revealing confidential information
- Explanation: Social engineering exploits human trust through phishing emails, pretexting, or baiting rather than technical software flaws.
Q26. Which framework is the most famous platform for developing and executing exploit code against remote targets?
A) Metasploit Framework
B) VirtualBox
C) Snort
D) OpenVPN
- Correct Answer: A) Metasploit Framework
- Explanation: Metasploit provides pre-built exploits, payloads, and auxiliary modules used by penetration testers to validate vulnerabilities.
Q27. What is “Privilege Escalation”?
A) Deleting user accounts
B) Gaining higher-level permissions (such as root or admin) from a standard user account
C) Changing a desktop wallpaper
D) Blocking an IP address
- Correct Answer: B) Gaining higher-level permissions (such as root or admin) from a standard user account
- Explanation: Privilege escalation exploits misconfigurations or bugs to elevate access rights to administrator or system level.
Q28. Which technique tests passwords by trying every possible combination of characters?
A) Dictionary Attack
B) Brute-Force Attack
C) Phishing Attack
D) Replay Attack
- Correct Answer: B) Brute-Force Attack
- Explanation: A brute-force attack systematically checks all possible character combinations until the correct password is found.
Q29. What is a “Honeypot” in network defense?
A) A decoy system set up to attract and study attackers
B) A high-speed fiber optic cable
C) An antivirus database update
D) A cloud storage bucket
- Correct Answer: A) A decoy system set up to attract and study attackers
- Explanation: Honeypots mimic vulnerable servers to lure hackers away from real assets and log their attack methods.
Q30. Which Linux command displays active network connections and listening ports?
A) mkdir
B) netstat or ss
C) chmod
D) grep
- Correct Answer: B) netstat or ss
- Explanation: Security analysts use netstat or ss to inspect open sockets, active connections, and suspicious listening ports.
Frequently Asked Questions (FAQs) on Ethical Hacking MCQs
1. Are these Ethical Hacking MCQs useful for the CEH exam?
Yes, these Ethical Hacking MCQs cover core concepts from the Certified Ethical Hacker (CEH) syllabus, including reconnaissance, scanning, sniffing, web security, and cryptography.
2. Is ethical hacking legal?
Ethical hacking is 100% legal when performed with explicit written permission from the organization or system owner.
3. Which tools should beginners learn first for ethical hacking?
Beginners should start with Kali Linux, Nmap, Wireshark, Burp Suite, and Metasploit to understand practical network and web security testing.
Conclusion
Mastering cyber security requires both theoretical knowledge and hands-on practice. Regularly reviewing Ethical Hacking MCQs helps reinforce key concepts, improve problem-solving speed, and prepare you for competitive IT exams and security certifications.
Bookmark this page on MCQsDesk and keep practicing more computer science and cyber security topics to stay ahead in your exam preparation!

2 Comments