Free 312-50v13 Exam Braindumps
Certified Ethical Hacker v13 Questions 217–224 (page: 29)

Updated On: 29-Jul-2026

As part of a penetration testing team, you've discovered a web application vulnerable to Cross-Site Scripting (XSS). The application sanitizes inputs against standard XSS payloads but fails to filter out HTML-encoded characters. On further analysis, you've noticed that the web application uses cookies to track session IDs. You decide to exploit the XSS vulnerability to steal users' session cookies. However, the application implements HTTPOnly cookies, complicating your original plan.
Which of the following would be the most viable strategy for a successful attack?

  1. Build an XSS payload using HTML encoding and use it to exploit the server-side code, potentially disabling the HTTPOnly flag on cookies.
  2. Develop a browser exploit to bypass the HTTPOnly restriction, then use a HTML-encoded XSS payload to retrieve the cookies.
  3. Utilize an HTML-encoded XSS payload to trigger a buffer overflow attack, forcing the server to reveal the HTTPOnly cookies.
  4. Create a sophisticated XSS payload that leverages HTML encoding to bypass the input sanitization, and then use it to redirect users to a malicious site where their cookies can be captured.

Answer(s): D

Explanation:

D is correct because it effectively exploits the inherent weaknesses in the application’s input sanitization while avoiding restrictions imposed by HTTPOnly cookie settings.
The rationale for choosing D hinges on the method's focus on social engineering and exploitation of user behavior rather than attempting to manipulate server-side code or underlying web protocols. By crafting an HTML-encoded XSS payload, the attacker can execute JavaScript in the user's browser context without directly interacting with HTTPOnly cookies. Redirecting users to a malicious site for cookie capture circumvents the need to access those cookies directly from the server, which is critical given the HTTPOnly attribute designed to protect them from client-side scripts. The success relies on user interaction and trust, as users might willingly provide session cookies to a trusted-looking site.
Evaluation of Other Options:

A: This option is flawed as modern web applications often implement robust security measures that prevent the disabling of HTTPOnly flags. Attempting to exploit server-side code directly places the attack at higher risk and complexity, making it less reliable than a user-centric approach.
B: Developing a browser exploit to bypass HTTPOnly restrictions is an impractical strategy. It demands deep technical knowledge about the specific browser vulnerabilities, which are continually patched by vendors. Such exploits are also beyond the scope of standard XSS attack methods.
C: Utilizing an HTML-encoded XSS payload to trigger a buffer overflow is technically plausible but introduces significant unpredictability and risk. Buffer overflow vulnerabilities are not straightforward to execute and commonly require intimate knowledge of the application's architecture, making this method less viable compared to user-directed social engineering.
For further analysis on XSS and cookie security, refer to the following resources:
1. https://owasp.org/www-community/attacks/Cross-site_Scripting_Cheat_Sheet 2. https://www.acs.com.hk/en/products/92/acr38-smart-card-reader/ 3. https://www.owasp.org/index.php/HttpOnly



An ethical hacker is testing the security of a website's database system against SQL Injection attacks. They discover that the IDS has a strong signature detection mechanism to detect typical SQL injection patterns.
Which evasion technique can be most effectively used to bypass the IDS signature detection while performing a SQL Injection attack?

  1. Employ IP fragmentation to obscure the attack payload
  2. Implement case variation by altering the case of SQL statements
  3. Leverage string concatenation to break identifiable keywords
  4. Use Hex encoding to represent the SQL query string

Answer(s): D

Explanation:

D is correct because Hex encoding effectively transforms SQL query strings into a format that evades signature detections by IDS.
Hex encoding allows attackers to represent characters in a hexadecimal format, thereby obscuring the payload from signature-based detection systems that rely on pattern recognition. This method bypasses traditional keyword detection mechanisms because the encoded payload appears as a sequence of non-typical characters during its transit, thus eluding the IDS's focus on recognizable SQL syntax patterns.
Evaluation of Other Options:

A: Employ IP fragmentation to obscure the attack payload : While IP fragmentation can help evade some network-based detection systems, it often introduces issues that may result in packet loss or reassembly problems, thereby limiting the reliability of the attack method in different network configurations. Additionally, many modern IDS have become adept at reassembling fragmented packets, leading to diminished effectiveness.
B: Implement case variation by altering the case of SQL statements : This technique presents a poorly scalable approach given that SQL is case insensitive, and many IDS can easily detect variations in SQL keywords. Hence, this method often fails to effectively bypass sophisticated signature-based detections that are less concerned with casing.
C: Leverage string concatenation to break identifiable keywords : String concatenation is a valid evasion technique, but it has limitations as many IDS systems are designed to parse and reassemble SQL queries logically. Moreover, concatenation can alter the execution of the SQL statement if not implemented correctly, obstructing the intended attack.
In summary, while all options present plausible evasion methods, Hex encoding stands out as the most effective due to its finite ability to disguise payloads from invasive IDS scrutiny.
References:
https://www.sans.org/blog/understanding-sql-injection/ https://owasp.org/www-community/attacks/SQL_Injection https://www.csoonline.com/article/3312942/what-is-sql-injection-definition-examples-and-prevention.html


Reference:

References:
https://www.sans.org/blog/understanding-sql-injection/ https://owasp.org/www-community/attacks/SQL_Injection https://www.csoonline.com/article/3312942/what-is-sql-injection-definition-examples-and-prevention.html



You have been hired as an intern at a start-up company. Your first task is to help set up a basic web server for the company's new website. The team leader has asked you to make sure the server is secure from common threats. Based on your knowledge from studying for the CEH exam, which of the following actions should be your priority to secure the web server?

  1. Limiting the number of concurrent connections to the server
  2. Installing a web application firewall
  3. Regularly updating and patching the server software
  4. Encrypting the company's website with SSL/TLS

Answer(s): C

Explanation:

C is correct because regularly updating and patching the server software addresses vulnerabilities that could be exploited by attackers.
Maintaining an up-to-date server reduces the attack surface by mitigating known vulnerabilities. Attack vectors often exploit unpatched software, making timely updates paramount in web security. This preventive measure ensures that the underlying infrastructure remains robust against emerging threats and zero-day exploits. The criticality of updates extends beyond software features; they often include security patches addressing vulnerabilities that could enable unauthorized access, data breaches, or service interruptions.
Evaluation of Other Options:

A: Limiting the number of concurrent connections to the server reduces the likelihood of Denial of Service (DoS) attacks but does not address critical vulnerabilities within the software itself. This measure can help mitigate certain attacks but has limited efficacy against a broader spectrum of security threats.
B: Installing a web application firewall is essential for protecting against specific application-level attacks (like SQL injection or XSS), but it is not a substitute for maintaining secure server software.
While it enhances security, it does not fix vulnerabilities that reside in the server or its applications.
D: Encrypting the company's website with SSL/TLS is indeed vital for protecting data in transit and establishing trust with users. However, without securing the underlying server and applications, SSL/TLS alone cannot prevent server-side vulnerabilities from being exploited.
In conclusion, while all options contribute to a secure web environment, prioritizing regular updates and patches (Option C) is the foundation upon which other security measures must be built for long-term protection.
1. https://owasp.org/www-project-top-ten/ 2. https://www.cisecurity.org/controls/ 3. https://staysafeonline.org/stay-safe-online/online-safety-basics/keeping-software-updated/



