forked from p15670423/monkey
Updated system info gathering technique.
This commit is contained in:
parent
21def2970f
commit
592abc77b3
|
@ -1,6 +1,5 @@
|
||||||
import logging
|
import logging
|
||||||
from monkey_island.cc.services.attack.technique_reports import T1210, T1197, T1110, T1075, T1003, T1059, T1086
|
from monkey_island.cc.services.attack.technique_reports import T1210, T1197, T1110, T1075, T1003, T1059, T1086, T1082
|
||||||
from monkey_island.cc.services.attack.attack_telem import AttackTelemService
|
|
||||||
from monkey_island.cc.services.attack.attack_config import AttackConfig
|
from monkey_island.cc.services.attack.attack_config import AttackConfig
|
||||||
from monkey_island.cc.database import mongo
|
from monkey_island.cc.database import mongo
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ class T1082(AttackTechnique):
|
||||||
scanned_msg = ""
|
scanned_msg = ""
|
||||||
used_msg = "Monkey gathered system info from machines in the network."
|
used_msg = "Monkey gathered system info from machines in the network."
|
||||||
|
|
||||||
query = [{'$match': {'telem_type': 'system_info_collection'}},
|
query = [{'$match': {'telem_category': 'system_info_collection'}},
|
||||||
{'$project': {'machine': {'hostname': '$data.hostname', 'ips': '$data.network_info.networks'},
|
{'$project': {'machine': {'hostname': '$data.hostname', 'ips': '$data.network_info.networks'},
|
||||||
'aws': '$data.aws',
|
'aws': '$data.aws',
|
||||||
'netstat': '$data.network_info.netstat',
|
'netstat': '$data.network_info.netstat',
|
||||||
|
@ -36,11 +36,12 @@ class T1082(AttackTechnique):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_report_data():
|
def get_report_data():
|
||||||
data = {'title': T1082.technique_title(T1082.tech_id)}
|
data = {'title': T1082.technique_title()}
|
||||||
system_info = list(mongo.db.telemetry.aggregate(T1082.query))
|
system_info = list(mongo.db.telemetry.aggregate(T1082.query))
|
||||||
data.update({'system_info': system_info})
|
data.update({'system_info': system_info})
|
||||||
if system_info:
|
if system_info:
|
||||||
data.update({'message': T1082.used_msg, 'status': ScanStatus.USED.name})
|
status = ScanStatus.USED
|
||||||
else:
|
else:
|
||||||
data.update({'message': T1082.unscanned_msg, 'status': ScanStatus.UNSCANNED.name})
|
status = ScanStatus.UNSCANNED
|
||||||
|
data.update(T1082.get_message_and_status(status))
|
||||||
return data
|
return data
|
||||||
|
|
Loading…
Reference in New Issue