Skip to content

Commit

Permalink
Add Defender for Endpoint File Indicator to file statistics command (d…
Browse files Browse the repository at this point in the history
  • Loading branch information
kamalq97 authored Nov 18, 2024
1 parent 6411782 commit e3cb014
Show file tree
Hide file tree
Showing 21 changed files with 933 additions and 60 deletions.
18 changes: 18 additions & 0 deletions Packs/Base/ReleaseNotes/1_35_0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

#### Scripts

##### CommonServerPython

Added new fields to `Common.File`, `Common.URL`, `Common.Domain`, `Common.IP` indicator classes:

- `organization_prevalence`

- `globally_prevalence`

- `organization_first_seen`

- `organization_last_seen`

- `first_seen_by_source`

- `last_seen_by_source`
186 changes: 181 additions & 5 deletions Packs/Base/Scripts/CommonServerPython/CommonServerPython.py

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -5819,6 +5819,7 @@ def test_create_domain(self):
dns='dns.somedomain',
detection_engines=10,
positive_detections=5,
first_seen_by_source='2024-10-06T09:50:50.555Z',
organization='Some Organization',
admin_phone='18000000',
admin_email='[email protected]',
Expand Down Expand Up @@ -5896,6 +5897,7 @@ def test_create_domain(self):
'Registrar': {'Name': 'Mr Registrar', 'AbuseEmail': '[email protected]', 'AbusePhone': None},
'Registrant': {'Name': 'Mr Registrant', 'Email': None, 'Phone': None, 'Country': None},
'Admin': {'Name': None, 'Email': '[email protected]', 'Phone': '18000000', 'Country': None},
'FirstSeenBySource': '2024-10-06T09:50:50.555Z',
'Organization': 'Some Organization',
'Subdomains': ['sub-domain1.somedomain.com', 'sub-domain2.somedomain.com',
'sub-domain3.somedomain.com'], 'DomainStatus': 'ACTIVE',
Expand Down Expand Up @@ -5994,6 +5996,7 @@ def test_create_url(self):
certificates=None,
description='description test',
stix_id='stix_id',
organization_first_seen='2024-11-04T14:48:23.456Z',
)

results = CommandResults(
Expand Down Expand Up @@ -6033,6 +6036,7 @@ def test_create_url(self):
'ASOwner': 'test_as_owner',
'Geo': {'Country': 'test_geo_country'},
'Organization': 'test_organization',
'OrganizationFirstSeen': '2024-11-04T14:48:23.456Z',
'CommunityNotes': [{'note': 'note', 'timestamp': '2019-01-01T00:00:00'}],
'Publications': [
{'source': 'source',
Expand Down Expand Up @@ -6118,7 +6122,8 @@ def test_create_file(self):
creation_date='test_creation_date',
description='test_description',
hashes=None,
stix_id='test_stix_id'
stix_id='test_stix_id',
organization_prevalence=0,
)

results = CommandResults(
Expand Down Expand Up @@ -6164,6 +6169,7 @@ def test_create_file(self):
'threatcategoryconfidence': 'threat_category_confidence'}],
'Imphash': 'test_imphash',
'Organization': 'test_organization',
'OrganizationPrevalence': 0,
'Malicious': {'Vendor': 'Test', 'Description': 'malicious!'}
}
],
Expand Down
2 changes: 1 addition & 1 deletion Packs/Base/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Base",
"description": "The base pack for Cortex XSOAR.",
"support": "xsoar",
"currentVersion": "1.34.47",
"currentVersion": "1.35.0",
"author": "Cortex XSOAR",
"serverMinVersion": "6.0.0",
"url": "https://www.paloaltonetworks.com/cortex",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"id": "indicator_globalprevalence",
"version": -1,
"modified": "2024-10-30T12:05:32.803043623Z",
"name": "Global Prevalence",
"ownerOnly": false,
"cliName": "globalprevalence",
"type": "number",
"closeForm": false,
"editForm": true,
"required": false,
"neverSetAsRequired": false,
"isReadOnly": false,
"useAsKpi": false,
"locked": false,
"system": false,
"content": true,
"group": 2,
"hidden": false,
"openEnded": false,
"description": "The number of times the indicator is detected across all organizations.",
"associatedTypes": [
"Domain",
"IP",
"IPv6",
"URL",
"File"
],
"associatedToAll": false,
"unmapped": false,
"unsearchable": false,
"caseInsensitive": true,
"sla": 0,
"threshold": 72,
"fromVersion": "5.0.0"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"id": "indicator_organizationfirstseen",
"version": -1,
"modified": "2024-10-30T12:05:32.803043623Z",
"name": "Organization First Seen",
"ownerOnly": false,
"cliName": "organizationfirstseen",
"type": "date",
"closeForm": false,
"editForm": true,
"required": false,
"neverSetAsRequired": false,
"isReadOnly": false,
"useAsKpi": false,
"locked": false,
"system": false,
"content": true,
"group": 2,
"hidden": false,
"openEnded": false,
"description": "Date and time when the indicator was first seen in the organization.",
"associatedTypes": [
"Domain",
"IP",
"IPv6",
"URL",
"File"
],
"associatedToAll": false,
"unmapped": false,
"unsearchable": false,
"caseInsensitive": true,
"sla": 0,
"threshold": 72,
"fromVersion": "5.0.0"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"id": "indicator_organizationlastseen",
"version": -1,
"modified": "2024-10-30T12:05:32.803043623Z",
"name": "Organization Last Seen",
"ownerOnly": false,
"cliName": "organizationlastseen",
"type": "date",
"closeForm": false,
"editForm": true,
"required": false,
"neverSetAsRequired": false,
"isReadOnly": false,
"useAsKpi": false,
"locked": false,
"system": false,
"content": true,
"group": 2,
"hidden": false,
"openEnded": false,
"description": "Date and time when the indicator was last seen in the organization.",
"associatedTypes": [
"Domain",
"IP",
"IPv6",
"URL",
"File"
],
"associatedToAll": false,
"unmapped": false,
"unsearchable": false,
"caseInsensitive": true,
"sla": 0,
"threshold": 72,
"fromVersion": "5.0.0"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"id": "indicator_organizationprevalence",
"version": -1,
"modified": "2024-10-30T12:05:32.803043623Z",
"name": "Organization Prevalence",
"ownerOnly": false,
"cliName": "organizationprevalence",
"type": "number",
"closeForm": false,
"editForm": true,
"required": false,
"neverSetAsRequired": false,
"isReadOnly": false,
"useAsKpi": false,
"locked": false,
"system": false,
"content": true,
"group": 2,
"hidden": false,
"openEnded": false,
"description": "The number of times the indicator is detected in the organization.",
"associatedTypes": [
"Domain",
"IP",
"IPv6",
"URL",
"File"
],
"associatedToAll": false,
"unmapped": false,
"unsearchable": false,
"caseInsensitive": true,
"sla": 0,
"threshold": 72,
"fromVersion": "5.0.0"
}
24 changes: 24 additions & 0 deletions Packs/CommonTypes/IndicatorTypes/reputation-domain.json
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,30 @@
}
]
}
},
"organizationprevalence": {
"simple": "Domain.OrganizationPrevalence",
"complex": null
},
"globalprevalence": {
"simple": "Domain.GlobalPrevalence",
"complex": null
},
"organizationfirstseen": {
"simple": "Domain.OrganizationFirstSeen",
"complex": null
},
"organizationlastseen": {
"simple": "Domain.OrganizationLastSeen",
"complex": null
},
"firstseenbysource": {
"simple": "Domain.FirstSeenBySource",
"complex": null
},
"lastseenbysource": {
"simple": "Domain.LastSeenBySource",
"complex": null
}
},
"manualMapping": null,
Expand Down
24 changes: 24 additions & 0 deletions Packs/CommonTypes/IndicatorTypes/reputation-file.json
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,30 @@
}
]
}
},
"organizationprevalence": {
"simple": "File.OrganizationPrevalence",
"complex": null
},
"globalprevalence": {
"simple": "File.GlobalPrevalence",
"complex": null
},
"organizationfirstseen": {
"simple": "File.OrganizationFirstSeen",
"complex": null
},
"organizationlastseen": {
"simple": "File.OrganizationLastSeen",
"complex": null
},
"firstseenbysource": {
"simple": "File.FirstSeenBySource",
"complex": null
},
"lastseenbysource": {
"simple": "File.LastSeenBySource",
"complex": null
}
},
"manualMapping": null,
Expand Down
24 changes: 24 additions & 0 deletions Packs/CommonTypes/IndicatorTypes/reputation-ip.json
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,30 @@
}
]
}
},
"organizationprevalence": {
"simple": "IP.OrganizationPrevalence",
"complex": null
},
"globalprevalence": {
"simple": "IP.GlobalPrevalence",
"complex": null
},
"organizationfirstseen": {
"simple": "IP.OrganizationFirstSeen",
"complex": null
},
"organizationlastseen": {
"simple": "IP.OrganizationLastSeen",
"complex": null
},
"firstseenbysource": {
"simple": "IP.FirstSeenBySource",
"complex": null
},
"lastseenbysource": {
"simple": "IP.LastSeenBySource",
"complex": null
}
},
"manualMapping": null,
Expand Down
24 changes: 24 additions & 0 deletions Packs/CommonTypes/IndicatorTypes/reputation-ipv6.json
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,30 @@
}
]
}
},
"organizationprevalence": {
"simple": "IPv6.OrganizationPrevalence",
"complex": null
},
"globalprevalence": {
"simple": "IPv6.GlobalPrevalence",
"complex": null
},
"organizationfirstseen": {
"simple": "IPv6.OrganizationFirstSeen",
"complex": null
},
"organizationlastseen": {
"simple": "IPv6.OrganizationLastSeen",
"complex": null
},
"firstseenbysource": {
"simple": "IPv6.FirstSeenBySource",
"complex": null
},
"lastseenbysource": {
"simple": "IPv6.LastSeenBySource",
"complex": null
}
},
"manualMapping": null,
Expand Down
26 changes: 25 additions & 1 deletion Packs/CommonTypes/IndicatorTypes/reputation-url.json
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,31 @@
"operator": "uniq",
"args": {}
}]
}
}
},
"organizationprevalence": {
"simple": "URL.OrganizationPrevalence",
"complex": null
},
"globalprevalence": {
"simple": "URL.GlobalPrevalence",
"complex": null
},
"organizationfirstseen": {
"simple": "URL.OrganizationFirstSeen",
"complex": null
},
"organizationlastseen": {
"simple": "URL.OrganizationLastSeen",
"complex": null
},
"firstseenbysource": {
"simple": "URL.FirstSeenBySource",
"complex": null
},
"lastseenbysource": {
"simple": "URL.LastSeenBySource",
"complex": null
}
},
"manualMapping": null,
Expand Down
Loading

0 comments on commit e3cb014

Please sign in to comment.