Renamed '_type' to 'gathered_data_type' in data from local system attack technique.

This commit is contained in:
VakarisZ 2019-08-20 15:05:14 +03:00
parent 1da20b33c6
commit 5b074158ec
3 changed files with 8 additions and 8 deletions

View File

@ -2,21 +2,21 @@ from infection_monkey.telemetry.attack.attack_telem import AttackTelem
class T1005Telem(AttackTelem): class T1005Telem(AttackTelem):
def __init__(self, status, _type, info=""): def __init__(self, status, gathered_data_type, info=""):
""" """
T1005 telemetry. T1005 telemetry.
:param status: ScanStatus of technique :param status: ScanStatus of technique
:param _type: Type of data collected :param gathered_data_type: Type of data collected from local system
:param info: Additional info about data :param info: Additional info about data
""" """
super(T1005Telem, self).__init__('T1005', status) super(T1005Telem, self).__init__('T1005', status)
self._type = _type self.gathered_data_type = gathered_data_type
self.info = info self.info = info
def get_data(self): def get_data(self):
data = super(T1005Telem, self).get_data() data = super(T1005Telem, self).get_data()
data.update({ data.update({
'type': self._type, 'gathered_data_type': self.gathered_data_type,
'info': self.info 'info': self.info
}) })
return data return data

View File

@ -19,12 +19,12 @@ class T1005(AttackTechnique):
'as': 'monkey'}}, 'as': 'monkey'}},
{'$project': {'monkey': {'$arrayElemAt': ['$monkey', 0]}, {'$project': {'monkey': {'$arrayElemAt': ['$monkey', 0]},
'status': '$data.status', 'status': '$data.status',
'type': '$data.type', 'gathered_data_type': '$data.gathered_data_type',
'info': '$data.info'}}, 'info': '$data.info'}},
{'$addFields': {'_id': 0, {'$addFields': {'_id': 0,
'machine': {'hostname': '$monkey.hostname', 'ips': '$monkey.ip_addresses'}, 'machine': {'hostname': '$monkey.hostname', 'ips': '$monkey.ip_addresses'},
'monkey': 0}}, 'monkey': 0}},
{'$group': {'_id': {'machine': '$machine', 'type': '$type', 'info': '$info'}}}, {'$group': {'_id': {'machine': '$machine', 'gathered_data_type': '$gathered_data_type', 'info': '$info'}}},
{"$replaceRoot": {"newRoot": "$_id"}}] {"$replaceRoot": {"newRoot": "$_id"}}]
@staticmethod @staticmethod

View File

@ -11,10 +11,10 @@ class T1005 extends React.Component {
static getDataColumns() { static getDataColumns() {
return ([{ return ([{
Header: "Data gathered from local systems", Header: "Sensitive data",
columns: [ columns: [
{Header: 'Machine', id: 'machine', accessor: x => renderMachineFromSystemData(x.machine), style: { 'whiteSpace': 'unset' }}, {Header: 'Machine', id: 'machine', accessor: x => renderMachineFromSystemData(x.machine), style: { 'whiteSpace': 'unset' }},
{Header: 'Type', id: 'type', accessor: x => x.type, style: { 'whiteSpace': 'unset' }}, {Header: 'Type', id: 'type', accessor: x => x.gathered_data_type, style: { 'whiteSpace': 'unset' }},
{Header: 'Info', id: 'info', accessor: x => x.info, style: { 'whiteSpace': 'unset' }}, {Header: 'Info', id: 'info', accessor: x => x.info, style: { 'whiteSpace': 'unset' }},
]}])}; ]}])};