ioc-typing


Nameioc-typing JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
SummaryA Python library for identifying and classifying Indicators of Compromise (IOCs)
upload_time2024-12-16 21:34:32
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseMIT License Copyright (c) 2024 Jan Wychowaniak 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.
keywords security ioc classifier cyber-security
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # IOC Typing (a classifier)

A Python library for identifying and classifying various types of Indicators of Compromise (IOCs). IOCs are forensic artifacts that indicate potential security breaches, malware infections, or other malicious activities in a system or network.

## Installation

From PyPI (stable release):
```bash
pip install ioc-typing
```

For development:
```bash
git clone https://github.com/janwychowaniak/ioc-typing.git
cd ioc-typing
pip install -e ".[dev]"  # or "make dev" for easily creating a local venv
```

## Usage

Basic usage:
```python
from ioc_typing import IOCClassifier

classifier = IOCClassifier()

# Classify different types of IOCs
print(classifier.classify("192.168.1.1"))          # Output: IP_ADDRESS
print(classifier.classify("evil.com"))             # Output: DOMAIN
print(classifier.classify("44d88612fea8a8f36de82e1278abb02f")) # Output: MD5_HASH
```

Batch classification:
```python
iocs = [
    "192.168.1.1",
    "https://pages.info/malware.exe",
    "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824",
    "not an IOC"
]

for ioc in iocs:
    ioc_type = classifier.classify(ioc)
    print(f"{ioc}: {ioc_type['type_pri']}")
```

## Features

- Identifies multiple IOC types:
  - IP addresses (IPv4 and IPv6)
  - Domain names
  - URLs
  - File hashes (MD5, SHA1, SHA256)
  - as well as non-IOCs (e.g. random strings)
- Fast and accurate classification using optimized regex patterns
- Zero dependencies for core functionality
- Comprehensive test suite ensuring reliability
- Easy integration with existing security tools and SIEM systems

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

[MIT](LICENSE)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ioc-typing",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "security, ioc, classifier, cyber-security",
    "author": null,
    "author_email": "Jan Wychowaniak <43786923+janwychowaniak@users.noreply.github.com>",
    "download_url": "https://files.pythonhosted.org/packages/4b/fc/860c0b29d82fd44ec4a8a794e52999b87e7e22d23af13d0f90fb18c4cbde/ioc_typing-0.1.0.tar.gz",
    "platform": null,
    "description": "# IOC Typing (a classifier)\n\nA Python library for identifying and classifying various types of Indicators of Compromise (IOCs). IOCs are forensic artifacts that indicate potential security breaches, malware infections, or other malicious activities in a system or network.\n\n## Installation\n\nFrom PyPI (stable release):\n```bash\npip install ioc-typing\n```\n\nFor development:\n```bash\ngit clone https://github.com/janwychowaniak/ioc-typing.git\ncd ioc-typing\npip install -e \".[dev]\"  # or \"make dev\" for easily creating a local venv\n```\n\n## Usage\n\nBasic usage:\n```python\nfrom ioc_typing import IOCClassifier\n\nclassifier = IOCClassifier()\n\n# Classify different types of IOCs\nprint(classifier.classify(\"192.168.1.1\"))          # Output: IP_ADDRESS\nprint(classifier.classify(\"evil.com\"))             # Output: DOMAIN\nprint(classifier.classify(\"44d88612fea8a8f36de82e1278abb02f\")) # Output: MD5_HASH\n```\n\nBatch classification:\n```python\niocs = [\n    \"192.168.1.1\",\n    \"https://pages.info/malware.exe\",\n    \"2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824\",\n    \"not an IOC\"\n]\n\nfor ioc in iocs:\n    ioc_type = classifier.classify(ioc)\n    print(f\"{ioc}: {ioc_type['type_pri']}\")\n```\n\n## Features\n\n- Identifies multiple IOC types:\n  - IP addresses (IPv4 and IPv6)\n  - Domain names\n  - URLs\n  - File hashes (MD5, SHA1, SHA256)\n  - as well as non-IOCs (e.g. random strings)\n- Fast and accurate classification using optimized regex patterns\n- Zero dependencies for core functionality\n- Comprehensive test suite ensuring reliability\n- Easy integration with existing security tools and SIEM systems\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\n[MIT](LICENSE)\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 Jan Wychowaniak  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. ",
    "summary": "A Python library for identifying and classifying Indicators of Compromise (IOCs)",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/janwychowaniak/ioc-typing"
    },
    "split_keywords": [
        "security",
        " ioc",
        " classifier",
        " cyber-security"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "79b37fb1f4bfab8b72ce8d7e90b10d8472ca6ae41b3c8e2542314f4444b0497d",
                "md5": "68c7c4bf915b7f75b55f707d9dada2b9",
                "sha256": "595ec78787242ee2a72586f6f8ceabee5715701be76093caf006035b5b9799c1"
            },
            "downloads": -1,
            "filename": "ioc_typing-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "68c7c4bf915b7f75b55f707d9dada2b9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 5961,
            "upload_time": "2024-12-16T21:34:29",
            "upload_time_iso_8601": "2024-12-16T21:34:29.694157Z",
            "url": "https://files.pythonhosted.org/packages/79/b3/7fb1f4bfab8b72ce8d7e90b10d8472ca6ae41b3c8e2542314f4444b0497d/ioc_typing-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4bfc860c0b29d82fd44ec4a8a794e52999b87e7e22d23af13d0f90fb18c4cbde",
                "md5": "66aef9779c44e848056909dbcfd7c672",
                "sha256": "047c9cb731569c1995b6d031b78ef2060392b4b116d61ff508c1fce9b9147876"
            },
            "downloads": -1,
            "filename": "ioc_typing-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "66aef9779c44e848056909dbcfd7c672",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 7221,
            "upload_time": "2024-12-16T21:34:32",
            "upload_time_iso_8601": "2024-12-16T21:34:32.324551Z",
            "url": "https://files.pythonhosted.org/packages/4b/fc/860c0b29d82fd44ec4a8a794e52999b87e7e22d23af13d0f90fb18c4cbde/ioc_typing-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-16 21:34:32",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "janwychowaniak",
    "github_project": "ioc-typing",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "tox": true,
    "lcname": "ioc-typing"
}
        
Elapsed time: 0.38723s