We briefly discussed the usage of the IOC Search Collector in the Data Collection task.
Let's take a closer look at the capabilities of this collector type. But first, let's recap what an IOC is.
IOC stands for Indicators of Compromise ; they are artifacts of the potential compromise and host intrusion on the system or network that you need to look for when conducting threat hunting or performing incident response. IOCs can be MD5, SHA1, SHA256 hashes, IP address, C2 domain, file size, filename, file path, a registry key, etc.
One of the great tools you can use is IOC Editor, created by FireEye, to create IOC files. You can refer to this link to learn how to use the IOC Editor: https://fireeye.market/assets/apps/S7cWpi9W//9cb9857f/ug-ioc-editor.pdf .
Note : According to the IOC Editor download page Windows 7 is the latest operating system officially supported. It is the same version installed in the attached VM. There is another tool called OpenIOC Editor by FireEye, which supports Windows 10 that is worth taking a look at.
Tip : Before proceeding you can close Redline to free up some system resources while using IOC Editor.
You can create a text file containing IOCs, modify them, and share it with other people in the InfoSec industry.
In this example, we will look at an IOC of a keylogger created with IOC Editor.
Note : Below, you may follow along with the screenshots and don't have to create the IOC file in this task. You will create an IOC file using IOC Editor and perform an IOC Search in the next task.
Open IOC Editor which was conveniently placed for you in the taskbar next to Redline.
Note: It may take ~60 seconds for the application to launch.
Before proceeding, create the directory which will store the IOC file (IOC Directory).
Next, create the IOC file.
Keylogger indicators in IOC Editor :
A brief explanation of the above image:
- The Name of the IOC file is Keylogger, Keylogger.ioc. (this field you can edit)
- The Author is RussianPanda. (this field you can edit)
- GUID , Created , and Modified are fields you can NOT edit, and IOC Editor populates the information.
- Under Description , you can add a summary explaining the purpose of the IOC file.
The actual IOCs will be added under, you guessed it, Add .
Here are the values from the image above:
- File Strings -
psylog.exe
- File Strings -
RIDEV_INPUTSINK
- File MD5 -
791ca706b285b9ae3192a33128e4ecbb
- File Size -
35400
Refer to the gif below to get an idea of adding specific IOCs to the IOC file.
Once you select an item you can enter the value for the item directly.
You can also add it within the Properties .
All the fields are read-only except for Content and Comment . To add a value to the item enter it under Content .
Once you enter the value click Save to save it.
Note : You can right-click on an item for additional options. See below.
We'll leave that for you to explore on your own.
Now that we've created and saved the IOC file, let's move on and go back to the IOC Search Collector in the Redline tool.
Note : If you closed Redline now is the time to relaunch the application. You can close IOC Editor, again, to free up system resources.
IOC Search Collector will ignore the data that doesn't match an IOC you have gathered. Although, you can always choose to collect additional data. As the Redline User Guide states, the quality of the IOC analysis will depend on the data you have available in the analysis session.
To create an IOC Search Collector, click "Browse..." and choose the location of the .ioc file. Redline will automatically detect the .ioc file and place it in the Indicators section, as shown below.
IOC Search Collector :
Unsupported Search Terms: These terms will not show any successful hits in Redline, which means Redline doesn't recognize specific search terms.
Supported Search Terms: The terms that Redline will recognize and search for.
After you are finished reviewing the configured IOCs, click "Next". Now click on "Edit your script" to configure what data will be collected for the analysis. For this example, Keylogger file IOC Search, the following parameters were selected.
Note : When you configure your own IOC Search, you will choose different settings for your script compared to the settings above.
When done editing the script, click "OK".
In the "Save Your Collector To" section, click "Browse" and choose an empty folder where your analysis file will be saved along with the RunRedlineAudit.bat file.
After executing the .bat file in the same manner as before, let's now wait for the analysis to finish.
After the analysis is finished, you will see the .mans file (AnalysisSession1 in our example). Double-click the file to open it in Redline.
If Redline fails to generate the IOC Report automatically, you can manually generate it by clicking "Create a New IOC Report" and importing your .ioc file.
When the report generation completes, you should see the "Hits". You can expand the list by clicking on the entries in each row.
From the screenshot, you can see that there was one hit on "chrome.dll", this is a false positive. Let's review the details below.
As you can see, the DLL file matched with the string "RIDEV_INPUTSINK" that we had in our .ioc file. It's important to gather granulated and accurate artifacts to add to your IOC file to avoid false positives.
The screenshot below is of a file with the most amount of "Hits", which means it is most likely the file we are looking for.
You should be ready to answer the questions below using the screenshots provided in the task and perform these similar actions in the upcoming task!