SY0-401 Premium Bundle

SY0-401 Premium Bundle

CompTIA Security+ Certification Certification Exam

4.5 
(14310 ratings)
0 QuestionsPractice Tests
0 PDFPrint version
November 21, 2024Last update

CompTIA SY0-401 Free Practice Questions

Q1. An attacker attempted to compromise a web form by inserting the following input into the username field: admin)(|(password=*)) 

Which of the following types of attacks was attempted? 

A. SQL injection 

B. Cross-site scripting 

C. Command injection 

D. LDAP injection 

Answer:

Explanation: 

LDAP Injection is an attack used to exploit web based applications that construct LDAP statements based on user input. When an application fails to properly sanitize user input, it’s possible to modify LDAP statements using a local proxy. This could result in the execution of arbitrary commands such as granting permissions to unauthorized queries, and content modification inside the LDAP tree. The same advanced exploitation techniques available in SQL Injection can be similarly applied in LDAP Injection. In a page with a user search form, the following code is responsible to catch input value and generate a LDAP query that will be used in LDAP database. <input type="text" size=20 name="userName">Insert the username</input> The LDAP query is narrowed down for performance and the underlying code for this function might be the following: String ldapSearchQuery = "(cn=" + $userName + ")"; System.out.println(ldapSearchQuery); 

If the variable $userName is not validated, it could be possible accomplish LDAP injection, as follows: If a user puts “*” on box search, the system may return all the usernames on the LDAP base If a user puts “jonys) (| (password = * ) )”, it will generate the code bellow revealing jonys’ password ( cn = jonys ) ( | (password = * ) ) 

Q2. A router has a single Ethernet connection to a switch. In the router configuration, the Ethernet interface has three sub-interfaces, each configured with ACLs applied to them and 802.1q trunks. 

Which of the following is MOST likely the reason for the sub-interfaces? 

A. The network uses the subnet of 255.255.255.128. 

B. The switch has several VLANs configured on it. 

C. The sub-interfaces are configured for VoIP traffic. 

D. The sub-interfaces each implement quality of service. 

Answer:

Explanation: 

A subinterface is a division of one physical interface into multiple logical interfaces. Routers commonly employ subinterfaces for a variety of purposes, most common of these are for routing traffic between VLANs. Also, IEEE 802.1Q is the networking standard that supports virtual LANs (VLANs) on an Ethernet network. 

Q3. A security administrator is tasked with calculating the total ALE on servers. In a two year period of time, a company has to replace five servers. Each server replacement has cost the company $4,000 with downtime costing $3,000. Which of the following is the ALE for the company? 

A. $7,000 

B. $10,000 

C. $17,500 

D. $35,000 

Answer:

Explanation: 

SLE × ARO = ALE, where SLE is equal to asset value (AV) times exposure factor (EF); and ARO is the annualized rate of occurrence. SLE =($4000 + $3000) x 5 = $35000 ARO = 2 years Thus per year it would be 50% = 0,5 The ALE is thus $35000 x 0.5 = $17500 

Q4. ABC company has a lot of contractors working for them. The provisioning team does not always get notified that a contractor has left the company. Which of the following policies would prevent contractors from having access to systems in the event a contractor has left? 

A. Annual account review 

B. Account expiration policy 

C. Account lockout policy 

D. Account disablement 

Answer:

Explanation: 

Account expiration is a secure feature to employ on user accounts for temporary workers, interns, or consultants. It automatically disables a user account or causes the account to expire at a specific time and on a specific day. 

Q5. Several employee accounts appear to have been cracked by an attacker. Which of the following should the security administrator implement to mitigate password cracking attacks? (Select TWO). 

A. Increase password complexity 

B. Deploy an IDS to capture suspicious logins 

C. Implement password history 

D. Implement monitoring of logins 

E. Implement password expiration 

F. Increase password length 

Answer: A,F 

Explanation: 

The more difficult a password is the more difficult it is to be cracked by an attacker. By increasing 

the password complexity you make it more difficult. 

Passwords that are too short can easily be cracked. The more characters used in a password, 

combined with the increased complexity will mitigate password cracking attacks. 

Q6. A security analyst implemented group-based privileges within the company active directory. Which of the following account management techniques should be undertaken regularly to ensure least privilege principles? 

A. Leverage role-based access controls. 

B. Perform user group clean-up. 

C. Verify smart card access controls. 

D. Verify SHA-256 for password hashes. 

Answer:

Explanation: Active Directory (AD) has no built-in clean-up feature. This can result in obsolete user, group and computer objects accumulating over time and placing security and compliance objectives in jeopardy. You would therefore need to regularly clean-up these settings. 

Q7. Which of the following should Pete, a security manager, implement to reduce the risk of employees working in collusion to embezzle funds from their company? 

A. Privacy Policy 

B. Least Privilege 

C. Acceptable Use 

D. Mandatory Vacations 

Answer:

Explanation: 

A mandatory vacation policy requires all users to take time away from work to refresh. But not only does mandatory vacation give the employee a chance to refresh, but it also gives the company a chance to make sure that others can fill in any gaps in skills and satisfies the need to have replication or duplication at all levels as well as an opportunity to discover fraud. 

Q8. A security manager requires fencing around the perimeter, and cipher locks on all entrances. The manager is concerned with which of the following security controls? 

A. Integrity 

B. Availability 

C. Confidentiality 

D. Safety 

Answer:

Explanation: 

Fencing is used to increase physical security and safety. Locks are used to keep those who are unauthorized out. 

Q9. During a recent investigation, an auditor discovered that an engineer’s compromised workstation was being used to connect to SCADA systems while the engineer was not logged in. The engineer is responsible for administering the SCADA systems and cannot be blocked from connecting to them. The SCADA systems cannot be modified without vendor approval which requires months of testing. 

Which of the following is MOST likely to protect the SCADA systems from misuse? 

A. Update anti-virus definitions on SCADA systems 

B. Audit accounts on the SCADA systems 

C. Install a firewall on the SCADA network 

D. Deploy NIPS at the edge of the SCADA network 

Answer:

Explanation: 

A supervisory control and data acquisition (SCADA) system is an industrial control system (ICS) that is used to control infrastructure processes, facility-based processes, or industrial processes. A network-based IPS (NIPS) is an intrusion detection and prevention system that scans network traffic in real time against a database of attack signatures. It is useful for detecting and responding to network-based attacks originating from outside the organization. 

Q10. Matt, the Chief Information Security Officer (CISO), tells the network administrator that a security company has been hired to perform a penetration test against his network. The security company asks Matt which type of testing would be most beneficial for him. Which of the following BEST describes what the security company might do during a black box test? 

A. The security company is provided with all network ranges, security devices in place, and logical maps of the network. 

B. The security company is provided with no information about the corporate network or physical locations. 

C. The security company is provided with limited information on the network, including all network diagrams. 

D. The security company is provided with limited information on the network, including some subnet ranges and logical network diagrams. 

Answer:

Explanation: 

The term black box testing is generally associated with application testing. However, in this question the term is used for network testing. Black box testing means testing something when you have no knowledge of the inner workings. 

Black-box testing is a method of software testing that examines the functionality of an application without peering into its internal structures or workings. This method of test can be applied to virtually every level of software testing: unit, integration, system and acceptance. It typically comprises most if not all higher level testing, but can also dominate unit testing as well. Specific knowledge of the application's code/internal structure and programming knowledge in general is not required. The tester is aware of what the software is supposed to do but is not aware of how it does it. For instance, the tester is aware that a particular input returns a certain, invariable output but is not aware of how the software produces the output in the first place. 

Q11. A security technician is attempting to access a wireless network protected with WEP. The technician does not know any information about the network. Which of the following should the technician do to gather information about the configuration of the wireless network? 

A. Spoof the MAC address of an observed wireless network client 

B. Ping the access point to discover the SSID of the network 

C. Perform a dictionary attack on the access point to enumerate the WEP key 

D. Capture client to access point disassociation packets to replay on the local PC’s loopback 

Answer:

Explanation: 

With ARP spoofing (also known as ARP poisoning), the MAC (Media Access Control) address of the data is faked. By faking this value, it is possible to make it look as if the data came from a network that it did not. This can be used to gain access to the network, to fool the router into sending data here that was intended for another host, or to launch a DoS attack. In all cases, the address being faked is an address of a legitimate user, and that makes it possible to get around such measures as allow/deny lists. Note: As an example, the initialization vector (IV) that WEP uses for encryption is 24-bit, which is quite weak and means that IVs are reused with the same key. By examining the repeating result, it was easy for attackers to crack the WEP secret key. This is known as an IV attack. 

Q12. Which of the following utilities can be used in Linux to view a list of users’ failed authentication attempts? 

A. badlog 

B. faillog 

C. wronglog 

D. killlog 

Answer:

Explanation: 

var/log/faillog - This Linux log fi le contains failed user logins. You’ll find this log useful when 

tracking attempts to crack into your system. 

/var/log/apport.log This log records application crashes. Sometimes these can reveal attempts to 

compromise the system or the presence of a virus or spyware. 

Q13. Which of the following should an administrator implement to research current attack methodologies? 

A. Design reviews 

B. Honeypot 

C. Vulnerability scanner 

D. Code reviews 

Answer:

Explanation: 

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. 

Q14. A security administrator implements access controls based on the security classification of the data and need-to-know information. Which of the following BEST describes this level of access control? 

A. Implicit deny 

B. Role-based Access Control 

C. Mandatory Access Controls 

D. Least privilege 

Answer:

Explanation: 

Mandatory Access Control allows access to be granted or restricted based on the rules of classification. MAC also includes the use of need to know. Need to know is a security restriction where some objects are restricted unless the subject has a need to know them. 

Q15. A company wants to ensure that all credentials for various systems are saved within a central database so that users only have to login once for access to all systems. Which of the following would accomplish this? 

A. Multi-factor authentication 

B. Smart card access 

C. Same Sign-On 

D. Single Sign-On 

Answer:

Explanation: 

Single sign-on means that once a user (or other subject) is authenticated into a realm, re-authentication is not required for access to resources on any realm entity. Single sign-on is able to internally translate and store credentials for the various mechanisms, from the credential used for original authentication.