|
2 | 2 | { |
3 | 3 | "id":1, |
4 | 4 | "title":"Block test parameter being present in the URL", |
5 | | - "rules":{"get.test":{"match":{"type":"isset"}}}, |
| 5 | + "rules":[{"parameter":"get.test","match":{"type":"isset"}}], |
6 | 6 | "cat":"TEST", |
7 | 7 | "type":"BLOCK", |
8 | 8 | "type_params":null |
9 | 9 | }, |
10 | 10 | { |
11 | 11 | "id":2, |
12 | 12 | "title":"Block backdoor parameter in payload set to mybackdoor and user agent containing some_backdoor_agent.", |
13 | | - "rules":{"post.backdoor":{"match":{"type":"equals","value":"mybackdoor"},"inclusive":true},"server.HTTP_USER_AGENT":{"match":{"type":"contains","value":"some_backdoor_agent"},"inclusive":true}}, |
| 13 | + "rules":[{"parameter":"post.backdoor","match":{"type":"equals","value":"mybackdoor"},"inclusive":true},{"parameter":"server.HTTP_USER_AGENT","match":{"type":"contains","value":"some_backdoor_agent"},"inclusive":true}], |
14 | 14 | "cat":"TEST", |
15 | 15 | "type":"BLOCK", |
16 | 16 | "type_params":null |
17 | 17 | }, |
18 | 18 | { |
19 | 19 | "id":3, |
20 | 20 | "title":"Block a base64 json encoded request with the user_role parameter set to administrator", |
21 | | - "rules":{"post.payload":{"mutations":["base64_decode","json_decode"],"match":{"type":"array_key_value","key":"user_role","match":{"type":"equals","value":"administrator"}}}}, |
| 21 | + "rules":[{"parameter":"post.payload","mutations":["base64_decode","json_decode"],"match":{"type":"array_key_value","key":"user_role","match":{"type":"equals","value":"administrator"}}}], |
| 22 | + "cat":"TEST", |
| 23 | + "type":"BLOCK", |
| 24 | + "type_params":null |
| 25 | + }, |
| 26 | + { |
| 27 | + "id":4, |
| 28 | + "title":"Block WordPress WP-AJAX action restaurant_system_customize_button or restaurant_system_insert_dialog, when not executed by an administrator.", |
| 29 | + "rules":[{"parameter":"rules","rules":[{"parameter":"get.action","match":{"type":"in_array","value":["restaurant_system_customize_button","restaurant_system_insert_dialog"]}},{"parameter":"post.action","match":{"type":"in_array","value":["restaurant_system_customize_button","restaurant_system_insert_dialog"]}}],"inclusive":true},{"parameter":false,"match":{"type":"current_user_cannot","value":"administrator"},"inclusive":true}], |
| 30 | + "cat":"TEST", |
| 31 | + "type":"BLOCK", |
| 32 | + "type_params":null |
| 33 | + }, |
| 34 | + { |
| 35 | + "id":5, |
| 36 | + "title":"Block WordPress WP-AJAX action restaurant_system_customize_button or restaurant_system_insert_dialog.", |
| 37 | + "rules":[{"parameter":"get.action","match":{"type":"in_array","value":["restaurant_system_customize_button","restaurant_system_insert_dialog"]}},{"parameter":"post.action","match":{"type":"in_array","value":["restaurant_system_customize_button","restaurant_system_insert_dialog"]}}], |
| 38 | + "cat":"TEST", |
| 39 | + "type":"BLOCK", |
| 40 | + "type_params":null |
| 41 | + }, |
| 42 | + { |
| 43 | + "id":6, |
| 44 | + "title":"Block access to specific WP-JSON endpoint.", |
| 45 | + "rules":[{"parameter":"server.REQUEST_URI","match":{"type":"contains","value":"yikes\/cpt\/v1\/settings"}},{"parameter":"post.rest_route","match":{"type":"contains","value":"yikes\/cpt\/v1\/settings"}},{"parameter":"get.rest_route","match":{"type":"contains","value":"yikes\/cpt\/v1\/settings"}}], |
| 46 | + "cat":"TEST", |
| 47 | + "type":"BLOCK", |
| 48 | + "type_params":null |
| 49 | + }, |
| 50 | + { |
| 51 | + "id":7, |
| 52 | + "title":"Block access to endpoint that should only accept an integer of less than 101.", |
| 53 | + "rules":[{"parameter":"get.pid","match":{"type":"ctype_digit","value":false}},{"parameter":"get.pid","match":{"type":"bigger_than","value":100}}], |
| 54 | + "cat":"TEST", |
| 55 | + "type":"BLOCK", |
| 56 | + "type_params":null |
| 57 | + }, |
| 58 | + { |
| 59 | + "id":8, |
| 60 | + "title":"Block access to endpoint that should only accept an integer of more than 99.", |
| 61 | + "rules":[{"parameter":"get.pid","match":{"type":"ctype_digit","value":false}},{"parameter":"get.pid","match":{"type":"less_than","value":100}}], |
| 62 | + "cat":"TEST", |
| 63 | + "type":"BLOCK", |
| 64 | + "type_params":null |
| 65 | + }, |
| 66 | + { |
| 67 | + "id":9, |
| 68 | + "title":"Determine if a POST parameter is a ctype_alnum.", |
| 69 | + "rules":[{"parameter":"post.value","match":{"type":"ctype_alnum","value":false}}], |
| 70 | + "cat":"TEST", |
| 71 | + "type":"BLOCK", |
| 72 | + "type_params":null |
| 73 | + }, |
| 74 | + { |
| 75 | + "id":10, |
| 76 | + "title":"Determine if a POST parameter is a numeric.", |
| 77 | + "rules":[{"parameter":"post.number","match":{"type":"is_numeric","value":false}}], |
| 78 | + "cat":"TEST", |
| 79 | + "type":"BLOCK", |
| 80 | + "type_params":null |
| 81 | + }, |
| 82 | + { |
| 83 | + "id":11, |
| 84 | + "title":"Determine if a POST parameter is a numeric.", |
| 85 | + "rules":[{"parameter":"server.REQUEST_URI","match":{"type":"regex","value":"\/(\\\/something\\\/)\/msi"}}], |
| 86 | + "cat":"TEST", |
| 87 | + "type":"BLOCK", |
| 88 | + "type_params":null |
| 89 | + }, |
| 90 | + { |
| 91 | + "id":12, |
| 92 | + "title":"Determine if a value is not in an array", |
| 93 | + "rules":[{"parameter":"get.user","match":{"type":"not_in_array","value":["admin"]}}], |
| 94 | + "cat":"TEST", |
| 95 | + "type":"BLOCK", |
| 96 | + "type_params":null |
| 97 | + }, |
| 98 | + { |
| 99 | + "id":13, |
| 100 | + "title":"Determine if an array contains any values from given array.", |
| 101 | + "rules":[{"parameter":"post.usernames","match":{"type":"array_in_array","value":["test","admin"]}}], |
22 | 102 | "cat":"TEST", |
23 | 103 | "type":"BLOCK", |
24 | 104 | "type_params":null |
|
0 commit comments