Hypertext Transfer Protocol (HTTP) is a cleartext-based, request-response and client-server protocol. It is the standard type of network activity to request/serve web pages, and by default, it is not blocked by any network perimeter. As a result of being unencrypted and the backbone of web traffic, HTTP is one of the must-to-know protocols in traffic analysis. Following attacks could be detected with the help of HTTP analysis:
http http2 (Note: HTTP2 is a revision of the HTTP protocol for better performance and security. It supports binary data transfer and request&response multiplexing.) http.request.method == "GET" http.request.method == "POST" http.requesthttp.response.code == 200http.user_agent contains "nmap"http.request.uri contains "admin"http.request.full_uri contains "admin" *URI: Uniform Resource Identifier.http.host contains "keyword" http.host == "keyword" http.server contains "apache" http.connection == "Keep-Alive" data-text-lines contains "keyword"As the adversaries use sophisticated technics to accomplish attacks, they try to leave traces similar to natural traffic through the known and trusted protocols. For a security analyst, it is important to spot the anomaly signs on the bits and pieces of the packets. The "user-agent" field is one of the great resources for spotting anomalies in HTTP traffic. In some cases, adversaries successfully modify the user-agent data, which could look super natural. A security analyst cannot rely only on the user-agent field to spot an anomaly. Never whitelist a user agent, even if it looks natural. User agent-based anomaly/threat detection/hunting is an additional data source to check and is useful when there is an obvious anomaly. If you are unsure about a value, you can conduct a web search to validate your findings with the default and normal user-agent info (example site).
http.user_agent(http.user_agent contains "sqlmap") or (http.user_agent contains "Nmap") or (http.user_agent contains "Wfuzz") or (http.user_agent contains "Nikto")Different user agent information from the same host in a short time notice. | Non-standard and custom user agent info. | Subtle spelling differences. ("Mozilla" is not the same as "Mozlilla" or "Mozlila") | Audit tools info like Nmap, Nikto, Wfuzz and sqlmap in the user agent field.| Payload data in the user agent field.
A proper investigation starts with prior research on threats and anomalies going to be hunted. Let's review the knowns on the "Log4j" attack before launching Wireshark.
http.request.method == "POST" (ip contains "jndi") or ( ip contains "Exploit")(frame contains "jndi") or ( frame contains "Exploit")(http.user_agent contains "$") or (http.user_agent contains "==")