forked from Te-k/analyst-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck_kext_kk.py
More file actions
21 lines (18 loc) · 741 Bytes
/
check_kext_kk.py
File metadata and controls
21 lines (18 loc) · 741 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import json
import argparse
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='Analyse kext and KnockKnock files')
parser.add_argument('JSONFILE', help='JSON File saved by kext or knock knock')
args = parser.parse_args()
with open(args.JSONFILE) as f:
data = json.loads(f.read())
for k in data.keys():
print("Checking {}".format(k))
for l in data[k]:
if "VT detection" in l:
if not l["VT detection"].startswith("0/"):
print("Suspicious detection in VT:")
print(json.dumps(l, indent=4))
else:
print("Suspicious detection in VT:")
print(json.dumps(l, indent=4))