Skip to content

detect wordpress scanning of txt and md files #1260

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
2 changes: 2 additions & 0 deletions .tests/http-wordpress-scan/http-wordpress-scan.log
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
127.0.0.1 - - [19/Apr/2024:14:41:25 +0200] "GET /activate/wp-content/plugins/advanced-dewplayer/admin-panel/download-file.php HTTP/1.1" 404 153 "-" "curl/7.68.0"
127.0.0.1 - - [19/Apr/2024:14:41:26 +0200] "GET /wp-content/plugins/sniplets/modules/syntax_highlight.php HTTP/1.1" 404 153 "-" "curl/7.68.0"
127.0.0.1 - - [19/Apr/2024:14:41:26 +0200] "GET /wp-content/plugins/sniplets/view/sniplets/warning.php HTTP/1.1" 404 153 "-" "curl/7.68.0"
127.0.0.1 - - [01/Mar/2025:18:09:52 +1100] "HEAD /wp-content/plugins/blocksy-companion/README.txt HTTP/2.0" 404 0 "https://example.com" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.6 (KHTML, like Gecko) Chrome/20.0.1092.0 Safari/536.6"
127.0.0.1 - - [01/Mar/2025:18:09:53 +1100] "HEAD /wp-content/plugins/blocksy-companion/README.md HTTP/2.0" 404 0 "https://example.com" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.6 (KHTML, like Gecko) Chrome/20.0.1092.0 Safari/536.6"
12 changes: 9 additions & 3 deletions scenarios/crowdsecurity/http-wordpress-scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,17 @@ type: leaky
name: crowdsecurity/http-wordpress-scan
description: "Detect WordPress scan: vuln hunting"
filter: |
evt.Meta.service == 'http' and
evt.Meta.log_type in ['http_access-log', 'http_error-log'] and
evt.Meta.service == 'http' and
evt.Meta.log_type in ['http_access-log', 'http_error-log'] and
evt.Meta.http_status in ['404', '403'] and
(
Lower(evt.Meta.http_path) contains "/wp-" and
Lower(evt.Meta.http_path) endsWith ".php"
Lower(evt.Meta.http_path) endsWith ".(php)"
) ||
(
Lower(evt.Meta.http_path) contains "/wp-content/plugins" and
Lower(evt.Meta.http_path) matches "\\.(txt|md)$"
)
groupby: evt.Meta.source_ip
distinct: evt.Meta.http_path
capacity: 3
Expand Down