Skip to content

Commit ccd7bab

Browse files
Update Rules.md
1 parent b74992c commit ccd7bab

File tree

1 file changed

+22
-12
lines changed

1 file changed

+22
-12
lines changed

wiki/Rules.md

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,24 +36,34 @@ Rules are stored as JSON files inside the `-rule-path` folder, in the simplest c
3636
| precedence | true or false. Sets if a rule take precedence (>= v1.2.0)|
3737
| action | Can be `deny`, `reject` or `allow`. |
3838
| duration | For rules persisting on disk, this value is default to `always`. |
39-
| operator.type | Can be `simple`, in which case a simple `==` comparison will be performed, `regexp` if the `data` field is a regular expression to match, `network` which will match a network range (127.0.0.1/8), `lists` which will look for matches on lists of something (domains, IPs, etc), or `list`, which is a combination of all of the types.|
40-
| operator.operand | What element of the connection to compare, can be one of: |
39+
| operator.type | `simple`, `regexp`, `network`, `lists`, `list`.|
40+
| | `simple` is a simple `==` comparison. `regexp` will match the regexp from the `data` field against the Operand, `network` which will match a network range (127.0.0.1/8), `lists` will look for matches on lists of something (domains, IPs, etc), and `list`, a combination of all of the previous types. |
41+
| operator.data | The data to compare the `operand` to, can be a regular expression if `type` is `regexp`, or a path to a directory with list of IPs/domains in the case of `lists`. |
42+
| operator.operand | Element of the connection to compare against, can be one of: |
4143
| |* `true` (will always match) |
42-
| |* `process.path` (the path of the executable) |
43-
| |* `process.id` PID|
44-
| |* `process.command` (full command line, including path and arguments)|
45-
| |* `provess.env.ENV_VAR_NAME` (use the value of an environment variable of the process given its name)
44+
| |* `process.path` (the absolute path of the executable) |
45+
| |* `process.id` PID of the process|
46+
| |* `process.command` (full command line, including path and arguments). Note that cmdlines can contain or not the process, and the path can be absolute or relative (`./cmd -x a`)|
47+
| |* `process.parent.path` (v1.7.0) check against ONE of the parent path. Include more parent paths to match the tree of a process. |
48+
| |* `provess.env.ENV_VAR_NAME` (use the value of an environment variable of the process given its name). |
49+
| |* `process.hash.md5` (v1.7.0) |
4650
| |* `user.id` (UID)|
51+
| |* `user.name` user name (v1.7.0). Check against a regular system username (no namespaces, containers or virtual user names).|
4752
| |* `protocol`|
53+
| |* `source.port` |
54+
| |* `source.ip` |
55+
| |* `source.network` |
4856
| |* `dest.ip` |
4957
| |* `dest.host` |
50-
| |* `dest.network` (>= v1.3.0)|
58+
| |* `dest.network` (v1.3.0)|
5159
| |* `dest.port` |
52-
| |* `lists.domains` (>= 1.4.0) lists of domains in hosts format [read more](https://github.com/evilsocket/opensnitch/wiki/block-lists)|
53-
| |* `lists.domains_regexp` (>= 1.5.0) list of domains with regular expressions (`.*\.example\.com`) [read more](https://github.com/evilsocket/opensnitch/wiki/block-lists)|
54-
| |* `lists.ips` (>= 1.5.0) list of IPs [read more](https://github.com/evilsocket/opensnitch/wiki/block-lists)|
55-
| |* `lists.nets` (>= 1.5.0) list of network ranges [read more](https://github.com/evilsocket/opensnitch/wiki/block-lists)|
56-
| operator.data | The data to compare the `operand` to, can be a regular expression if `type` is `regexp`, or a path to a directory with list of IPs/domains in the case of `lists`. |
60+
| |* `iface.in` (v1.6.0) |
61+
| |* `iface.out` (v1.6.0) |
62+
| |* `lists.domains` (v1.4.0) lists of domains in hosts format [read more](https://github.com/evilsocket/opensnitch/wiki/block-lists)|
63+
| |* `lists.domains_regexp` (v1.5.0) list of domains with regular expressions (`.*\.example\.com`) [read more](https://github.com/evilsocket/opensnitch/wiki/block-lists)|
64+
| |* `lists.ips` (v1.5.0) list of IPs [read more](https://github.com/evilsocket/opensnitch/wiki/block-lists)|
65+
| |* `lists.nets` (v1.5.0) list of network ranges [read more](https://github.com/evilsocket/opensnitch/wiki/block-lists)|
66+
| |* `lists.hash.md5` (v1.7.0) list of md5s |
5767

5868
### Some considerations
5969

0 commit comments

Comments
 (0)