AbbySec

My digital playground โ€“ where hacking meets learning.

View on GitHub
28 February 2026

SOC166 โ€“ Javascript Code Detected in Requested URL (XSS Scanning Attempt)

by

๐Ÿง  Summary

This investigation began with a SOC166 โ€“ Javascript Code Detected in Requested URL alert.

Initial analysis showed an external IP attempting to inject multiple JavaScript payloads into the /search endpoint of a web server.

Further log analysis across web logs, server logs, network logs, and CLI activity confirmed that the attack was unsuccessful and no compromise occurred.

The activity was identified as an automated reflected XSS scanning attempt.


๐Ÿšจ Alert Overview


๐Ÿ”Ž Initial Suspicious Request

The alert was triggered due to the following request:

https://172.16.17.17/search/?q=<$script>javascript:$alert(1)<$/script>

This indicates an attempt to inject JavaScript into the search parameter.


๐Ÿงช Investigation Steps

1๏ธโƒฃ Reviewed Web Logs

Filtered logs by source IP:

112.85.42.13

Multiple payload variations were observed targeting the /search endpoint.


2๏ธโƒฃ Observed Payload Variations

The attacker tested several XSS techniques:

Script Tag Injection

/search/?q=<$script>javascript:$alert(1)<$/script>

Image Event Handler Injection

/search/?q=<$img src=0=q onerror=prompt(8)$>

SVG + Script Injection

/search/?q=<$svg><$script>$alert(1)

Obfuscated Dynamic Execution

/search/?q=<$script>$for(i in(self))eval(i)(i)<$/script>

Simple JavaScript Execution Test

/search/?q=prompt(8)


๐Ÿ“Š HTTP Response Comparison

Request Category HTTP Status Response Size (Bytes) Interpretation
Normal Homepage 200 OK 885 Legitimate page served successfully
About Page 200 OK 3531 Legitimate content delivered normally
XSS Payload Attempts 302 Redirect 0 Malicious input redirected / blocked

All malicious payload attempts returned:

This strongly indicates:


4๏ธโƒฃ Server Log Review

No evidence of:


5๏ธโƒฃ Network Log Review


6๏ธโƒฃ Email Review


๐ŸŽฏ Attack Classification

This activity is classified as:

Reflected Cross-Site Scripting (XSS) Scanning Attempt

The attacker used:

The behavior strongly resembles:


๐Ÿ›ก Was the Attack Successful?

No.

Reasons:


๐Ÿงพ Artifacts Identified

๐Ÿ”น Source IP

๐Ÿ”น Target Server

๐Ÿ”น Malicious Endpoints


๐Ÿง  MITRE ATT&CK Mapping


๐Ÿ“Œ Final Verdict

Assessment Category Determination
Attack Type Reflected Cross-Site Scripting (XSS)
Activity Nature Automated Web Application Scanning
Source Classification External Public IP
Exploitation Status Unsuccessful
Payload Execution Not Observed
Host Compromise No Evidence Detected
Alert Classification True Positive
Overall Incident Severity Medium (Reconnaissance / Attempt Only)

๐Ÿ“ Conclusion

The alert was a legitimate detection of malicious JavaScript injection attempts. However, the application successfully prevented exploitation by redirecting malicious requests.

The activity is classified as a True Positive โ€“ Unsuccessful XSS Scanning Attempt.

No compromise occurred.


๐Ÿ” Recommendations


This case demonstrates how proper log correlation across web, server, network, and email sources helps determine whether an alert represents an actual compromise or merely reconnaissance activity.

tags: