Open sgofferj opened 3 weeks ago
One line triggering error?
Random one:
2024-10-31 10:44:24.065 ERROR: /etc/snort/rules/snort3-server-webapp.rules:5197 unknown rule keyword: pcre.
alert tcp $EXTERNAL_NET any -> $HOME_NET $HTTP_PORTS ( msg:"SERVER-WEBAPP Advantech WISE-PaaS RMM UpgradeMgmt upload_ota directory traversal attempt"; flow:to_server,established; http_uri; content:"/UpgradeMgmt/upload_ota",fast_pattern,nocase; content:"frmUpdateSetting_UploadFileFullName=",nocase; content:"../"; pcre:"/[?&]frmUpdateSetting_UploadFileFullName=[^&]*?\x2e\x2e\x2f/i"; metadata:policy max-detect-ips drop,policy security-ips drop; service:http; reference:cve,2019-13551; classtype:web-application-attack; sid:59319; rev:1; )
Not sure why you're seeing this but try pulling https://github.com/openwrt/packages/pull/25267 (and see comments in the PR)
@graysky2 I'm neither familiar enough with OpenWRT yet, nor with snort to build this. I also only have this one production box and I'd rather not have all build tools on a production firewall.
After reading a little bit, I ran sed -i "s/pcre/pcre2/g" over all rule files and snort starts and seems to work. At least I'm getting alert. However, that is not in the documentation. I think, it would be good to have this in the documentation or better, have snort-rules do this automatically and transparently to the user.
The sed line is only temporary as upstream reworks the PR and implements, see: https://github.com/snort3/snort3/pull/326#issuecomment-2462663172
Issue template (remove lines from top till here)
Maintainer: @flyn-org Environment: ARM64, Bananapi BPI-R4, OpenWrt SNAPSHOT (r27913-a2aabc9a7a)
Description: When trying to start snort3, thousands of rules fail to load with
ERROR: <rulesfile>:<line no.> unknown rule keyword: pcre.
snort 3, 3.1.84.0-r4
Reproduce:
More info:
Logs not included because it's 12114 errors (463 warnings).