-
Notifications
You must be signed in to change notification settings - Fork 362
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
Updated Beacon Scoring #742
Conversation
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.
In this first review, I'm just looking over the code and documentation.
Everything looks solid 🎉. I'm really excited to see the new results.
Once we go through this first round of changes, we'll want to copy the changes into the other beaconing packages.
I have a few small change requests:
Bug fix changes:
- Add 1 to
total
in thecreateBuckets
function to fix an off-by-one error where we end up with one less bucket than we'd like
Code maintenance changes:
- Move the rounding code into its own function in the
util
package - Split the
freqCount
calculation out ofcreateHistogram
and into its own function - Avoid calculating
total
increateHistogram
by callinglen(tsList)
Documentation Changes:
- Add documentation to
getTsHistogramScore
- Change/ remove the comment in
getTsHistogramScore
which references a 24 hour observation period - Add comments to
freqList
andfreqCount
Personal request:
- Add
Top Intvl
back into the show-beacons and report-beacons code
} | ||
} | ||
|
||
freqMean := float64(total) / float64(len(freqList)) |
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.
I believe we can avoid calculating total by calling len(tsList)
.
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.
LGTM and tested well.
Updates to beacon scoring metrics per testing against simulated c2 data and gathered false positives.
Closes #736