forked from p15670423/monkey
Added primitive display of post breach actions
This commit is contained in:
parent
eb05dd46e7
commit
2ce27dc885
|
@ -82,12 +82,7 @@ class TelemetryFeed(flask_restful.Resource):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_post_breach_telem_brief(telem):
|
def get_post_breach_telem_brief(telem):
|
||||||
target = telem['data']['ip']
|
pass
|
||||||
output = telem['data']['output']
|
|
||||||
if output:
|
|
||||||
return 'Monkey ran post breach commands on %s.' % target
|
|
||||||
else:
|
|
||||||
return 'Monkey failed running post breach commands on %s.' % target
|
|
||||||
|
|
||||||
|
|
||||||
TELEM_PROCESS_DICT = \
|
TELEM_PROCESS_DICT = \
|
||||||
|
|
|
@ -142,7 +142,8 @@ class NodeService:
|
||||||
"group": NodeService.get_monkey_group(monkey),
|
"group": NodeService.get_monkey_group(monkey),
|
||||||
"os": NodeService.get_monkey_os(monkey),
|
"os": NodeService.get_monkey_os(monkey),
|
||||||
"dead": monkey["dead"],
|
"dead": monkey["dead"],
|
||||||
"domain_name": ""
|
"domain_name": "",
|
||||||
|
"post_breach_actions": monkey["post_breach_actions"]
|
||||||
}
|
}
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|
|
@ -155,7 +155,8 @@ class ReportService:
|
||||||
'domain_name': monkey['domain_name'],
|
'domain_name': monkey['domain_name'],
|
||||||
'exploits': list(set(
|
'exploits': list(set(
|
||||||
[ReportService.EXPLOIT_DISPLAY_DICT[exploit['exploiter']] for exploit in monkey['exploits'] if
|
[ReportService.EXPLOIT_DISPLAY_DICT[exploit['exploiter']] for exploit in monkey['exploits'] if
|
||||||
exploit['result']]))
|
exploit['result']])),
|
||||||
|
'post_breach_actions': monkey['post_breach_actions'] if 'post_breach_actions' in monkey else 'None'
|
||||||
}
|
}
|
||||||
for monkey in exploited]
|
for monkey in exploited]
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,10 @@ let renderIpAddresses = function (val) {
|
||||||
return <div>{renderArray(val.ip_addresses)} {(val.domain_name ? " (".concat(val.domain_name, ")") : "")} </div>;
|
return <div>{renderArray(val.ip_addresses)} {(val.domain_name ? " (".concat(val.domain_name, ")") : "")} </div>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let renderPostBreach = function (val) {
|
||||||
|
return <div>{val.map(x => <div>Name: {x.name}<br/>Command: {x.command}<br/>Output: {x.output}<br/></div>)}</div>;
|
||||||
|
};
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
Header: 'Breached Servers',
|
Header: 'Breached Servers',
|
||||||
|
@ -16,7 +20,9 @@ const columns = [
|
||||||
{Header: 'Machine', accessor: 'label'},
|
{Header: 'Machine', accessor: 'label'},
|
||||||
{Header: 'IP Addresses', id: 'ip_addresses',
|
{Header: 'IP Addresses', id: 'ip_addresses',
|
||||||
accessor: x => renderIpAddresses(x)},
|
accessor: x => renderIpAddresses(x)},
|
||||||
{Header: 'Exploits', id: 'exploits', accessor: x => renderArray(x.exploits)}
|
{Header: 'Exploits', id: 'exploits', accessor: x => renderArray(x.exploits)},
|
||||||
|
{Header: 'Post breach actions:', id: 'post_breach_actions', accessor: x => renderPostBreach(x.post_breach_actions)}
|
||||||
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in New Issue