1[
2  {
3    "enabled":1,
4    "version_min":300000,
5    "version_max":0,
6    "title":"Testing action :: tag 1",
7    "client":{
8      "ip":"200.249.12.31",
9      "port":2313
10    },
11    "server":{
12      "ip":"200.249.12.31",
13      "port":80
14    },
15    "request":{
16      "headers":{
17        "User-Agent":"Mozilla\/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.5) Gecko\/20091102 Firefox\/3.5.5 (.NET CLR 3.5.30729)",
18        "Accept":"text\/html,application\/xhtml+xml,application\/xml;q=0.9,*\/*;q=0.8",
19        "Accept-Language":"en-us,en;q=0.5",
20        "Accept-Encoding":"gzip,deflate",
21        "Accept-Charset":"ISO-8859-1,utf-8;q=0.7,*;q=0.7",
22        "Keep-Alive":"300",
23        "Connection":"keep-alive",
24        "Cookie":"PHPSESSID=rAAAAAAA2t5uvjq435r4q7ib3vtdjq120",
25        "Pragma":"no-cache",
26        "Cache-Control":"no-cache"
27      },
28      "uri":"\/test.pl?param1=   test   &param2=test2",
29      "method":"GET",
30      "http_version":1.1,
31      "body":""
32    },
33    "response":{
34      "headers":{
35        "Content-Type":"text\/xml; charset=utf-8\n\r",
36        "Content-Length":"length\n\r"
37      },
38      "body":[
39        "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\r",
40        "<soap:Envelope xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\" xmlns:xsd=\"http:\/\/www.w3.org\/2001\/XMLSchema\" xmlns:soap=\"http:\/\/schemas.xmlsoap.org\/soap\/envelope\/\">\n\r",
41        "  <soap:Body>\n\r",
42        "  <EnlightenResponse xmlns=\"http:\/\/clearforest.com\/\">\n\r",
43        "  <EnlightenResult>string<\/EnlightenResult>\n\r",
44        "  <\/EnlightenResponse>\n\r",
45        "  <\/soap:Body>\n\r",
46        "<\/soap:Envelope>\n\r"
47      ]
48    },
49    "expected":{
50      "audit_log":"",
51      "debug_log":"Rule tag: teste",
52      "error_log":""
53    },
54    "rules":[
55      "SecRuleEngine On",
56      "SecRule REQUEST_HEADERS \"@contains PHPSESSID\" \"id:1,tag:'teste',t:lowercase,t:none\"",
57      "SecRule TX \"@contains to_test\" \"id:2,t:lowercase,t:none\""
58    ]
59  },
60  {
61    "enabled":1,
62    "version_min":300000,
63    "version_max":0,
64    "title":"Testing action :: tag 2",
65    "client":{
66      "ip":"200.249.12.31",
67      "port":2313
68    },
69    "server":{
70      "ip":"200.249.12.31",
71      "port":80
72    },
73    "request":{
74      "headers":{
75        "User-Agent":"Mozilla\/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.5) Gecko\/20091102 Firefox\/3.5.5 (.NET CLR 3.5.30729)",
76        "Accept":"text\/html,application\/xhtml+xml,application\/xml;q=0.9,*\/*;q=0.8",
77        "Accept-Language":"en-us,en;q=0.5",
78        "Accept-Encoding":"gzip,deflate",
79        "Accept-Charset":"ISO-8859-1,utf-8;q=0.7,*;q=0.7",
80        "Keep-Alive":"300",
81        "Connection":"keep-alive",
82        "Cookie":"PHPSESSID=rAAAAAAA2t5uvjq435r4q7ib3vtdjq120",
83        "Pragma":"no-cache",
84        "Cache-Control":"no-cache"
85      },
86      "uri":"\/test.pl?param1=   test   &param2=test2",
87      "method":"GET",
88      "http_version":1.1,
89      "body":""
90    },
91    "response":{
92      "headers":{
93        "Content-Type":"text\/xml; charset=utf-8\n\r",
94        "Content-Length":"length\n\r"
95      },
96      "body":[
97        "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\r",
98        "<soap:Envelope xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\" xmlns:xsd=\"http:\/\/www.w3.org\/2001\/XMLSchema\" xmlns:soap=\"http:\/\/schemas.xmlsoap.org\/soap\/envelope\/\">\n\r",
99        "  <soap:Body>\n\r",
100        "  <EnlightenResponse xmlns=\"http:\/\/clearforest.com\/\">\n\r",
101        "  <EnlightenResult>string<\/EnlightenResult>\n\r",
102        "  <\/EnlightenResponse>\n\r",
103        "  <\/soap:Body>\n\r",
104        "<\/soap:Envelope>\n\r"
105      ]
106    },
107    "expected":{
108      "audit_log":"",
109      "debug_log":"Rule tag: teste no-cache",
110      "error_log":""
111    },
112    "rules":[
113      "SecRuleEngine On",
114      "SecRule REQUEST_HEADERS \"@contains PHPSESSID\" \"id:1,tag:'teste %{REQUEST_HEADERS:Pragma}%',t:lowercase,t:none\"",
115      "SecRule TX \"@contains to_test\" \"id:2,t:lowercase,t:none\""
116    ]
117  }
118]
119