ExamGecko
Home Home / CompTIA / CS0-003

CompTIA CS0-003 Practice Test - Questions Answers, Page 34

Question list
Search
Search

List of questions

Search

Related questions











A systems administrator needs to gather security events with repeatable patterns from Linux log files. Which of the following would the administrator most likely use for this task?

A.

A regular expression in Bash

A.

A regular expression in Bash

Answers
B.

Filters in the vi editor

B.

Filters in the vi editor

Answers
C.

Variables in a PowerShell script

C.

Variables in a PowerShell script

Answers
D.

A playbook in a SOAR tool

D.

A playbook in a SOAR tool

Answers
Suggested answer: A

Explanation:

Regular expressions are powerful tools for searching text based on specific patterns, making them ideal for parsing Linux log files to detect security events with repeatable patterns. In Bash, regular expressions can be used in commands like grep or awk to efficiently filter log data. CompTIA CySA+ emphasizes the use of regular expressions in log analysis for pattern matching, a common requirement for identifying suspicious activities in log files. Options B, C, and D are less suited for this specific task due to their limited pattern-matching capabilities or platform constraints.

An analyst is reviewing a dashboard from the company's SIEM and finds that an IP address known to be malicious can be tracked to numerous high-priority events in the last two hours. The dashboard indicates that these events relate to TTPs. Which of the following is the analyst most likely using?

A.

MITRE ATT&CK

A.

MITRE ATT&CK

Answers
B.

OSSTMM

B.

OSSTMM

Answers
C.

Diamond Model of Intrusion Analysis

C.

Diamond Model of Intrusion Analysis

Answers
D.

OWASP

D.

OWASP

Answers
Suggested answer: A

Explanation:

The MITRE ATT&CK framework is specifically designed for tracking Tactics, Techniques, and Procedures (TTPs) associated with cyber threats. It provides a detailed matrix of known adversarial behaviors, which is useful for correlating SIEM data to known attack patterns. According to CompTIA CySA+, MITRE ATT&CK is an industry-standard framework for threat intelligence and behavior analysis, making it the ideal tool for tracking malicious IP addresses and understanding their tactics. Other options like OSSTMM, the Diamond Model, and OWASP do not focus on TTPs as directly as MITRE ATT&CK does.

A SOC analyst observes reconnaissance activity from an IP address. The activity follows a pattern of short bursts toward a low number of targets. An open-source review shows that the IP has a bad reputation. The perimeter firewall logs indicate the inbound traffic was allowed. The destination hosts are high-value assets with EDR agents installed. Which of the following is the best action for the SOC to take to protect against any further activity from the source IP?

A.

Add the IP address to the EDR deny list.

A.

Add the IP address to the EDR deny list.

Answers
B.

Create a SIEM signature to trigger on any activity from the source IP subnet detected by the web proxy or firewalls for immediate notification.

B.

Create a SIEM signature to trigger on any activity from the source IP subnet detected by the web proxy or firewalls for immediate notification.

Answers
C.

Implement a prevention policy for the IP on the WAF.

C.

Implement a prevention policy for the IP on the WAF.

Answers
D.

Activate the scan signatures for the IP on the NGFWs.

D.

Activate the scan signatures for the IP on the NGFWs.

Answers
Suggested answer: A

Explanation:

Blocking the IP address at the EDR (Endpoint Detection and Response) level provides an immediate, targeted response to the detected reconnaissance activity, preventing further interaction with the high-value assets. EDR tools are designed to detect and block malicious IPs across endpoints. According to CompTIA CySA+, this proactive step is effective for isolating and mitigating threats on specific endpoints. While creating SIEM signatures (B) is useful for monitoring, and policies on WAF (C) and NGFWs (D) can provide additional layers of defense, the most immediate protective action is to block at the endpoint level.

SIMULATION

An organization's website was maliciously altered.

INSTRUCTIONS

Review information in each tab to select the source IP the analyst should be concerned about, the indicator of compromise, and the two appropriate corrective actions.

A.

see the explanation for step by step solution.

A.

see the explanation for step by step solution.

Answers
Suggested answer: A

Explanation:

Step 1: Analyzing the SFTP Log

The SFTP log provides a record of file transfer and login activities:

User ''sjames'' logged in from several IP addresses:

192.168.10.32 and 192.168.10.37 (internal network IPs)

32.111.16.37 and 41.21.18.102 (external IPs)

We see file alterations in the /var/www directory, which is commonly the web directory.

Modified files: about_us.html, index.html

Suspicious activity:

192.168.11.102 and 41.21.18.102 modified the files.

32.111.16.37 had failed login attempts, indicating possible unauthorized access attempts.

The most suspicious IP here is 41.21.18.102, as it's associated with direct file modifications, possibly indicating unauthorized access.

Step 2: Reviewing Netstat

The netstat output shows active connections and their states:

IP 41.21.18.102 has an ESTABLISHED connection with port 22, commonly used for SFTP.

IP 32.111.16.37 is also attempting connections, and 32.111.16.37 connections are in a TIME_WAIT state, showing prior connections were recently closed.

The netstat output reaffirms 41.21.18.102 is actively connected and potentially involved in malicious activities.

Step 3: Checking the HTTP Access Log

The HTTP Access log shows access to about_us.html:

32.111.16.37 repeatedly accessed /about_us.html with 404 errors, indicating attempts to reach non-existing pages.

41.21.18.102 accessed the 200 status code, showing successful page requests, but since this IP was modifying files directly on the server, it might be testing or verifying changes.

Again, 41.21.18.102 stands out as it matches both successful file modification and page request patterns, while 32.111.16.37 shows unsuccessful attempts.

Step 4: Selecting the IP of Concern

Based on the above analysis:

Step 5: Identifying the Indicator of Compromise

Potential indicators include unauthorized file modifications:

Modified index.html file is the correct answer, as it indicates direct changes to website content and is often a clear sign of compromise.

Step 6: Selecting Corrective Actions

To mitigate and prevent further compromise:

Change the password on the ''sjames'' account: The account was used across various IPs, indicating potential account compromise.

Block external SFTP access: Restricting SFTP to internal IPs only would prevent unauthorized external modifications. Since 41.21.18.102 was external, this would stop similar threats.

Summary

IP of Concern: 41.21.18.102

Indicator of Compromise: Modified index.html file

Corrective Actions:

Change the password on the sjames account

Block external SFTP access

These selections address both the immediate security breach and implement a preventative measure against future unauthorized access.

SIMULATION

A systems administrator is reviewing the output of a vulnerability scan.

INSTRUCTIONS

Review the information in each tab.

Based on the organization's environment architecture and remediation standards, select the server to be patched within 14 days and select the appropriate technique and mitigation.

A.

see the explanation for step by step solution

A.

see the explanation for step by step solution

Answers
Suggested answer: A

Explanation:

Step 1: Reviewing the Vulnerability Remediation Timeframes

The remediation standards require servers to be patched based on their CVSS score:

CVSS > 9.0: Patch within 7 days

CVSS 7.9 - 9.0: Patch within 14 days

CVSS 5.0 - 7.9: Patch within 30 days

CVSS 0 - 5.0: Patch within 60 days

Step 2: Analyzing the Output Tab

From the Output tab:

Server 192.168.76.5 has a CVSS score of 9.2 for an unsupported Microsoft IIS version, indicating a critical vulnerability requiring a patch within 7 days.

Server 192.168.76.6 has a CVSS score of 7.4 for a missing secure attribute on HTTPS cookies, which falls in the 5.0 - 7.9 range, requiring a patch within 30 days.

Since the question asks for the server to be patched within 14 days, we need to focus on servers with CVSS 7.9 - 9.0:

None of the servers have a CVSS score that falls precisely in the 7.9 - 9.0 range.

However, 192.168.76.5, with a CVSS score of 9.2, has a vulnerability that necessitates a quick response and fits as it must be patched within the shortest timeframe (7 days, which includes 14 days).

The server that fits within a 14-day urgency, based on standard practices, would be 192.168.76.5.

Step 3: Reviewing the Environment Tab

The Environment Tab provides additional context for 192.168.76.5:

It's in the dev environment, which is internal and not publicly accessible.

MFA is required, indicating security measures are already present.

Step 4: Selecting the Appropriate Technique and Mitigation

For 192.168.76.5, with the Microsoft IIS unsupported version:

Patch; upgrade IIS to the current release is the most suitable option, as upgrading IIS will resolve the unsupported software vulnerability by bringing it up-to-date with supported versions.

This technique addresses the root cause, which is the unpatched, outdated software.

Summary

Server to be patched within 14 calendar days: 192.168.76.5

Appropriate technique and mitigation: Patch; upgrade IIS to the current release

This approach ensures that the most critical vulnerabilities are addressed promptly, maintaining security compliance.

A new SOC manager reviewed findings regarding the strengths and weaknesses of the last tabletop exercise in order to make improvements. Which of the following should the SOC manager utilize to improve the process?

A.

The most recent audit report

A.

The most recent audit report

Answers
B.

The incident response playbook

B.

The incident response playbook

Answers
C.

The incident response plan

C.

The incident response plan

Answers
D.

The lessons-learned register

D.

The lessons-learned register

Answers
Suggested answer: D

Explanation:

The lessons-learned register is an essential document that captures insights and feedback from past exercises or incidents, highlighting what went well and what did not. By utilizing this register, the SOC manager can identify specific areas for improvement and develop actionable steps to enhance future response efforts. According to CompTIA's CySA+ and Security+ guidance, lessons learned from tabletop exercises are crucial for iterative improvements in an incident response plan. Options A, B, and C are useful resources, but the lessons-learned register specifically focuses on reflection and improvement, which is the primary objective in this context.

K company has recently experienced a security breach via a public-facing service. Analysis of the event on the server was traced back to the following piece of code:

SELECT ' From userjdata WHERE Username = 0 and userid8 1 or 1=1;---

Which of the following controls would be best to implement?

A.

Deploy a wireless application protocol.

A.

Deploy a wireless application protocol.

Answers
B.

Remove the end-of-life component.

B.

Remove the end-of-life component.

Answers
C.

Implement proper access control.

C.

Implement proper access control.

Answers
D.

Validate user input.

D.

Validate user input.

Answers
Suggested answer: D

Explanation:

The code snippet provided suggests an SQL injection vulnerability, indicated by the use of '1=1,' which is a common SQL injection technique to bypass authentication. To mitigate this risk, validating user input is the most effective control, as it ensures that any input is properly sanitized and escapes potentially malicious characters before interacting with the database. This is a key principle from CompTIA Security+ guidelines on secure coding practices. Options A and B are unrelated to the vulnerability type here, and while access control (Option C) is generally good practice, it does not specifically prevent SQL injection.

A report contains IoC and TTP information for a zero-day exploit that leverages vulnerabilities in a specific version of a web application. Which of the following actions should a SOC analyst take first after receiving the report?

A.

Implement a vulnerability scan to determine whether the environment is at risk.

A.

Implement a vulnerability scan to determine whether the environment is at risk.

Answers
B.

Block the IP addresses and domains from the report in the web proxy and firewalls.

B.

Block the IP addresses and domains from the report in the web proxy and firewalls.

Answers
C.

Verify whether the information is relevant to the organization.

C.

Verify whether the information is relevant to the organization.

Answers
D.

Analyze the web application logs to identify any suspicious or malicious activity.

D.

Analyze the web application logs to identify any suspicious or malicious activity.

Answers
Suggested answer: C

Explanation:

Before taking any action, the SOC analyst should first verify if the Indicators of Compromise (IoC) and Tactics, Techniques, and Procedures (TTPs) reported are relevant to the organization's environment. This involves checking if the vulnerable application or version is actually in use. As per CompTIA's CySA+ guidelines, relevance verification helps in prioritizing resources and response actions effectively, ensuring that time is not wasted on threats that do not impact the organization. Options A, B, and D are important subsequent steps if the threat is deemed relevant.

A systems administrator is reviewing after-hours traffic flows from data center servers and sees regular, outgoing HTTPS connections from one of the servers to a public IP address. The server should not be making outgoing connections after hours. Looking closer, the administrator sees this traffic pattern around the clock during work hours as well. Which of the following is the most likely explanation?

A.

Command-and-control beaconing activity

A.

Command-and-control beaconing activity

Answers
B.

Data exfiltration

B.

Data exfiltration

Answers
C.

Anomalous activity on unexpected ports

C.

Anomalous activity on unexpected ports

Answers
D.

Network host IP address scanning

D.

Network host IP address scanning

Answers
E.

A rogue network device

E.

A rogue network device

Answers
Suggested answer: A

Explanation:

Command-and-control (C2) beaconing involves compromised systems communicating with an attacker's server at regular intervals, often using HTTPS to blend in with legitimate traffic. This is indicative of a potential compromise where malware communicates back to a command center. The persistent nature of the connections after hours and throughout the day suggests automated beaconing, which is a tell-tale sign of C2 activity. According to CompTIA CySA+, this type of activity should raise immediate suspicion and warrants further investigation and containment. While options B, C, D, and E might indicate other issues, they do not fit the pattern described as well as option A.

A web application has a function to retrieve content from an internal URL to identify CSRF attacks in the logs. The security analyst is building a regular expression that will filter out the correctly formatted requests. The target URL is https://10.1.2.3/api, and the receiving API only accepts GET requests and uses a single integer argument named 'id.' Which of the following regular expressions should the analyst use to achieve the objective?

A.

(?!https://10\.1\.2\.3/api\?id=[0-9]+)

A.

(?!https://10\.1\.2\.3/api\?id=[0-9]+)

Answers
B.

'https://10\.1\.2\.3/api\?id=\d+

B.

'https://10\.1\.2\.3/api\?id=\d+

Answers
C.

(?:'https://10\.1\.2\.3/api\?id-[0-9]+)

C.

(?:'https://10\.1\.2\.3/api\?id-[0-9]+)

Answers
D.

https://10\.1\.2\.3/api\?id[0-9J$

D.

https://10\.1\.2\.3/api\?id[0-9J$

Answers
Suggested answer: B

Explanation:

The correct regular expression to match a GET request to this API endpoint is 'https://10\.1\.2\.3/api\?id=\d+'. This pattern checks for the specific URL with an id parameter that accepts integer values. The syntax \d+ matches one or more digits, which aligns with the requirement for a single integer argument. Other options either use incorrect syntax or do not accurately capture the expected URL format. Regular expressions are vital in filtering and identifying patterns in logs, as recommended by CompTIA Cybersecurity Analyst (CySA+) practices for threat hunting and log analysis.

Total 368 questions
Go to page: of 37