GIAC certification · Exam GPEN

GPEN Mock Exam Page 5

GIAC Certified Penetration Tester

Free GPEN mock exam questions 41–50, each with the answer and an explanation.

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

Free GPEN questions

41–50 of 92 free
Question 41 Choose 2

You run the following PHP script:
<?php $name = mysql_real_escape_string($_POST["name"]);
$password = mysql_real_escape_string($_POST["password"]);?>
What is the use of the mysql_real_escape_string() function in the above script.
Each correct answer represents a complete solution. Choose all that apply

Show answerHide answer

Correct answer: A, D

It escapes all special characters from strings $_POST["name"] and
$_POST["password"].

It can be used as a countermeasure against a SQL injection attack.

Question 42 Choose 1

You have received a file named new.com in your email as an attachment. When you
execute this file in your laptop, you get the following message:
'EICAR-STANDARD-ANTIVIRUS-TEST-FILE!'
When you open the file in Notepad, you get the following string:
X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*
What step will you take as a countermeasure against this attack?

Show answerHide answer

Correct answer: A

Do nothing.

Question 43 Choose 1

John works as a Professional Penetration Tester. He has been assigned a project to test
the Website security of www.we-are-secure Inc. On the We-are-secure Website login page,
he enters='or''=' as a username and successfully logs on to the user page of the Web site.
Now, John asks the we-are-secure Inc. to improve the login page PHP script. Which of the
following suggestions can John give to improve the security of the we-are-secure Website
login page from the SQL injection attack?

 

Show answerHide answer

Correct answer: C

Use the mysql_real_escape_string() function for escaping input

Question 44 Choose 1

You want to use a Windows-based GUI tool which can perform MITM attacks, along with
sniffing and ARP poisoning. Which of the following tools will you use?

Show answerHide answer

Correct answer: A

Cain and Abel

Question 45 Choose 1

John works as a professional Ethical Hacker. He has been assigned the project of testing
the security of www.we-are-secure.com. He has successfully performed the following steps
of the preattack phase to check the security of the We-are-secure network:
l Gathering information
l Determining the network range
l Identifying active systems
Now, he wants to find the open ports and applications running on the network. Which of the
following tools will he use to accomplish his task?

Show answerHide answer

Correct answer: B

SuperScan

Question 46 Choose 3

Which of the following statements are true about NTLMv1?
Each correct answer represents a complete solution. Choose all that apply.

Show answerHide answer

Correct answer: A, B, C

It uses the LANMAN hash of the user's password.

It is mostly used when no Active Directory domain exists.

It is a challenge-response authentication protocol.

Question 47 Choose 1

You work as a Network Penetration tester in the Secure Inc. Your company takes the
projects to test the security of various companies. Recently, Secure Inc. has assigned you
a project to test the security of a Web site. You go to the Web site login page and you run
the following SQL query:
SELECT email, passwd, login_id, full_name
FROM members
WHERE email = 'attacker@somehwere.com'; DROP TABLE members; -'
What task will the above SQL query perform?

Show answerHide answer

Correct answer: B

Deletes the entire members table.

Question 48 Choose 1

Which of the following Nmap commands is used to perform a UDP port scan?

Show answerHide answer

Correct answer: D

nmap –sU

Question 49 Choose 1

You have obtained the hash below from the /etc/shadow file. What are you able to discern
simply by looking at this hash?


Show answerHide answer

Correct answer: C

A4XDsB4COGqWaEpFjLLDe. is an MD5 hash that was created using the salt
uWeOhL6k

Question 50 Choose 1

You run the rdisk /s command to retrieve the backup SAM file on a computer. Where
should you go on the computer to find the file?

Show answerHide answer

Correct answer: C

%systemroot%\repair\sam._

Full mock exam

Sit the GPEN exam before exam day

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

Get full GPEN mock exam
  • 65questions per mock
  • 105 mintime limit
  • 312questions in the bank
  • Newmock on every attempt