diff --git a/monkey/monkey_island/cc/services/reporting/exploitations/monkey_exploitation.py b/monkey/monkey_island/cc/services/reporting/exploitations/monkey_exploitation.py index ac400d8cc..f06d23274 100644 --- a/monkey/monkey_island/cc/services/reporting/exploitations/monkey_exploitation.py +++ b/monkey/monkey_island/cc/services/reporting/exploitations/monkey_exploitation.py @@ -20,18 +20,20 @@ class MonkeyExploitation: def get_monkey_exploited() -> List[MonkeyExploitation]: - exploited_with_monkeys = [ + exploited_nodes_monkeys_launched = [ NodeService.get_displayed_node_by_id(monkey["_id"], True) for monkey in mongo.db.monkey.find({}, {"_id": 1}) if not NodeService.get_monkey_manual_run(NodeService.get_monkey_by_id(monkey["_id"])) ] - exploited_without_monkeys = [ + # The node got exploited, but no monkeys got launched. + # For example the exploited machine was too old. + exploited_nodes_monkeys_failed = [ NodeService.get_displayed_node_by_id(node["_id"], True) for node in mongo.db.node.find({"exploited": True}, {"_id": 1}) ] - exploited = exploited_with_monkeys + exploited_without_monkeys + exploited = exploited_nodes_monkeys_launched + exploited_nodes_monkeys_failed exploited = [ MonkeyExploitation( diff --git a/monkey/monkey_island/cc/ui/src/components/report-components/SecurityReport.js b/monkey/monkey_island/cc/ui/src/components/report-components/SecurityReport.js index 6825fb1d4..4f8af8c62 100644 --- a/monkey/monkey_island/cc/ui/src/components/report-components/SecurityReport.js +++ b/monkey/monkey_island/cc/ui/src/components/report-components/SecurityReport.js @@ -1,4 +1,5 @@ import React, {Fragment} from 'react'; +import Pluralize from 'pluralize'; import BreachedServers from 'components/report-components/security/BreachedServers'; import ScannedServers from 'components/report-components/security/ScannedServers'; import PostBreach from 'components/report-components/security/PostBreach'; @@ -566,6 +567,12 @@ class ReportPageComponent extends AuthComponent {
+ The Monkey successfully breached + + {this.state.report.glance.exploited_cnt} + {Pluralize('machine', this.state.report.glance.exploited_cnt)}: +
- The Monkey successfully breached {exploitations.length} {Pluralize('machine', exploitations.length)}: -