cyboxproject / openioc-to-cybox Goto Github PK
View Code? Open in Web Editor NEWGenerate CybOX XML from OpenIOC XML
Generate CybOX XML from OpenIOC XML
I have the following IOC:
<?xml version="1.0" encoding="utf-8"?>
<OpenIOC xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="e9e37871-e6e2-4673-a9c1-880a5baac3b1" last-modified="2013-07-28T23:38:59Z" published-date="0001-01-01T00:00:00" xmlns="http://openioc.org/schemas/OpenIOC_1.1">
<metadata>
<short_description>Mixed_Yara_signatures_and_embedded_signatures</short_description>
<authored_date>2013-07-28T21:34:54Z</authored_date>
<links />
</metadata>
<criteria>
<Indicator operator="OR" id="09040328-cd27-4042-bc90-865fa40b460c">
<IndicatorItem id="00be843e-d87e-4f0d-8260-cca22976edcb" condition="contains" preserve-case="false" negate="false">
<Context document="Yara" search="Yara/TextString" type="yara" />
<Content type="string">evilMutex</Content>
</IndicatorItem>
<IndicatorItem id="345f9120-aeed-45f7-a6f8-41ba52752324" condition="contains" preserve-case="false" negate="false">
<Context document="Yara" search="Yara/Yara" type="yara" />
<Content type="string">rule Ocurrences
{
strings:
$a = "dummy1"
$b = "dummy2"
condition:
for all i in (1,2,3) : (@a[i] + 10 == @b[i])
}</Content>
</IndicatorItem>
</Indicator>
</criteria>
<parameters />
</OpenIOC>
When I run the tool I have this:
$ python openioc_to_cybox.py -i test.ioc -o test.cybox
Generating test.cybox from test.ioc...
Error: 'IocTermList' object has no attribute 'get_description'
It would be nice to "merge" AND'd IndicatorItems of the same type into a single CybOX Object in the output. E.g. a registry key and value could be represented via one Object, whereas right now the script outputs them as two separate Objects. The logic for doing this correctly is probably not so simple, though.
From IOCBucket.com, I downloaded the file:
iocbucket_633ac6cfd9833ecd0cf15402d3549c9350bcf986_zeus\ gameover\ with\ necurs\ rootkit.ioc
I then run the script this way:
python openioc_to_cybox.py -i iocbucket_633ac6cfd9833ecd0cf15402d3549c9350bcf986_zeus\ gameover\ with\ necurs\ rootkit.ioc -o out.cybox
I have this error:
Error: 'StringObjectPropertyType' object has no attribute 'get_fully_qualified'
Currently the OpenIOC -> CybOX translation code uses the python-cybox
bindings rather than its APIs. We should update this to natively use the APIs, which should also fix some issues with IDs not being automatically generated, etc.
Currently, this utility only handles OpenIOC v1.0 documents. We should add support for the newer version, OpenIOC v1.1.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.