-
-
Notifications
You must be signed in to change notification settings - Fork 230
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
Feature: Pm custom separator #349
Comments
Hey @M4tteoP, thank you for your interest in Coraza. CRS has solved this problem by using text wrappers like datasets.conf SecDataset malicious_browsers `
hacker_browser
# this is a comment
hacker_browser_2
`
# or maybe
SecDataset malicious_browsers \
"hacker_browser", \
"hacker_browser_2" rules.conf SecRule REQUEST_HEADERS:user-agent "@pmfromdict malicious_browsers" "..."
# or something like :
SecRule REQUEST_HEADERS:user-agent "@pm %{dict_to_pm malicious_browsers}" "..." This would be consistent with the idea of helpers and code snippets for future versions, but your solution would be easier to implement and understand. |
Hi @jptosso, thanks a lot for the prompt reply!
As far as I can see, it could permit to look also for Summarizing:
A couple of questions:
As a side note, I'm dreaming about an implementation that may also land on ModSecurity, but there it may be way more tricky... |
I will open this discussion for the August Monthly Meeting |
Just a note that may add another element to the discussion: the same concept may be applied to |
Could we mark this as solved with the new SecDataset operator? #361 |
@M4tteoP ☝️ ? |
Sorry to have kept you waiting, but #393 gave me pause wondering about overlaps in functionalities with |
Summary
Hi folks, I'm opening this issue in order to extend the conversation about providing a custom separator for the
@pm
operator.It is an open feature request from such a long time inside the Modsecurity repo (see owasp-modsecurity/ModSecurity#682) and Wasm is yet another player that would take advantage of such a feature.
Basic example
I made a first PoC under ModSec repo: owasp-modsecurity/ModSecurity#2786.
This first proposal takes advantage of a fixed string at the beginning of the rule (
PmCustomSeparator:
) in order to provide and figure out that we are going to use a custom separator.An overall example of rule syntax is the following:
Motivation
@pm
operator more flexible and able to handle some cases that currently can only be managed byPmFromFile
.|
character and do not interpret it as Suricata syntax)Extra details
Thanks for any feedback!
cc: @jcchavezs
The text was updated successfully, but these errors were encountered: