Limited-Time Offer: Enjoy 50% Savings! - Ends In 0d 12h 4m 52s Coupon code: 50OFF

Eccouncil 312-50 Exam Questions & Answers (November 2026)

Certified Ethical Hacker exam questions with 58 free practice questions and explained answers. Updated November 25, 2026. · See all Eccouncil exams

Answer 58 scenario questions on this page and see your score as you go. No sign-up needed.

Exam Details

Exam Code
312-50
Vendor
Eccouncil
Questions
125
Duration (minutes)
4 hours
Passing Score
60% to 85%, depending on the exam form
Delivery
ECC EXAM, VUE
Question Types
Single Choice
Official Page
View Exam Page
1

Introduction to Ethical Hacking

This topic covers the purpose, authorization, and ethical responsibilities of ethical hacking. Candidates must identify the limits of an engagement and act responsibly when handling findings or unexpected exposure.

Question 1 of 58 Single Choice

A company hires a consultant to assess its customer portal under a signed agreement that names two company-owned web hosts. While reviewing the approved test plan, the consultant notices that the portal also uses a vendor-hosted authentication server. The vendor system is not listed in the scope, but the client contact says it is closely connected to the portal.

What should the tester do before assessing the additional host?

Show Answer

Correct Answer

B

Option B is correct because the signed scope excludes the vendor-hosted system, so written authorization must be amended before testing it. Option A is not correct because shared corporate ownership does not extend the signed scope. Option C is not correct because passive activity on an excluded system is still outside authorization. Option D is not correct because verbal approval does not replace the required written authorization.

Question 2 of 58 Single Choice

A consultant is conducting an approved assessment of a company portal, with the rules of engagement prohibiting access to production customer records. During a permitted test of a test account, the portal displays one real customer record. The engagement names a security manager as the contact for unexpected findings and requires the tester to minimize access to sensitive information.

What is the most appropriate response to the exposure?

Show Answer

Correct Answer

C

Option C is correct because the engagement excludes production data, so the tester should stop further access and report the exposure through the agreed contact process. Option A is not correct because further record access exceeds the stated limits. Option B is not correct because moving sensitive data creates unnecessary exposure. Option D is not correct because altering evidence and withholding the event undermine the assessment.

Question 3 of 58 Single Choice

An ethical hacking engagement has ended, and the consultant has documented a confirmed security weakness with supporting evidence. The signed rules of engagement specify that findings go to the security manager and executive sponsor. Before delivery, an executive asks the consultant to omit the weakness because it may delay a product launch, while the security manager has not changed the engagement terms.

How should the tester handle the requested change to the report?

Show Answer

Correct Answer

D

Option D is correct because the tester must provide an accurate, evidence-based report through the agreed channel, even when a client executive objects to a finding. Option A is not correct because ownership does not justify suppressing a substantiated result. Option B is not correct because changing severity to appease someone distorts the evidence. Option C is not correct because public disclosure bypasses the agreed process.

2

Footprinting and Reconnaissance

This topic covers the collection and analysis of public information about an organization, its people, and its online presence. Candidates must select suitable reconnaissance sources, extract relevant clues, and distinguish current information from historical records.

Question 4 of 58 Single Choice

A consulting firm is conducting the initial public-information review for a client that operates several regional websites. The client requests a list of additional hostnames that may be associated with its main domain, but asks the team not to send traffic to its infrastructure. The team can use public internet resources and must record where each candidate hostname was found.

Which action best meets the requirement?

Show Answer

Correct Answer

A

Option A is correct because certificate transparency logs provide publicly available certificate records and can reveal candidate hostnames without connecting to the organization’s systems. Option B actively probes hosts and ports. Option C attempts to obtain zone data from a name server. Option D sends queries to the organization’s name servers, so neither is the required passive approach.

Question 5 of 58 Single Choice

A company has posted annual reports and supplier forms on its public website. During a passive reconnaissance exercise, the assessment lead wants to determine whether these files reveal employee names or document creation software that could help map the public organizational footprint. The team is permitted to retrieve public files, but must not probe the website or contact staff.

Which approach best supports the requested finding?

Show Answer

Correct Answer

A

Option A is correct because locally inspecting public documents with ExifTool can reveal metadata such as author names or software versions without probing internal systems. Option B tests the web server rather than document metadata. Option C relies on direct employee contact. Option D identifies mail routing information, not the document authoring details requested.

Question 6 of 58 Single Choice

A client recently changed its company name and replaced several public webpages. The assessment team needs to understand what information was previously exposed, but its report must distinguish past disclosures from current assets. The team has access to public web archives and search engines, and it must avoid contacting or probing any servers while researching the change.

What is the most appropriate next step?

Show Answer

Correct Answer

A

Option A is correct because archived snapshots can show information the organization previously published, while current public sources are needed to confirm whether it remains valid. Option B wrongly treats historical data as current. Option C probes systems rather than conducting passive research. Option D turns public information into attempted account access, which is outside footprinting.

3

Scanning Networks

This topic covers techniques for discovering active hosts and identifying open, closed, or filtered network ports. Candidates must choose suitable scan methods and interpret their results in light of the probes sent and the responses received.

Question 7 of 58 Single Choice

An internal assessment must identify TCP ports on a Linux server that runs a fragile legacy service. The service owner permits individual SYN probes but requests that the assessment not complete TCP handshakes. The tester has root privileges on the scanning system, and the target address is 10.40.6.18. Which Nmap command best meets this requirement?

Which Nmap scan type best meets the service owner's requirement?

Show Answer

Correct Answer

A

Option A is correct because a SYN scan sends TCP SYN probes without completing the TCP handshake, as the service owner requires. Option B is not correct because a TCP connect scan completes the handshake. Option C scans UDP ports rather than TCP ports. Option D is an ACK scan, which is used to assess firewall filtering and does not reliably identify open ports.

Question 8 of 58 Single Choice

A network team needs a live-host inventory for the subnet 10.20.8.0/24 before scheduling a later port assessment. Its border configuration drops ICMP echo requests, but systems in the subnet respond to TCP probes sent to port 443. The current task is limited to discovering responding hosts, not checking which ports are open. Which command should the tester run?

