-
Notifications
You must be signed in to change notification settings - Fork 178
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
Create multiCleaner.py #180
Open
garanews
wants to merge
4
commits into
spender-sandbox:master
Choose a base branch
from
garanews:master
base: master
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
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
This script will delete samples (present into mongodb and on disk) older than X seconds (find in delta variable), with a malware score less than Y value (find in MAX_MALSCORE) and with no virustotal evidences (0 is considered a report). Before run it, some index into monngodb is needed: mongo cuckoo then db.calls.createIndex({"pid": 1}) db.analysis.createIndex({"virustotal_summary": 1, "info.ended": -1}) db.analysis.createIndex({"malscore": 1, "info.ended": -1}) db.analysis.createIndex({"virustotal_summary": -1, "info.ended": -1}) db.analysis.createIndex({"malscore": -1, "info.ended": -1}) It is working, need to fix the duplicates id output from mongo: db.analysis.find( {$and : [{"malscore": {$gt : -1}}, {"malscore": {$lt : 4}}], "info.ended": {$lt : "2016-06-23 10:00:42"}, "virustotal_summary": {$exists: false } } , {"info.id": 1} ) { "_id" : ObjectId("576b9ae39992744853f44f2e"), "info" : { "id" : 11 } } { "_id" : ObjectId("576b9a3599927449392608ef"), "info" : { "id" : 11 } } { "_id" : ObjectId("576ba3949992744937261c39"), "info" : { "id" : 26 } } { "_id" : ObjectId("576ba3bf9992744853f4803b"), "info" : { "id" : 26 } } in order to avoid the double try removal, if "debug = true" will see: python multiCleaner.py 2016-06-23 15:32:06 starting found 66 samples /home/analyst/cuckoo-advanced/storage/analyses/11 deleted: 11 /home/analyst/cuckoo-advanced/storage/analyses/11 [Errno 2] No such file or directory: '/home/analyst/cuckoo-advanced/storage/analyses/11' /home/analyst/cuckoo-advanced/storage/analyses/26 deleted: 26 /home/analyst/cuckoo-advanced/storage/analyses/26 [Errno 2] No such file or directory: '/home/analyst/cuckoo-advanced/storage/analyses/26'
I have seen, the reason I created new one is to keep samples with a malscore greater than X value and/or positive to VT for comparison (malheur) etc |
Whitelisting adobe.com in misp.conf will whitelist both domains and urls containing adobe.com domain: skipped domains from misp submit: adobe.com , acroipm2.adobe.com skipped urls from misp submit: http://acroipm2.adobe.com/15/rdr/ITA/win/nooem/none/consumer/279_15_20_20039.zip
check this one https://github.com/doomedraven/cuckoo-modified/blob/master/utils/remove_older.py there also your misp improvements merged |
support non utf8 chars in filename
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.
This script will delete samples (present into mongodb and on disk) older than X seconds (find in delta variable), with a malware score less than Y value (find in MAX_MALSCORE) and with no virustotal evidences (0 is considered a report).
Before run it, some index into monngodb is needed:
mongo cuckoo then
db.calls.createIndex({"pid": 1})
db.analysis.createIndex({"virustotal_summary": 1, "info.ended": -1})
db.analysis.createIndex({"malscore": 1, "info.ended": -1})
db.analysis.createIndex({"virustotal_summary": -1, "info.ended": -1})
db.analysis.createIndex({"malscore": -1, "info.ended": -1})
It is working, need to fix the duplicates id output from mongo:
db.analysis.find( {$and : [{"malscore": {$gt : -1}}, {"malscore": {$lt : 4}}], "info.ended": {$lt : "2016-06-23 10:00:42"}, "virustotal_summary": {$exists: false } } , {"info.id": 1} )
{ "_id" : ObjectId("576b9ae39992744853f44f2e"), "info" : { "id" : 11 } }
{ "_id" : ObjectId("576b9a3599927449392608ef"), "info" : { "id" : 11 } }
{ "_id" : ObjectId("576ba3949992744937261c39"), "info" : { "id" : 26 } }
{ "_id" : ObjectId("576ba3bf9992744853f4803b"), "info" : { "id" : 26 } }
in order to avoid the double try removal, if "debug = true" will see:
python multiCleaner.py
2016-06-23 15:32:06 starting
found 66 samples
/home/analyst/cuckoo-advanced/storage/analyses/11
deleted: 11
/home/analyst/cuckoo-advanced/storage/analyses/11
[Errno 2] No such file or directory: '/home/analyst/cuckoo-advanced/storage/analyses/11'
/home/analyst/cuckoo-advanced/storage/analyses/26
deleted: 26
/home/analyst/cuckoo-advanced/storage/analyses/26
[Errno 2] No such file or directory: '/home/analyst/cuckoo-advanced/storage/analyses/26'