This will create an OpenIOC format IOC in the same directory:
From here you aren’t done it does most of the work but you
have to edit some of the property files and check for BAD IOCs. You can load
the IOC up in Mandiant IOC editor located here:
When parsed it will look similar to the figure below:
“ioc_creator.py” will
generate domain, IP, MD5 hash, registry and file path IOCs. Be sure to change
the name, add groups, and change the description as it defaults to BulkImport .
The IOC will still load into MIR if you don’t change this but you want to
change this data for context if it ever hits. The IOC also has some bad
auto-generated IOCs. The “File Full Path contains “\Windows,” which is a bad
IOC, as well as the single registry path contains. Delete these BAD IOCs out. “ioc_creator.py”
defaults IOC term logic to the following for each IOC term type:
- FileItem/FullPath – contains
- RegistryPath – contains
- Network/DNS – contains
- PortItem/remoteIP – is
- FileItem/Md5sum - is
The auto-generation will catch some very high false positive
IOCs so make sure to use IOC lint and double check what has been auto-generated
for you. In the end my IOC was cleaned
up to look like the following figure:
Please let me know of any bugs or features needed. The
script can be found here:
3 comments:
This is cool!
Was wondering how to bulkimport and assign indicator IDs. Cool regex searching for context and assigning uuid. Noice noice!
Thanks for the work.
Great, however apart from indentation errors it gives "SyntaxError: unexpected EOF while parsing" error.
Post a Comment