Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/1.0.1 #13

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Release Information

- **Version**: 1.0.0 <sup>Preview</sup>
- **Version**: 1.0.1 <sup>Preview</sup>

- **Certified**: No

Expand Down
3 changes: 2 additions & 1 deletion widget/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
"name": "mitreAttackSpread",
"title": "MITRE ATT&CK Alert Incident Spread",
"subTitle": "Detailed table view of Alerts and Incidents linked to MITRE ATT&CK records",
"version": "1.0.0",
"version": "1.0.1",
"published_date": "1676526096",
"metadata": {
"help_online":"https://github.com/fortinet-fortisoar/widget-mitre-attack-spread/blob/release/1.0.1/README.md",
"description": "Provides a consolidated look into Alert and Incident threats under MITRE ATT&CK records. Requires MITRE ATT&CK Enrichment Framework installed and MITRE ATT&CK records ingested into FortiSOAR via MITRE ATT&CK Connector.",
"pages": [
"Dashboard",
Expand Down
21 changes: 19 additions & 2 deletions widget/view.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
}
};


if ($scope.config.incidentsQuery != undefined && $scope.config.incidentsQuery.filters.length != 0) {
var old_incidents_filter = {"logic": $scope.incidents.query.logic, "filters": $scope.incidents.query.filters};
$scope.incidents.query.logic = "AND";
Expand Down Expand Up @@ -184,6 +184,7 @@
$scope.related_tactics = [];
$scope.currentUser = usersService.getCurrentUser();
$scope.currentTheme = 'dark';
$scope.changeMatrix = changeMatrix;
$scope.globalRefresh = globalRefresh;
$scope.hide_all = false;

Expand All @@ -200,6 +201,10 @@
'TA0038', 'TA0039',
'TA0108', 'TA0104', 'TA0110', 'TA0111', 'TA0103', 'TA0102', // ics
'TA0109', 'TA0100', 'TA0101', 'TA0107', 'TA0106', 'TA0105'];
$scope.enterprise_list = $scope.tactics_order.slice(0, 14);
$scope.mobile_list = $scope.tactics_order.slice(14, 28);
$scope.ics_list = $scope.tactics_order.slice(28);
$scope.selected_list = $scope.enterprise_list;

init();

Expand Down Expand Up @@ -291,7 +296,7 @@
angular.forEach($scope.subtechniquesRecords, function (subtechnique_record) {
if (subtechnique_record.parentTechnique != null) { // need this check otherwise it breaks the loop
if (technique['@id'] == subtechnique_record.parentTechnique) {
// requires subtechnique object to be cloned
// requires subtechnique object to be cloned
// otherwise clicking on one toggle shows/hides alerts and incidents across all duplicates
technique._subtechniques.push(structuredClone(subtechnique_record));
}
Expand Down Expand Up @@ -528,6 +533,18 @@
$state.go(state, params);
}

function changeMatrix(selectedMatrix) {
if (selectedMatrix === 'mobile') {
$scope.selected_list = $scope.mobile_list;
}
else if (selectedMatrix === 'ics') {
$scope.selected_list = $scope.ics_list;
}
else {
$scope.selected_list = $scope.enterprise_list;
}
}

function globalRefresh() {
init();
}
Expand Down
20 changes: 15 additions & 5 deletions widget/view.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,18 @@
<div class="display-flex-space-between margin-chart">
<div class="padding-right-0 padding-left-0 widget-dashboard-title-width"
data-ng-class="(page === 'dashboard' || page === 'reporting') ? 'widget-dashboard-title-width' : 'widget-title-width'">
<h5 class="margin-top-0 margin-bottom-0 text-overflow ng-binding">{{ config.title ? config.title : 'MITRE ATT&CK
Alert/Incident Spread' }}</h5>
<h5 class="margin-top-0 margin-bottom-0 text-overflow ng-binding"><span class="pull-left padding-top-sm">{{ config.title ? config.title : 'MITRE ATT&CK
Alert/Incident Spread' }}&nbsp;&nbsp;&nbsp;
</span>
<span class="pull-left">
<select data-ng-readonly="disabled" data-ng-model="selectedMatrix" class="form-control ng-pristine ng-valid ng-empty input-sm ng-touched" data-ng-change="changeMatrix(selectedMatrix)" data-ng-class="::{'input-big': size === 'large', 'input-sm': size === 'small'}" aria-invalid="false">
<option value="" disabled selected>Select Matrix</option>
<option value="enterprise">Enterprise</option>
<option value="mobile">Mobile</option>
<option value="ics">ICS</option>
</select>
</span>
</h5>
</div>
<div class="padding-left-0 margin-top-8 padding-top-5 pull-left" data-ng-show="detail_display">
<span class="fa btn btn-sm" data-ng-class="{'hover':isOpen}" data-ng-click="globalRefresh()" role="button"
Expand All @@ -24,15 +34,15 @@ <h5 class="margin-top-0 margin-bottom-0 text-overflow ng-binding">{{ config.titl
<tr>
<td class="mitre-techniques-count padding-top-sm padding-left-sm padding-right-sm"
data-ng-repeat="tactic in tacticsRecords | orderBy:'_order_key'"
data-ng-hide="(tactic.techniques.length == 0 && config.hideTactics) || (tactic._hidden_techniques_count == tactic.techniques.length && config.hideParentTactics && !tactic._toggled) || (detail_display && !tactic._toggled_detail)">
data-ng-hide="(tactic.techniques.length == 0 && config.hideTactics) || (tactic._hidden_techniques_count == tactic.techniques.length && config.hideParentTactics && !tactic._toggled) || (detail_display && !tactic._toggled_detail) || (selected_list.indexOf(tactic.mitreId) === -1)">
{{ tactic.techniques.length }}
{{ tactic.techniques.length === 1 ? 'technique' : 'techniques' }}
</td>
</tr>
<tr>
<td class="mitre-tactics-cells padding-bottom-sm padding-left-sm padding-right-sm"
data-ng-repeat="tactic in tacticsRecords | orderBy:'_order_key'"
data-ng-hide="(tactic.techniques.length == 0 && config.hideTactics) || (tactic._hidden_techniques_count == tactic.techniques.length && config.hideParentTactics && !tactic._toggled) || (detail_display && !tactic._toggled_detail)">
data-ng-hide="(tactic.techniques.length == 0 && config.hideTactics) || (tactic._hidden_techniques_count == tactic.techniques.length && config.hideParentTactics && !tactic._toggled) || (detail_display && !tactic._toggled_detail) || (selected_list.indexOf(tactic.mitreId) === -1)">
<div class="div-style">
<a href="" data-ng-click="openRecord(tactics.module, tactic['@id'])" data-tooltip-placement="top"
data-uib-tooltip="{{tactic.mitreId}}" data-tooltip-append-to-body="true">{{ tactic.name }}</a>
Expand All @@ -43,7 +53,7 @@ <h5 class="margin-top-0 margin-bottom-0 text-overflow ng-binding">{{ config.titl
<tbody data-ng-class="currentTheme == 'light' ? 'mitre-techniques-light' : 'mitre-techniques'">
<tr>
<td class="padding-sm" data-ng-repeat="tactic in tacticsRecords | orderBy:'_order_key'"
data-ng-hide="(tactic.techniques.length == 0 && config.hideTactics) || (tactic._hidden_techniques_count == tactic.techniques.length && config.hideParentTactics && !tactic._toggled) || (detail_display && !tactic._toggled_detail)">
data-ng-hide="(tactic.techniques.length == 0 && config.hideTactics) || (tactic._hidden_techniques_count == tactic.techniques.length && config.hideParentTactics && !tactic._toggled) || (detail_display && !tactic._toggled_detail) || (selected_list.indexOf(tactic.mitreId) === -1)">
<table class="inner-mitre-table" width="100%">
<tr data-ng-repeat="technique in tactic.techniques">
<td
Expand Down
Loading