All EC-Council exams
Free Certified Ethical Hacker (CEH v13, "Powered by AI") practice test: 30 questions with answers
30 original questions for Certified Ethical Hacker (CEH v13, "Powered by AI"), drawn from every topic area. Answer each one to see whether you got it right and why. No sign-up.
- Free questions
- 30
- Full bank
- 112 questions
- Real exam
- 125 (knowledge exam); practical has 20 challenges questions, 240360 min
- Passing score
- 60% to 85% (varies by form)
Certified Ethical Hacker (CEH v13, "Powered by AI") exam guide: topics, cost and format
All 30 Certified Ethical Hacker (CEH v13, "Powered by AI") questions with answers
The same questions as the test above, grouped by exam topic. Open any question to see the answer and explanation.
Malware Threats (2 questions)
Question 1
Which characteristic distinguishes a worm from a virus?
- AA worm needs a user to open an infected document before it can spread to other systems
- BA worm spreads across networks on its own, without attaching itself to a host program or file
- CA worm can spread only through removable media such as USB flash drives and optical discs
- DA worm always encrypts files for ransom, while a virus is limited to stealing data
Show answer and explanationHide answer
Correct answer: BA worm is self-propagating over network paths and does not need a host file, which is the key difference from a virus. Requiring user action, ransom behavior and removable media are traits of other malware types or delivery methods.
Question 2
Which malware type hides its presence by modifying low-level operating system components or the boot process?
- ARansomware that encrypts user files and displays a payment notice on the desktop afterward
- BA keylogger that records keystrokes into a log file stored on the user's local disk
- CA rootkit that alters low-level system components to conceal its files, processes, and activity
- DAdware that injects advertisements into the browser window on each page the user opens
Show answer and explanationHide answer
Correct answer: CRootkits modify kernel, driver or boot components so that their own files, processes and network activity stay hidden from normal tools. Adware, keyloggers and ransomware are not defined by concealment at that level.
Introduction to Ethical Hacking (2 questions)
Question 3
During an authorized web application test, the tester finds that the app calls a third-party payment API hosted by another company. The rules of engagement do not mention that provider. What should the tester do?
- AContinue testing the API, since the client's application calls it and therefore it is in scope
- BStop testing that API and obtain written authorization from the provider before continuing
- CTest the API only at night to reduce the chance of disruption to the provider's other customers
- DRun the scanner quietly against the API, then decide later whether the results will be reported
Show answer and explanationHide answer
Correct answer: BTesting a system you do not have authority over is unauthorized, even when a client's application depends on it, so the test must stop until the provider consents in writing. Timing the test or testing quietly does not create permission.
Question 4
Which document defines the boundaries, timing, and permitted techniques for a penetration test?
- AThe vulnerability scanner's license agreement signed between the vendor and the testing firm
- BThe threat intelligence report describing the attacker groups common in the client's industry
- CThe client's network diagram showing all subnets, VLANs, and firewall zones in production
- DThe rules of engagement, signed by the client and the testing team before testing begins
Show answer and explanationHide answer
Correct answer: DThe rules of engagement set scope, timing, permitted techniques and escalation contacts, and both parties sign them before testing starts. A license, a network diagram and a threat report inform the test but do not authorize or bound it.
Footprinting and Reconnaissance (2 questions)
Question 5
Which technique gathers information about a target without sending traffic to the target's own systems?
- APort scanning with SYN packets against the target's public address range
- BPassive OSINT using certificate transparency logs and public records
- CBanner grabbing from the target's web server by sending an HTTP request
- DZone transfer attempts against the target's authoritative name servers
Show answer and explanationHide answer
Correct answer: BPassive reconnaissance uses public data sources such as certificate transparency logs and public records, so the target's systems never see the query. Port scans, banner grabs and zone transfer attempts all send traffic to the target's infrastructure.
Question 6
Which DNS record type identifies the mail servers that accept email for a domain?
- ATXT record that carries SPF policy text, published by the domain's registrar for the zone
- BSOA record that stores the zone's serial number and its refresh and retry timers
- CPTR record that maps an IP address back to a host name for reverse lookups on the network
- DMX record, listing the mail exchanger hosts and their priority values
Show answer and explanationHide answer
Correct answer: DMX records name the mail exchangers for a domain and their preference order, which is what determines where mail is delivered. SPF text, reverse pointers and SOA timers relate to email policy, reverse lookups or zone maintenance rather than the mail hosts themselves.
Hacking Web Applications (2 questions)
Question 7
Which control best prevents stored cross-site scripting in a web application?
- ABlocking all HTML tags in the database so that no markup can be stored by the application at all
- BIncreasing the session timeout so that users remain signed in longer and see fewer login prompts
- CContext-aware output encoding of untrusted data, combined with a strict Content Security Policy
- DUsing GET rather than POST for every form submission across the whole application to hide inputs
Show answer and explanationHide answer
Correct answer: CEncoding untrusted data for its output context stops injected markup from executing, and a strict CSP limits what a script can do if one gets through. Blocking tags in storage, longer sessions and changing request methods do not address the injection.
Question 8
Which two HTTP response headers help protect browsers against common web attacks? (Choose two.)
- AContent-Security-Policy, restricting which sources scripts and other resources may load from
- BA Server header that shows the exact version of the web server software in use
- CAn X-Powered-By header that names the language runtime and framework used by the app
- DAccess-Control-Allow-Origin set to * on every authenticated endpoint of the application
- EStrict-Transport-Security, which tells the browser to use HTTPS for future requests to the site
Show answer and explanationHide answer
Correct answer: A, EA Content-Security-Policy limits where scripts and resources can come from, which reduces the impact of injection, and HSTS enforces HTTPS on future visits. Version banners reveal information, and a wildcard CORS policy on authenticated endpoints weakens cross-origin protection.
Cloud Computing (2 questions)
Question 9
Under the shared responsibility model, who patches the guest operating system on an IaaS virtual machine?
- AThe cloud provider, for every operating system version offered across its whole platform
- BThe customer, who owns the guest operating system and is responsible for its patching
- CNobody, because IaaS virtual machines are patched by the platform during its scheduled maintenance
- DThe provider's hypervisor team, which patches each guest operating system automatically overnight
Show answer and explanationHide answer
Correct answer: BIn IaaS the provider secures the physical and hypervisor layers, while the customer is responsible for the guest OS, its patches and its configuration. Automatic patching by the provider applies to managed services, not to a customer-owned guest OS.
Question 10
A cloud storage bucket that holds backups is publicly readable. What is the best first step?
- AAdd a lifecycle rule that deletes the backups after thirty days, to reduce the period of exposure
- BRemove public access, review the access logs for reads, and then assess what data was exposed
- CEmail the bucket owner to ask whether the public access is intended before doing anything else
- DEnable versioning on the bucket so that any overwritten data can be recovered later on request
Show answer and explanationHide answer
Correct answer: BClosing the exposure stops further access, and reviewing logs shows whether data was already read, which determines the breach assessment. Versioning, deletion rules and waiting for a reply leave the data exposed while the team deliberates.
Cryptography (2 questions)
Question 11
Which algorithm is appropriate for storing user passwords?
- AMD5 with a fixed salt that is shared by every user account in the same application database
- BArgon2id with a unique salt per user and tuned memory and iteration cost parameters
- CSHA-256 applied once to the raw password, without a salt or any key stretching applied to it
- DBase64 encoding of the password, so that the original value can be restored for later checks
Show answer and explanationHide answer
Correct answer: BArgon2id is a memory-hard password hashing function, and a unique salt with tuned costs slows offline cracking. Fast hashes, shared salts and encoding are reversible or easily attacked, so they do not protect stored passwords.
Question 12
Which property does a digital signature provide that a message authentication code (MAC) does not?
- AConfidentiality, because the message body is encrypted with a shared secret key
- BSpeed, because signing is faster than message authentication on every common platform in use
- CNon-repudiation, because only the holder of the private key could have produced the signature
- DKey distribution, because each party publishes the same symmetric key openly for verification
Show answer and explanationHide answer
Correct answer: CA MAC uses a shared secret, so either party could have created it, while a signature uses a private key only the signer holds, which supports non-repudiation. MACs and signatures both give integrity, and neither encrypts the message by itself.
Scanning Networks (2 questions)
Question 13
A scan reports a normally open port as filtered. What is the most likely cause?
- AThe service has crashed, and the port is now closed at the operating system level
- BThe host is responding normally, and the scanner is misreporting the response it received
- CThe scanner used an incorrect TCP sequence number in the probe packet's header
- DA firewall is dropping the probes, so no response reaches the scanner
Show answer and explanationHide answer
Correct answer: DA filtered result means the probe received no response, which is typical when a firewall silently drops it. A crashed service would show as closed, while a wrong sequence number or a scanner error would not produce a consistent filtered state.
Question 14
Which scan type sends a TCP segment with only the FIN flag set to probe how a target filters traffic?
- ATCP connect scan, which completes a full three-way handshake on every port it tests
- BUDP scan, which sends datagrams and interprets ICMP port unreachable messages as results
- CStealth FIN scan, which relies on closed ports answering with a RST packet
- DARP scan, which asks each local host on the subnet for its hardware address directly
Show answer and explanationHide answer
Correct answer: CA FIN-only probe receives a RST from closed ports and no response from open or filtered ones, which helps infer port state without a full handshake. Connect scans, UDP scans and ARP scans use different mechanisms to answer different questions.
Enumeration (1 question)
Question 15
Which target gives an authorized tester a list of valid user accounts in an Active Directory domain?
- AThe domain controller's LDAP directory, queried with a low-privilege authenticated account
- BThe DNS server's cache file, stored on the domain controller's local disk in the system folder
- CA router's SNMP service, reached with the factory default community string on the management port
- DThe VPN concentrator's login banner, which every unauthenticated client can read before signing in
Show answer and explanationHide answer
Correct answer: AActive Directory exposes user objects through LDAP, and a low-privilege account can usually read them, which is why this is a standard enumeration step. A DNS cache, SNMP community strings and login banners do not expose the domain's user list.
Social Engineering (1 question)
Question 16
A caller claims to be from IT support and asks for an employee's password to fix a locked account. What is the best control?
- AGive the password to the caller once they supply the employee's employee ID number
- BReset the password to a shared default value so that the caller can use it immediately
- CVerify the caller through a known internal channel, and never disclose credentials to a caller
- DAsk the caller to email the password so that a written record exists for the help desk
Show answer and explanationHide answer
Correct answer: CVerifying identity through a known channel and never giving credentials to a caller defeats pretexting, the core of this attack. An employee ID is easy to obtain, and emailing or resetting to a shared default both expose the account.
Denial-of-Service (1 question)
Question 17
Which attack exhausts a server's connection capacity by sending many TCP SYN packets and never completing the handshakes?
- ADNS cache poisoning, which replaces records on a resolver with forged answers to misdirect users
- BSession fixation, which reuses one session identifier across several user accounts on the application
- CSYN flood, which fills the backlog with half-open connections and blocks legitimate clients
- DSmurf attack, which broadcasts ICMP echo requests with a spoofed source address to amplify traffic
Show answer and explanationHide answer
Correct answer: CA SYN flood leaves many half-open connections in the backlog, so legitimate clients cannot complete new connections. Smurf is a broadcast amplification attack, while session fixation and cache poisoning target different weaknesses.
Vulnerability Analysis (1 question)
Question 18
A scanner reports a critical CVE on a host, but the host's package manager shows a patched build. What should the analyst do?
- AReport the CVE as confirmed and open an emergency change to upgrade the host immediately
- BDisable the scanner for that host until the next quarterly audit, since the findings are not reliable
- CCheck the installed package version against the vendor advisory, then document a false positive if patched
- DAccept the risk permanently without checking whether a backported fix was installed on the host
Show answer and explanationHide answer
Correct answer: CDistributions often backport fixes without changing the upstream version number, so the vendor advisory and the installed package build must be checked before a finding is confirmed or closed. Blind upgrades, disabling the scanner or accepting risk without evidence each skip that verification.
System Hacking (1 question)
Question 19
Which control most directly reduces the risk of offline password cracking after an attacker obtains a system's credential database?
- ADisabling the screen lock timeout on all user workstations across the domain
- BChanging the default port of the remote desktop service to a non-standard number
- CEnabling verbose logging for every failed authentication attempt across the domain controllers
- DStoring password hashes with a slow, salted algorithm, combined with a strong password policy
Show answer and explanationHide answer
Correct answer: DSalted, slow hashing makes each guess expensive, and a strong password policy makes successful guesses less likely. Screen timeouts, port changes and logging do not protect a stolen credential store from offline attacks.
Sniffing (1 question)
Question 20
On a switched LAN, which technique lets an attacker read traffic addressed to another host?
- APing sweeps that record which hosts answer ICMP echo requests on the segment
- BDNS zone transfers that list every host name published in the internal zone file
- CBanner grabbing of each service to identify software versions running on the segment
- DARP poisoning, which redirects the victim's traffic through the attacker's host
Show answer and explanationHide answer
Correct answer: DARP poisoning convinces hosts to send traffic for other addresses to the attacker, which makes man-in-the-middle capture possible on a switch. Ping sweeps, banner grabs and zone transfers gather information but do not redirect another host's traffic.
Session Hijacking (1 question)
Question 21
A web application places its session identifier in the URL. Which risk is most direct?
- ASession identifiers leak through browser history, server logs, and Referer headers to third parties
- BThe application can no longer use HTTP-only cookies for any of its features and pages
- CThe page loads more slowly, because the browser must parse each query string on every request
- DEach request needs a new identifier, which forces the server to rebuild its session table
Show answer and explanationHide answer
Correct answer: AA session ID in a URL is recorded in history, logs and Referer headers, so anyone who reads those can reuse the session. Page speed, cookie use and session table size are not the main risk from putting the identifier in the URL.
Evading IDS, Firewalls, and Honeypots (1 question)
Question 22
Which technique helps a malicious payload evade a signature-based IDS?
- AIP address spoofing, which makes the traffic appear to come from a trusted internal host
- BPort knocking, which opens a service only after a specific sequence of connection attempts
- CTunneling inside an encrypted session that the IDS cannot inspect at all on the wire
- DFragmenting the payload so that no single packet contains the full signature string
Show answer and explanationHide answer
Correct answer: DSplitting content across fragments or packets can stop a signature from matching in any single packet unless the IDS reassembles the stream. Spoofing and port knocking address different controls, and tunneling evades inspection only where the IDS cannot decrypt, which is a separate issue.
Wireless Network Hacking (1 question)
Question 23
Which security protocol should an enterprise choose today over WEP and WPA-TKIP for its wireless networks?
- AWPA3-Enterprise, which adds 192-bit security mode and stronger key management for the network
- BWPA with a shared passphrase configured identically on every access point in the building
- COpen authentication with MAC address filtering enforced on the wireless controller's interface
- DWEP with a longer key, which strengthens the RC4 cipher against known key recovery attacks
Show answer and explanationHide answer
Correct answer: AWPA3-Enterprise provides modern authentication and a 192-bit security mode, replacing protocols with known weaknesses. A longer WEP key does not fix WEP's design, and shared passphrases, open networks and MAC filtering all provide weak protection.
IoT and OT Hacking (1 question)
Question 24
An OT network controls a water pump. Which principle should guide security testing on it?
- ARun aggressive port scans on all controllers during production hours so that the inventory is fast
- BUse passive discovery and non-disruptive tests, with the process safety staff present during testing
- CSend fuzzing traffic to the controllers continuously, to find crashes before attackers do
- DReboot each controller remotely to confirm that it restarts cleanly after every single test
Show answer and explanationHide answer
Correct answer: BOT systems can fail unsafely when scanned or stressed, so testing is passive where possible and non-disruptive, with safety staff present. Aggressive scans, continuous fuzzing and remote reboots can stop or damage the physical process.
Incident Handling (1 question)
Question 25
During an investigation, which action best preserves evidence before a compromised system is changed?
- ARebooting the system so that the malware is removed and the memory is cleared for analysis
- BCreating a forensic disk image and memory capture, with hashes recorded before any changes occur
- CDeleting temporary files from the user profile to free disk space for the analysis work
- DRunning a full antivirus scan that quarantines and modifies the suspicious files found on disk
Show answer and explanationHide answer
Correct answer: BImaging the disk and capturing memory with hashes preserves the state of the system before anything changes, which supports later analysis. Rebooting clears volatile memory, deleting files and running a modifying scan all alter the evidence.
Hacking Web Servers (1 question)
Question 26
Which hardening step most reduces the risk from a misconfigured web server?
- ARunning the web server with root privileges so that it can bind to every port on the host
- BEnabling directory listing so that administrators can browse the content of the web root quickly
- CRemoving default pages, sample scripts, and unneeded modules, and keeping the server patched
- DDisplaying the full server version and build banner in every HTTP response header returned
Show answer and explanationHide answer
Correct answer: CDefault content and unused modules add attack surface, and patching closes known flaws in the server software. Directory listing, root privileges and detailed banners each expose data or increase the impact of a compromise.
SQL Injection (1 question)
Question 27
A tester adds a single quote to a parameter and the application returns a database error. What does this most suggest?
- AStrong input validation is in place, and the error is raised by a logging library in the stack
- BThe parameter is a numeric identifier that the database rejects only when the value is negative
- CThe web server failed to start properly, so the query could not run against the database at all
- DThe input may be concatenated into a SQL query, so injection should be tested further in that parameter
Show answer and explanationHide answer
Correct answer: DA database error triggered by a quote suggests the input reaches a SQL statement without parameterization, which is the condition for injection. Strong validation would normally reject the input without a database error, and the other options do not explain the error.
Hacking Mobile Platforms (1 question)
Question 28
Which mobile security practice most reduces the risk of malicious apps on a corporate device?
- AEnforcing app allowlisting and blocking sideloaded apps through mobile device management
- BAllowing installation from unknown sources so that employees can try new tools when they need them
- CDisabling device encryption so that IT can recover data from lost devices more easily in future
- DGranting every installed app full access to storage and contacts by default, to avoid permission prompts
Show answer and explanationHide answer
Correct answer: AAllowlisting and blocking sideloads through MDM limit installs to vetted apps, which removes most malicious installation paths. Unknown sources, disabled encryption and blanket permissions each widen the attack surface.
Web Application Hacking (1 question)
Question 29
Which two measures reduce SQL injection risk in a web application? (Choose two.)
- AConcatenating user input into SQL strings and filtering only the single quote character
- BUsing parameterized queries or prepared statements with bound variables for user input
- CShowing full database error messages to users so that they can correct their inputs quickly
- DGranting the application's database account the DBA role for simplicity of administration
- EValidating input against an allowlist and using least-privilege database accounts
Show answer and explanationHide answer
Correct answer: B, EParameterized queries keep user data out of the SQL grammar, and least-privilege database accounts limit what an injection can reach. Concatenation with quote filtering is easily bypassed, while verbose errors and DBA rights each give attackers more information or more power.
Hacking Wireless Networks (1 question)
Question 30
Which Bluetooth attack reads data from a device by exploiting weak pairing or authentication?
- ABluejacking, which sends unsolicited messages to nearby devices, usually as a prank
- BBluesnarfing, which exploits weak pairing or authentication to read data from a device
- CWar driving, which maps Wi-Fi networks by listening to beacon frames from a moving vehicle
- DJamming, which floods the 2.4 GHz band so that all radio communication on it fails
Show answer and explanationHide answer
Correct answer: BBluesnarfing gains unauthorized access to data on a Bluetooth device through weak pairing or authentication. Bluejacking only sends messages, war driving maps Wi-Fi, and jamming disrupts radio rather than reading data.