Malicious User-Agent Detection in Logs

AttackPatterns Web Application Scanning / Bot Activity

What This Means

Identify malicious User-Agent strings in web server logs. Detect vulnerability scanners, bots, and attack tools by analyzing User-Agent patterns targeting your web infrastructure.

Example Log

-- Access log showing suspicious User-Agent strings:
203.0.113.55 "GET /admin HTTP/1.1" 404 0 "-" "sqlmap/1.7.2"
203.0.113.56 "GET / HTTP/1.1" 200 5120 "-" "Nikto/2.1.6"
203.0.113.57 "GET /wp-login.php HTTP/1.1" 404 0 "-" "WPScan v3.8.24"
203.0.113.58 "GET / HTTP/1.1" 200 5120 "-" "python-requests/2.28.0"
203.0.113.59 "GET /.env HTTP/1.1" 403 0 "-" "Go-http-client/1.1"
203.0.113.60 "GET / HTTP/1.0" 200 5120 "-" "-"

Indicators of Suspicious Activity

How to Investigate

  1. Parse access logs and group requests by User-Agent string
  2. Identify known malicious or scanning tool User-Agents in your logs
  3. Verify claimed search engine bots using reverse DNS lookup
  4. Check the behavior of suspicious User-Agents (what URIs they request, error rates)
  5. Correlate malicious User-Agents with IP addresses for further blocking
  6. Track new or unusual User-Agent strings appearing in your logs

Recommended Mitigations

Scan This Log Instantly

Paste a suspicious log line below and get an instant AI-powered security assessment.

0 / 2000

Need a Full Investigation?

Scan entire log files, detect attack patterns, reconstruct timelines, and generate a full investigation report.

Run Smart Scan

Related Log Types

Related Attack Patterns

Frequently Asked Questions

Can I rely on User-Agent strings for security?
No. User-Agent strings are trivially spoofed. They are useful for detecting unsophisticated scanners but should not be your primary defense. Combine User-Agent analysis with behavioral detection and IP reputation.
Which User-Agent strings should I block?
Block known tools: sqlmap, nikto, WPScan, Acunetix, Nessus, dirbuster, gobuster. Also consider blocking empty User-Agents and generic library clients from IPs that are not your own integrations.
How do I verify a Googlebot claim?
Perform a reverse DNS lookup on the IP. Legitimate Googlebot IPs resolve to crawl-xxx-xxx-xxx-xxx.googlebot.com. If the reverse DNS does not match, the User-Agent is spoofed.