Skip to main content

Generate random STIX 2 content.

Project description

Build_Status Coverage Version

cti-stix-generator

This is an OASIS TC Open Repository. See the Governance section for more information.

The STIX generator is a tool for generating random STIX content for prototyping and testing. It uses a simple, sentence-like syntax for expressing what STIX content to generate. This tool is provided in two forms: as a Jupyter notebook and as a commandline tool.

For more information, see the documentation on ReadTheDocs.

Jupyter Notebook

The Jupyter notebook provides an interactive environment to input generator syntax and view the generated content. To use the notebook, install the generator’s dependencies including the jupyter extras, and run Jupyter:

pip install -e .[jupyter]
jupyter nbextension install stix2viz --py
jupyter nbextension enable stix2viz --py
jupyter notebook

Open stix.ipynb in Jupyter to use the tool. Look at examples.ipynb for documentation and examples of the syntax.

Commandline Tool

The commandline version of the tool reads prototyping language from a file, and prints the generated objects to stdout. If a bundle is selected, the bundle is printed instead.

usage: build_stix.py [-h] [-b] [-e ENCODING] [-v] [--stix-version {2.0,2.1}]
                     [--extra-specs EXTRA_SPECS] [-m]
                     language-file

Create STIX content from the STIX prototyping language

positional arguments:
  language-file         The file containing STIX prototyping language

optional arguments:
  -h, --help            show this help message and exit
  -b, --bundle          Create a bundle
  -e ENCODING, --encoding ENCODING
                        Encoding to use when reading text files, e.g. STIX
                        prototyping language, custom generator specifications,
                        etc. Default=utf-8
  -v, --verbose         Enable verbose diagnostic output. Repeat for increased
                        verbosity.
  --stix-version {2.0,2.1}
                        STIX version to use. Default=2.1
  --extra-specs EXTRA_SPECS
                        A JSON file with extra object generator
                        specifications. These will be merged with the built-in
                        specifications, and made available for use in
                        prototyping language content.
  -m, --minimize-refs   Minimize reference properties in generated objects
                        (*_ref and *_refs).

Caveats

The tool generates random data for all properties, so it may be nonsensical but will have the correct datatype or structure according to the STIX specification.

The object generator currently only generates STIX 2.1 objects. The commandline tool and some APIs will error out if any STIX version other than “2.1” is used.

Governance

This GitHub public repository cti-stix-generator was created at the request of the OASIS Cyber Threat Intelligence (CTI) TC <https://www.oasis-open.org/committees/cti/>`__as an `OASIS TC Open Repository to support development of open source resources related to Technical Committee work.

While this TC Open Repository remains associated with the sponsor TC, its development priorities, leadership, intellectual property terms, participation rules, and other matters of governance are separate and distinct from the OASIS TC Process and related policies.

All contributions made to this TC Open Repository are subject to open source license terms expressed in the BSD-3-Clause License. That license was selected as the declared applicable license when the TC Open Repository was created.

As documented in Public Participation Invited, contributions to this OASIS TC Open Repository are invited from all parties, whether affiliated with OASIS or not. Participants must have a GitHub account, but no fees or OASIS membership obligations are required. Participation is expected to be consistent with the OASIS TC Open Repository Guidelines and Procedures, the open source LICENSE designated for this particular repository, and the requirement for an Individual Contributor License Agreement that governs intellectual property.

Maintainers

TC Open Repository Maintainers are responsible for oversight of this project’s community development activities, including evaluation of GitHub pull requests and preserving open source principles of openness and fairness. Maintainers are recognized and trusted experts who serve to implement community goals and consensus design preferences.

Initially, the TC members have designated one or more persons to serve as Maintainer(s); subsequently, participating community members may select additional or substitute Maintainers, by consensus agreements.

Current Maintainers of this TC Open Repository

About OASIS TC Open Repositories

Feedback

Questions or comments about this TC Open Repository’s activities should be composed as GitHub issues or comments. If use of an issue/comment is not possible or appropriate, questions may be directed by email to the Maintainer(s) listed above.

Please send general questions about TC Open Repository participation to OASIS Staff at repository-admin@oasis-open.org and any specific CLA-related questions to repository-cla@oasis-open.org.

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

stix2-generator-0.1.0.tar.gz (73.0 kB view hashes)

Uploaded Source

Built Distribution

stix2_generator-0.1.0-py2.py3-none-any.whl (80.1 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