Which command should the tester run to discover responding hosts without conducting a port scan?

Show Answer

Correct Answer

A

Option A is correct because `-sn` disables port scanning and `-PS443` uses TCP SYN probes to port 443 for host discovery. Option B relies on ICMP echo, which the network blocks. Option C treats every address as online and scans port 443 rather than discovering hosts. Option D lists target addresses without sending discovery probes.

Question 9 of 58 Single Choice

A tester runs an Nmap UDP scan against port 161 on a server during an approved network assessment. The scan sends probes and retries them, but receives neither a UDP response nor an ICMP error from the target. The team needs the result recorded accurately because it will decide whether to request a later application-level check. How should the tester interpret the UDP port result?

How should the tester interpret the UDP port result?

Show Answer

Correct Answer

D

Option D is correct because a UDP probe with no response leaves Nmap unable to distinguish an open service from filtering that suppresses replies. Option A is not justified because an open UDP service may respond, but silence alone does not prove it is open. Option B requires a response indicating that the port is closed. Option C requires evidence of filtering, such as certain ICMP errors.

4

Enumeration

This topic covers queries that reveal named resources, accounts, and configuration details through network services. Candidates must select suitable enumeration requests, interpret the returned data, and avoid actions that change settings or access unauthorized resources.

Question 10 of 58 Single Choice

During an internal assessment, the network team confirms that SNMP version 2c is enabled on a router and provides the read-only community string audit_ro. The team wants the tester to collect the system description and interface information, but prohibits changes to device settings. The tester already has the router address and must choose a query that returns multiple relevant values.

Which command should the tester use to retrieve the system information and interface details available through the authorized read-only SNMP service?

Show Answer

Correct Answer

A

Option A is correct because walking the management-information-base subtree retrieves the available system and interface values with the supplied read-only community. Option B requests only one scalar value, the system name. Option C attempts to change a value and the community is read-only. Option D walks only the system-name object, so it does not retrieve interface details.

Question 11 of 58 Single Choice

A company has approved enumeration of a Windows file server at 10.20.4.25. Its administrator confirms that anonymous SMB sessions can list share names, but file access requires a separate account that the tester has not been given. The assessment objective is limited to recording the names of available shares, and the tester must not attempt to read or modify any files.

Which command best meets the requirement to identify the server's available SMB share names without opening files?

Show Answer

Correct Answer

A

Option A is correct because the list option requests the server's share list, and the no-password option attempts the anonymous access permitted by the server. Option B and Option D require the share name to be known already. Option C uses an authenticated account, which the tester does not have, rather than the allowed anonymous session.

Question 12 of 58 Single Choice

An organization has authorized read-only LDAP enumeration of its internal directory. The directory administrator confirms that anonymous simple binds may search below the base distinguished name dc=corp,dc=example,dc=net. The tester needs only user IDs and department values for person entries, has no administrator credentials, and must avoid returning unrelated computer records.

Which ldapsearch command should the tester use to enumerate the user IDs and department attributes for person entries through the permitted anonymous bind?

Show Answer

Correct Answer

A

Option A is correct because the simple anonymous bind, directory base, person filter, and requested attributes match the permitted query. Option B limits the search to the base entry instead of searching its subtree. Option C filters for computer entries, not people. Option D requires an administrator bind and password, which are not part of the approved access.

5

Vulnerability Analysis

Vulnerability analysis involves checking whether reported weaknesses apply to assessed systems and judging their risk. Candidates must interpret technical evidence and prioritize findings using exploitability, exposure, and business impact.

Question 13 of 58 Single Choice

An authorized vulnerability assessment finds that a Linux server runs an OpenSSL version listed as affected by a high-severity CVE. The organization uses a distribution that regularly backports security fixes, and its change records show a recent package update. The scanner did not authenticate to the server, but the owner needs a reliable finding before scheduling downtime. What should the analyst do before reporting the finding as confirmed?

What should the analyst do before reporting the finding as confirmed?

Show Answer

Correct Answer

A

Option A is correct because the distributor may backport a security fix without changing the upstream version string, so the installed build and advisory determine applicability. Option B is not correct because the scanner's version match alone can create a false positive. Option C is not correct because a CVE severity score does not confirm that this installation is vulnerable. Option D is not correct because the result can be investigated.

Question 14 of 58 Single Choice

A security team has limited maintenance windows and must choose one finding for immediate remediation. An isolated test server has a CVSS base score of 9.8, but no known exploit and no connection to production. An internet-accessible payroll server has a CVSS base score of 8.1, and a reliable public exploit exists for the affected component. A development server has a separate finding scored 6.5. Which finding should the team investigate and remediate first?

Which finding should the team investigate and remediate first?

Show Answer

Correct Answer

B

Option B is correct because the payroll server is internet-accessible, supports a sensitive function, and has a finding with a known exploit. Option A is not correct because a base score alone does not account for isolation or business context. Option C is not correct because the scenario gives no evidence that this finding presents greater risk. Option D is not correct because lower scores do not automatically take precedence.

6

System Hacking

This topic covers password auditing, privilege escalation, and actions that can conceal activity on compromised systems. Candidates must assess system-level evidence, choose safe validation methods, and distinguish what the available evidence proves from what it only suggests.

Question 15 of 58 Single Choice

During an authorized assessment of a Windows domain, the security team provides a protected export of NTLM password hashes from a lab replica. The assessment rules prohibit authentication attempts against production accounts, and the team wants to identify weak passwords before a scheduled password-policy review. The domain uses account lockout controls.

Which method best meets the audit requirement while avoiding account lockouts?

Show Answer

Correct Answer

A

Option A is correct because Hashcat can test candidate passwords against the approved offline hash export without sending login attempts to the domain. Option B is not correct because repeated live guesses can trigger lockouts. Option C is not correct because a password spray still sends live authentication attempts. Option D is not correct because resetting all passwords is disruptive and does not complete the requested audit.

Question 16 of 58 Single Choice

