Path: blob/master/tutorials-and-examples/example-notebooks/Recorded Future Sigma Rules Importer.ipynb
3253 views
Import and convert Recorded Future Sigma rules
Created by Jonah Feldman, Recorded Future. Heavily based off of this notebook by [email protected]
NOTE: This is a beta version. We are constantly improving its features and functionality to provide you with the best user experience possible. Your feedback is valuable and helps us identify areas of improvement. Please send any suggestions or issues to [email protected].
This notebook fetches sigma rules created by Recorded Future's Insikt team and converts them to KQL. After conversion, you have the option to interactively query your Log Analytics workspace with these rules or create a Sentine Analytic rule to generate alerts/incidents based off it's detections
Known issues:
Authentication to Sentinel can sometimes fail to detect msticpyconfig.yaml even when it's present. As a workaround, you can directly hardcode the, subscription id, resource group name, and workspace name into the cell
Techniques and not currently translated correctly to the Analytic Rule. This is being worked on
Backslashes are not always escaped properly and some rules with backlashes in the query will not always execute correctly
In certain shells,
msticpy[azure]in the first cell needs to be wrapped in quotes
By Default, all Analytic rules are create disabled
Install dependencies
Enter your Recorded Future API key
This notebook requires an API key to communicate with the Recorded Future API. To obtain API keys, please visit Recorded Future Requesting API Tokens.
Fetch Rules from the Recorded Future API. This may take awhile
Modify query here. E.g. time interval (after, before), number of retrieved Sigma rules (limit). For more inspiration check out the API specification here.
Save the rules locally.
Check that we have the files
You should see a folder with folders such as application, apt, windows...
APT_RU_Gamaredon_SFX_Loader.yml*
APT_RU_Gamaredon_SFX_Loader_cleanup.yml*
'Bitsadmin Command to Download File from Web.yml'*
'Commodity Packer Processes.yml'*
'MAL Remcos RAT.yml'*
MAL_ASYNCRAT_DNS_EVENTS.yml*
MAL_ASYNCRAT_POWERSHELL_FILECREATION.yml*
MAL_AcridRain.yml*
MAL_Aesthetic_Wiper.yml*
MAL_Cuba_Ransomware.yml*
MAL_DarkOwl_Download_Payload.yml*
MAL_DivergentGap.yml*
MAL_Kodex_Ransomware.yml*
MAL_LockBit3_Shadowcopy_Deletion.yml*
MAL_Lorenz_Ransomware.yml*
MAL_MagicRAT.yml*
MAL_NullMixer.yml*
MAL_PWNKIT_Exploit_File_Event.yml*
MAL_Qakbot.yml*
MAL_SharpHound_process.yml*
MAL_Vidar_Stealer.yml*
MAL_disable_modify_tools.yml*
Mal_Trochilus_Interaction.yml*
'Permissions Modification.yml'*
'Startup Folder Modification in Registry.yml'*
'XMRig Mining Software - Processes Created.yml'*