A sophisticated attacker targets your web server with the intent to execute a Denial of Service (DoS) attack. His strategy involves a unique mixture of TCP SYN, UDP, and ICMP floods, using 'r' packets per second. Your server, reinforced with advanced security measures, can handle 'h' packets per second before it starts showing signs of strain. If 'r' surpasses 'h', it overwhelms the server, causing it to become unresponsive. In a peculiar pattern, the attacker selects 'r' as a composite number and 'h' as a prime number, making the attack detection more challenging. Considering 'r=2010' and different values for 'h', which of the following scenarios would potentially cause the server to falter?

  1. h=1987 (prime): The attacker's packet rate exceeds the server's capacity, causing potential unresponsiveness.
  2. h=1999 (prime): Despite the attacker's packet flood, the server can handle these requests, remaining responsive.
  3. h=1993 (prime): Despite being less than 'r', the server's prime number capacity keeps it barely operational, but the risk of falling is imminent.
  4. h=2003 (prime): The server can manage more packets than the attacker is sending, hence it stays operational.

Answer(s): A

Explanation:

A is correct because the packet rate 'r' (2010 packets per second) exceeds the server's handling capacity 'h' (1987 packets per second), leading to potential unresponsiveness.
To systematically evaluate the scenarios, we analyze the values of 'h':
Option A (h=1987) : Being a prime number and less than 2010, it triggers a DoS condition as 'r' surpasses 'h', which compromises server responsiveness. This exemplifies the critical scenario where incoming traffic overwhelms the server's capacity.
Option B (h=1999) : Although 1999 is a prime, it remains above the attack rate of 2010 packets per second. Thus, the server can effectively manage the incoming flood, maintaining its operational integrity and preventing the onset of a DoS scenario.
Option C (h=1993) : In this case, while 1993 is a prime number and less than 2010, it is isolated in an ambiguous situation. The server may exhibit signs of strain; however, unless the packet processing mechanisms explicitly detail how they recover under such conditions, it’s presumable that the server can attempt to manage the flood, albeit precariously.
Option D (h=2003) : With 2003 being significantly greater than the attack rate of 2010, this ensures that the server remains capable of processing incoming traffic efficiently, thereby protecting against unresponsiveness.
In summary, option A is the most straightforward and definite scenario leading to a Denial of Service condition due to the clear exceeding of capacity. The other options either maintain operability or provide ambiguous outcomes, making them less critical.
For further study, refer to:
https://www.eccouncil.org/courses/certified-ethical-hacker-ceh/ https://www.csoonline.com/article/2229567/what-is-a-denial-of-service-dos-attack.html https://www.cloudflare.com/learning/ddos/what-is-a-ddos-attack/



An IT security team is conducting an internal review of security protocols in their organization to identify potential vulnerabilities. During their investigation, they encounter a suspicious program running on several computers. Further examination reveals that the program has been logging all user keystrokes. How can the security team confirm the type of program and what countermeasures should be taken to ensure the same attack does not occur in the future?

  1. The program is spyware; the team should use password managers and encrypt sensitive data.
  2. The program is a keylogger; the team should employ intrusion detection systems and regularly update the system software.
  3. The program is a keylogger; the team should educate employees about phishing attacks and maintain regular backups.
  4. The program is a Trojan; the team should regularly update antivirus software and install a reliable firewall.

Answer(s): B

Explanation:

B is correct because identifying the program as a keylogger leads to targeted defensive strategies, specifically employing intrusion detection systems and maintaining up-to-date software.
Keyloggers are malicious software designed to capture keystrokes, making it crucial for organizations to deploy intrusion detection systems (IDS) which can recognize and alert the presence of unauthorized software behavior in real-time. Regular software updates are vital to patch vulnerabilities that keyloggers exploit.
In contrast, option A incorrectly classifies the program as spyware and suggests using password managers and data encryption.
While these measures enhance security, they do not directly address the real-time detection of keyloggers or prevent their installation.
Option C, although it correctly identifies the program as a keylogger, suggests employee education regarding phishing attacks and regular backups as countermeasures.
While education is valuable for reducing risk, it does not provide immediate or technical defenses against active keyloggers nor does it prevent such attacks from being executed on modified systems.
Option D misclassifies the program as a Trojan, which typically disguises itself as legitimate software. This option focuses on antivirus updates and firewalls, which are important but insufficient for real-time identification and prevention of keyloggers specifically.
In summary, option B's dual approach of employing IDS and updating systems aligns more precisely with the threat posed by keyloggers.
References:
https://www.csoonline.com/article/3291062/what-is-an-intrusion-detection-system-ids.html https://www.cisecurity.org/white-papers/critical-security-controls-for-effective-cyber-defense/ https://www.nist.gov/publications/guide-managing-sigs-sys-14-nist-sp-800-53


Reference:

References:
https://www.csoonline.com/article/3291062/what-is-an-intrusion-detection-system-ids.html https://www.cisecurity.org/white-papers/critical-security-controls-for-effective-cyber-defense/ https://www.nist.gov/publications/guide-managing-sigs-sys-14-nist-sp-800-53



Being a Certified Ethical Hacker (CEH), a company has brought you on board to evaluate the safety measures in place for their network system. The company uses a network time protocol server in the demilitarized zone. During your enumeration, you decide to run a ntptrace command. Given the syntax: ntptrace [-n] [-m maxhosts] [servername/IP_address], which command usage would best serve your objective to find where the NTP server obtains the time from and to trace the list of NTP servers connected to the network?

  1. ntptrace -n -m 5192.168.1.1
  2. ntptrace -m 5192.168.1.1
  3. ntptrace -n localhost
  4. ntptrace 192.168.1.1

Answer(s): D

Explanation:

The correct command usage is D: ntptrace 192.168.1.1 , as it allows for direct tracing of the NTP server's hierarchy.
Justification for D
This command directly queries the NTP server located at the specified IP address (192.168.1.1) to retrieve timestamp information, revealing its upstream sources. By executing this command, the CEH can trace the chain of NTP servers and verify the trustworthiness of the time synchronization process. It is critical for maintaining network security, as time discrepancies can lead to vulnerabilities.
Evaluation of Other Options
A: ntptrace -n -m 5192.168.1.1
The option contains a malformed IP address due to the presence of "519" before the correct format, rendering the command invalid and ineffective for tracing NTP servers.
B: ntptrace -m 5192.168.1.1
Similar to option A, this command also suffers from an incorrect address format leading to failure in valid execution. Additionally, the -m flag is unnecessary here as its primary purpose is to limit the number of hosts to query, which detracts from obtaining a full trace.
C: ntptrace -n localhost
While syntactically correct, this command queries the local machine’s NTP service rather than the external NTP server, which limits the scope of evaluation. It does not provide insights into external synchronization sources necessary for thorough network assessment. References https://www.ntp.org/documentation.html https://www.binarytides.com/ntp-time-servers/ https://www.sans.org/blog/understanding-and-configuring-npt-in-security-initiatives/



A Certified Ethical Hacker is attempting to gather information about a target organization's network structure through network footprinting. During the operation, they encounter ICMP blocking by the target system's firewall. The hacker wants to ascertain the path that packets take to the host system from a source, using an alternative protocol.
Which of the following actions should the hacker consider next?

  1. Use UDP Traceroute in the Linux operating system by executing the 'traceroute' command with the destination IP or domain name.
  2. Use the ICMP Traceroute on the Windows operating system as it is the default utility.
  3. Use the ARIN Whois database search tool to find the network range of the target network.
  4. Utilize the Path Analyzer Pro to trace the route from the source to the destination target systems.

Answer(s): A

Explanation:

A is correct because using UDP Traceroute circumvents ICMP blocking by leveraging User Datagram Protocol to identify the network path to the target.
UDP Traceroute is advantageous in situations where ICMP traffic is restricted, as it operates on top of the network, allowing for route discovery through datagram packets rather than echo requests. This method provides an alternative means of assessing the path to the target, potentially revealing routes and intermediate devices not accessible via ICMP.
Incorrect Options:
B: ICMP Traceroute is not viable due to the existing ICMP blocking by the target's firewall, which prohibits echo request packets from reaching the destination. Relying on ICMP under these circumstances will yield no results.
C: Using the ARIN Whois database can provide insight into the IP address allocation and organization ownership of the network but does not facilitate real-time path tracing or provide direct information about the route packets will take. This option lacks the necessary network flow analysis required for effective footprinting.
D: Path Analyzer Pro is a specialized tool that provides analysis capabilities but may still rely on ICMP or other protocols that are blocked. Moreover, its use may not be permitted in all ethical hacking scenarios depending on the legal compliance required for network analysis.
References:
1. https://www.comptia.org/content/articles/understanding-network-footprinting 2. https://www.cisco.com/c/en/us/td/docs/internetworking/technology/guide/IPAddr/IPv4Routing.html 3. https://www.sans.org/blog/using-icmp-and-udp-for-network-footer/


Reference:

References:
1. https://www.comptia.org/content/articles/understanding-network-footprinting 2. https://www.cisco.com/c/en/us/td/docs/internetworking/technology/guide/IPAddr/IPv4Routing.html 3. https://www.sans.org/blog/using-icmp-and-udp-for-network-footer/



An ethical hacker is preparing to scan a network to identify live systems. To increase the efficiency and accuracy of his scans, he is considering several different host discovery techniques. He expects several unused IP addresses at any given time, specifically within the private address range of the LAN, but he also anticipates the presence of restrictive firewalls that may conceal active devices.
Which scanning method would be most effective in this situation?

  1. ICMP ECHO Ping Sweep
  2. ICMP Timestamp Ping
  3. TCP SYN Ping
  4. ARP Ping Scan

Answer(s): D

Explanation:

D is correct because ARP Ping Scan effectively identifies live hosts on a local network, even in the presence of restrictive firewalls and unused IP addresses.
Justification for ARP Ping Scan:
1. Local Network Efficiency : ARP (Address Resolution Protocol) operates at the data link layer,
allowing it to identify devices on the same subnet without relying on any IP-based responses. It directly queries the MAC addresses associated with active IPs, making it highly efficient in local area networks (LANs). 2. Firewall Evasion : Because ARP packets do not traverse routers and are generally not blocked by firewalls, this method is immune to many common security measures that might otherwise obscure active devices. 3. Accuracy with Unused Addresses : ARP scans can identify active IP addresses in a range that includes multiple unused addresses; inactive IPs will simply return no response, whereas active ones will respond with their MAC address.
Critical Evaluation of Other Options:

A: ICMP ECHO Ping Sweep : This method may be blocked by firewalls configured to disregard ICMP packets, leading to missed active hosts.
While it is effective in open environments, it is not reliable in secured networks. B. ICMP Timestamp Ping : Similar to the ECHO ping, this method relies on ICMP traffic and is also likely to be restricted by firewalls. It provides time-related information, which is less useful for merely identifying live hosts. C. TCP SYN Ping : This technique involves sending SYN packets to detect live hosts (akin to a stealth SYN scan).
While it can be effective, it may still be filtered out by firewalls configured to drop unsolicited SYN packets, thereby reducing accuracy.
In sum, ARP Ping Scan stands out as the superior method within the specified scenario, providing highly reliable results in environments with potential security barriers.
References:
https://www.offensive-security.com/metasploit-unleashed/arp-scanning/ https://www.cisecurity.org/white-papers/arp-spoofing-and-its-impact-on-the-lan/ https://www.sans.org/white-papers/36893/


Reference:

References:
https://www.offensive-security.com/metasploit-unleashed/arp-scanning/ https://www.cisecurity.org/white-papers/arp-spoofing-and-its-impact-on-the-lan/ https://www.sans.org/white-papers/36893/



Viewing page 29 of 133
Viewing questions 225 - 232 out of 1436 questions


Post your Comments and Discuss EC-Council 312-50v13 exam prep with other Community members:

AI Tutor AI Tutor 👋 I’m here to help!