An authorized assessment finds that a Linux maintenance script is group-writable by the tester's account. A sudo rule allows that same account to run the script as root without a password. The host supports a production service, and the rules of engagement prohibit making configuration changes or causing service interruption. An isolated clone is available for validation.

What is the best next step for the tester?

Show Answer

Correct Answer

B

Option B is correct because the writable script and root execution rule provide evidence of a privilege-escalation path, while an isolated clone allows validation without changing production. Option A is not correct because running the script on production could cause an unintended change. Option C is not correct because changing permissions exceeds the tester's validation role. Option D is not correct because creating an administrator account changes the system and is unnecessary.

Question 17 of 58 Single Choice

A Windows server forwards audit events to a central collector. During a review of a suspected compromise, the local Security log contains event 1102 at 02:14, while the central collector shows a gap in locally generated Security events after that time. The server also recorded a successful administrator logon earlier that night, but no evidence yet identifies the person or process responsible.

Which conclusion is best supported by this evidence?

Show Answer

Correct Answer

C

Option C is correct because Windows Security event 1102 records that the Security audit log was cleared, but the event alone does not establish the actor or motive. Option A is not correct because a reboot does not routinely clear that log. Option B is not correct because Defender cleanup does not explain event 1102. Option D is not correct because the event does not prove external access or domain administrator privileges.

7

Malware Threats

This topic covers malicious software and the ways it behaves, spreads, or activates. Candidates must use observed behavior and conditions to distinguish malware types and identify the threat they present.

Question 18 of 58 Single Choice

A security team reviews alerts from several workstations after endpoint protection detects a suspicious executable. The file has different byte signatures on each machine, but each copy produces the same behavior during controlled analysis. Analysts also observe an encrypted payload and a similar decryptor structure in every copy. No evidence shows that the file spreads itself to other hosts.

Which malware type best matches these observations?

Show Answer

Correct Answer

A

Option A is correct because the changing encrypted payload and consistent behavior indicate polymorphic malware. Option B is not correct because metamorphic malware rewrites its code structure rather than relying on an encrypted payload that changes. Option C is not correct because a logic bomb waits for a trigger. Option D is not correct because a worm self-propagates between systems.

Question 19 of 58 Single Choice

A company finds that a malicious program has moved from one server to several others overnight. The affected servers run the same vulnerable service, and network records show repeated exploitation attempts between them. No employee opened an attachment or installed a file during the incident. The program also created copies of itself on newly compromised servers, while the company has not observed file encryption or ransom demands.

Which malware type best explains the observed spread?

Show Answer

Correct Answer

B

Option B is correct because the malware spreads directly between servers by exploiting a service, without requiring a user to run an infected file. Option A is not correct because a virus typically depends on a host file and user action to spread. Option C is not correct because a Trojan disguises malicious behavior as legitimate software. Option D is not correct because encryption for extortion does not explain the self-propagation.

Question 20 of 58 Single Choice

During an internal review, an analyst finds malicious code in a business application scheduled for removal. The code has been present for months without producing visible effects, and it does not attempt to contact other systems or copy itself. Testing in an isolated environment shows that it deletes selected local data only after a named administrator account is disabled. The company needs to classify the threat before planning containment.

Which malware type best fits the delayed destructive action?

Show Answer

Correct Answer

A

Option A is correct because the destructive code remains inactive until a specified condition occurs, namely the account being disabled. Option B is not correct because a worm is defined by self-propagation, which the investigation did not find. Option C is not correct because adware displays or delivers advertising. Option D is not correct because a rootkit conceals activity or maintains hidden access.

8

Sniffing

This topic covers passive packet capture and active methods that can expose network traffic. Candidates must select suitable capture methods and interpret evidence that traffic is being redirected for inspection.

Question 21 of 58 Single Choice

During an authorized assessment of a corporate LAN, an analyst connects a laptop to an unused switch port and runs Wireshark in promiscuous mode. The target employee workstation and the analyst are on the same VLAN, but the switch forwards unicast frames only to their intended ports. The assessor must observe all traffic entering and leaving the employee port without changing endpoint settings.

Which configuration should the analyst use to meet the requirement?

Show Answer

Correct Answer

B

Option B is correct because a SPAN session can copy ingress and egress frames from the employee port to the analyzer port, giving Wireshark visibility into switched unicast traffic. Option A is not correct because promiscuous mode does not make a switch forward frames from other ports. Option C is not correct because no hub is present. Option D cannot recover packets the laptop never received.

Question 22 of 58 Single Choice

A support team has approved inspection of an internal test service at 10.20.4.18 on TCP port 8080. The service exchanges test credentials in cleartext, and the assessor must confirm what appears on the wire. The laptop receives mirrored traffic from a busy VLAN, and company rules prohibit storing unrelated employee packets when a narrower capture is practical.

Which capture configuration best meets the assessor's requirements?

Show Answer

Correct Answer

A

Option A is correct because the capture filter restricts collection to TCP traffic involving the specified host on port 8080 before packets are stored. Option B uses Wireshark display-filter syntax, which is applied after capture. Option C collects unrelated traffic the assessor must avoid storing. Option D also uses display-filter syntax, not valid capture-filter syntax.

Question 23 of 58 Single Choice

In an isolated IPv4 lab, an assessor is approved to examine how endpoint address resolution affects packet visibility. Two test workstations continue reaching the network, but their ARP tables now map the default gateway's IP address to the assessor laptop's MAC address. A capture on the laptop shows traffic from both workstations arriving there, and the assessor forwards the packets to the real gateway.

Which technique best explains the observed traffic redirection?

Show Answer

Correct Answer

B

Option B is correct because the endpoints have learned the assessor's MAC address for the gateway IP, directing local traffic through the assessor. Option A concerns switch forwarding behavior, not false IP-to-MAC mappings in endpoint caches. Option C exhausts DHCP leases rather than changing ARP entries. Option D alters name resolution and does not set a gateway's hardware address.

9

Social Engineering

This topic examines how people may be manipulated into disclosing information, granting access, or taking unsafe actions. Candidates must recognize common social engineering tactics and select appropriate ways to verify requests, protect access, and report suspicious items.

Question 24 of 58 Single Choice

A finance employee receives an urgent email that appears to come from the CFO. The sender asks for an employee's payroll bank details to be changed before the next payment run and says the request must remain confidential. The address differs from the CFO's usual address by one character. Company policy requires secondary verification for payroll changes through an approved contact channel.

Which action best verifies the request before any payroll change is made?

Show Answer

Correct Answer

C

Option C is correct because the company requires secondary verification, and the approved directory provides a contact channel independent of the suspicious message. Option A is not correct because a sender who controls the message can answer the reply. Option B is not correct because the signature number may be controlled by the sender. Option D is not correct because a colleague's opinion does not verify the request.

Question 25 of 58 Single Choice

At a company office, employees must use badges to enter a restricted corridor, and visitors are required to check in at reception. An unfamiliar person carrying a parcel says the reception desk is busy and asks an employee to hold the secured door. The person has no visitor badge and says the package is time-sensitive. The employee is alone at the door.

What should the employee do?

Show Answer

Correct Answer

B

Option B is correct because the visitor has not been verified and the site requires badge-controlled entry, so the employee should keep the boundary intact and use the reception process. Option A is not correct because it grants access before verification. Option C is not correct because paperwork does not authorize entry. Option D is not correct because an escort to an office still bypasses reception.

Question 26 of 58 Single Choice

An employee finds a USB drive labeled with the name of a senior payroll manager near the entrance to the finance office. Several staff members are discussing whether the owner may need the files before a scheduled payroll run. Company policy prohibits employees from connecting unknown removable media, and the security team has a process for handling found devices.

What is the best immediate response to the USB drive?

Show Answer

Correct Answer

D

Option D is correct because the unexpected labeled drive may be bait intended to prompt someone to connect it, and the company's policy assigns unknown media to the security team. Option A is not correct because a spare workstation is still an unauthorized system. Option B is not correct because the label does not establish ownership or make handling safe. Option C is not correct because connecting the drive creates the same exposure.

10

Denial-of-Service

This topic covers denial-of-service methods that disrupt the availability of systems and networks. Candidates must interpret attack symptoms and select suitable controls that reduce disruption while preserving legitimate access.

Question 27 of 58 Single Choice

During a permitted resilience exercise, a company experiences a sudden rise in inbound UDP traffic that saturates its internet link. The traffic comes from many unrelated DNS servers, and packet analysis shows large responses but no corresponding outbound queries from the company. The company needs to classify the event before selecting an appropriate mitigation with its upstream provider.

Which denial-of-service pattern best explains the evidence?

Show Answer

Correct Answer

B

Option B is correct because the target receives large UDP responses from many third-party servers without matching requests, which indicates reflection and amplification. Option A is not correct because the traffic consists of responses from intermediaries, not direct packets from the apparent sources. Option C concerns TCP handshakes. Option D would involve ICMP traffic.

Question 28 of 58 Single Choice

A company validates a public Linux service during an authorized test window. The service becomes difficult to reach as inbound TCP SYN packets rise sharply from many addresses. Monitoring shows few completed handshakes, an exhausted half-open connection queue, and delayed connections for legitimate users. The kernel supports SYN cookies, but the host configuration currently has them disabled. The service must remain available without broadly blocking clients.

Which host-level control best addresses the observed failure while preserving normal service for legitimate clients?

Show Answer

Correct Answer

A

Option A is correct because SYN cookies reduce the need to retain connection state before a client completes the handshake, addressing the exhausted half-open queue. Option B changes application capacity but not the TCP backlog. Option C would block legitimate clients. Option D would prevent normal TCP connections from working.

11

Session Hijacking

Session hijacking involves taking control of an active communication session by exploiting its connection state or trust assumptions. Candidates must recognize common TCP hijacking approaches and select controls that authenticate session traffic and protect its integrity.

Question 29 of 58 Single Choice

A maintenance terminal communicates with a control server through a plaintext TCP connection. An attacker has gained a position on the path and can observe packets in both directions, but the connection must remain active for the operator. The attacker knows the current four-tuple and the latest sequence and acknowledgment values. The server accepts data only from the existing connection.

Which action would most directly allow the attacker to inject data into the established TCP stream?

Show Answer

Correct Answer

A

Option A is correct because the attacker must use sequence and acknowledgment values that the endpoints currently accept for the payload to enter the established stream. Option B is not correct because a SYN begins connection establishment. Option C is not correct because a reset terminates the connection. Option D is not correct because stale sequence values are rejected.

Question 30 of 58 Single Choice

A remote administration service uses a legacy TCP stack with an initial sequence number algorithm that advances predictably between connections. An attacker cannot capture packets from the active session, but has learned the client and server addresses and ports and has observed earlier connections from the same client. The service accepts commands based on the source address and the established TCP connection.

Which technique best describes how the attacker could attempt to take over the existing TCP session?

Show Answer

Correct Answer

B

Option B is correct because predictable sequence state can let an attacker who cannot observe live packets forge a segment for the known connection. Option A is not correct because ARP poisoning is an interception method, not blind sequence prediction. Option C is not correct because a SYN flood consumes connection resources. Option D is not correct because an old segment will not match the current sequence state.

Question 31 of 58 Single Choice

A company’s remote administration service carries commands over plaintext TCP across a routed network that is outside the company’s control. The client and server can both be configured to use TLS, and the operations team can deploy client certificates. The service must remain available to approved administrators, and the primary concern is an attacker injecting commands into an active session rather than merely interrupting it.

Which change best protects the command stream from the described session-hijacking attempt?

Show Answer

Correct Answer

C

Option C is correct because mutual TLS authenticates both endpoints and protects stream contents with integrity, rejecting forged payloads from the routed segment. Option A is not correct because random sequence numbers do not stop an in-path attacker. Option B is not correct because source filtering trusts spoofable addresses. Option D is not correct because shorter timeouts do not authenticate traffic.

12

Evading IDS, Firewalls, and Honeypots

This topic covers methods that can cause intrusion detection systems or firewalls to miss or misinterpret network activity, as well as indicators that a system may be a honeypot. Candidates must assess traffic behavior and system responses to identify these techniques and their likely effects.

Question 32 of 58 Single Choice

During an authorized assessment of a legacy network segment, a tester sends a crafted request to a Linux application server through an inline IDS. The IDS records the request as harmless, but the server logs show that a command was processed. A packet capture shows overlapping IPv4 fragments, with conflicting bytes in the overlap. The sensor and server reconstruct different payloads.

Which technique best explains why the endpoint processes the command while the IDS records only benign content?

Show Answer

Correct Answer

A

Option A is correct because conflicting overlapping fragments can be reconstructed differently by the IDS and the endpoint, matching the observed content difference. Option B is not correct because the evidence concerns IP fragment reassembly, not forged TCP sequence state. Option C is not correct because the capture shows fragments, not DNS queries. Option D is not correct because no source-routing behavior is described.

Question 33 of 58 Single Choice

An authorized egress-control test finds that workstations can send DNS requests only to a corporate recursive resolver, and direct outbound TCP connections are blocked. The resolver accepts lookups for external domains. Monitoring then shows one workstation issuing frequent queries with long, high-entropy subdomain labels to an assessment-owned domain. The DNS service remains available for normal business use.

Which evasion technique most likely accounts for the traffic pattern?

Show Answer

Correct Answer

B

Option B is correct because the permitted resolver performs external lookups, while encoded data in long, high-entropy query labels is consistent with DNS tunneling. Option A is not correct because the firewall blocks outbound ICMP. Option C is not correct because the logs contain DNS queries rather than proxy connections. Option D is not correct because the observed traffic consists of client queries, not spoofed DNS responses.

Question 34 of 58 Single Choice

During an authorized assessment, an SSH endpoint presents a Linux banner and accepts the supplied test credentials. Each connection returns the same directory listing, and commands that should create or remove a temporary file produce identical output on later sessions. The service responds promptly, but no state persists between connections. The assessment team has permission to identify deception systems without attempting destructive actions.

What is the most likely explanation for the SSH behavior?

Show Answer

Correct Answer

A

Option A is correct because canned command responses and a filesystem that never changes are characteristic of a low-interaction honeypot emulating SSH. Option B is not correct because a host firewall does not explain the fixed command output. Option C is not correct because the sessions show no evidence of a changing backend host. Option D is not correct because the service responds promptly rather than delaying connections.

13

Hacking Web Servers

This topic covers weaknesses in web server software and its configuration, including exposed server details, unnecessary services, and unsafe defaults. Candidates must assess server-level exposure and select changes that reduce it without disrupting required hosting functions.

Question 35 of 58 Single Choice

An organization hosts public static files on Apache HTTP Server 2.4. An authorized review finds that responses reveal the Apache version and operating system, while generated error pages also include a server signature. The team must reduce these disclosures using Apache configuration and must keep the site available without changing its static content.

Which Apache configuration best addresses both disclosures?

Show Answer

Correct Answer

B

Option B is correct because ServerTokens Prod limits the server header to the product name, while ServerSignature Off removes details from server-generated page footers. Option A increases the exposed information. Option C still discloses the operating system in the header. Option D leaves the footer signature enabled.

Question 36 of 58 Single Choice

A company runs an IIS 10 server for static policy documents, and no team uses WebDAV to publish or edit files. During an authorized configuration review, the tester confirms that WebDAV-related methods are available. The service owner wants to remove the unused capability, but the site must continue serving existing files and must not depend on WebDAV.

Which server-level change most directly removes the unused WebDAV capability?

Show Answer

Correct Answer

A

Option A is correct because removing the WebDAV Publishing role service removes a capability the static site does not need. Option B hides method information but does not remove WebDAV handlers. Option C reduces banner disclosure only. Option D affects directory listings and does not disable WebDAV.

Question 37 of 58 Single Choice

A public Apache 2.4 file server hosts approved PDF documents for customers. The document root has no index file, and its configuration enables Indexes, so a request for a folder displays its contents. The business requires customers to continue opening documents through known URLs, and the administrator wants to prevent browsing of folder contents without moving the files.

Which change prevents directory listings while preserving access to files by their direct URLs?

Show Answer

Correct Answer

A

Option A is correct because disabling Indexes stops Apache from generating directory listings while leaving direct file requests available. Option B is unnecessary and changes the hosting design. Option C reduces server identification details but does not affect listings. Option D blocks access to the files as well as the directory listing.

14

Hacking Web Applications

This topic covers weaknesses in web application behavior, including unsafe content handling, forged requests, and file uploads. Candidates must analyze application scenarios and select controls that address the specific weakness without relying on unrelated protections.

Question 38 of 58 Single Choice

An internal support portal stores customer display names and inserts them into a shared ticket page viewed by agents. During an authorized test, a harmless markup probe entered as a display name is saved and later interpreted by the browser when another agent opens the ticket. The application uses server-side templates and must continue to allow ordinary punctuation in names.

Which change best addresses the vulnerability while preserving ordinary punctuation in names?

Show Answer

Correct Answer

A

Option A is correct because the value is saved and later displayed to other users, so output-context encoding prevents the browser from treating it as executable markup. Option B is not correct because input filtering can miss encoded content and does not address each output context. Option C is not correct because a Content Security Policy is a defense-in-depth control, not a replacement for safe output handling. Option D is not correct because HTTPS protects data in transit, not browser interpretation of page content.

Question 39 of 58 Single Choice

A staff portal lets employees change their notification address through a POST form. The application authenticates requests with a Secure session cookie configured with SameSite=None because an approved embedded workflow requires cross-site use. The form has no anti-CSRF value, and the server accepts the update whenever the cookie is present. The team must preserve the embedded workflow.

Which change best prevents this cross-site request forgery risk?

Show Answer

Correct Answer

A

Option A is correct because the server can reject a state-changing request that lacks the expected unpredictable token. Option B is not correct because CORS does not prevent a browser from submitting a cross-origin form. Option C is not correct because changing a profile through GET still permits forged requests and can expose state changes through links. Option D is not correct because HttpOnly limits script access to the cookie but does not stop the browser from sending it.

Question 40 of 58 Single Choice

