Skip to content

feat: add option for whitelisting broken Apple devices #23

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

Merged
merged 8 commits into from
Dec 30, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions plugins/fake-bot-after.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,26 @@
# Documentation can be found here:
# https://github.com/coreruleset/fake-bot-plugin

SecRule REQUEST_HEADERS:User-Agent "@pm amazonbot applebot bingbot linkedinbot facebookbot facebookcatalog facebookexternalhit googlebot twitterbot" \
SecRule TX:FAKE-BOT-PLUGIN_WHITELIST_BROKEN_APPLE_DEVICES "@streq 1" \
"id:9504110,\
phase:1,\
pass,\
t:none,\
msg:'Fake Bot Plugin: Broken Apple device detected from %{REMOTE_ADDR} - whitelisting',\
logdata:'Matched Data: REQUEST_HEADERS:User-Agent: %{REQUEST_HEADERS.User-Agent}',\
tag:'paranoia-level/1',\
ver:'fake-bot-plugin/1.0.0',\
skip:1,\
chain"
SecRule REQUEST_HEADERS:User-Agent "@endsWith facebookexternalhit/1.1 Facebot Twitterbot/1.0"

SecRule REQUEST_HEADERS:User-Agent "@pm amazonbot applebot bingbot linkedinbot facebookbot facebookcatalog facebookexternalhit googlebot twitterbot" \
"id:9504120,\
phase:1,\
block,\
capture,\
t:none,\
msg:'Fake bot detected: %{tx.fake-bot-plugin_bot_name}',\
msg:'Fake Bot Plugin: Detected fake %{tx.fake-bot-plugin_bot_name}.',\
logdata:'Matched Data: %{TX.0} found within REQUEST_HEADERS:User-Agent: %{REQUEST_HEADERS.User-Agent}',\
tag:'application-multi',\
tag:'language-multi',\
Expand Down
9 changes: 9 additions & 0 deletions plugins/fake-bot-config.conf
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,12 @@
# pass,\
# nolog,\
# setvar:'tx.fake-bot-plugin_enabled=0'"

SecAction \
"id:9504020,\
phase:1,\
nolog,\
pass,\
t:none,\
ver:'fake-bot-plugin/1.0.0',\
setvar:'tx.fake-bot-plugin_whitelist_broken_apple_devices=0'"
Loading