tests: Enable XSS WAF tests

Signed-off-by: Nicolás A. Ortega Froysa <nicolas.ortega@zevenet.com>
This commit is contained in:
Nicolás A. Ortega Froysa 2023-05-11 12:56:43 +02:00
parent 0cb924daa8
commit 334ebef072
180 changed files with 218 additions and 299 deletions

View File

@ -1 +0,0 @@
ip netns exec cl-ns-1 /usr/bin/curl -X POST --data-binary @xss_body.txt --connect-timeout 2 -s -k --show-error -w 'HTTP_VERSION: %{http_version}\n' -v -D test_1_curl/response_headers.out.tmp -o test_1_curl/body.out.tmp http://10.1.2.1:80/echo >test_1_curl/extended.out.tmp 2>test_1_curl/error.out.tmp

View File

@ -1 +0,0 @@
* Done waiting for 100-continue

View File

@ -1 +0,0 @@
ip netns exec cl-ns-1 /usr/bin/curl -X POST --data-binary @xss_body.txt --connect-timeout 2 -s -k --show-error -w 'HTTP_VERSION: %{http_version}\n' -v -D test_3_curl/response_headers.out.tmp -o test_3_curl/body.out.tmp http://10.1.2.1:80/echo >test_3_curl/extended.out.tmp 2>test_3_curl/error.out.tmp

View File

@ -1 +0,0 @@
The request was rejected by the server.

View File

@ -1 +0,0 @@
ip netns exec cl-ns-1 /usr/bin/curl -X POST --data-binary @xss_body.txt --connect-timeout 2 -s -k --show-error -w 'HTTP_VERSION: %{http_version}\n' -v -D test_5_curl/response_headers.out.tmp -o test_5_curl/body.out.tmp http://10.1.2.1:80/echo >test_5_curl/extended.out.tmp 2>test_5_curl/error.out.tmp

View File

@ -1 +0,0 @@
* Done waiting for 100-continue

View File

@ -1 +0,0 @@
The request was rejected by the server.

View File

@ -1 +0,0 @@
ip netns exec cl-ns-1 /usr/bin/curl -X POST --data-binary @xss_body.txt --connect-timeout 2 -s -k --show-error -w 'HTTP_VERSION: %{http_version}\n' -v -D test_7_curl/response_headers.out.tmp -o test_7_curl/body.out.tmp http://10.1.2.1:80/echo >test_7_curl/extended.out.tmp 2>test_7_curl/error.out.tmp

View File

@ -1 +0,0 @@
ip netns exec cl-ns-1 /usr/bin/curl -X POST --data-binary @xss_body.txt --connect-timeout 2 -s -k --show-error -w 'HTTP_VERSION: %{http_version}\n' -v -D test_1_curl/response_headers.out.tmp -o test_1_curl/body.out.tmp https://10.1.2.1:80/echo >test_1_curl/extended.out.tmp 2>test_1_curl/error.out.tmp

View File

@ -1 +0,0 @@
* Done waiting for 100-continue

View File

@ -1 +0,0 @@
ip netns exec proxy-ns /usr/bin/curl -X PATCH --connect-timeout 2 -s -k --show-error -w 'HTTP_VERSION: %{http_version}\n' -D test_2_reload/response_headers.out.tmp -o test_2_reload/body.out.tmp --unix-socket /tmp/functional-tests/env_proxy.socket http://localhost/config >test_2_reload/extended.out.tmp 2>test_2_reload/error.out.tmp

View File

@ -1,46 +0,0 @@
{
"3xx-code-hits": 0,
"4xx-code-hits": 0,
"5xx-code-hits": 0,
"address": "0.0.0.0",
"connections": 0,
"https": true,
"id": 0,
"name": "env",
"object_ref": 0,
"pending-connections": 0,
"port": 80,
"services": [
{
"backends": [
{
"2xx-code-hits": 1,
"3xx-code-hits": 0,
"4xx-code-hits": 0,
"5xx-code-hits": 0,
"address": "10.2.1.1",
"connect-time": -1.0,
"connections": 0,
"connections-limit": 0,
"https": false,
"id": 0,
"name": "bck_0",
"pending-connections": 0,
"port": 80,
"priority": 1,
"response-time": -1.0,
"status": "active",
"type": 0,
"weight": 1
}
],
"id": 0,
"name": "default",
"priority": 1,
"sessions": [],
"status": "active"
}
],
"status": "active",
"waf-hits": 0
}

View File