A customer portal accepts profile images and checks only the submitted Content-Type header before saving each file beneath a publicly accessible directory. The web server can execute script files in that directory. The application must continue to accept common image formats, and the development team can change validation and storage behavior but cannot disable uploads.

Which design change provides the strongest protection against execution of uploaded files?

Show Answer

Correct Answer

B

Option B is correct because server-side validation and image re-encoding limit accepted content, while storage outside the web root prevents direct web execution. Option A is not correct because a client can supply a misleading Content-Type header. Option C is not correct because filename checks can be bypassed and do not remove execution from the upload location. Option D is not correct because authentication does not make uploaded content safe.

15

SQL Injection

This topic covers how SQL injection occurs when an application handles data as part of a database command. Candidates must recognize injection behavior and select controls that keep supplied values separate from SQL statements.

Question 41 of 58 Single Choice

A company inventory service uses Java and JDBC with a PostgreSQL database. Its search function builds a query by appending a user-supplied product name and an optional status value to a SQL string. The team needs to retain searches for punctuation and ordinary product names, and it wants a code-level change that protects both values.

Which change best prevents SQL injection in the search function?

Show Answer

Correct Answer

A

Option A is correct because the search function can bind both user-supplied values separately from the SQL statement. Option B is not correct because manual escaping can be incomplete or inconsistent. Option C is not correct because concatenation inside a stored procedure remains injectable. Option D is not correct because keyword filtering does not reliably prevent SQL syntax from entering the query.

Question 42 of 58 Single Choice

During an authorized test of a reporting portal, an analyst finds that a numeric report identifier affects a PostgreSQL query. The portal does not display database errors, and response times remain similar across repeated requests. However, a condition that evaluates true returns the normal report rows, while a false condition returns an empty table, even though both requests use the same identifier format.

Which SQL injection technique best explains the observed behavior?

Show Answer

Correct Answer

C

Option C is correct because the page returns different record counts for true and false conditions without showing database errors. Option A is not correct because no database error messages reveal query details. Option B is not correct because the response does not display data combined from another query. Option D is not correct because the tester observes no condition-dependent delay.

Question 43 of 58 Single Choice

A billing application stores customer account names using a parameterized insert into a MySQL database. Months later, a nightly reconciliation job reads those names and constructs a lookup query by concatenating each stored value into SQL. A security review finds that imported account names can contain punctuation, and the team wants to fix the vulnerable database operation without restricting legitimate names.

Which change addresses the SQL injection risk in the account lookup?

Show Answer

Correct Answer

B

Option B is correct because the later lookup must bind the stored account name as a value rather than concatenate it into SQL. Option A is not correct because escaping at storage time does not guarantee safe use in a different query context. Option C is not correct because validation alone does not make concatenation safe. Option D is not correct because HTML encoding does not protect SQL syntax.

16

Hacking Wireless Networks

This topic covers wireless network authentication, access point settings, and common weaknesses in wireless security. Candidates must assess wireless configurations and select controls that reduce unauthorized access and attacks against wireless clients.

Question 44 of 58 Single Choice

A company uses WPA2-Enterprise with PEAP and username-and-password credentials. During an authorized wireless assessment, the tester confirms that managed laptops accept the authentication server certificate without checking its issuing authority or server name. The security team must retain the existing credential method, and it can update the laptop configuration centrally. What should it change?

Which configuration change best addresses the identified risk while retaining the current username-and-password authentication method?

Show Answer

Correct Answer

A

Option A is correct because validating the RADIUS certificate and server name helps prevent clients from sending credentials to an impostor access point. Option B is not correct because it preserves the condition that permits credential capture. Option C removes wireless authentication, and Option D does not authenticate access points or protect credentials.

Question 45 of 58 Single Choice

A small office access point uses WPA2-Personal with a long, randomly generated passphrase. An authorized assessment finds that WPS PIN enrollment is enabled, and the tester can repeatedly submit PIN attempts. The office has no devices that require WPS onboarding, but management wants to avoid changing the passphrase because it is already deployed to many approved devices. Which change is most appropriate?

Which change most directly removes the demonstrated wireless access path?

Show Answer

Correct Answer

A

Option A is correct because disabling WPS removes the PIN-based enrollment path that the assessment found exposed. Option B and Option C change network visibility, not WPS availability. Option D strengthens passphrase resistance but does not close the WPS path. Option E restricts client addresses but does not disable WPS enrollment.

Question 46 of 58 Single Choice

A company is replacing its access points in a restricted work area. The inventory confirms that every approved client supports WPA3-Personal, and the security requirement forbids older WPA2 connections because the assessment found clients could be induced to join the WPA2 option. The team also wants protection against forged deauthentication frames. Which access point configuration best meets these requirements?

Which access point configuration best meets the security requirement?

Show Answer

Correct Answer

A

Option A is correct because the scenario permits WPA3-capable clients only, so disabling transition mode removes the WPA2 fallback, while required protected management frames help resist forged management frames. Option B and Option D retain transition mode, and Option D also does not require protection. Option C uses obsolete TKIP and does not address downgrade risk.

17

Hacking Mobile Platforms

This topic covers security risks and protective controls for mobile devices and applications. Candidates must assess mobile platform behavior and select controls that protect app data and prevent unsafe access to app functions.

Question 47 of 58 Single Choice

A company is preparing an Android app for field staff who may lose their devices. The app must retain an authentication token across restarts, and the team currently writes the token as plain text to SharedPreferences. The app should still restore the token after the user reopens it, but extracting app files from a lost or compromised device must not reveal the token directly.

Which design best meets the storage requirement?

Show Answer

Correct Answer

A

Option A is correct because encrypting the token and protecting its key with Android Keystore secures the stored value while allowing recovery after a restart. Option B is not correct because Base64 is encoding, not protection. Option C is not correct because obfuscation does not protect data read from app storage. Option D is not correct because private SharedPreferences leaves the token in plaintext on a compromised device.

Question 48 of 58 Single Choice

An Android 13 app uses an exported activity with an intent filter to receive a required account deep link. A security review finds that the activity performs a sensitive account action when it receives a particular intent, but authentication is checked only in the app launcher flow. The product team must keep deep links working for customers while preventing another installed app from invoking the action without an authorized session.

Which change best preserves the deep link while preventing an unauthenticated caller from triggering the sensitive action?

Show Answer

Correct Answer

A

Option A is correct because the exported activity must treat incoming intents as untrusted and enforce authorization before the sensitive operation. Option B is not correct because making the activity non-exported prevents external deep links from reaching it. Option C is not correct because removing the intent filter also breaks the required deep link. Option D is not correct because exported activities can receive intents from other apps.

Question 49 of 58 Single Choice

An iOS app stores recovery codes in a local file on company-managed phones. Staff need to use the codes only while the device is unlocked, and the codes must not be copied into iCloud or computer backups. The current file uses NSFileProtectionCompleteUntilFirstUserAuthentication, and the app has not set any backup-exclusion attribute. The team wants a file-level configuration that meets both requirements.

Which file configuration meets both requirements?

Show Answer

Correct Answer

A

Option A is correct because NSFileProtectionComplete restricts file access while the device is locked, and isExcludedFromBackupKey excludes the file from backups. Option B is not correct because the file remains backup eligible and can be accessed after the first unlock. Option C is not correct because NSFileProtectionNone does not restrict access while locked. Option D is not correct because the file remains in backups.

18

IoT and OT Hacking

This topic covers security assessment methods for connected devices and operational technology systems. Candidates must be able to examine IoT firmware and protocols while avoiding unsafe actions that could disrupt industrial or building operations.

Question 50 of 58 Single Choice

A facilities team has authorized an assessment of a fleet of environmental sensors that report to a building management system. The vendor supplied an unencrypted firmware image for the sensor model, and the team wants to check for embedded credentials and configuration files. Production devices must remain online, and no firmware changes are permitted during the assessment.

Which action best supports the next stage of the assessment?

Show Answer

Correct Answer

A

Option A is correct because the known, unencrypted firmware image can be examined offline with binwalk, avoiding changes to the deployed device. Option B is not correct because flashing the production unit risks disrupting service. Option C is not correct because changing firmware through the bootloader exceeds the stated need. Option D is not correct because a PLC is not a safe environment for directly running an image.

Question 51 of 58 Single Choice

During an authorized assessment at a water treatment facility, an engineer must verify the temperature setpoint stored in a PLC that communicates over Modbus/TCP. The process is operating normally, the PLC controls live equipment, and the facility permits read-only checks during production. The assessor has the register address from the approved device documentation and must not change any value or coil state.

Which Modbus function should the assessor use to read the current setpoint without changing the controller?

Show Answer

Correct Answer

B

Option B is correct because Modbus function code 03 reads holding registers, allowing the assessor to retrieve the setpoint without writing to the PLC. Option A is not correct because function code 06 writes a register. Option C is not correct because function code 05 changes a coil state. Option D is not correct because function code 16 writes multiple registers and could alter process settings.

Question 52 of 58 Single Choice

A manufacturer uses an MQTT broker to carry telemetry from warehouse temperature sensors to an internal dashboard. The assessment scope includes one named telemetry topic and permits testing with an unauthenticated client, but excludes control topics and denial-of-service activity. The broker serves active sensors, so the assessor must gather evidence without publishing messages or placing unnecessary load on the service.

Which test best checks whether an unauthenticated client can access the assigned telemetry topic while limiting the chance of affecting device operation?

Show Answer

Correct Answer

A

Option A is correct because a scoped subscription tests access to the assigned telemetry topic without sending commands or changing broker state. Option B is not correct because a retained command could affect devices or persist for later clients. Option C is not correct because wildcard access and publishing exceed the limited test. Option D is not correct because it risks disrupting the broker and telemetry service.

19

Cloud Computing

This topic covers security controls for cloud services, workloads, storage, and identities. Candidates must select configurations that limit access, protect data, and use cloud-native controls appropriately.

Question 53 of 58 Single Choice

A company stores customer reports in an Amazon S3 bucket. An older application uploads each object with a public-read ACL, but the application team can update its upload code during a planned release. The security team requires the bucket to remain private even if a future operator adds an overly broad bucket policy. The application must continue uploading reports after the change.

Which configuration best meets the security requirement while allowing the application to continue uploading objects?

Show Answer

Correct Answer

B

Option B is correct because account-level Block Public Access prevents public ACL and policy exposure, while Bucket owner enforced removes ACL-based access after the uploader stops sending public-read ACLs. Option A leaves public ACLs active. Option C still permits access through the ACLs. Option D grants broad access instead of restricting it.

Question 54 of 58 Single Choice

A production application on Amazon EC2 reads configuration files from one S3 bucket prefix. Its current AMI contains an IAM access key, and several instances were launched from that image. The application can use the AWS SDK default credential provider chain, but downtime is limited to a short maintenance window. The security team requires the key to stop working after migration and the workload to retain read access only to that prefix.

Which approach best replaces the embedded credentials without granting more access than the application needs?

Show Answer

Correct Answer

C

Option C is correct because the EC2 instance profile provides temporary role credentials, and the policy can limit reads to the required S3 prefix. Option A leaves reusable credentials in the image. Option B grants excessive permissions and retains the exposed key. Option D uses a user password rather than an appropriate workload credential.

Question 55 of 58 Single Choice

A company runs its application instances in a private Amazon VPC subnet and its PostgreSQL database on Amazon RDS without a public address. The database security group currently allows inbound TCP port 5432 from 0.0.0.0/0 because a temporary troubleshooting rule was never removed. Only the application instances should connect, and the application tier already has a dedicated security group.

Which change most directly restricts database connections to the approved application tier?

Show Answer

Correct Answer

A

Option A is correct because the database security group can use the application tier security group as the inbound source, limiting connections to approved application instances. Option B permits the port from every address. Option C leaves the database broadly reachable. Option D uses a wider subnet-based boundary and retains unnecessary public exposure.

20

Cryptography

This topic covers cryptographic methods used to protect data, verify integrity, and establish identity. Candidates must choose suitable algorithms and key-handling approaches for realistic security requirements.

Question 56 of 58 Single Choice

