Coder Social home page Coder Social logo

carbonblack / cb-taxii-connector Goto Github PK

View Code? Open in Web Editor NEW
15.0 15.0 8.0 744 KB

Connector for pulling and converting STIX information from TAXII Service Providers into CB Feeds.

License: MIT License

Shell 3.95% Python 89.92% Kotlin 2.68% Dockerfile 0.66% HTML 2.80%

cb-taxii-connector's People

Contributors

zacharyestep avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cb-taxii-connector's Issues

Does not recognize removed entries from a Taxii feed

I know it does not currently recognize reports (STIX) removed from a Taxii feed, but I wanted to suggest an option:

  • Request a pull from taxii with a start deep in the past (maybe leave the ability specify the start date), and end of now.
  • Hourly request an update for the last hour.
  • Daily, pull the entire feed again some time before the nightly CB full feed fetch
  • Let Carbon Black handle the feed management with the daily refresh

I think this will allow the Taxii feed integration handle deleted entries from Taxii.

Possible issue with README.md

Hello,
I might just be doing it wrong, but it appears some of the sample commands in the README.md are not correct.

Line 151: /usr/share/cb/integrations/cbtaxii/cbtaxii -c /etc/cb/integrations/cbtaxii/cbtaxii.conf
This does work for me after the latest upgrade, I get /usr/share/cb/integrations/cbtaxii/cb-taxii-connector: command not found. If instead, I use /usr/share/cb/integrations/cbtaxii/bin/cb-taxii-connector -c /etc/cb/integrations/cbtaxii/cbtaxii.conf then it works.

Line 166: /usr/share/cb/integrations/cbtaxii/cbtaxii -c /etc/cb/integrations/cbtaxii/cbtaxii.conf -l
Same issue as above, but if I try the alternative path get unrecognized argumets: -l.

Line 183: /usr/share/cb/integrations/cbtaxii/cbtaxii -c /etc/cb/integrations/cbtaxii/cbtaxii.conf --export
Same as the first issue.

If my change in pathing is correct, I would be happy to try and make the necessary changes.

Regards

TAXII connector re-enables deleted fees in Carbon Black

If I delete a feed int he Carbon Black GUI and the integration finds the same feed on the TAXII server again, it will re-import then enable both the deleted feed and the new feed so it appears I have double reports. I think the integration should honor the deleted flag in the database.

subscription_id support

Have feeds that require subscription_id support. Example requirement: "For each subscription, you will receive a subscription ID. This must be present in all Poll_Requests as the value of the “subscription_id” attribute".

Parse IP:port from IP addresses in input

Some data sources report IP addresses with a port number (IP:port) in the IP address field. Right now the entire record is rejected; we should strip off the port and add the IP address in the feed instead.

IP address validation only validates lists, not individual entries

https://github.com/carbonblack/cb-taxii-connector/blob/master/cbopensource/connectors/taxii/cybox_parse.py#L169

The parsing for IPv4 addresses validates the format of lists of IPs via validate_ip_address() and fails cleanly on unexpected inputs, but does not validate individual entries. (e.g., the else block)

If an individual Address entry is malformed, it results in the bad IP address being included in the list of IOCs and a hard fail later in processing (e.g., on feed.dump()).

We should update the else block to call validate_ip_address()


Below is stack trace that triggered this, note the IP address we tried to parse in the feed validation contains an URL. That's a bug in the feed - our bug is we failed hard instead of cleanly.

2017-05-17 08:51:11,904 Sending Poll_Request to https://analysis.foo.com/taxii-data
2017-05-17 08:51:18,787 content blocks read: 2194
2017-05-17 08:51:18,788 current number of reports: 4701
2017-05-17 08:51:18,788 Found 4701 new reports.
2017-05-17 08:51:18,804 Total number of reports: 8860
2017-05-17 08:51:19,363 Traceback (most recent call last):
  File "cbopensource/connectors/taxii/bridge.py", line 468, in runner
  File "cbopensource/connectors/taxii/bridge.py", line 446, in perform
  File "cbopensource/connectors/taxii/bridge.py", line 344, in _import_collection
  File "cbopensource/connectors/taxii/cb_feed_util.py", line 116, in build_feed_data
  File "cbfeeds/feed.py", line 28, in dump
  File "cbfeeds/feed.py", line 91, in validate
  File "cbfeeds/feed.py", line 348, in validate
CbInvalidReport: Malformed IPv4 (1.2.3.4/zeco/panelnew/gate.php) addr in IOC list for report foo-Observable-eeb1d830-ac39-49f0-9317-57ae9b42eb3b

Arbitrary STIX file

It would be useful to include the ability to import arbitrary STIX data from a file. Many orgs get this information by file and don't have the resources to host their own STIX server

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.