-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PLGN-406] Sentinelone Path Traversal (#2140)
* Update to remove ../ and ..\ from file paths in the Threats Fetch File action * Reformat * Update dockerfile
- Loading branch information
1 parent
72ec9ad
commit ee0ee11
Showing
14 changed files
with
188 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
plugins/sentinelone/unit_test/inputs/threats_fetch_file_invalid_path.json.inp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"id": "1000000000000000001", | ||
"password": "Str0ngP455word" | ||
} |
80 changes: 80 additions & 0 deletions
80
plugins/sentinelone/unit_test/responses/activities_malicious_file_path.json.resp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
{ | ||
"data": [ | ||
{ | ||
"accountId": "1234567898765432112", | ||
"accountName": "Example", | ||
"activityType": 19, | ||
"agentId": "1234567898765432112", | ||
"agentUpdatedVersion": null, | ||
"comments": null, | ||
"createdAt": "2020-12-17T22:39:24.305435Z", | ||
"data": { | ||
"accountName": "Example", | ||
"computerName": "so-agent-win12", | ||
"confidenceLevel": "malicious", | ||
"fileContentHash": "02699626f388ed830012e5b787640e71c56d42d8", | ||
"fileDisplayName": "test.txt", | ||
"filePath": "\\..\\..\\Fake\\HarddiskVolume2\\Users\\Administrator\\Desktop\\test.txt", | ||
"groupName": "Default Group", | ||
"siteName": "Example", | ||
"threatClassification": "Trojan", | ||
"threatClassificationSource": "Cloud", | ||
"username": null | ||
}, | ||
"description": null, | ||
"groupId": "1234567898765432112", | ||
"groupName": "Default Group", | ||
"hash": null, | ||
"id": "1234567898765432112", | ||
"osFamily": null, | ||
"primaryDescription": "Threat with confidence level malicious detected: test.txt", | ||
"secondaryDescription": "02699626f388ed830012e5b787640e71c56d42d8", | ||
"siteId": "1234567898765432112", | ||
"siteName": "Example", | ||
"threatId": "1234567898765432112", | ||
"updatedAt": "2020-12-17T22:39:24.299235Z", | ||
"userId": null | ||
}, | ||
{ | ||
"accountId": "1234567898765432112", | ||
"accountName": "Example", | ||
"activityType": 2001, | ||
"agentId": "1234567898765432112", | ||
"agentUpdatedVersion": null, | ||
"comments": null, | ||
"createdAt": "2020-12-17T22:39:24.423814Z", | ||
"data": { | ||
"accountName": "Example", | ||
"computerName": "so-agent-win12", | ||
"fileContentHash": "02699626f388ed830012e5b787640e71c56d42d8", | ||
"fileDisplayName": "test.txt", | ||
"filePath": "\\..\\..\\Fake\\HarddiskVolume2\\Users\\Administrator\\Desktop\\test.txt", | ||
"fullScopeDetails": "Group Default Group in Site Example of Account Example", | ||
"globalStatus": "success", | ||
"groupName": "Default Group", | ||
"scopeLevel": "Group", | ||
"scopeName": "Default Group", | ||
"siteName": "Example", | ||
"threatClassification": "Trojan", | ||
"threatClassificationSource": "Cloud" | ||
}, | ||
"description": null, | ||
"groupId": "1234567898765432112", | ||
"groupName": "Default Group", | ||
"hash": null, | ||
"id": "1234567898765432112", | ||
"osFamily": null, | ||
"primaryDescription": "The agent so-agent-win12 successfully killed the threat: test.txt.", | ||
"secondaryDescription": "\\..\\..\\Fake\\HarddiskVolume2\\Users\\Administrator\\Desktop\\test.txt", | ||
"siteId": "1234567898765432112", | ||
"siteName": "Example", | ||
"threatId": "1234567898765432112", | ||
"updatedAt": "2020-12-17T22:39:24.419607Z", | ||
"userId": null | ||
} | ||
], | ||
"pagination": { | ||
"nextCursor": null, | ||
"totalItems": 0 | ||
} | ||
} |
56 changes: 56 additions & 0 deletions
56
plugins/sentinelone/unit_test/responses/threat_file_invalid_path.resp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
"data": [ | ||
{ | ||
"accountId": "1000000000000000001", | ||
"accountName": "Account", | ||
"activityType": 86, | ||
"activityUuid": "aaaaa-aa-adsadsad-asadasd", | ||
"agentId": "1000000000000000001", | ||
"agentUpdatedVersion": null, | ||
"comments": null, | ||
"createdAt": "2023-09-27T12:16:43.525758Z", | ||
"data": { | ||
"accountName": "Rapid7", | ||
"commandBatchUuid": "aaaaa-aa-adsadsad-asadasd", | ||
"commandId": 1000000000000000001, | ||
"computerName": "WindowsX64", | ||
"downloadUrl": "../../fake/1000000000000000001/uploads/1000000000000000001", | ||
"escapedMaliciousProcessArguments": null, | ||
"externalIp": "0.0.0.0", | ||
"fileContentHash": "1000000000000000000", | ||
"fileDisplayName": "file.txt", | ||
"filePath": "../../fake/1000000000000000001/uploads/1000000000000000001", | ||
"fileSize": 68, | ||
"filename": "WindowsX64_2023-09-27_12_16_43.503.zip", | ||
"fullScopeDetails": "Details", | ||
"fullScopeDetailsPath": "Details Path", | ||
"groupName": "Default Group", | ||
"ipAddress": null, | ||
"realUser": null, | ||
"siteName": "Example Site", | ||
"sourceType": "API", | ||
"storyline": "1000000000000000001", | ||
"threatClassification": "Malware", | ||
"threatClassificationSource": "Static", | ||
"uploadedFilename": "WindowsX64_2023-09-27_07:16:43.zip" | ||
}, | ||
"description": null, | ||
"groupId": "1000000000000000001", | ||
"groupName": "Default Group", | ||
"hash": null, | ||
"id": "1000000000000000001", | ||
"osFamily": null, | ||
"primaryDescription": "Agent WindowsX64 (0.0.0.0) successfully uploaded a threat file.", | ||
"secondaryDescription": "WindowsX64_2023-09-27_07:16:43.zip (Group ID: 1000000000000000001).", | ||
"siteId": "1000000000000000001", | ||
"siteName": "Example Site", | ||
"threatId": "1000000000000000001", | ||
"updatedAt": "2023-09-27T12:16:43.525095Z", | ||
"userId": null | ||
} | ||
], | ||
"pagination": { | ||
"nextCursor": null, | ||
"totalItems": 1 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters