File: websocket-keywords.rst

package info (click to toggle)
suricata 1%3A8.0.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 240,704 kB
  • sloc: ansic: 357,736; python: 8,721; sh: 5,043; makefile: 2,411; perl: 570; php: 170
file content (63 lines) | stat: -rw-r--r-- 1,483 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
WebSocket Keywords
==================

websocket.payload
-----------------

A sticky buffer on the unmasked payload,
limited by suricata.yaml config value ``websocket.max-payload-size``.

Examples::

  websocket.payload; pcre:"/^123[0-9]*/";
  websocket.payload content:"swordfish";

``websocket.payload`` is a 'sticky buffer' and can be used as ``fast_pattern``.

websocket.flags
---------------

Matches on the websocket flags.
It uses a 8-bit unsigned integer as value.
Only the four upper bits are used.

The value can also be a list of strings (comma-separated),
where each string is the name of a specific bit like `fin` and `comp`,
and can be prefixed by `!` for negation.

websocket.flags uses an :ref:`unsigned 8-bits integer <rules-integer-keywords>`

Examples::

  websocket.flags:128;
  websocket.flags:&0x40=0x40;
  websocket.flags:fin,!comp;

websocket.mask
--------------

Matches on the websocket mask if any.
It uses a 32-bit unsigned integer as value (big-endian).

websocket.mask uses an :ref:`unsigned 32-bits integer <rules-integer-keywords>`

Examples::

  websocket.mask:123456;
  websocket.mask:>0;

websocket.opcode
----------------

Matches on the websocket opcode.
It uses a 8-bit unsigned integer as value.
Only 16 values are relevant.
It can also be specified by text from the enumeration

websocket.opcode uses an :ref:`unsigned 8-bits integer <rules-integer-keywords>`

Examples::

  websocket.opcode:1;
  websocket.opcode:>8;
  websocket.opcode:ping;