SY0-401 Premium Bundle

SY0-401 Premium Bundle

CompTIA Security+ Certification Certification Exam

4.5 
(27960 ratings)
0 QuestionsPractice Tests
0 PDFPrint version
November 23, 2024Last update

CompTIA SY0-401 Free Practice Questions

Q1. Ann has taken over as the new head of the IT department. One of her first assignments was to implement AAA in preparation for the company’s new telecommuting policy. When she takes inventory of the organizations existing network infrastructure, she makes note that it is a mix of several different vendors. Ann knows she needs a method of secure centralized access to the company’s network resources. Which of the following is the BEST service for Ann to implement? 

A. RADIUS 

B. LDAP 

C. SAML 

D. TACACS+ 

Answer:

Explanation: 

The Remote Authentication Dial In User Service (RADIUS) networking protocol offers centralized Authentication, Authorization, and Accounting (AAA) management for users who make use of a network service. 

Q2. Which of the following would MOST likely involve GPS? 

A. Wardriving 

B. Protocol analyzer 

C. Replay attack 

D. WPS attack 

Answer:

Explanation: 

Q3. Which of the following controls would allow a company to reduce the exposure of sensitive systems from unmanaged devices on internal networks? 

A. 802.1x 

B. Data encryption 

C. Password strength 

D. BGP 

Answer:

Explanation: 

IEEE 802.1X (also known as Dot1x) is an IEEE Standard for Port-based Network Access Control (PNAC). It is part of the IEEE 802.1 group of networking protocols. It provides an authentication mechanism to devices wishing to attach to a LAN or WLAN. 

802.1X authentication involves three parties: a supplicant, an authenticator, and an authentication server. The supplicant is a client device (such as a laptop) that wishes to attach to the LAN/WLAN 

-though the term 'supplicant' is also used interchangeably to refer to the software running on the client that provides credentials to the authenticator. The authenticator is a network device, such as an Ethernet switch or wireless access point; and the authentication server is typically a host running software supporting the RADIUS and EAP protocols. The authenticator acts like a security guard to a protected network. The supplicant (i.e., client device) is not allowed access through the authenticator to the protected side of the network until the supplicant’s identity has been validated and authorized. An analogy to this is providing a valid visa at the airport's arrival immigration before being allowed to enter the country. With 802.1X port-based authentication, the supplicant provides credentials, such as user name/password or digital certificate, to the authenticator, and the authenticator forwards the credentials to the authentication server for verification. If the authentication server determines the credentials are valid, the supplicant (client device) is allowed to access resources located on the protected side of the network. 

Q4. After visiting a website, a user receives an email thanking them for a purchase which they did not request. Upon investigation the security administrator sees the following source code in a pop-up window: 

<HTML> 

<body onload="document.getElementByID(‘badForm’).submit()"> 

<form id="badForm" action="shoppingsite.company.com/purchase.php" method="post" > 

<input name="Perform Purchase" value="Perform Purchase"/> 

</form> 

</body> 

</HTML> 

Which of the following has MOST likely occurred? 

A. SQL injection 

B. Cookie stealing 

C. XSRF 

D. XSS 

Answer:

Explanation: 

XSRF or cross-site request forgery applies to web applications and is an attack that exploits the web application’s trust of a user who known or is supposed to have been authenticated. This is often accomplished without the user’s knowledge. 

Q5. Joe, an administrator, installs a web server on the Internet that performs credit card transactions for customer payments. Joe also sets up a second web server that looks like the first web server. 

However, the second server contains fabricated files and folders made to look like payments were processed on this server but really were not. Which of the following is the second server? 

A. DMZ 

B. Honeynet 

C. VLAN 

D. Honeypot 

Answer:

Explanation: 

In this scenario, the second web server is a ‘fake’ webserver designed to attract attacks. We can then monitor the second server to view the attacks and then ensure that the ‘real’ web server is secure against such attacks. The second web server is a honeypot. 

A honeypot is a system whose purpose it is to be attacked. An administrator can watch and study the attack to research current attack methodologies. 

According to the Wepopedia.com, a Honeypot luring a hacker into a system has several main purposes: 

The administrator can watch the hacker exploit the vulnerabilities of the system, thereby learning 

where the system has weaknesses that need to be redesigned. 

