Beaconing C2: conexiones regulares de volumen constante
Un implante que «late» hacia su servidor de mando produce muchas conexiones al mismo destino con tamaños casi idénticos: STD_DEV de los bytes cercano a cero durante un largo periodo.
Requisitos
Elasticsearch 8.14+, logs de flux (NetFlow/firewall)
SQL
FROM "logs-network-*"
| WHERE @timestamp >= NOW() - 24 hours
AND network.direction == "outbound"
| STATS
connexions = COUNT(*),
octets_moy = ROUND(AVG(network.bytes)),
ecart_type = ROUND(STD_DEV(network.bytes), 1),
premiere = MIN(@timestamp),
derniere = MAX(@timestamp)
BY source.ip, destination.ip, destination.port
| EVAL duree_h = DATE_DIFF("hour", premiere, derniere)
| WHERE connexions > 200 AND ecart_type < 50 AND duree_h >= 12
| KEEP source.ip, destination.ip, destination.port,
connexions, octets_moy, ecart_type, duree_h
| SORT connexions DESC
| LIMIT 25Resultado
source.ip | destination.ip | destination.port | connexions | octets_moy | ecart_type | duree_h -----------+----------------+------------------+------------+------------+------------+-------- 10.2.14.88 | 198.51.100.23 | 443 | 2871 | 1124 | 3.2 | 23 10.2.31.17 | 203.0.113.99 | 8443 | 1439 | 890 | 12.7 | 23 10.2.7.204 | 192.0.2.55 | 53 | 941 | 312 | 0.0 | 19 10.2.18.40 | 198.51.100.81 | 443 | 288 | 2048 | 41.9 | 14
SOCBeaconingC2STD_DEVRéseau