Commit graph

41 commits

Author SHA1 Message Date
Christopher Talib 1528c28d7e Changing Type to NodeType to avoid issues 2020-08-28 15:55:18 +02:00
Christopher Talib fe01a9240f Parsing shodan, not droppping DB
* Adding Certstream and Shodan matchers
* Insert or skip for new matchers (working without having to drop the DB
and not more duplicate matchers)
* Closing files after using them
* Adding Match model to schema and Node (for unmarshalling purposes)
2020-06-10 10:48:47 +02:00
Christopher Talib 929222aff4 Parallel matching on multiple targets work 2020-06-08 10:49:19 +02:00
Christopher Talib 3961e79062 Matcher logic and IOCs
This work starts to build the matcher logic into styx. For the moment,
the goal is to define IOCs and load them when the Matcher plugin is
activated.

To implement: Then, the matcher will run periodic queries to different
types of nodes and index them to its one Matcher Dgraph Node. So be
targetting a specific IOCs, the user will be able to list the
observation that have been made to it.
2020-05-29 11:32:55 +02:00
Christopher Talib 9547aeea3f basic matching on simple target, no sending to dgraph 2020-05-27 12:05:53 +02:00
Christopher Talib 9fa5d13bf6 Full text search and indexing some keywords
Some of keywords are indexed and open for full text search, please refer
to the README for more details.

CertStream, Pastebin and Shodan are running as services and can be
searched.

Next steps: building the matcher and creating edges.
2020-05-20 10:03:28 +02:00
Christopher Talib 7163147a4f Pastebin nodes simple
Pastebin data is also sent to Dgraph and can be queried.
2020-05-19 10:10:42 +02:00
Christopher Talib b1ca4b3c5f Shodan in Dgraph, first part
Implementing first version for shodan node, missing yet some models, but
the overal approach works and can be queried in Ratel.
2020-05-18 16:09:04 +02:00
Christopher Talib cbdca52ab2 Simple linked model on certstream + better install instructions 2020-05-18 10:22:08 +02:00
Christopher Talib d0c8deae99 saving 2020-03-19 09:27:15 +01:00
Christopher Talib f61fe566a5 Basic connection to Dgraph DB
The first work and input to the graph db is set up in this work. It's
for the moment very basic and doesn't cover relations and only works for
certstream data.
2020-03-04 15:16:59 +01:00
Christopher Talib b72e82071d saving 2020-03-02 17:06:28 +01:00
Christopher Talib b2da64a9d7 Enh/modular arch 2020-02-25 10:05:31 +01:00
Christopher Talib afd99c0a4d Adding balboa enrichment for domains and hostnames + documentation 2020-02-07 17:39:33 +01:00
Christopher Talib 01f7ae70b9 Renaming CertStreamWrapper to CertStreamRaw for more clarity 2020-02-07 15:50:21 +01:00
Christopher Talib c7a52c527a Refactoring saving single value into a helper, adding meta names to main nodes and edges 2020-02-07 15:27:14 +01:00
Christopher Talib cc87dab922 Cleaning up and and reorganizing the models package 2020-02-06 17:13:19 +01:00
Christopher Talib b5caae0974 Shodan connector and saving up and running 2020-02-06 17:01:37 +01:00
Christopher Talib a321b46d0f Adding chained items to parent object in certstream 2020-02-05 15:57:30 +01:00
Christopher Talib efde1a4a54 Building ID on certnode 2020-02-04 10:58:56 +01:00
Christopher Talib 380e51229b Building nodes, certnode, and edges 2020-02-04 10:57:14 +01:00
Christopher Talib 00bfb5eaaf First implementation of certnode 2020-02-04 10:53:09 +01:00
Christopher Talib 0cd0faa6fa Working pastebin connector with parallel running with certstream
Parallel running of Certstream and Pastebin connectors in go routine
with wait groups to exit them properly.
2020-02-03 10:01:52 +01:00
Christopher Talib b9a2e73e33 Working version capturing CertStream saving raw, nodes and edges.
There was some problem with my editor and lost some code, this work is
fixing that and adding new features. Current state of the code:
* capturing CertStream traffic
* saving raw certstream objects in a custom wrapper
* extracting fingerprints and domains from the certstream object
* saving fingerprints and domains nodes and edges between them.
* fingerprint is linked to the raw certstream object with an edge
* saving to files with customizable names (raw in code)

broker:
* kafka connection and test
* no sending of data to it for the moment
2020-01-29 12:47:01 +01:00
Christopher Talib b9f0ac688c Removing extract.go file and refactoring the adhoc functions to files with name of the service 2020-01-29 11:05:05 +01:00
Christopher Talib 668686fbab Saving edges and node from CertStream traffic.
This work extracts fingerprints and domains from CertStream data
structure received through the stream. It builds nodes and edges and
saves them to the relevant files. It sends this data to Kafka but no
logic is implemented at the exit of the broker yet.
2020-01-29 11:02:19 +01:00
Christopher Talib 67aecd65c1 Saving edges and node from CertStream traffic.
This work extracts fingerprints and domains from CertStream data
structure received through the stream. It builds nodes and edges and
saves them to the relevant files. It sends this data to Kafka but no
logic is implemented at the exit of the broker yet.
2020-01-29 10:03:52 +01:00
Christopher Talib de0c5bfe83 Setting up linking and and creating nodes already from the input source 2020-01-28 23:52:24 +01:00
Christopher Talib 7785372e3a Refactoring from utils to models
This work refactors saving and extracting function from the utils
package to the models package as it is a main component of the tool.
`utils` will take care of not related to models functions (such as
finding the files for example).

Also creating unique files for each type of source we are parsing.
2020-01-28 16:02:17 +01:00
Christopher Talib e4cc92e100 First work on Pastebin parser 2020-01-26 17:27:20 +01:00
Christopher Talib a0d2761c4e Adding RFC3339 times 2020-01-26 17:26:03 +01:00
Christopher Talib 7cbb7e9180 Cleaning and working write/read to kafka and saving objects 2020-01-23 14:36:24 +01:00
Christopher Talib 2548c19ca4 saving 2020-01-23 13:13:59 +01:00
Christopher Talib d33b293e7c Read/write from Kafka, simpler structure with plain data and not pointers 2020-01-22 15:01:07 +01:00
Christopher Talib 48cc976595 Adding a consummer for Kafka, WIP 2020-01-21 16:50:50 +01:00
Christopher Talib 06f42fc472 Moving SendToKafka function to broker package 2020-01-17 14:02:52 +01:00
Christopher Talib e9c065bcc8 Setting up connector to Kafka and sending consummed and formatted Nodes to Kafka 2020-01-16 15:56:57 +01:00
Christopher Talib e6cbfc6466 Changing IDs to stix compatible format 2020-01-16 12:06:03 +01:00
Christopher Talib 6eaae99668 Extracting structures from CertStream
This work builds an extractor for the data in the CertStream in order to
save it. It builds itself from the previous work, so extensions and
flags can be added to the structures. The work in `utils` is basically a
big extractor for the data taking advantage of the JSONq library.

Currently, there is not refactoring and the "chains" are not saved
because they need additionnal computation which will come in a later
commit.
2020-01-15 14:36:53 +01:00
Christopher Talib b7dce16c9e Adding unpacking in JSON format, and types for certstream format 2020-01-14 16:31:57 +01:00
Christopher Talib 7d741f4cf3 Basic read/write implementation with output in JSON 2020-01-14 14:49:14 +01:00