exam questions

Exam SY0-701 All Questions

View all questions & answers for the SY0-701 exam

Exam SY0-701 topic 1 question 371 discussion

Actual exam question from CompTIA's SY0-701
Question #: 371
Topic #: 1
[All SY0-701 Questions]

While reviewing logs, a security administrator identifies the following code:



Which of the following best describes the vulnerability being exploited?

  • A. XSS
  • B. SQLi
  • C. DDoS
  • D. CSRF
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
45043df
1 week ago
Selected Answer: A
ChatGPT as of 01/01/2025: indicates the potential for Cross-Site Scripting (XSS). Reasoning: XSS (Cross-Site Scripting): This vulnerability occurs when attackers inject malicious scripts into webpages viewed by others. The presence of a <script> tag in the logs strongly suggests the possibility of XSS. If the script content includes malicious code, it could be executed in the context of the victim's browser. SQLi (SQL Injection): This pertains to injecting malicious SQL queries into database queries, which does not involve <script> tags or JavaScript. DDoS (Distributed Denial of Service): This involves overwhelming a service with traffic, which does not directly involve JavaScript or <script> tags in logs. CSRF (Cross-Site Request Forgery): This exploits trust in authenticated users to perform unwanted actions on their behalf, but it does not involve <script> tags or JavaScript injection. Correct Answer: a) XSS
upvoted 1 times
...
jbmac
1 week, 2 days ago
Selected Answer: A
The correct answer is: A. XSS (Cross-Site Scripting) Explanation: The code <script>function (send_info)</script> is a basic example of Cross-Site Scripting (XSS). In an XSS attack, an attacker injects malicious JavaScript code into web pages that can be executed in the context of another user's browser. This allows the attacker to steal sensitive information, such as session cookies, or perform other malicious actions, such as redirecting users or altering the content of the page.
upvoted 1 times
...
ProudFather
3 weeks, 2 days ago
Selected Answer: B
The code snippet demonstrates a classic example of SQL injection (SQLi). The attacker has injected malicious SQL code into the input field, bypassing the intended query and potentially gaining unauthorized access to the database.
upvoted 1 times
...
0ca8ee9
3 weeks, 5 days ago
Selected Answer: A
The code snippet <script>function (send_info)</script> by itself does not exploit a vulnerability. It's an incomplete piece of JavaScript code. However, its presence in logs, especially in contexts like URLs or web server logs, strongly suggests an attempted Cross-Site Scripting (XSS) attack.
upvoted 2 times
...
4617f0b
1 month ago
Selected Answer: B
Explanation according to ChatGPT: The code in the log likely contains evidence of an SQL Injection (SQLi) attack. Here’s why: SQL Injection (SQLi) is an attack technique where an attacker exploits a vulnerability in an application's software by injecting malicious SQL code into an input field (such as a form field, URL parameter, or API input). This can lead to unauthorized access to the database, data leakage, or even data modification. In the logs, if the attacker is attempting to inject SQL keywords such as UNION, SELECT, OR, AND, or similar, it is a strong indicator of an SQLi attack. These are typical components of SQL injection queries used to manipulate the database query.
upvoted 1 times
...
chasingsummer
1 month, 2 weeks ago
Selected Answer: A
The code snippet provided (<script>function (send_info)</script>) indicates the presence of a JavaScript function embedded within a webpage, which is typical of a cross-site scripting (XSS) attack.
upvoted 4 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago