diff --git a/src/utils/constants.js b/src/utils/constants.js index 9afc82d1..0fbb17da 100644 --- a/src/utils/constants.js +++ b/src/utils/constants.js @@ -178,6 +178,13 @@ export const eventSeverityColor = { low: '#FFD82D', info: '#D1BD50' } +export const riskLevelColor = { + 5: '#D84C4C', + 4: '#FE845D', + 3: '#FFB65A', + 2: '#FFD82D', + 1: '#D1BD50' +} export const eventSeverityColor1 = { Critical: '#D84C4C', High: '#FE845D', diff --git a/src/views/detections/DetectionList.vue b/src/views/detections/DetectionList.vue index 04abb8c8..e033e3b9 100644 --- a/src/views/detections/DetectionList.vue +++ b/src/views/detections/DetectionList.vue @@ -67,18 +67,17 @@ export default { this.myListData = [] this.listData.forEach((item, i) => { this.myListData.push(this.$_.cloneDeep(item)) - if (item.eventInfoObj) { - axios.get(`${api.detection.securityEvent.detail}/${item.eventInfoObj.ioc_type}?resource=${item.eventInfoObj.ioc_value}`).then(res => { - if (res.status === 200 && this.myListData[i]) { - this.myListData[i].malwareName = (this.$_.get(res, 'data.data.malware.malwareName', '-')) || '-' - } else if (this.myListData[i]) { - this.myListData[i].malwareName = '-' + if (item.eventInfoObj && item.isBuiltin === 1) { + axios.get(`${api.detection.securityEvent.detail}/${item.eventInfoObj.ioc_type.toLowerCase()}?resource=${item.eventInfoObj.ioc_value}`).then(res => { + if (res.status === 200) { + if (item.eventType === 'Anonymity') { + item.darkweb = this.$_.get(res, 'data.data.darkweb', {}) || {} + } else if (item.eventType === 'Command and Control') { + item.malware = this.$_.get(res, 'data.data.malware', {}) || {} + } } }).catch(e => { console.error(e) - if (this.myListData[i]) { - this.myListData[i].malwareName = '-' - } }) } }) @@ -118,10 +117,7 @@ export default { } else { clearTimeout(this.timeout) this.noData = false - const timer = setTimeout(() => { - this.initData() - clearTimeout(timer) - }, 200) + this.initData() } } } diff --git a/src/views/detections/DetectionRow.vue b/src/views/detections/DetectionRow.vue index 1e0f4ad5..6cd37328 100644 --- a/src/views/detections/DetectionRow.vue +++ b/src/views/detections/DetectionRow.vue @@ -41,21 +41,16 @@ {{$t('detections.severity')}} :   {{detection.eventSeverity || '-'}} - - - - - -
+
{{$t('detection.list.malwareName')}} :   - {{ $_.get(detection, 'malwareName', '-') || '-' }} + {{ $_.get(detection, 'malware.malwareName', '-') || '-' }} +
+
+ + {{$t('detection.nodeType')}} :   + {{ $_.get(detection, 'darkweb.nodeType', '-') || '-' }}
- - - - -
{{$t('detection.list.startTime')}} :   diff --git a/src/views/detections/overview/DetectionSecurityEventOverview.vue b/src/views/detections/overview/DetectionSecurityEventOverview.vue index 68bcc700..aad60502 100644 --- a/src/views/detections/overview/DetectionSecurityEventOverview.vue +++ b/src/views/detections/overview/DetectionSecurityEventOverview.vue @@ -3,32 +3,17 @@
{{ $t('overall.remark') }}
-
- - +
+ + {{ $_.get(detection, 'malware.mitreAttackDescription', '-') || '-' }} +  
+
+ + {{ $_.get(detection, 'malware.mitreAttackDescription', '-') || '-' }} +   +
+ -
Fields
@@ -66,85 +51,185 @@
{{ $t('overall.domain') }}
{{ detection.domain || '-' }}
-
-
{{ $t('entities.domainCategory') }}
-
{{ $_.get(basicInfo, 'domainInfo.category.categoryName', '-') || '-' }}
-
-
-
{{ $t('entities.domainDetail.categoryGroup') }}
-
{{ $_.get(basicInfo, 'domainInfo.category.categoryGroup', '-') || '-' }}
-
-
-
{{ $t('entities.reputationLevel') }}
-
-
- {{ basicInfo.domainInfo.category.reputationLevel }} + + + + +
{{ $t('detections.goToVictim') }}
@@ -251,7 +336,7 @@ import axios from 'axios' import { api } from '@/utils/api' import { getMillisecond, dateFormatByAppearance } from '@/utils/date-util' -import { eventSeverityColor, unitTypes } from '@/utils/constants' +import { eventSeverityColor, unitTypes, riskLevelMapping, riskLevelColor } from '@/utils/constants' import unitConvert from '@/utils/unit-convert' import _ from 'lodash' export default { @@ -262,6 +347,7 @@ export default { data () { return { eventSeverityColor, + riskLevelColor, basicInfo: {}, events: [], reference: 'https://attack.mitre.org' @@ -288,6 +374,14 @@ export default { } return '' } + }, + appRisk () { + return function (level) { + const m = riskLevelMapping.find(mapping => { + return mapping.value == level + }) + return (m && m.name) || level + } } }, methods: { @@ -303,9 +397,6 @@ export default { axios.get(`${api.detection.securityEvent.ipDetail}?resource=${this.detection.offenderIp}`).then(res => { if (res.status === 200) { this.basicInfo.offenderInfo = res.data.data - if (this.$_.get(this.detection, 'eventInfoObj.ioc_type', '').toLowerCase() === 'ip') { - this.basicInfo.malwareInfo = res.data.data.malware - } } }) } @@ -320,9 +411,6 @@ export default { axios.get(`${api.detection.securityEvent.domainDetail}?resource=${this.detection.domain}`).then(res => { if (res.status === 200) { this.basicInfo.domainInfo = res.data.data - if (this.$_.get(this.detection, 'eventInfoObj.ioc_type', '').toLowerCase() === 'domain') { - this.basicInfo.malwareInfo = res.data.data.malware - } } }) }