This is a simple proxy server to inspect traffic as it goes to httpbin.org
If a request has a JSON payload, and in that payload there's a key value of {"is_malicious": true}
then the proxy
will intercept the payload and return a 403 error.
If a request repeats, the proxy will log a warning.
The proxy is built on Python and uses the Flask library
Install required libraries
pip install -r .\requirements.txt
From the project root:
python .\proxy_main.py
Simple curl:
curl --location --request GET 'http://0.0.0.0:8080/get'
Simple malicious test case
curl --location --request POST 'http://0.0.0.0:8080/post' \
--header 'Content-Type: application/json' \
--data-raw '{
"is_malicious":true
}'
A slightly more complicated test case
curl --location --request POST 'http://0.0.0.0:8080/post' \
--header 'Content-Type: application/json' \
--data-raw '{
"is_malicious":false,
"hidden": {
"some_value": {
"is_malicious": false
}
}
}'