-
Notifications
You must be signed in to change notification settings - Fork 168
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
Get destination IP from socket & new hpfeeds logging fields #290
Merged
Conversation
This file contains 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
- added log_s3.py logging module to store attack event files on external s3 storage - added s3storage config section in dist config - added botocore to requirements.txt - tested with pithos s3 (http) and AWS s3 (https). - Note: For pithos use signature_version "s3" , for AWS S3 uses "s3v4"
- add flag for known file (known_file) to AttackEvent: set if file already locally exists - extended log_sql to new flag - added deduplication handling in log_s3 - local check (flag) and remote check (avoid upload)
Allow interpolation of environment variables from glastopf.cfg. This is useful in a docker environment in case you want settings to be controlled via docker-compose.yml. Interpolation is invoked in glastopf.cfg, for example ... [hpfeed] … chan_events = %(CHANEVENTS)s …
- changed filename to use sha256 hash - stix test to use sha256 - added flag for known rci for php cgi rce
…reliant log processing removed sha256 as default hash for files to maintain interoperability with md5 reliant log processing - removed previous changes in test_stix, php_cgi_rce, in order to still use md5 - added file_sha256 to AttackEvent event_dict dict - log_s3.py now stores on s3 and uses sha256 as filename
maintained "source" field for backward compatibility
glaslos
approved these changes
Aug 8, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
As a requirement for large scale installations using hpfeeds logging e.g. for sissden.eu, I replaced the
sensor_addr
andsensor_port
from the information I get from the socket in use. In case the host uses several IP addresses, glastopf now distinguishes between the destination IPs targeted.Further, I added the http host header to the json, which might directly reveal the domain / IP accessed and split the source/sensor_ip and source/sensor_port in distinct fields for better processing using logstash. I still left the list [ source_addr, source_port ] for backward compatibility, just added fields.
I think this might also be of value for other users.