Skip to main content

OpenSTIX aims to make STIX easy and accessible for analysts

Project description

OpenSTIX

OpenSTIX is an unofficial STIX 2.1 library and toolkit built upon the foundations of the STIX2 library, aimed at enhancing the efficiency and productivity of cybersecurity professionals. It's developed and maintained by AbuseTotal, a startup committed to delivering high-quality software solutions in the cybersecurity domain.

PyPI version

Features

  • Modular Design: Organizes the functionalities provided by STIX2 library into modules for easy consumption and extension.
  • Workspace Class: Extends the Environment class into a Workspace class to facilitate seamless creation, removal, and management of STIX SDOs (Structured Data Objects) based on contributing properties.
  • Static Namespace Management: Allows users to define a static namespace for their organization, ensuring consistent identification and management across STIX objects.
  • Contributing Properties-based ID Management: Enables operations on STIX SDOs with identical IDs, governed by specific contributing properties.
  • Built-in Datasets: Provides ready-to-use datasets including MITRE frameworks, geolocations, custom TLP markings, and industries to expedite the analytical process.
  • Custom Objects and Extensions: Offers custom objects and extensions to assist analysts with additional informational resources such as Whois and DNS-Records.

Installation

pip install openstix

Usage

Import the necessary modules and get started with creating and managing STIX objects within your defined workspace.

Start workspace

from openstix.toolkit.workspace import Workspace

# Create a new workspace with your organization's namespace
workspace = Workspace(namespace="<your-namespace-uuid>")

Parse and load stix data into workspace

data = """
{
    "type": "bundle",
    "id": "bundle--0ef10afc-6a6b-4df7-bc4b-099977bfcba8",
    "objects": [
        {
            "type": "domain-name",
            "spec_version": "2.1",
            "id": "domain-name--9076dffc-9b97-55f6-a720-bc115b25fe31",
            "value": "openstix.dev"
        }
    ]
}
"""

# Parse STIX data and load automatically the objects in workspace
workspace.parse(data)

Create SCO within workspace

from openstix.objects import DomainName

# Add STIX observable object (SCO)
domain = self.workspace.create(Domain, value="abusetotal.com")

Remove object from workspace

# Remove STIX observable object (SCO)
self.workspace.remove(domain.id)

Create SDO within workspace

from openstix.objects import Malware

# Add STIX domain object (SDO)
self.workspace.create(Malware, name="Malicious", is_family=False)

Filter workspace objects using presets filters

from openstix.toolkit.filters.presets import MALWARE_FILTER

# Filter objects using presets
malwares = self.workspace.query(MALWARE_FILTER)

Download STIX datasets

$ openstix datasets download --all

Get MITRE TTP using MITRE Datasets

Note: make sure you have downloaded the dataset using openstix cli

from openstix.datasets import MITREDataset

dataset = MITREDataset()
dataset.load()

# Use Attack Pattern objects from MITRE Dataset
attack_pattern = dataset.attack_pattern("T1090")

Get country and regions objects using GeoLocation Datasets

Note: make sure you have downloaded the dataset using openstix cli

from openstix.datasets import GeoLocationsDataset

dataset = GeoLocationsDataset()
dataset.load()

# Use Location objects from GeoLocation Dataset
country = dataset.country("PT")
region = dataset.region("Europe")

Contributing

We welcome contributions to OpenSTIX! Whether you're reporting bugs, proposing new features, or contributing code, we appreciate your help. Please make sure to read our Contributing Guidelines before making a contribution.

License

OpenSTIX is licensed under the Apache 2.0.

Contact

For any inquiries, issues, or support related to OpenSTIX, feel free to reach out to us at support@abusetotal.com.

Acknowledgements

OpenSTIX is an initiative by AbuseTotal to foster the development of cybersecurity tools and libraries. We thank the OASIS Cyber Threat Intelligence Technical Committee and all STIX community for laying down the robust foundation upon which OpenSTIX is built.

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

openstix-0.1.8.tar.gz (16.2 kB view details)

Uploaded Source

Built Distribution

openstix-0.1.8-py3-none-any.whl (22.2 kB view details)

Uploaded Python 3

File details

Details for the file openstix-0.1.8.tar.gz.

File metadata

  • Download URL: openstix-0.1.8.tar.gz
  • Upload date:
  • Size: 16.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for openstix-0.1.8.tar.gz
Algorithm Hash digest
SHA256 69517c9fe5f86e88bded38460dc454c7e7e55fd55ad0189d0685a428db0105d5
MD5 65f93bd81706b67a4a7a4e406f10135a
BLAKE2b-256 0c218bee62adefabc5a5dbb2e0e8aaabb95109b749570644e8306076ed6a73d4

See more details on using hashes here.

File details

Details for the file openstix-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: openstix-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 22.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for openstix-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 5c224b49d8fb70bc5021ef61a22fcb3b8b8583957460df574da4d43843af11dd
MD5 fdacb440d18d54d0c45011d9c2cccc70
BLAKE2b-256 cabe9117310d44bc0256821220609b2db8c868d2c67f78da795aa9c5281357e5

See more details on using hashes here.

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