fireeye / bitsparser Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
Great job.
Haven't you considered compiling the python source code in an EXE?
It would be nice for the blue teams to have the EXE in the repository
Firstly, great tool, thank you for all your efforts.
When using Python 3.10.5 and running BitsParser.py, I noticed the output file growing in size in the filesystem, but then returning to zero bytes a number of times. At the end of the process, the output file is zero bytes.
I changed line 333: sys.stdout = open(self.out_file, "w")
Opening the out_file with "a" rather than "w" and this appeared to work for me, but there is probably a better way?
When using python 3.9 or higher
\BitsParser.py:554: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if type(v) is not 'Dict':
Traceback (most recent call last):
Thank you very much for sharing BitsParser!
I tried to convert the JSON output to CSV without success. I think the JSON objects should be comma separated in an array:
[
{
"JobType": "download",
"JobPriority": "foreground",
"JobState": "suspended",
"JobId": "e36fd920-5cb1-40c5-a372-000bf2a15625",
"JobName": "Microsoft Office Click-to-Run",
"OwnerSID": "S-1-5-18",
"Owner": "NT-AUTHORITY \SYSTEM",
"CreationTime": "2021-01-17T06:23:01Z",
"ModifiedTime": "2021-01-17T06:23:01Z"
},
{
"JobType": "download",
"JobPriority": "foreground",
"JobState": "suspended",
"JobId": "d97652de-7f08-4806-9df4-44fc98ce4b7a",
"JobName": "Microsoft Office Click-to-Run",
"OwnerSID": "S-1-5-18",
"Owner": "NT-AUTHORITY \SYSTEM",
"CreationTime": "2020-12-14T13:58:18Z",
"ModifiedTime": "2020-12-14T13:58:18Z"
}
]
The current json output is not formatted to allow for easy processing of BitsParser output in additional tools. There is a small change that can make the output easier to process.
https://github.com/fireeye/BitsParser/blob/master/BitsParser.py#L341
Current output code:
# Output unique jobs
if job.hash not in self.visited_jobs:
formatted_job = json.dumps(job.job_dict, indent=4)
print(formatted_job)
Potential change:
# Output unique jobs
if job.hash not in self.visited_jobs:
json.dump(job.job_dict, sys.stdout)
print()
The print()
call is needed to ensure each result in the output file is on a separate line.
Maybe an option could be added to specify output type.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.