Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate modsecurity fields's in caddy logs's #32

Open
Barnoux opened this issue Nov 16, 2022 · 3 comments
Open

Duplicate modsecurity fields's in caddy logs's #32

Barnoux opened this issue Nov 16, 2022 · 3 comments

Comments

@Barnoux
Copy link

Barnoux commented Nov 16, 2022

Hello,

At first thank a lot for you work for this project he is very nice.
I found that some field in the log from coraza are duplicated see the log bellow when i tested an SQL injection.

{"level":"error","ts":1668631193.1862295,"logger":"http.handlers.waf","msg":"[client \"192.168.1.1\"] Coraza: Warning. SQL Injection Attack: SQL Boolean-based attack detected [file \"/ruleset/coreruleset/rules/REQUEST-942-APPLICATION-ATTACK-SQLI.conf\"] [line \"0\"] [id \"942130\"] [rev \"\"] [msg \"SQL Injection Attack: SQL Boolean-based attack detected\"] [data \"Matched Data:  1=1 found within ARGS:q: '1 OR 1=1\\\"\"] [severity \"critical\"] [ver \"OWASP_CRS/4.0.0-rc1\"] [maturity \"0\"] [accuracy \"0\"] [tag \"application-multi\"] [tag \"language-multi\"] [tag \"platform-multi\"] [tag \"attack-sqli\"] [tag \"OWASP_CRS\"] [tag \"capec/1000/152/248/66\"] [tag \"PCI/6.5.2\"] [tag \"paranoia-level/2\"] [hostname \"\"] [uri \"/?q=%271%20OR%201=1%22\"] [unique_id \"VLS1AeezUlAFnWQyFd2\"]\n[client \"192.168.1.1\"] Coraza: Warning. SQL Injection Attack: SQL Boolean-based attack detected [file \"/ruleset/coreruleset/rules/REQUEST-942-APPLICATION-ATTACK-SQLI.conf\"] [line \"0\"] [id \"942130\"] [rev \"\"] [msg \"\"] [data \"\"] [severity \"critical\"] [ver \"OWASP_CRS/4.0.0-rc1\"] [maturity \"0\"] [accuracy \"0\"] [tag \"application-multi\"] [tag \"language-multi\"] [tag \"platform-multi\"] [tag \"attack-sqli\"] [tag \"OWASP_CRS\"] [tag \"capec/1000/152/248/66\"] [tag \"PCI/6.5.2\"] [tag \"paranoia-level/2\"] [hostname \"\"] [uri \"/?q=%271%20OR%201=1%22\"] [unique_id \"VLS1AeezUlAFnWQyFd2\"]\n"}

if you beautify it:

{"level":"error","ts":1668631193.1862295,"logger":"http.handlers.waf","msg":"[client \"192.168.1.1\"] Coraza: Warning. SQL Injection Attack: SQL Boolean-based attack detected [file \"/ruleset/coreruleset/rules/REQUEST-942-APPLICATION-ATTACK-SQLI.conf\"]
[line \"0\"]
[id \"942130\"]
[rev \"\"]
[msg \"SQL Injection Attack: SQL Boolean-based attack detected\"]
[data \"Matched Data:  1=1 found within ARGS:q: '1 OR 1=1\\\"\"]
[severity \"critical\"]
[ver \"OWASP_CRS/4.0.0-rc1\"]
[maturity \"0\"]
[accuracy \"0\"]
[tag \"application-multi\"]
[tag \"language-multi\"]
[tag \"platform-multi\"]
[tag \"attack-sqli\"]
[tag \"OWASP_CRS\"]
[tag \"capec/1000/152/248/66\"]
[tag \"PCI/6.5.2\"]
[tag \"paranoia-level/2\"]
[hostname \"\"]
[uri \"/?q=%271%20OR%201=1%22\"] #After unique_id this is exatcly the same.
[unique_id \"VLS1AeezUlAFnWQyFd2\"]\n[client \"192.168.1.1\"] Coraza: Warning. SQL Injection Attack: SQL Boolean-based attack detected [file \"/ruleset/coreruleset/rules/REQUEST-942-APPLICATION-ATTACK-SQLI.conf\"]
[line \"0\"]
[id \"942130\"]
[rev \"\"]
[msg \"\"]
[data \"\"]
[severity \"critical\"]
[ver \"OWASP_CRS/4.0.0-rc1\"]
[maturity \"0\"]
[accuracy \"0\"]
[tag \"application-multi\"]
[tag \"language-multi\"]
[tag \"platform-multi\"]
[tag \"attack-sqli\"]
[tag \"OWASP_CRS\"]
[tag \"capec/1000/152/248/66\"]
[tag \"PCI/6.5.2\"]
[tag \"paranoia-level/2\"]
[hostname \"\"]
[uri \"/?q=%271%20OR%201=1%22\"]
[unique_id \"VLS1AeezUlAFnWQyFd2\"]\n"}

We can see that there is duplication, is it me or ?

Regards,

BBA

@jptosso
Copy link
Member

jptosso commented Jan 19, 2023

@Barnoux
Copy link
Author

Barnoux commented Jan 22, 2023

Hello, it doesn't fix it. I'm still having the same issue.

@Barnoux Barnoux closed this as completed Mar 2, 2023
@Barnoux Barnoux reopened this Jun 3, 2023
@Barnoux
Copy link
Author

Barnoux commented Jun 3, 2023

From another question that i have on the wiki conversation of coraza : corazawaf/coraza#662,
i got the same issue duplicate modsecurity fields's in caddy logs's .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants