Skip to main content

Simple python package for finding indicators of compromise in text.

Project description

MIT License

Copyright (c) 2018, Floyd Hightower

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


Description: *******************************
IOC Finder
*******************************

.. image:: https://img.shields.io/pypi/v/ioc_finder.svg
:target: https://pypi.python.org/pypi/ioc_finder

.. image:: https://img.shields.io/travis/fhightower/ioc-finder.svg
:target: https://travis-ci.org/fhightower/ioc-finder

.. image:: https://codecov.io/gh/fhightower/ioc-finder/branch/master/graph/badge.svg
:target: https://codecov.io/gh/fhightower/ioc-finder

.. image:: https://api.codacy.com/project/badge/Grade/6927955d30df40f395aa8adbd7b8bfe4
:alt: Codacy Badge
:target: https://www.codacy.com/app/fhightower/ioc-finder

Find `indicators of compromise <https://searchsecurity.techtarget.com/definition/Indicators-of-Compromise-IOC>`_ in text.

Capabilities
============

Currently, this package can the following items in a given text:

- IP address (IPv4 and IPv6)
- Email addresses (both standard format (e.g. ``test@example.com``) and an email with an IP address as the domain (e.g. ``test@[192.168.0.1]``))
- Hosts (including unicode domain names (e.g. ``ȩxample.com``))
- URLs
- File Hashes (sha256, sha1, and md5)

Also provides some helpful features like:

- Ability to remove an indicator type after it is parsed - For example, this is helpful if you do not want to parse the host name from a URL. You can setup IOC Finder to remove all URLs from the text after it parses them.
- Ability to set order in which IOCs are parsed

Installation
============

To install this package:

.. code-block:: shell

pip install ioc_finder

Usage
=====

To use this package:

.. code-block:: python

from ioc_finder import find_iocs
text = "This is just an example.com"
iocs = find_iocs(text)
print('Domains: {}'.format(iocs['domain']))

See `test_ioc_finder.py <https://github.com/fhightower/ioc-finder/blob/master/tests/test_ioc_finder.py>`_ for more examples.

Credits
=======

Many of the elements of this package also exist in `https://github.com/mosesschwartz/extract_iocs <https://github.com/mosesschwartz/extract_iocs>`_ which I've contributed to in the past.

This package was created with Cookiecutter_ and the `fhightower-templates/python-project-template`_ project template.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`fhightower-templates/python-project-template`: https://github.com/fhightower-templates/python-project-template

Keywords: ioc_finder
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ioc_finder-0.1.5.tar.gz (6.3 kB view hashes)

Uploaded Source

Built Distribution

ioc_finder-0.1.5-py2.py3-none-any.whl (8.6 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page