A security team must send a quarterly assessment archive to an external auditor. The archive contains regulated data, and the auditor's RSA public key has been validated through an established certificate process. The sender must be able to prove which company signed the package, while only the auditor can recover its contents. Both parties support AES and RSA, but large-file processing must remain efficient.

Which approach best meets the team's requirements?

Show Answer

Correct Answer

D

Option D is correct because a random AES key handles the large archive efficiently, the auditor's public key protects that key, and the sender's private key signs the archive digest. Option A exposes the archive to anyone with the sender's public key. Option B uses the wrong parties' keys. Option C lacks sender authentication and applies RSA inefficiently to the full file.

Question 57 of 58 Single Choice

A document service encrypts customer records before storing them in object storage. A security review found that the current format uses encryption without reliable tamper detection. The application team can change the format for new records, but it needs a single authenticated-encryption operation and must reject modified records before exposing plaintext to downstream processing.

Which encryption approach best satisfies the application's requirements?

Show Answer

Correct Answer

A

Option A is correct because AES-GCM provides confidentiality and an authentication tag, while a fresh nonce prevents reuse under the same key. Option B's repeated GCM nonce can undermine confidentiality and integrity. Option C's unkeyed hash does not authenticate ciphertext. Option D's CRC detects accidental errors but does not resist deliberate tampering.

Question 58 of 58 Single Choice

A company is replacing a legacy login service that stores reversible password values. The replacement must verify login attempts but has no feature that needs to retrieve a user's original password. The security team expects that an attacker could obtain a database backup and requires per-account salts and a work factor that can be increased as server capacity changes.

Which password-storage method best meets the service's requirements?

Show Answer

Correct Answer

B

Option B is correct because bcrypt uses a salt and configurable work factor, and password verification does not require recovering the original password. Option A is reversible and places all accounts at risk if the shared key is exposed. Option C remains fast to brute-force despite its salt. Option D uses a fast, obsolete hash that is easier to crack.

Continue Your 312-50 Preparation

You have seen 58 questions from a full set of 924. Prepare with the 312-50 dumps PDF and the Web-Based Practice Test.

PDF

  • Compatible with All Devices
  • Printable Format
  • No Download Limits

Practice Test

  • Check your timing and weak areas
  • No Practice Limits
  • Regularly Updated
Get Full Access
  • 100% Money-Back Guarantee
  • 90 Days Free Updates
  • Instant Access

Frequently Asked Questions

Why can network scanning questions be difficult on the 312-50 exam?

The challenge is interpreting results in context rather than treating a port listing as a complete answer. You need to distinguish open, closed, and filtered ports and consider which probes were sent and what responses came back. That reasoning also connects to enumeration, where a query may reveal useful details but must not change settings or exceed authorization. Practise explaining what each result proves, and what it does not prove, before choosing a response.

Which parts of the Certified Ethical Hacker exam are hardest to balance?

The exam spans technical areas from SQL injection and session hijacking to cloud controls, wireless security, and cryptography. It also tests judgment, especially when an assessment involves IoT or operational technology where an unsafe action could interrupt operations. Knowing an attack name is not enough if the scenario asks for a safe validation method or an appropriate control. Build a study map across all listed topics, then give extra review time to areas where you cannot explain both the risk and the responsible response.

Why does knowing security definitions sometimes fail to help with exam scenarios?

Many topics require you to apply a concept to evidence. A question about vulnerability analysis may ask whether a reported weakness applies to the assessed system and how to prioritize it using exposure, exploitability, and business impact. Memorizing a vulnerability label will not settle those points. Use short scenarios in your revision and state the evidence, the limit of what it establishes, and the next defensible action. The Exam4Success PDF can support this review away from a lab.

How can candidates prepare when they cannot practise every technique in a lab?

Some topics, especially malware behavior, traffic interception, and industrial systems, are not suitable for casual experimentation. Preparation should include careful interpretation of diagrams, logs, observed behavior, and configuration details, not just tool practice. The Exam4Success Practice Test format can help you check how well you apply concepts under timed conditions and identify weak areas without attempting risky activity. Keep hands-on work within authorized, isolated environments, and use written scenario analysis for the rest.

What practical capability does the 312-50 exam reflect for an ethical hacker?

Its topics reflect the work of assessing systems with permission and reporting findings responsibly. Candidates consider the scope of an engagement, examine evidence across networks, applications, wireless systems, mobile platforms, and cloud services, then select controls that address the identified weakness. The exam also includes decisions about business impact and safe validation, rather than treating every discovery as permission to proceed. To connect study with professional practice, write down the authorization boundary and reporting responsibility for each assessment scenario you review.

Will studying for Certified Ethical Hacker develop skills beyond recognizing attack methods?

Yes. The 312-50 topics also ask candidates to connect weaknesses with suitable safeguards. SQL injection scenarios focus on keeping supplied values separate from SQL statements, while cloud and wireless questions test controls that limit unauthorized access. Social engineering includes verifying requests and reporting suspicious items. These topics can support work assessing security risks and explaining practical remediation. As you study, write one applicable control beside each attack pattern, and be ready to explain why it addresses that specific weakness.

How can I judge whether I am ready for the 312-50 exam?

Start by checking whether you can explain the reasoning behind an answer across every topic, including topics you have not used at work. The official format is 125 questions in four hours, delivered through ECC EXAM or VUE, and the passing score varies by exam form from 60% to 85%. Those details make timing and broad coverage worth checking, but they do not define readiness on their own. Use an Exam4Success Practice Test to find weak areas and review every uncertain response.

What should I study first if I am beginning preparation for this exam?

Begin with authorization and ethical responsibilities, because scope and safe conduct affect how you approach every later topic. Then review core network concepts through scanning and enumeration before moving to vulnerability analysis and system hacking. Continue with application, wireless, cloud, mobile, IoT and OT, and cryptography topics, while revisiting any weak areas. The Exam4Success PDF offers a way to review topic material away from a lab. Make a checklist from the official topic list and mark each area you can explain with evidence and a suitable control.

Exam4Success is an independent exam preparation provider and is not affiliated with or endorsed by Eccouncil.