mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Add Intel::ADDR lookup to host field
IP addresses are often seen in the HTTP host field; this change checks if the value in the host field is a valid IP address and processes the Intel::seen event to check for an Intel::ADDR indicator.
This commit is contained in:
parent
9b672f9e7f
commit
2dbca1ccd9
1 changed files with 12 additions and 6 deletions
|
@ -9,12 +9,18 @@ event http_header(c: connection, is_orig: bool, name: string, value: string)
|
||||||
switch ( name )
|
switch ( name )
|
||||||
{
|
{
|
||||||
case "HOST":
|
case "HOST":
|
||||||
|
if ( is_valid_ip(value) )
|
||||||
|
Intel::seen([$host=to_addr(value),
|
||||||
|
$conn=c,
|
||||||
|
$where=HTTP::IN_HOST_HEADER]);
|
||||||
|
else
|
||||||
Intel::seen([$indicator=value,
|
Intel::seen([$indicator=value,
|
||||||
$indicator_type=Intel::DOMAIN,
|
$indicator_type=Intel::DOMAIN,
|
||||||
$conn=c,
|
$conn=c,
|
||||||
$where=HTTP::IN_HOST_HEADER]);
|
$where=HTTP::IN_HOST_HEADER]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case "REFERER":
|
case "REFERER":
|
||||||
Intel::seen([$indicator=sub(value, /^.*:\/\//, ""),
|
Intel::seen([$indicator=sub(value, /^.*:\/\//, ""),
|
||||||
$indicator_type=Intel::URL,
|
$indicator_type=Intel::URL,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue