Todas las investigacionesAll investigations
SOC166 · #116Web Attack · XSSWeb Attack · XSS

Detección de intentos de Cross-Site Scripting (XSS) sobre WebServer1002Cross-Site Scripting (XSS) Attempt Detection Against WebServer1002

Un usuario desde una IP comercial de China Unicom (AS4837) navega por el sitio y realiza 5 intentos manuales de inyección JavaScript (XSS) sobre el parámetro /search/?q= de WebServer1002. Todas las inyecciones fueron mitigadas por el WAF con estado HTTP 302 (0 B). Se confirma ausencia de anomalías en el EDR y se cierra como True Positive sin necesidad de escalamiento.

An external user from a commercial China Unicom IP (AS4837) browsed the website normally before submitting 5 manual JavaScript injection (XSS) payloads against /search/?q= on WebServer1002. All injection attempts were mitigated by the WAF with HTTP 302 (0 B) responses. EDR inspection confirmed no host anomalies, and the alert was closed as a True Positive without escalation.

Severidad
Medium
Veredicto
True Positive
Plataforma
LetsDefend
Fecha
20 de oct de 2026
Duración
20 min
Técnicas
02
Severity
Medium
Verdict
True Positive
Platform
LetsDefend
Date
Oct 20, 2026
Duration
20 min
Techniques
02

Resumen ejecutivo

El 26 de febrero de 2022 se activó la alerta SOC166 — Javascript Code Detected in Requested URL (Caso #116, severidad Media) tras detectarse múltiples peticiones HTTP GET con vectores de Cross-Site Scripting (XSS) contra el buscador /search/?q= del servidor interno WebServer1002 (172.16.17.17), originadas desde la IP 112[.]85[.]42[.]13 (AS4837 — China Unicom).

El análisis de los logs HTTP permitió reconstruir la secuencia completa: el visitante realizó primero una navegación legítima por / y /about-us/, probó el buscador con la palabra test (HTTP 200 OK, 885 bytes) y luego ejecutó 5 intentos manuales de inyección JavaScript. En los cinco casos, el WAF/servidor interceptó las solicitudes devolviendo HTTP 302 con 0 bytes de respuesta. Tras confirmar en el EDR que WebServer1002 no registró actividad sospechosa, se cerró la alerta como Verdadero Positivo (True Positive) sin necesidad de contención ni escalamiento.

Veredicto: True Positive — ataque XSS oportunista no exitoso. La protección del WAF funcionó según lo esperado (HTTP 302 / 0 B), por lo que no requiere escalamiento.

Detección inicial y triaje

Campo Valor
ID de Alerta / Regla LetsDefend Alert #116 — SOC166 - Javascript Code Detected in Requested URL
Severidad Inicial Media (Medium)
Fecha del Incidente (Logs) 2022-02-26 (12:34:34 – 12:56:55 SIEM)
Fecha de Investigación 2026-10-20
IP de Origen 112[.]85[.]42[.]13 (AS4837 — CHINA UNICOM China169 Backbone)
Activo Afectado WebServer1002 (172.16.17.17)
Endpoint / Método GET hxxps://172[.]16[.]17[.]17/search/?q=...
Respuesta ante Payloads HTTP 302 (0 bytes — Redirección / Bloqueo de WAF)

Análisis e investigación técnica

Reconstrucción del tráfico y análisis de payloads

Los registros HTTP de WebServer1002 muestran 8 peticiones provenientes de 112[.]85[.]42[.]13 a lo largo de ~22 minutos, divididas en una fase de exploración normal y una fase de pruebas manuales de inyección XSS:

<!-- 12:46:23 | Vector con etiqueta img y manejador de evento onerror -->
<$img src =q onerror=prompt(8)$>

<!-- 12:46:36 | Sondeo aislado de la función JS para identificar qué bloquea el filtro -->
prompt(8)

<!-- 12:50:09 | Intento de evasión sin espacios iterando sobre self con eval() -->
<$script>$for((i)in(self))eval(i)(1)<$/script>

<!-- 12:53:40 | Combinación de etiquetas svg y script -->
<$svg><$script ?>$alert(1)

<!-- 12:56:55 | Etiqueta script con pseudoprotocolo javascript: -->
<$script>javascript:$alert(1)
Hora URI Solicitada Estado HTTP Tamaño Observación
12:34:34 / 200 OK 1024 B Acceso inicial a la portada
12:35:10 /about-us/ 200 OK 3531 B Navegación legítima por el sitio
12:45:43 /search/?q=test 200 OK 885 B Prueba funcional del parámetro q
12:46:23 /search/?q=<$img%20src%20=q%20onerror=prompt(8)$> 302 0 B Mitigado — redirección sin contenido
12:46:36 /search/?q=prompt(8) 302 0 B Mitigado — redirección sin contenido
12:50:09 /search/?q=<$script>$for((i)in(self))eval(i)(1)<$/script> 302 0 B Mitigado — redirección sin contenido
12:53:40 /search/?q=<$svg><$script%20?>$alert(1) 302 0 B Mitigado — redirección sin contenido
12:56:55 /search/?q=<$script>javascript:$alert(1) 302 0 B Mitigado — dispara alerta SOC166

Evaluación de impacto y verificación en EDR

  • Efectividad del WAF (HTTP 302 / 0 B): Mientras que la búsqueda legítima ?q=test retornó 200 OK con 885 bytes de HTML, las 5 peticiones con vectores JavaScript recibieron código 302 y 0 bytes. El servidor nunca procesó ni reflejó los payloads en el cuerpo de la respuesta.
  • Inspección en EDR (WebServer1002): Se revisó la telemetría de endpoint en 172.16.17.17 (procesos activos, historial de comandos y conexiones de red), confirmando que no existió ninguna actividad sospechosa en el host.

Inteligencia de amenazas (CTI) y perfil del origen

  • Red de origen (112[.]85[.]42[.]13): IP geolocalizada en China perteneciente al ISP comercial China Unicom (AS4837 — China169 Backbone). En los motores de CTI no figura listada como maliciosa de forma generalizada, presentando únicamente una marca como sospechosa (Suspicious) en el vendor Gridinsoft.
  • Análisis del User-Agent: La cabecera Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1 identifica un sistema Windows 7 (x64) con Firefox 40.1. Aunque desactualizado para febrero de 2022, sigue siendo plausible en equipos antiguos de usuarios finales. Sumado a la navegación previa por /about-us/ y a los intervalos manuales entre cada prueba (de 13 segundos a 4 minutos), se concluye que fue un intento de XSS oportunista y no planeado originado desde Internet.

Conclusión y acciones de cierre

  1. Veredicto True Positive sin escalamiento: La alerta se clasifica como Verdadero Positivo ya que la regla SOC166 detectó con precisión intentos reales de inyección JavaScript en la URL, pero no requiere contención del host ni escalamiento a Tier 2 dado que las defensas perimetrales (WAF) bloquearon cada intento con HTTP 302 (0 B).
  2. Recomendaciones de defensa en profundidad:
    • Mantener las firmas de inspección del WAF sobre el parámetro q en /search/.
    • Verificar que el frontend aplique Output Encoding contextual y una política Content-Security-Policy (CSP) sin unsafe-inline ni unsafe-eval.

Cronología

  1. 12:34:34Navegación inicial legítima GET / y GET /about-us/ (12:35:10) — HTTP 200 OK (1024 B y 3531 B)
  2. 12:45:43Prueba benigna del buscador GET /search/?q=test — HTTP 200 OK (885 B)
  3. 12:46:23Primer intento XSS con [<$img src =q onerror=prompt(8)$>] — HTTP 302 (0 B)
  4. 12:46:36Sondeo de filtro enviando únicamente [prompt(8)] — HTTP 302 (0 B)
  5. 12:50:09Intento de evasión con [<$script>$for((i)in(self))eval(i)(1)<$/script>] — HTTP 302 (0 B)
  6. 12:53:40Prueba combinando etiquetas [<$svg><$script ?>$alert(1)] — HTTP 302 (0 B)
  7. 12:56:55Quinto payload [<$script>javascript:$alert(1)] dispara SOC166 (#116) — HTTP 302 (0 B)
  8. CierreVerificación de EDR limpio en WebServer1002 y cierre como True Positive (mitigado por WAF, sin escalamiento)

Mapeo MITRE ATT&CK

Indicadores de compromiso

defanged
IPv4112[.]85[.]42[.]13Origen en China · AS4837 (China Unicom) · Suspicious en Gridinsoft
HostWebServer1002 (172.16.17.17)Servidor web objetivo (sin anomalías en EDR)
URLhxxps://172[.]16[.]17[.]17/search/?q=<$script>javascript:$alert(1)URI que disparó la alerta SOC166 (#116)
User-AgentMozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1Windows 7 x64 · Firefox 40.1 en las 8 peticiones

Executive Summary

On February 26, 2022, the alert SOC166 — Javascript Code Detected in Requested URL (Case #116, Medium severity) triggered after multiple HTTP GET requests containing Cross-Site Scripting (XSS) payloads were sent to the /search/?q= endpoint of internal server WebServer1002 (172.16.17.17) from external IP 112[.]85[.]42[.]13 (AS4837 — China Unicom).

Log analysis revealed a two-stage pattern: the user first browsed / and /about-us/ normally, tested the search bar with a benign query (?q=test, HTTP 200 OK, 885 bytes), and then manually submitted 5 reflected XSS payloads. Every malicious request was intercepted and redirected with HTTP 302 and a 0-byte body, confirming that the WAF protection successfully neutralized the attack. Following EDR verification on WebServer1002 showing zero suspicious activity, the alert was closed as a True Positive without requiring escalation.

Verdict: True Positive — opportunistic XSS attempt, unsuccessful. WAF protections operated as expected (HTTP 302 / 0 B); no escalation or host containment required.

Initial Detection & Triage

Field Value
Alert ID / Rule LetsDefend Alert #116 — SOC166 - Javascript Code Detected in Requested URL
Initial Severity Medium
Incident Timestamp (Logs) 2022-02-26 (12:34:34 – 12:56:55 SIEM)
Investigation Date 2026-10-20
Source IP 112[.]85[.]42[.]13 (AS4837 — CHINA UNICOM China169 Backbone)
Affected Asset WebServer1002 (172.16.17.17)
Endpoint / Method GET hxxps://172[.]16[.]17[.]17/search/?q=...
Server / WAF Response HTTP 302 (0 bytes — Redirected / Mitigated)

Technical Analysis & Investigation

Traffic Reconstruction & Payload Analysis

Reviewing the HTTP access logs on WebServer1002 identified 8 total requests from 112[.]85[.]42[.]13 over roughly 22 minutes, transitioning from normal browsing to manual XSS filter probing:

<!-- 12:46:23 | Image tag vector with onerror event handler -->
<$img src =q onerror=prompt(8)$>

<!-- 12:46:36 | Isolated JS function probe to test which token triggered the filter -->
prompt(8)

<!-- 12:50:09 | Spaceless obfuscation iterating over self object with eval() -->
<$script>$for((i)in(self))eval(i)(1)<$/script>

<!-- 12:53:40 | Nested svg and malformed script tags -->
<$svg><$script ?>$alert(1)

<!-- 12:56:55 | Script tag paired with javascript: pseudo-protocol -->
<$script>javascript:$alert(1)
Time Requested URI HTTP Status Size Observation
12:34:34 / 200 OK 1024 B Initial homepage visit
12:35:10 /about-us/ 200 OK 3531 B Legitimate navigation
12:45:43 /search/?q=test 200 OK 885 B Benign baseline test on parameter q
12:46:23 /search/?q=<$img%20src%20=q%20onerror=prompt(8)$> 302 0 B Mitigated — zero-byte redirect
12:46:36 /search/?q=prompt(8) 302 0 B Mitigated — zero-byte redirect
12:50:09 /search/?q=<$script>$for((i)in(self))eval(i)(1)<$/script> 302 0 B Mitigated — zero-byte redirect
12:53:40 /search/?q=<$svg><$script%20?>$alert(1) 302 0 B Mitigated — zero-byte redirect
12:56:55 /search/?q=<$script>javascript:$alert(1) 302 0 B Mitigated — triggers alert SOC166

Impact Assessment & EDR Verification

  • WAF Mitigation Confirmed (HTTP 302 / 0 B): While the benign query ?q=test returned 200 OK with 885 bytes, all 5 requests containing JavaScript syntax received HTTP 302 with a 0-byte response body, confirming that the payloads were blocked before reaching or reflecting in the application response.
  • EDR Inspection (WebServer1002): Inspecting endpoint telemetry on 172.16.17.17 (processes, command history, and network connections) confirmed no suspicious activity on the host.

Threat Intelligence (CTI) & Source Profiling

  • Source Network (112[.]85[.]42[.]13): Located in China within the commercial ISP China Unicom (AS4837 — China169 Backbone). Major CTI engines do not classify the IP as a known malicious actor; only a single vendor (Gridinsoft) marks it as Suspicious.
  • User-Agent Assessment: The header Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1 indicates Windows 7 (x64) running Firefox 40.1. Although outdated by 2022, it remains plausible for legacy end-user machines. Combined with the prior /about-us/ browsing and multi-minute gaps between probes, the evidence points to an unplanned, opportunistic manual XSS attempt from the public internet.

Conclusion & Closure Decision

  1. True Positive Verdict without Escalation: The alert is classified as a True Positive because rule SOC166 accurately detected real JavaScript injection attempts in the URL, but no host containment or Tier 2 escalation is required since the WAF mitigated all 5 attempts (HTTP 302, 0 B).
  2. Defense-in-Depth Recommendations:
    • Maintain active WAF filtering rules on /search/ and monitor 112[.]85[.]42[.]13 for recurrent probing.
    • Ensure contextual Output Encoding on search results and enforce a strict Content-Security-Policy (CSP) disallowing unsafe-inline and unsafe-eval.

Timeline

  1. 12:34:34Initial legitimate browsing to GET / and GET /about-us/ (12:35:10) — HTTP 200 OK (1024 B & 3531 B)
  2. 12:45:43Benign search baseline GET /search/?q=test — HTTP 200 OK (885 B)
  3. 12:46:23First XSS probe using [<$img src =q onerror=prompt(8)$>] — HTTP 302 (0 B)
  4. 12:46:36Filter test sending isolated [prompt(8)] string — HTTP 302 (0 B)
  5. 12:50:09Filter bypass attempt using [<$script>$for((i)in(self))eval(i)(1)<$/script>] — HTTP 302 (0 B)
  6. 12:53:40Nested tag probe [<$svg><$script ?>$alert(1)] — HTTP 302 (0 B)
  7. 12:56:55Fifth payload [<$script>javascript:$alert(1)] triggers SOC166 (#116) — HTTP 302 (0 B)
  8. ClosedVerified clean EDR telemetry on WebServer1002 and closed as True Positive (WAF mitigated, no escalation needed)

MITRE ATT&CK Mapping

Indicators of Compromise (IOCs)

defanged
IPv4112[.]85[.]42[.]13China origin · AS4837 (China Unicom) · Flagged Suspicious by Gridinsoft
HostWebServer1002 (172.16.17.17)Target web server (clean EDR telemetry)
URLhxxps://172[.]16[.]17[.]17/search/?q=<$script>javascript:$alert(1)Specific URI that triggered alert SOC166 (#116)
User-AgentMozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1Windows 7 x64 · Firefox 40.1 across all 8 requests