SY0-401 Premium Bundle

SY0-401 Premium Bundle

CompTIA Security+ Certification Certification Exam

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

CompTIA SY0-401 Free Practice Questions

Q1. The BEST methods for a web developer to prevent the website application code from being vulnerable to cross-site request forgery (XSRF) are to: (Select TWO). 

A. Permit redirection to Internet-facing web URLs. 

B. Ensure all HTML tags are enclosed in angle brackets, e.g., ”<” and “>”. 

C. Validate and filter input on the server side and client side. 

D. Use a web proxy to pass website requests between the user and the application. 

E. Restrict and sanitize use of special characters in input and URLs. 

Answer: C,E 

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. XSRF can be prevented by adding a randomization string (called a nonce) to each URL request and session establishment and checking the client HTTP request header referrer for spoofing. 

Q2. The security administrator at ABC company received the following log information from an external party: 

10:45:01 EST, SRC 10.4.3.7:3056, DST 8.4.2.1:80, ALERT, Directory traversal 

10:45:02 EST, SRC 10.4.3.7:3057, DST 8.4.2.1:80, ALERT, Account brute force 

10:45:03 EST, SRC 10.4.3.7:3058, DST 8.4.2.1:80, ALERT, Port scan 

The external party is reporting attacks coming from abc-company.com. Which of the following is the reason the ABC company’s security administrator is unable to determine the origin of the attack? 

A. A NIDS was used in place of a NIPS. 

B. The log is not in UTC. 

C. The external party uses a firewall. 

D. ABC company uses PAT. 

Answer:

Explanation: 

PAT would ensure that computers on ABC’s LAN translate to the same IP address, but with a different port number assignment. The log information shows the IP address, not the port number, making it impossible to pin point the exact source. 

Q3. When implementing fire suppression controls in a datacenter it is important to: 

A. Select a fire suppression system which protects equipment but may harm technicians. 

B. Ensure proper placement of sprinkler lines to avoid accidental leakage onto servers. 

C. Integrate maintenance procedures to include regularly discharging the system. 

D. Use a system with audible alarms to ensure technicians have 20 minutes to evacuate. 

Answer:

Explanation: 

Water-based systems can cause serious damage to all electrical equipment and the sprinkler lines in a fire suppression control system should be placed in such a way so as not to leak onto computers when it do get activated because it works with overhead nozzles. 

Q4. A system administrator has been instructed by the head of security to protect their data at-rest. 

Which of the following would provide the strongest protection? 

A. Prohibiting removable media 

B. Incorporating a full-disk encryption system 

C. Biometric controls on data center entry points 

D. A host-based intrusion detection system 

Answer:

Explanation: 

Full disk encryption can be used to encrypt an entire volume with 128-bit encryption. When the entire volume is encrypted, the data is not accessible to someone who might boot another operating system in an attempt to bypass the computer’s security. Full disk encryption is sometimes referred to as hard drive encryption. This would be best to protect data that is at rest. 

Q5. Which of the following attacks could be used to initiate a subsequent man-in-the-middle attack? 

A. ARP poisoning 

B. DoS 

C. Replay 

D. Brute force 

Answer:

Explanation: 

A replay attack (also known as playback attack) is a form of network attack in which a valid data transmission is maliciously or fraudulently repeated or delayed. This is carried out either by the originator or by an adversary who intercepts the data and retransmits it, possibly as part of a masquerade attack by IP packet substitution (such as stream cipher attack). 

For example: Suppose Alice wants to prove her identity to Bob. Bob requests her password as proof of identity, which Alice dutifully provides (possibly after some transformation like a hash function); meanwhile, Eve is eavesdropping on the conversation and keeps the password (or the hash). After the interchange is over, Eve (posing as Alice) connects to Bob; when asked for a proof of identity, Eve sends Alice's password (or hash) read from the last session, which Bob accepts thus granting access to Eve. 

Countermeasures: A way to avoid replay attacks is by using session tokens: Bob sends a one-time token to Alice, which Alice uses to transform the password and send the result to Bob (e.g. computing a hash function of the session token appended to the password). On his side Bob performs the same computation; if and only if both values match, the login is successful. Now suppose Eve has captured this value and tries to use it on another session; Bob sends a different session token, and when Eve replies with the captured value it will be different from Bob's computation. Session tokens should be chosen by a (pseudo-) random process. Otherwise Eve may be able to pose as Bob, presenting some predicted future token, and convince Alice to use that token in her transformation. Eve can then replay her reply at a later time (when the previously predicted token is actually presented by Bob), and Bob will accept the authentication. One-time passwords are similar to session tokens in that the password expires after it has been used or after a very short amount of time. They can be used to authenticate individual transactions in addition to sessions. The technique has been widely implemented in personal online banking systems. Bob can also send nonces but should then include a message authentication code (MAC), which Alice should check. Timestamping is another way of preventing a replay attack. Synchronization should be achieved using a secure protocol. For example Bob periodically broadcasts the time on his clock together with a MAC. When Alice wants to send Bob a message, she includes her best estimate of the time on his clock in her message, which is also authenticated. Bob only accepts messages for which the timestamp is within a reasonable tolerance. The advantage of this scheme is that Bob does not need to generate (pseudo-) random numbers, with the trade-off being that replay attacks, if they are performed quickly enough i.e. within that 'reasonable' limit, could succeed. 

