Detect Web Attack Tools (sqlmap, Nikto, Nmap) in AWS ALB / ELB Access Logs
Published · Updated
Sigma Rule
title: AWS ALB Request From a Web Attack Tool
id: e5cc82ed-71dc-4762-8692-bc5a536b14eb
status: experimental
description: >
Detects requests in AWS ALB/ELB access logs whose user agent identifies a
web attack or scanning tool: sqlmap, Nikto, the Nmap Scripting Engine or
Acunetix. These tools announce themselves unless the operator changes the
user agent, so a match is a cheap, high-precision sign of an attack
attempt.
references:
- https://attack.mitre.org/techniques/T1595/002/
- https://attack.mitre.org/techniques/T1190/
author: LogTriage
date: 2026/10/06
modified: 2026/10/20
logsource:
product: aws
service: alb
detection:
attack_tool:
user_agent|contains:
- 'sqlmap'
- 'Nikto'
- 'Nmap Scripting Engine'
- 'acunetix'
condition: attack_tool
falsepositives:
- Authorized penetration tests from known addresses
- Subscribed attack-surface scanning services
level: medium
tags:
- attack.reconnaissance
- attack.t1595.002
- attack.initial_access
- attack.t1190
1 · Each event is compared with one selection. Every field in a selection must match; listed values are alternatives.
- user_agent contains any of
sqlmapNiktoNmap Scripting Engineacunetix
2 · An event counts when
attack_tool
alb_attack.log, silent on alb_normal.log — both in the public sample dataset ↗︎ What this rule detects
Off-the-shelf web attack tools identify themselves in the HTTP User-Agent header unless the
operator changes it: sqlmap/1.7 (https://sqlmap.org), Nikto, Nmap Scripting Engine.
AWS Application Load Balancer and Classic ELB access logs record the user agent of every request,
so these tools show up there before anything else.
This rule fires on any request whose user agent contains one of those names, or acunetix.
Detection logic
A single selection on the ALB log’s user_agent field. The strings are specific enough not to
appear in browser or library user agents (Nmap Scripting Engine rather than just nmap). The
rule ignores the path and status on purpose, so that it fires on every attempt; use the status
to prioritize, since a 2xx response means the request was served.
Validated against a real sample
Validated against alb_attack.log (shipped with LogTriage). The rule fires on one of its four
requests: 185.220.101.42 with the user agent sqlmap/1.7 (https://sqlmap.org) requesting
GET /admin/users, which the load balancer answered with 200: the admin resource was served,
the case to escalate.
The other three requests, from python-requests and axios clients to /admin/config,
/api/v1/login and /api/v1/users/export, are context; the FAQ explains why scripted clients
alone are not part of this rule. It stays silent on the matching benign log, where every request
comes from a browser.
False positives
Authorized testing is the recurring case: an internal penetration test or a subscribed attack-surface scanning service. Allowlist their documented source addresses and time windows; everything else is an attack attempt, to be prioritized by the response status.
Frequently Asked Questions
- Why flag these tools by user agent alone, with no path or status condition?
- Because the user agent is the signal. sqlmap, Nikto and the Nmap Scripting Engine identify themselves in every request unless the operator deliberately changes it, and no browser or ordinary integration sends those strings. Adding a path or status condition would only create gaps. The obvious limit is the other direction: a careful attacker sets a browser user agent, so treat this as a cheap tripwire, not complete coverage.
- Why medium and not high?
- Because internet-facing load balancers are scanned constantly, and most of these requests are rejected or answered with errors. What deserves escalation is the response: a 2xx from an admin or data path to a scanner, as in the sample, means the request was served and needs immediate review.
- Why doesn't it flag python-requests or axios on admin and login paths any more?
- An earlier version did, at critical severity. Those libraries are what many legitimate integrations and internal services use to call APIs, including login and export endpoints, so the branch flagged ordinary traffic. Scripted clients deserve attention in combination with other signals, such as failed logins in volume or unusual export sizes, rather than on their own.
- How does this pair with a WAF or GuardDuty on the same traffic?
- A WAF may already block the attack payload; this rule still fires on the user agent whatever the WAF did, which gives you the source address and full request history. GuardDuty's findings cover a different layer (VPC, DNS and API threat intelligence) and generally do not inspect HTTP request headers the way an access-log rule does.
Related Resources
Reference
- AWS ALB Access Log Fields: field reference → every field explained, with real sample records
- Web scanner probes: what the odd requests in an access log are after →
- Scanner user agents: who sends libredtail-http, l9explore, zgrab and fake Googlebots →
- Paste one record and see what each field means → free, runs in your browser
See this detection run on a real report
Try the live demo with a pre-loaded malicious log set — no signup required — or upload your own log file and get a full AI-reviewed threat report in minutes.