-
Notifications
You must be signed in to change notification settings - Fork 2
access.log forensics #113
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
bserem
wants to merge
1
commit into
main
Choose a base branch
from
forensics-toolkit
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
access.log forensics #113
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| I have an Apache access log at __ACCESS_LOG_FILE__ | ||
| Run the following triage in order, stopping to flag anomalies before proceeding: | ||
| **STEP 1 — Baseline (run all at once)** | ||
| - Date range of the log | ||
| - Total request count | ||
| - HTTP status code distribution (flag if 4xx+5xx > 10% of total) | ||
| - Requests per hour (flag any hour > 3x the median) | ||
|
|
||
| **STEP 2 — Top offenders** | ||
| - Top 30 source IPs with request counts | ||
| - Group IPs by /24 subnet and flag any subnet with > 500 requests | ||
| - Top 20 user agents (flag empty UAs, known scanners, rotating browser strings | ||
| doing uniform behaviour) | ||
| - Top 20 requested URLs (flag if one URL accounts for > 20% of traffic) | ||
|
|
||
| **STEP 3 — Attack signatures (only on IPs/subnets flagged above)** | ||
| - What URLs are they hitting? Uniform = likely DDoS/flood. Varied = crawler/scraper. | ||
| - What referrers are they sending? Flag non-existent domains. | ||
| - What is their request rate per hour? Coordinated spikes = botnet. | ||
| - Run whois on the top flagged /24 to identify the owning organisation and country. | ||
|
|
||
| **STEP 4 — Verdict** | ||
| Produce a short report: | ||
| - Is an attack ongoing right now? (check last 30 mins of log) | ||
| - Was there a past attack? When did it peak, when did it stop? | ||
| - What is the blast radius? (did it cause 500/502s for legitimate users?) | ||
| - What is the source? (ASN, country, likely actor type) | ||
| - Immediate action: list of CIDR ranges to block | ||
| - Abuse contact if available from whois | ||
|
|
||
| Keep responses concise. Lead with the verdict, support with numbers. | ||
|
|
||
| <!-- #ddev-generated --> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Will this allow us to paste an Upsun shared log file location as per their docs - https://developer.upsun.com/docs/observability/logs/access-logs#sharing-activity-logs. I'm guessing most log files we will be interested in will be production ones living on Upsun/Aquia.
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.
Activity logs are not access logs. You'll need the access.log file.
ddev ucchas a helper for this.Haven't worked on Acquia regarding this.
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.
Rare case, but I committed the helper along other improvements, it's here:
c668f5f#diff-dd1fb0a2215b0ac89cfced16af666f6513ce4a61685aa23896041431585c2a1a