Q6. Which of the following is BEST used as a secure replacement for TELNET? 

A. HTTPS 

B. HMAC 

C. GPG 

D. SSH 

Answer:

Explanation: 

SSH transmits both authentication traffic and data in a secured encrypted form, whereas Telnet transmits both authentication credentials and data in clear text. 

Q7. Which of the following ports and protocol types must be opened on a host with a host-based firewall to allow incoming SFTP connections? 

A. 21/UDP 

B. 21/TCP 

C. 22/UDP 

D. 22/TCP 

Answer:

Explanation: 

SSH uses TCP port 22. All protocols encrypted by SSH, including SFTP, SHTTP, SCP, SExec, and slogin, also use TCP port 22. 

Q8. The common method of breaking larger network address space into smaller networks is known as: 

A. subnetting. 

B. phishing. 

C. virtualization. 

D. packet filtering. 

Answer:

Explanation: 

Q9. Encryption of data at rest is important for sensitive information because of which of the following? 

A. Facilitates tier 2 support, by preventing users from changing the OS 

B. Renders the recovery of data harder in the event of user password loss 

C. Allows the remote removal of data following eDiscovery requests 

D. Prevents data from being accessed following theft of physical equipment 

Answer:

Explanation: 

Data encryption allows data that has been stolen to remain out of the eyes of the intruders who took it as long as they do not have the proper passwords. 

Q10. Which of the following concepts is enforced by certifying that email communications have been sent by who the message says it has been sent by? 

A. Key escrow 

B. Non-repudiation 

C. Multifactor authentication 

D. Hashing 

Answer:

Explanation: 

Explanation: 

Regarding digital security, the cryptological meaning and application of non-repudiation shifts to 

mean: 

*

 A service that provides proof of the integrity and origin of data. 

*

 An authentication that can be asserted to be genuine with high assurance. 

Q11. All executive officers have changed their monitor location so it cannot be easily viewed when passing by their offices. Which of the following attacks does this action remediate? 

A. Dumpster Diving 

B. Impersonation 

C. Shoulder Surfing 

D. Whaling 

Answer:

Explanation: 

Viewing confidential information on someone’s monitor is known as shoulder surfing. By moving their monitors so they cannot be seen, the executives are preventing users passing by ‘shoulder surfing’. 

Shoulder surfing is using direct observation techniques, such as looking over someone's shoulder, to get information. Shoulder surfing is an effective way to get information in crowded places because it's relatively easy to stand next to someone and watch as they fill out a form, enter a PIN number at an ATM machine, or use a calling card at a public pay phone. Shoulder surfing can also be done long distance with the aid of binoculars or other vision-enhancing devices. To prevent shoulder surfing, experts recommend that you shield paperwork or your keypad from view by using your body or cupping your hand. 

Q12. Recent data loss on financial servers due to security breaches forced the system administrator to harden their systems. Which of the following algorithms with transport encryption would be implemented to provide the MOST secure web connections to manage and access these servers? 

A. SSL 

B. TLS 

C. HTTP 

D. FTP 

Answer:

Explanation: 

Transport Layer Security (TLS) and its predecessor, Secure Sockets Layer (SSL), are cryptographic protocols designed to provide communications security over a computer network. Transport Layer Security (TLS) is a security protocol that expands upon SSL. Many industry analysts predict that TLS will replace SSL in the future. TLS 1.0 was first defined in RFC 2246 in January 1999 as an upgrade of SSL Version 3.0. As of February 2015, the latest versions of all major web browsers support TLS 1.0, 1.1, and 1.2, have them enabled by default. 

Q13. Ann, a security administrator, wishes to replace their RADIUS authentication with a more secure protocol, which can utilize EAP. Which of the following would BEST fit her objective? 

A. CHAP 

B. SAML 

C. Kerberos 

D. Diameter 

Answer:

Explanation: 

Diameter is an authentication, authorization, and accounting protocol that replaces the RADIUS protocol. Diameter Applications extend the base protocol by including new commands and/or attributes, such as those for use of the Extensible Authentication Protocol (EAP). 

Q14. A datacenter requires that staff be able to identify whether or not items have been removed from the facility. Which of the following controls will allow the organization to provide automated notification of item removal? 

A. CCTV 

B. Environmental monitoring 

C. RFID 

D. EMI shielding 

Answer:

Explanation: 

RFID is radio frequency identification that works with readers that work with 13.56 MHz smart cards and 125 kHz proximity cards and can open turnstiles, gates, and any other physical security safeguards once the signal is read. Fitting out the equipment with RFID will allow you to provide automated notification of item removal in the event of any of the equipped items is taken off the premises. 

Q15. The security department has implemented a new laptop encryption product in the environment. The product requires one user name and password at the time of boot up and also another password after the operating system has finished loading. This setup is using which of the following authentication types? 

A. Two-factor authentication 

B. Single sign-on 

C. Multifactor authentication 

D. Single factor authentication 

Answer:

Explanation: 

Single-factor authentication is when only one authentication factor is used. In this case, Something you know is being used as an authentication factor. Username, password, and PIN form part of Something you know.