NGINX ingress controller HTTP requests from security scanner

Goal

Detect when a web application is being scanned. This will identify attacker IP addresses who are not trying to hide their attempt to attack your system. More advanced hackers will use an inconspicuous user agent.

Strategy

Inspect the user agent in the HTTP headers to determine if an IP is scanning your application and generate an INFO signal.

Triage and response

  1. Determine if this IP is making authenticated requests to the application.
  2. If the IP is making authenticated requests to the application:
    • Investigate the HTTP logs and determine if the user is attacking your application.

The HTTP headers in the query are from darkqusar’s gist