@ -1 +0,0 @@
ip netns exec proxy-ns /usr/bin/curl -X GET --connect-timeout 2 -s -k --show-error -w 'HTTP_VERSION: %{http_version}\n' -D test_2_reload_dump/response_headers.out.tmp -o test_2_reload_dump/body.out.tmp --unix-socket /tmp/functional-tests/env_proxy.socket http://localhost/listener/0/services >test_2_reload_dump/extended.out.tmp 2>test_2_reload_dump/error.out.tmp

View File

@ -1 +0,0 @@
ip netns exec cl-ns-1 /usr/bin/curl -X POST --data-binary @xss_body.txt --connect-timeout 2 -s -k --show-error -w 'HTTP_VERSION: %{http_version}\n' -v -D test_3_curl/response_headers.out.tmp -o test_3_curl/body.out.tmp https://10.1.2.1:80/echo >test_3_curl/extended.out.tmp 2>test_3_curl/error.out.tmp

View File

@ -1 +0,0 @@
ip netns exec proxy-ns /usr/bin/curl -X PATCH --connect-timeout 2 -s -k --show-error -w 'HTTP_VERSION: %{http_version}\n' -D test_4_reload/response_headers.out.tmp -o test_4_reload/body.out.tmp --unix-socket /tmp/functional-tests/env_proxy.socket http://localhost/config >test_4_reload/extended.out.tmp 2>test_4_reload/error.out.tmp

View File

@ -1,46 +0,0 @@
{
"3xx-code-hits": 0,
"4xx-code-hits": 0,
"5xx-code-hits": 0,
"address": "0.0.0.0",
"connections": 0,
"https": true,
"id": 0,
"name": "env",
"object_ref": 0,
"pending-connections": 0,
"port": 80,
"services": [
{
"backends": [
{
"2xx-code-hits": 2,
"3xx-code-hits": 0,
"4xx-code-hits": 0,
"5xx-code-hits": 0,
"address": "10.2.1.1",
"connect-time": -1.0,
"connections": 0,
"connections-limit": 0,
"https": false,
"id": 0,
"name": "bck_0",
"pending-connections": 0,
"port": 80,
"priority": 1,
"response-time": -1.0,
"status": "active",
"type": 0,
"weight": 1
}
],
"id": 0,
"name": "default",
"priority": 1,
"sessions": [],
"status": "active"
}
],
"status": "active",
"waf-hits": 0
}

View File

@ -1 +0,0 @@
ip netns exec proxy-ns /usr/bin/curl -X GET --connect-timeout 2 -s -k --show-error -w 'HTTP_VERSION: %{http_version}\n' -D test_4_reload_dump/response_headers.out.tmp -o test_4_reload_dump/body.out.tmp --unix-socket /tmp/functional-tests/env_proxy.socket http://localhost/listener/0/services >test_4_reload_dump/extended.out.tmp 2>test_4_reload_dump/error.out.tmp

View File

@ -1,8 +0,0 @@
HTTP/1.0 200 OK
Content-Type: text/html
Content-Length: 683
Expires: now
Pragma: no-cache
Server: zproxy/VERSION
Cache-control: no-cache,no-store

View File

@ -1 +0,0 @@
The request was rejected by the server.

View File

@ -1 +0,0 @@
ip netns exec cl-ns-1 /usr/bin/curl -X POST --data-binary @xss_body.txt --connect-timeout 2 -s -k --show-error -w 'HTTP_VERSION: %{http_version}\n' -v -D test_5_curl/response_headers.out.tmp -o test_5_curl/body.out.tmp https://10.1.2.1:80/echo >test_5_curl/extended.out.tmp 2>test_5_curl/error.out.tmp

View File

@ -1 +0,0 @@
* Done waiting for 100-continue

View File

@ -1 +0,0 @@
ip netns exec proxy-ns /usr/bin/curl -X PATCH --connect-timeout 2 -s -k --show-error -w 'HTTP_VERSION: %{http_version}\n' -D test_6_reload/response_headers.out.tmp -o test_6_reload/body.out.tmp --unix-socket /tmp/functional-tests/env_proxy.socket http://localhost/config >test_6_reload/extended.out.tmp 2>test_6_reload/error.out.tmp

View File

@ -1,8 +0,0 @@
HTTP/1.0 200 OK
Content-Type: text/html
Content-Length: 16
Expires: now
Pragma: no-cache
Server: zproxy/VERSION
Cache-control: no-cache,no-store

View File

