Added primitive display of post breach actions

This commit is contained in:
VakarisZ 2019-02-11 13:24:33 +02:00
parent eb05dd46e7
commit 2ce27dc885
4 changed files with 12 additions and 9 deletions

View File

@ -82,12 +82,7 @@ class TelemetryFeed(flask_restful.Resource):
@staticmethod
def get_post_breach_telem_brief(telem):
target = telem['data']['ip']
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
pass
TELEM_PROCESS_DICT = \

View File

@ -142,7 +142,8 @@ class NodeService:
"group": NodeService.get_monkey_group(monkey),
"os": NodeService.get_monkey_os(monkey),
"dead": monkey["dead"],
"domain_name": ""
"domain_name": "",
"post_breach_actions": monkey["post_breach_actions"]
}
@staticmethod

View File

@ -155,7 +155,8 @@ class ReportService:
'domain_name': monkey['domain_name'],
'exploits': list(set(
[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]

View File

@ -9,6 +9,10 @@ let renderIpAddresses = function (val) {
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 = [
{
Header: 'Breached Servers',
@ -16,7 +20,9 @@ const columns = [
{Header: 'Machine', accessor: 'label'},
{Header: 'IP Addresses', id: 'ip_addresses',
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)}
]
}
];