-
Notifications
You must be signed in to change notification settings - Fork 612
[New Rule] Initial Access via File Upload Followed by GET Request #5371
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
base: main
Are you sure you want to change the base?
Conversation
Rule: New - GuidelinesThese guidelines serve as a reminder set of considerations when proposing a new rule. Documentation and Context
Rule Metadata Checks
New BBR Rules
Testing and Validation
|
|
⛔️ Test failed Results
|
| [network where | ||
| data_stream.dataset == "network_traffic.http" and | ||
| http.request.method in ("POST", "PUT") and | ||
| /* We can restrict to 200 in the future, but I prefer to broaden the scope and decrease it later if necessary */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't restrict to 200 because some file upload vulns don't respond with 200's such as CVE-2025-24813; it really depends on the logic of the application itself even if it adheres to a specific RFC.
| data_stream.dataset == "network_traffic.http" and | ||
| http.request.method in ("POST", "PUT") and | ||
| /* We can restrict to 200 in the future, but I prefer to broaden the scope and decrease it later if necessary */ | ||
| http.response.status_code in (200, 201, 204, 301, 302, 303) and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| http.response.status_code in (200, 201, 204, 301, 302, 303) and | |
| http.response.status_code in (200, 201, 204, 301, 302, 303, 409) and |
| ] | ||
| [file where | ||
| event.dataset == "endpoint.events.file" and | ||
| event.action in ("creation", "rename") and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wonder if we would have better luck doing file creation (webshell) to webshell requests and sequence on file name? Could also add arbitrary parameters like cmd= (hard to guess here as they could be anything), etc. wdyt?
Summary
This rule detects potential initial access activity where an adversary uploads a web shell or malicious script to a web server via a file upload mechanism (e.g., through a web form using multipart/form-data), followed by a GET or POST request to access the uploaded file. By checking the body content of HTTP requests for file upload indicators such as "Content-Disposition: form-data" and "filename=", the rule identifies suspicious upload activities. This sequence of actions is commonly used by attackers to gain and maintain access to compromised web servers.
Telemetry