exam questions

Exam SY0-601 All Questions

View all questions & answers for the SY0-601 exam

Exam SY0-601 topic 1 question 330 discussion

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

A security analyst reviews web server logs and notices the following lines:



Which of the following vulnerabilities is the attacker trying to exploit?

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

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
ApplebeesWaiter1122
Highly Voted 2 years, 1 month ago
Selected Answer: D
The main difference between XSS and CSRF can be summarized as follows: XSS involves injecting and executing malicious scripts in a victim's browser when interacting with a compromised website, while CSRF tricks the victim's browser into performing unwanted actions on a target website where the victim is authenticated. XSS exploits the vulnerability in the website's input validation and output encoding, while CSRF exploits the trust between the user's browser and the target website. XSS impacts the user's browser, while CSRF impacts the target website and its users.
upvoted 36 times
ID77
1 year, 4 months ago
Thanks Applebee!
upvoted 2 times
...
...
6R15
Highly Voted 2 years, 4 months ago
Selected Answer: C
Get command is Powershell = CSRF use Powershell XSS =Javascript
upvoted 24 times
RyanL26
1 year, 2 months ago
That doesn't look like PowerShell to me... I am sticking with D.
upvoted 1 times
...
Nishkurup
2 years, 3 months ago
https://www.netsolutions.com/insights/severe-php-vulnerabilities-how-to-fix-them/
upvoted 1 times
Nishkurup
2 years, 3 months ago
https://brightsec.com/blog/cross-site-scripting-php/ What is Cross-Site Scripting? Cross-Site Scripting (XSS) attacks are a form of injection attack, where malicious scripts are injected into trusted web applications. XSS is usually inserted through a website using a hyperlink or a web form. The inserted code can be used via any client-side language such as JavaScript, PHP, HTML. And the URL for the page becomes https://example.com/school/?group=beginner Injecting the following code into the URL enables an XSS attack: https://example.com/school/?group=window.location=”https://maliciouswebsite.com”
upvoted 4 times
Nishkurup
2 years, 3 months ago
Chat GP question asked A security analyst reviews web server logs and notices the following lines: "http://www.example.com/downloadreport.php" 104.35.45.53 - [22/May/2020:06:57:31 +0100] "GET /profile.php?id=3cscript 3ealert 288271%27%29%3Cscript%3e HTTP/1.1" 200 11705 104.35.45.53 - [22/May/2020:07:00:58 +0100] "GET /profile.php?id=3cscript%3ealert*28%27 http%3a%2f%2fwww.evilsite.com%2fupdater.php%27%29%3cscript 3e HTTP/1.1" 200 23713 "http://www.example.com/downloadreport.php" Answer
upvoted 4 times
Nishkurup
2 years, 3 months ago
The first log entry shows that a user or an automated script made a GET request to the URL http://www.example.com/profile.php?id=3cscript%203ealert%20288271%2527%29%3Cscript%3e. The URL contains encoded characters, which suggests that an attacker may have attempted to exploit a vulnerability in the web application. The HTTP response code is 200, which means the request was successful, and the server returned a response with a size of 11705 bytes. The second log entry shows that a user or an automated script made a GET request to the URL http://www.example.com/profile.php?id=3cscript%3ealert*28%27http%3a%2f%2fwww.evilsite.com%2fupdater.php%27%29%3cscript%203e. This URL also contains encoded characters, and it appears to be an attempt to execute a cross-site scripting (XSS) attack. The HTTP response code is 200, and the server returned a response with a size of 23713 bytes.
upvoted 3 times
Nishkurup
2 years, 3 months ago
Based on this information, it's possible that the web application is vulnerable to XSS attacks, and an attacker may have attempted to exploit this vulnerability. As a security analyst, you should investigate the vulnerability and take appropriate steps to mitigate the risk of further attacks.
upvoted 4 times
...
...
...
...
...
mh1143
2 years, 3 months ago
In this sample, GET is not using powershell. The HTTP protocol uses the Get request method to request a resource (like a webpage) from the server
upvoted 2 times
Nishkurup
2 years, 3 months ago
can it not be CSSF Yes, it is possible that the attempted attack is a Cross-Site Script Forgery (CSRF) attack instead of an XSS attack. The log entries alone do not provide enough information to definitively determine the type of attack. However, there are a few reasons to suspect that the attack is an XSS attack rather than a CSRF attack. Firstly, the URLs in the log entries appear to contain encoded characters that are commonly used in XSS attacks, such as <script> and %27. Secondly, the URLs are accessing a profile.php page with a parameter called id, which is often a target of XSS attacks. Finally, the attacker is attempting to execute JavaScript code in the URL, which is typically associated with XSS attacks. That being said, it is important to perform a thorough investigation to determine the exact type of attack and take appropriate measures to mitigate the vulnerability.
upvoted 7 times
...
...
fryderyk
2 years, 2 months ago
I may be missing something, but in this case GET is simply an HTTP method.
upvoted 11 times
...
...
5e5650c
Most Recent 11 months, 3 weeks ago
Selected Answer: D
The answer is XSS because they injected malicious scripts on the webside, and they even add "evilsite" to make it more clear, another things you need to know: CRSF: It makes the victim preform unwanted actions, like if you are in your bank acct you get an emailn you clic on the link on your email and a transaction is preform under you name for $100, and SQL we can identify that one for 1 = 1, they atack the date base and introduce code malicious code
upvoted 1 times
...
Nemish71
1 year, 2 months ago
Selected Answer: D
Log snippet with alert = XSS
upvoted 3 times
...
kewokil120
1 year, 4 months ago
Selected Answer: D
Answer is D.
upvoted 1 times
...
evvie
1 year, 5 months ago
The clue lies in the URL parameters id=1, id=2, and id=3 appended to the website address. This pattern often indicates that the attacker is trying to manipulate the SQL query by injecting SQL code into the parameter values to gain unauthorized access to the database or perform other malicious actions. Therefore, the correct answer is: B. SQLi
upvoted 1 times
...
david124
1 year, 6 months ago
Selected Answer: C
The "evilsite.com" is what gives it. its C
upvoted 1 times
...
ComPCertOn
1 year, 8 months ago
Selected Answer: D
it seems the attacker is trying to inject a script into a web server, and using different script in each try. more like a XSS attack
upvoted 1 times
...
sujon_london
1 year, 10 months ago
Selected Answer: D
(%cscript%3eatert%28%271%27%29%3script%3e and %27 http%3a%2f%2fwww.evilsite.com%2fupdater.php%27%29%3script%3e) indicates an attempt to execute malicious scripts within the profile.php page. This is a common technique used in XSS attacks to execute arbitrary code or redirect users to malicious websites
upvoted 3 times
sujon_london
1 year, 10 months ago
If this was CSRF attack it could have been like quite similar pattern: /profile.php?id=<img src="http://www.evilsite.com/attack-script"> The attacker might embed an "img" tag with a source pointing to a script hosted on the attacker's site. This script could perform an action like changing the user's account settings or initiating a transaction on another website where the user is already authenticated. Hope this helps. In this context based on my reseach answer is XSS which is D
upvoted 2 times
...
sujon_london
1 year, 10 months ago
(%cscript%3eatert%28%271%27%29%3script%3e) into the URL parameter id of the /profile.php request. The injected code is obfuscated using URL encoding. This indicates an attempt to exploit a vulnerability in the web application to execute malicious scripts within users' browsers. This aligns with the definition of a Cross-Site Scripting (XSS) attack, where the attacker injects scripts that are executed by other users when they view the affected page. The presence of the URL http%3a%2f%2fwww.evilsite.com%2fupdater.php in the second request does not necessarily indicate CSRF. It could be part of the injected script trying to load content from an external site as part of the attack. CSRF typically involves tricking users into unknowingly performing actions within the application they are authenticated in, not loading external content.
upvoted 2 times
...
...
ja1092m
1 year, 10 months ago
https://crashtest-security.com/xss-vs-csrf-difference/ Id say C 100%
upvoted 1 times
...
SlySyrup
1 year, 11 months ago
Selected Answer: D
XSS seems to be the go here. XSRF requires the payload to be sent to a user in order to get them to click/process a malicious link but there is no such interaction in this case.
upvoted 5 times
...
sursur
2 years ago
Selected Answer: C
XSS vs CSRF - What Is The Difference? Now that the basic understanding of these two vulnerabilities is clear, let’s talk about the differences that these two shares: XSS is a two-way attack while CSRF is only one-way. In XSS, threat actors can execute a code, receive a response, and forward it to the desired destination whereas CSRF allows attackers only to raise a corrupted HTTP request. XSS is JavaScript-based while CSRF is HTTP-based. The success of an XSS attack isn’t based on the session activation. Corrupted payloads are delivered whenever the user accesses the website. CSRF demands an active session be completed. The scope of CSRF attacks is limited. At max, it leads to accessing corrupted websites or clicking on malicious links. The reach of XSS is far-flung and permits attackers to do anything they want. About XSS vs CSRF attacks, one key point is the way they both store the trouble-causing code. The code is stored on the targeted website in an XSS attack while it’s stored on the 3rd party site for carrying out a CSRF attack.
upvoted 1 times
...
milktea810182
2 years, 1 month ago
Selected Answer: D
The attacker in the provided log lines is attempting to exploit a Cross-Site Scripting (XSS) vulnerability. XSS involves injecting malicious scripts into web pages viewed by other users, typically through user input fields. In the log lines, the attacker is attempting to inject a script by modifying the "id" parameter in the URL, specifically within the "profile.php" page. The injected script appears to be an alert statement encoded using URL encoding.
upvoted 2 times
...
EvelynStandford
2 years, 1 month ago
What is the difference between XSS and CSRF? Cross-site scripting (or XSS) allows an attacker to execute arbitrary JavaScript within the browser of a victim user. Cross-site request forgery (or CSRF) allows an attacker to induce a victim user to perform actions that they do not intend to.
upvoted 1 times
...
Abdul2107
2 years, 2 months ago
Selected Answer: D
Looks like D. XSS https://portswigger.net/web-security/cross-site-scripting
upvoted 3 times
...
fouserd
2 years, 2 months ago
Selected Answer: D
According to chat GPT: The logs show an attempt to exploit an XSS (Cross-Site Scripting) vulnerability. The attacker injected a script into the request for the /profile.php?id= URL, and the server returned a 200 OK response with a large amount of data. XSS attacks involve injecting malicious scripts into web pages that are viewed by other users. These scripts can be used to steal sensitive data, such as session cookies or login credentials, or to perform other malicious actions on behalf of the user whose browser is running the script. In this case, the attacker appears to be attempting to execute a script that will trigger an alert message in the victim's browser, indicating that the XSS payload was successful.
upvoted 2 times
...
smallz1979
2 years, 2 months ago
Selected Answer: D
believe it is XSS. It looks like it is trying to get or attach the download report from evilsite but looks like it is coming from the legit site. Let me know where I went wrong.
upvoted 3 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 ...