@ -1,46 +0,0 @@
{
"3xx-code-hits": 0,
"4xx-code-hits": 1,
"5xx-code-hits": 0,
"address": "0.0.0.0",
"connections": 0,
"https": true,
"id": 0,
"name": "env",
"object_ref": 0,
"pending-connections": 0,
"port": 80,
"services": [
{
"backends": [
{
"2xx-code-hits": 2,
"3xx-code-hits": 0,
"4xx-code-hits": 0,
"5xx-code-hits": 0,
"address": "10.2.1.1",
"connect-time": -1.0,
"connections": 0,
"connections-limit": 0,
"https": false,
"id": 0,
"name": "bck_0",
"pending-connections": 0,
"port": 80,
"priority": 1,
"response-time": -1.0,
"status": "active",
"type": 0,
"weight": 1
}
],
"id": 0,
"name": "default",
"priority": 1,
"sessions": [],
"status": "active"
}
],
"status": "active",
"waf-hits": 1
}

View File

@ -1 +0,0 @@
ip netns exec proxy-ns /usr/bin/curl -X GET --connect-timeout 2 -s -k --show-error -w 'HTTP_VERSION: %{http_version}\n' -D test_6_reload_dump/response_headers.out.tmp -o test_6_reload_dump/body.out.tmp --unix-socket /tmp/functional-tests/env_proxy.socket http://localhost/listener/0/services >test_6_reload_dump/extended.out.tmp 2>test_6_reload_dump/error.out.tmp

View File

@ -1,8 +0,0 @@
HTTP/1.0 200 OK
Content-Type: text/html
Content-Length: 683
Expires: now
Pragma: no-cache
Server: zproxy/VERSION
Cache-control: no-cache,no-store

View File

@ -1 +0,0 @@
The request was rejected by the server.

View File

@ -1 +0,0 @@
ip netns exec cl-ns-1 /usr/bin/curl -X POST --data-binary @xss_body.txt --connect-timeout 2 -s -k --show-error -w 'HTTP_VERSION: %{http_version}\n' -v -D test_7_curl/response_headers.out.tmp -o test_7_curl/body.out.tmp https://10.1.2.1:80/echo >test_7_curl/extended.out.tmp 2>test_7_curl/error.out.tmp

View File

@ -1 +0,0 @@
ip netns exec proxy-ns /usr/bin/curl -X GET --connect-timeout 2 -s -k --show-error -w 'HTTP_VERSION: %{http_version}\n' -D test_8_ctl/response_headers.out.tmp -o test_8_ctl/body.out.tmp --unix-socket /tmp/functional-tests/env_proxy.socket http://localhost/listener/0 >test_8_ctl/extended.out.tmp 2>test_8_ctl/error.out.tmp

View File

@ -1,8 +0,0 @@
HTTP/1.0 200 OK
Content-Type: text/html
Content-Length: 681
Expires: now
Pragma: no-cache
Server: zproxy/VERSION
Cache-control: no-cache,no-store

View File

@ -1,7 +1,6 @@
DESCRIPTION="This request must be allowed and it will wait the expect-100-continue timeout"
CMD=curl
CL=1
FILTER="Done waiting for 100-continue"
BODY=xss_body.txt
METHOD="POST"
URL="/echo"
@ -12,7 +11,6 @@ FILE="zproxy_100cont.cfg"
DESCRIPTION="This request must be allowed and it will NOT wait the expect-100-continue timeout"
CMD=curl
CL=1
FILTER="Done waiting for 100-continue"
BODY=xss_body.txt
METHOD="POST"
URL="/echo"
@ -23,7 +21,6 @@ FILE="zproxy_waf.cfg"
DESCRIPTION="This request must be blocked and it will wait the expect-100-continue timeout"
CMD=curl
CL=1
FILTER="Done waiting for 100-continue"
BODY=xss_body.txt
METHOD="POST"
URL="/echo"
@ -34,7 +31,6 @@ FILE="zproxy_100cont_waf.cfg"
DESCRIPTION="This request must be blocked and it will NOT wait the expect-100-continue timeout"
CMD=curl
CL=1
FILTER="Done waiting for 100-continue"
BODY=xss_body.txt
METHOD="POST"
URL="/echo"

View File

@ -0,0 +1 @@
ip netns exec cl-ns-1 /usr/bin/curl -X POST --data-binary @xss_body.txt --connect-timeout 2 -s -k --show-error -w 'HTTP_VERSION: %{http_version}\n' -D test_1_curl/response_headers.out.tmp -o test_1_curl/body.out.tmp http://10.1.2.1:80/echo >test_1_curl/extended.out.tmp 2>test_1_curl/error.out.tmp

View File

@ -2,7 +2,7 @@
{
"backends": [
{
"2xx-code-hits": 2,
"2xx-code-hits": 0,
"3xx-code-hits": 0,
"4xx-code-hits": 0,
"5xx-code-hits": 0,
@ -15,7 +15,7 @@
"pending-connections": 0,
"port": 80,
"priority": 1,
"response-time": -1.0,
"response-time": "#######",
"status": "active",
"type": 0,
"nfmark": 0,

View File

@ -0,0 +1 @@
ip netns exec cl-ns-1 /usr/bin/curl -X POST --data-binary @xss_body.txt --connect-timeout 2 -s -k --show-error -w 'HTTP_VERSION: %{http_version}\n' -D test_3_curl/response_headers.out.tmp -o test_3_curl/body.out.tmp http://10.1.2.1:80/echo >test_3_curl/extended.out.tmp 2>test_3_curl/error.out.tmp

View File

@ -2,7 +2,7 @@
{
"backends": [
{
"2xx-code-hits": 1,
"2xx-code-hits": 0,
"3xx-code-hits": 0,
"4xx-code-hits": 0,
"5xx-code-hits": 0,
@ -15,7 +15,7 @@
"pending-connections": 0,
"port": 80,
"priority": 1,
"response-time": -1.0,
"response-time": "#######",
"status": "active",
"type": 0,
"nfmark": 0,

View File

@ -0,0 +1,7 @@
<html>
<head><title>403 Forbidden</title></head>
<body bgcolor="white">
<center><h1>403 Forbidden</h1></center>
<hr><center>zproxy</center>
</body>
</html>

View File

@ -0,0 +1 @@
ip netns exec cl-ns-1 /usr/bin/curl -X POST --data-binary @xss_body.txt --connect-timeout 2 -s -k --show-error -w 'HTTP_VERSION: %{http_version}\n' -D test_5_curl/response_headers.out.tmp -o test_5_curl/body.out.tmp http://10.1.2.1:80/echo >test_5_curl/extended.out.tmp 2>test_5_curl/error.out.tmp

View File

@ -1,8 +1,8 @@
HTTP/1.0 403 Forbidden
Content-Type: text/html
Content-Length: 40
Expires: now
Pragma: no-cache
Server: zproxy/VERSION
Cache-control: no-cache,no-store
HTTP/1.0 403 Forbidden
Content-Type: text/html
Content-Length: #######
Expires: now
Pragma: no-cache
Server: zproxy
Cache-control: no-cache,no-store

View File

@ -2,7 +2,7 @@
{
"backends": [
{
"2xx-code-hits": 2,
"2xx-code-hits": 0,
"3xx-code-hits": 0,
"4xx-code-hits": 0,
"5xx-code-hits": 0,
@ -15,7 +15,7 @@
"pending-connections": 0,
"port": 80,
"priority": 1,
"response-time": -1.0,
"response-time": "#######",
"status": "active",
"type": 0,
"nfmark": 0,

View File

@ -0,0 +1,7 @@
<html>
<head><title>403 Forbidden</title></head>
<body bgcolor="white">
<center><h1>403 Forbidden</h1></center>
<hr><center>zproxy</center>
</body>
</html>

View File

@ -0,0 +1 @@
ip netns exec cl-ns-1 /usr/bin/curl -X POST --data-binary @xss_body.txt --connect-timeout 2 -s -k --show-error -w 'HTTP_VERSION: %{http_version}\n' -D test_7_curl/response_headers.out.tmp -o test_7_curl/body.out.tmp http://10.1.2.1:80/echo >test_7_curl/extended.out.tmp 2>test_7_curl/error.out.tmp

View File

@ -1,8 +1,8 @@
HTTP/1.0 403 Forbidden
Content-Type: text/html
Content-Length: 40
Expires: now
Pragma: no-cache
Server: zproxy/VERSION
Cache-control: no-cache,no-store
HTTP/1.0 403 Forbidden
Content-Type: text/html
Content-Length: #######
Expires: now
Pragma: no-cache
Server: zproxy
Cache-control: no-cache,no-store

View File

@ -13,7 +13,7 @@
{
"backends": [
{
"2xx-code-hits": 2,
"2xx-code-hits": 0,
"3xx-code-hits": 0,
"4xx-code-hits": 0,
"5xx-code-hits": 0,

Some files were not shown because too many files have changed in this diff Show More