Extract Artifacts from Text File
LAST UPDATED: AUG 07, 2024
Extracts artifacts from a text file with File ID. Artifacts include IP, Domain, URL, File Hash, Email Address etc.
Implementation | System |
Command Category | Cyber Utility |
Tags | ARITIFACT CONDITION |
Inputs
Parameter Name | Required/Optional | Description | Sample Data |
---|---|---|---|
Files | Required | The Text files to extract artifact |
CODE
|
File Source | Required | File source. | Artifact File |
Output
Remote Command API
The D3 command API allows you to send requests to D3 SOAR to execute this utility command via REST API.
Request
POST
https:/{base_url}/{api_namespace}/api/Command/ExtractArtifactsFromTextFile
Headers
Please refer to the page Webhook Configuration Guide - Authentication Method: API Keys for more details.
Request Body
{
"Username": <Username here>,
"Site": <Site here>,
"CommandParams": {
"Files": <Files here>,
"File Source": <File Source here>
}
}
Body Parameters
Parameter Name | Type | Required/Optional | Description |
---|---|---|---|
Username |
| Required | The username of your D3 SOAR account. |
Site |
| Required | The D3 SOAR site to run the remote command. |
Files |
| Required | The Text files |
File Source |
| Required | File source. |
Sample Request
SAMPLE DATA
{
"Username": "Admin",
"Site": "Security Operations",
"CommandParams": {
"Files": [
{
"FileName": "96296_2011021835400000---art1.txt",
"FileId": 10742,
"FileType": "text/plain",
"FileExtension": ".txt",
"FileDescription": "This file contains artifacts from events"
}
],
"File Source": "Artifact File"
}
}
Response
Response Fields
Field Name | Type | Description |
---|---|---|
error |
| The error message if the API request has failed. |
returnData |
| The return data from the API request. |
contextData |
| The context data from the API request. |
Sample Response
{
"error": "",
"returnData": "Succeed",
"contextData": {
"ip": [
"192.168.1.128"
],
"url": [
"http://192.168.1.128",
"https://www.d3security.com"
],
"domain": [
"www.d3security.com"
],
"md5": [],
"sha256": [
"2548884526E8FBC5781F5B3B2972E9B20CC16DD86BDE93D2E888023F6919F5A2"
],
"sha1": [],
"emailaddress": [
"mye@d3security.com"
]
}
}