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=testretornó200 OKcon885 bytesde HTML, las 5 peticiones con vectores JavaScript recibieron código302y0 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 en172.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.1identifica 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
- Veredicto
True Positivesin escalamiento: La alerta se clasifica como Verdadero Positivo ya que la reglaSOC166detectó 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 conHTTP 302 (0 B). - Recomendaciones de defensa en profundidad:
- Mantener las firmas de inspección del WAF sobre el parámetro
qen/search/. - Verificar que el frontend aplique Output Encoding contextual y una política
Content-Security-Policy (CSP)sinunsafe-inlineniunsafe-eval.
- Mantener las firmas de inspección del WAF sobre el parámetro
Cronología
- 12:34:34Navegación inicial legítima GET / y GET /about-us/ (12:35:10) — HTTP 200 OK (1024 B y 3531 B)
- 12:45:43Prueba benigna del buscador GET /search/?q=test — HTTP 200 OK (885 B)
- 12:46:23Primer intento XSS con [<$img src =q onerror=prompt(8)$>] — HTTP 302 (0 B)
- 12:46:36Sondeo de filtro enviando únicamente [prompt(8)] — HTTP 302 (0 B)
- 12:50:09Intento de evasión con [<$script>$for((i)in(self))eval(i)(1)<$/script>] — HTTP 302 (0 B)
- 12:53:40Prueba combinando etiquetas [<$svg><$script ?>$alert(1)] — HTTP 302 (0 B)
- 12:56:55Quinto payload [<$script>javascript:$alert(1)] dispara SOC166 (#116) — HTTP 302 (0 B)
- CierreVerificación de EDR limpio en WebServer1002 y cierre como True Positive (mitigado por WAF, sin escalamiento)
Mapeo MITRE ATT&CK
Indicadores de compromiso
defanged112[.]85[.]42[.]13Origen en China · AS4837 (China Unicom) · Suspicious en GridinsoftWebServer1002 (172.16.17.17)Servidor web objetivo (sin anomalías en EDR)hxxps://172[.]16[.]17[.]17/search/?q=<$script>javascript:$alert(1)URI que disparó la alerta SOC166 (#116)Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1Windows 7 x64 · Firefox 40.1 en las 8 peticionesExecutive 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=testreturned200 OKwith885 bytes, all 5 requests containing JavaScript syntax receivedHTTP 302with a0-byteresponse body, confirming that the payloads were blocked before reaching or reflecting in the application response. - EDR Inspection (
WebServer1002): Inspecting endpoint telemetry on172.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.1indicates 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
True PositiveVerdict without Escalation: The alert is classified as a True Positive because ruleSOC166accurately 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).- Defense-in-Depth Recommendations:
- Maintain active WAF filtering rules on
/search/and monitor112[.]85[.]42[.]13for recurrent probing. - Ensure contextual Output Encoding on search results and enforce a strict
Content-Security-Policy (CSP)disallowingunsafe-inlineandunsafe-eval.
- Maintain active WAF filtering rules on
Timeline
- 12:34:34Initial legitimate browsing to GET / and GET /about-us/ (12:35:10) — HTTP 200 OK (1024 B & 3531 B)
- 12:45:43Benign search baseline GET /search/?q=test — HTTP 200 OK (885 B)
- 12:46:23First XSS probe using [<$img src =q onerror=prompt(8)$>] — HTTP 302 (0 B)
- 12:46:36Filter test sending isolated [prompt(8)] string — HTTP 302 (0 B)
- 12:50:09Filter bypass attempt using [<$script>$for((i)in(self))eval(i)(1)<$/script>] — HTTP 302 (0 B)
- 12:53:40Nested tag probe [<$svg><$script ?>$alert(1)] — HTTP 302 (0 B)
- 12:56:55Fifth payload [<$script>javascript:$alert(1)] triggers SOC166 (#116) — HTTP 302 (0 B)
- ClosedVerified clean EDR telemetry on WebServer1002 and closed as True Positive (WAF mitigated, no escalation needed)
MITRE ATT&CK Mapping
Indicators of Compromise (IOCs)
defanged112[.]85[.]42[.]13China origin · AS4837 (China Unicom) · Flagged Suspicious by GridinsoftWebServer1002 (172.16.17.17)Target web server (clean EDR telemetry)hxxps://172[.]16[.]17[.]17/search/?q=<$script>javascript:$alert(1)Specific URI that triggered alert SOC166 (#116)Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1Windows 7 x64 · Firefox 40.1 across all 8 requests