IP Header Values
You can use keywords to identify possible attacks or security policy violations in the IP headers of packets.
fragbits
The
fragbits
keyword inspects the fragment and reserved
bits in the IP header. You can check each packet for the Reserved Bit, the More
Fragments bit, and the Don't Fragment bit in any combination.
Argument |
Description |
---|---|
R |
Reserved bit |
M |
More Fragments bit |
D |
Don’t Fragment bit |
To further refine a rule using the
fragbits
keyword, you can specify any operator
described in the following table after the argument value in the rule.
Operator |
Description |
---|---|
plus sign (+) |
The packet must match against all specified bits. |
asterisk (*) |
The packet can match against any of the specified bits. |
exclamation point (!) |
The packet meets the criteria if none of the specified bits are set. |
For example, to generate an event against packets that have the
Reserved Bit set (and possibly any other bits), use
R+
as the
fragbits
value.
id
The
id
keyword tests the IP header fragment identification
field against the value you specify in the keyword’s argument. Some
denial-of-service tools and scanners set this field to a specific number that
is easy to detect. For example, in SID 630, which detects a Synscan portscan,
the
id
value is set to
39426
, the static value used as the ID number in
packets transmitted by the scanner.
Note |
|
ipopts
The
IPopts
keyword allows you to search packets for
specified IP header options. The following table lists the available argument
values.
Argument |
Description |
---|---|
rr |
record route |
eol |
end of list |
nop |
no operation |
ts |
time stamp |
sec |
IP security option |
lsrr |
loose source routing |
ssrr |
strict source routing |
satid |
stream identifier |
Analysts most frequently watch for strict and loose source routing because these options may be an indication of a spoofed source IP address.
ip_proto
The
ip_proto
keyword allows you to identify packets with
the IP protocol specified as the keyword’s value. You can specify the IP
protocols as a number, 0 through 255. You can combine these numbers with the
following operators:
<
, >
, or
!
. For example, to inspect traffic with any protocol
that is not ICMP, use
!1
as a value to the
ip_proto
keyword. You can also use the
ip_proto
keyword multiple times in a single rule; note,
however, that the rules engine interprets multiple instances of the keyword as
having a Boolean AND relationship. For example, if you create a rule containing
ip_proto:!3; ip_proto:!6
, the rule ignores traffic
using the GGP protocol AND the TCP protocol.
tos
Some networks use the type of service (ToS) value to set
precedence for packets traveling on that network. The
tos
keyword allows you to test the packet’s IP header
ToS value against the value you specify as the keyword’s argument. Rules using
the
tos
keyword will trigger on packets whose ToS is set to
the specified value and that meet the rest of the criteria set forth in the
rule.
Note | Argument values for
|
The ToS field has been deprecated in the IP header protocol and replaced with the Differentiated Services Code Point (DSCP) field.
ttl
A packet’s time-to-live (ttl) value indicates how many hops it
can make before it is dropped. You can use the
ttl
keyword to test the packet’s IP header ttl value
against the value, or range of values, you specify as the keyword’s argument.
It may be helpful to set the
ttl
keyword parameter to a low value such as 0 or 1, as
low time-to-live values are sometimes indicative of a traceroute or intrusion
evasion attempt. (Note, though, that the appropriate value for this keyword
depends on your managed device placement and network topology.) Use syntax as
follows:
-
Use an integer from 0 to 255 to set a specific value for the TTL value. You can also precede the value with an equal (=) sign (for example, you can specify
5
or=5
). -
Use a hyphen (
-
) to specify a range of TTL values (for example,0-2
specifies all values 0 through 2,-5
specifies all values 0 through 5, and5-
specifies all values 5 through 255). -
Use the greater than (>) sign to specify TTL values greater than a specific value (for example,
>3
specifies all values greater than 3). -
Use the greater than and equal to signs (>=) to specify TTL values greater than or equal to a specific value (for example,
>=3
specifies all values greater than or equal to 3). -
Use the less than (<) sign to specify TTL values less than a specific value (for example,
<3
specifies all values less than 3). -
Use the less than and equal to signs (<=) to specify TTL values less than or equal to a specific value (for example,
<=3
specifies all values less than or equal to 3).