5 |
All process and module blacklists and whitelists and string argument restrictions in Ambush are regular expressions. This means that with a single expression you can specify a wide variety of restrictions, but mistakes are easy to make.
6 |
Use
7 |
- Blacklists and whitelists have one regular expression per line. Ambush will combine each regular expression into the complete blacklist (or whitelist).
8 | - Blacklists and whitelists will be applied case-insensitively, but argument restrictions will be case-sensitive.
9 | - The regular expressions will match any portion of the string or path unless you start your regular expression with ^ to only match at the beginning or $ to only match at the end.
10 |
11 |
Examples
12 |
13 |
14 | | Regular Expression | Matches | Does not match |
15 |
16 | | chrome.exe | C:\Users\Bob\Appdata\Local\Google\Chrome\Application\chrome.exe | C:\Temp\bhrome.exe |
17 | | C:\Temp\chromezexe.txt | |
18 | | C:\Temp\zzzchrome.exe.bat | |
19 | | [abc]hrome\.exe | C:\Users\Bob\Appdata\Local\Google\Chrome\Application\chrome.exe | C:\Temp\chromezexe.txt |
20 | | C:\Temp\zzzchrome.exe.bat | |
21 | | C:\Temp\bhrome.exe | |
22 | | \\chrome\.exe$ | C:\Users\Bob\Appdata\Local\Google\Chrome\Application\chrome.exe | C:\Temp\chromezexe.txt |
23 | | | C:\Temp\zzzchrome.exe.bat |
24 | | chrome\d\.exe | chrome1.exe | chromea.exe |
25 |
26 |
27 |
Syntax
28 |
^ Match beginning of a buffer
29 | $ Match end of a buffer
30 | () Grouping and substring capturing
31 | [...] Match any character from set
32 | [^...] Match any character but ones from set
33 | \s Match whitespace
34 | \S Match non-whitespace
35 | \d Match decimal digit
36 | \r Match carriage return
37 | \n Match newline
38 | + Match one or more times (greedy)
39 | +? Match one or more times (non-greedy)
40 | * Match zero or more times (greedy)
41 | *? Match zero or more times (non-greedy)
42 | ? Match zero or once
43 | \xDD Match byte with hex value 0xDD
44 | \meta Match one of the meta character: ^$().[*+?\
45 |
46 |