The hacker can be caught and stopped while trying to obtain root access to the system. 

By studying the activities of hackers, designers can better create more secure systems that are 

potentially invulnerable to future hackers. 

There are two main types of honeypots: 

Production - A production honeypot is one used within an organization's environment to help 

mitigate risk. 

Research – A research honeypot add value to research in computer security by providing a 

platform to study the threat. 

Q6. HOTSPOT 

The security administrator has installed a new firewall which implements an implicit DENY policy by default. Click on the firewall and configure it to allow ONLY the following communication. 

1. The Accounting workstation can ONLY access the web server on the public network over the default HTTPS port. The accounting workstation should not access other networks. 

2. The HR workstation should be restricted to communicate with the Financial server ONLY, over the default SCP port 

3. The Admin workstation should ONLY be able to access the servers on the secure network over the default TFTP port. 

Instructions: The firewall will process the rules in a top-down manner in order as a first match The port number must be typed in and only one port number can be entered per rule Type ANY for all ports. The original firewall configuration can be reset at any time by pressing the reset button. Once you have met the simulation requirements, click save and then Done to submit. 

Answer:  

Explanation: 

Implicit deny is the default security stance that says if you aren’t specifically granted access or privileges for a resource, you’re denied access by default. Rule #1 allows the Accounting workstation to ONLY access the web server on the public network over the default HTTPS port, which is TCP port 443. Rule #2 allows the HR workstation to ONLY communicate with the Financial server over the 

default SCP port, which is TCP Port 22 

Rule #3 & Rule #4 allow the Admin workstation to ONLY access the Financial and Purchasing 

servers located on the secure network over the default TFTP port, which is Port 69. 

References: 

Stewart, James Michael, CompTIA Security+ Review Guide, Sybex, Indianapolis, 2014, pp 26, 44. 

http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers 

Q7. Layer 7 devices used to prevent specific types of html tags are called: 

A. Firewalls 

B. Content filters 

C. Routers 

D. NIDS 

Answer:

Explanation: 

A content filter is a is a type of software designed to restrict or control the content a reader is authorised to access, particularly when used to limit material delivered over the Internet via the Web, e-mail, or other means. Because the user and the OSI layer interact directly with the content filter, it operates at Layer 7 of the OSI model. 

Q8. After Matt, a user enters his username and password at the login screen of a web enabled portal, the following appears on his screen: 

`Please only use letters and numbers on these fields’ 

Which of the following is this an example of? 

A. Proper error handling 

B. Proper input validation 

C. Improper input validation 

D. Improper error handling 

Answer:

Explanation: 

Input validation is an aspect of secure coding and is intended to mitigate against possible user input attacks, such as buffer overflows and fuzzing. Input validation checks every user input submitted to the application before processing that input. The check could be a length, a character type, a language type, or a domain. 

Q9. A security administrator develops a web page and limits input into the fields on the web page as well as filters special characters in output. The administrator is trying to prevent which of the following attacks? 

A. Spoofing 

B. XSS 

C. Fuzzing 

D. Pharming 

Answer:

Explanation: 

Cross-site scripting (XSS) is a type of computer security vulnerability typically found in Web applications. XSS enables attackers to inject client-side script into Web pages viewed by other users. Cross-site scripting uses known vulnerabilities in web-based applications, their servers, or plug-in systems on which they rely. Exploiting one of these, attackers fold malicious content into the content being delivered from the compromised site. When the resulting combined content arrives at the client-side web browser, it has all been delivered from the trusted source, and thus operates under the permissions granted to that system. By finding ways of injecting malicious scripts into web pages, an attacker can gain elevated access-privileges to sensitive page content, session cookies, and a variety of other information maintained by the browser on behalf of the user. 

By validating user input and preventing special characters, we can prevent the injection of client-side scripting code. 

Q10. Which of the following BEST describes a protective countermeasure for SQL injection? 

A. Eliminating cross-site scripting vulnerabilities 

B. Installing an IDS to monitor network traffic 

C. Validating user input in web applications 

D. Placing a firewall between the Internet and database servers 

Answer:

Explanation: 

By validating user input and preventing special characters, we can prevent the injection of client-side scripting code. SQL injection is a code injection technique, used to attack data-driven applications, in which malicious SQL statements are inserted into an entry field for execution (e.g. to dump the database contents to the attacker). SQL injection must exploit a security vulnerability in an application's software, for example, when user input is either incorrectly filtered for string literal escape characters embedded in SQL statements or user input is not strongly typed and unexpectedly executed. SQL injection is mostly known as an attack vector for websites but can be used to attack any type of SQL database. 

Q11. After encrypting all laptop hard drives, an executive officer’s laptop has trouble booting to the operating system. Now that it is successfully encrypted the helpdesk cannot retrieve the data. 

Which of the following can be used to decrypt the information for retrieval? 

A. Recovery agent 

B. Private key 

C. Trust models 

D. Public key 

Answer:

Explanation: 

To access the data the hard drive need to be decrypted. To decrypt the hard drive you would need 

the proper private key. The key recovery agent can retrieve the required key. 

A key recovery agent is an entity that has the ability to recover a key, key components, or plaintext 

messages as needed. 

Q12. A technician has just installed a new firewall onto the network. Users are reporting that they cannot reach any website. Upon further investigation, the technician determines that websites can be reached by entering their IP addresses. Which of the following ports may have been closed to cause this issue? 

A. HTTP 

B. DHCP 

C. DNS 

D. NetBIOS 

Answer:

Explanation: 

DNS links IP addresses and human-friendly fully qualified domain names (FQDNs), which are made up of the Top-level domain (TLD), the registered domain name, and the Subdomain or hostname. 

Therefore, if the DNS ports are blocked websites will not be reachable. 

Q13. Which of the following algorithms has well documented collisions? (Select TWO). 

A. AES 

B. MD5 

C. SHA 

D. SHA-256 

E. RSA 

Answer: B,C 

Explanation: 

B: MD5 biggest weakness is that it does not have strong collision resistance, and thus it is no longer recommended for use. 

C: SHA-1 (also known as SHA) is being retired from most government uses; the U.S. National Institute of Standards and Technology said, "Federal agencies should stop using SHA-1 for...applications that require collision resistance as soon as practical, and must use the SHA-2 family of hash functions for these applications after 2010", though that was later relaxed. Note: The hashing algorithm must have few or no collisions. This means that hashing two different inputs does not give the same output. Cryptographic hash functions are usually designed to be collision resistant. But many hash functions that were once thought to be collision resistant were later broken. MD5 and SHA-1 in particular both have published techniques more efficient than brute force for finding collisions. 

Q14. Which of the following is a requirement when implementing PKI if data loss is unacceptable? 

A. Web of trust 

B. Non-repudiation 

C. Key escrow 

D. Certificate revocation list 

Answer:

Explanation: 

Key escrow is a database of stored keys that later can be retrieved. Key escrow addresses the possibility that a third party may need to access keys. Under the conditions of key escrow, the keys needed to encrypt/decrypt data are held in an escrow account (think of the term as it relates to home mortgages) and made available if that third party requests them. The third party in question is generally the government, but it could also be an employer if an employee’s private messages have been called into question. 

Q15. A company has proprietary mission critical devices connected to their network which are configured remotely by both employees and approved customers. The administrator wants to monitor device security without changing their baseline configuration. Which of the following should be implemented to secure the devices without risking availability? 

A. Host-based firewall 

B. IDS 

C. IPS 

D. Honeypot 

Answer:

Explanation: 

An intrusion detection system (IDS) is a device or software application that monitors network or system activities for malicious activities or policy violations and produces reports to a management station. IDS come in a variety of “flavors” and approach the goal of detecting suspicious traffic in different ways. There are network based (NIDS) and host based (HIDS) intrusion detection systems. Some systems may attempt to stop an intrusion attempt but this is neither required nor expected of a monitoring system. Intrusion detection and prevention systems (IDPS) are primarily focused on identifying possible incidents, logging information about them, and reporting attempts. In addition, organizations use IDPSes for other purposes, such as identifying problems with security policies, documenting existing threats and deterring individuals from violating security policies. IDPSes have become a necessary addition to the security infrastructure of nearly every organization. IDPSes typically record information related to observed events, notify security administrators of important observed events and produce reports. Many IDPSes can also respond to a detected threat by attempting to prevent it from succeeding. They use several response techniques, which involve the IDPS stopping the attack itself, changing the security environment (e.g. reconfiguring a firewall) or changing the attack's content.