Introduction
cyjax-cti is a Python library to use Cyjax platform API. You can access different resources (incident reports,
threat actors, indicators of compromise, etc.) from a Python script.
The library is available on Python Package Index.
Install
You can install the cyjax-cti library with pip:
pip install cyjax-cti
Supported resources
| Resource class | Methods |
|---|---|
| Dashboard | list, list_widgets, get_table_widget, get_mitre_widget, get_metric_widget, get_map_widget, get_counter_widget |
| DataBreach | one, list |
| IncidentReport | one, list |
| IndicatorOfCompromise | list, enrichment |
| LeakedEmail | one, list, search |
| MaliciousDomain | list |
| Paste | one, list |
| SocialMedia | one, list |
| Supplier | create, delete, one, list, update |
| TailoredReport | one, list |
| ThreatActor | list |
| Tier | list |
| TorExitNode | one, list |
| Tweet | list |
Examples
Set the API key
import cyjax
# set a global API key
cyjax.api_key = "346568ecf85f0b5ca98f389908e8b803"
# set a resource API key
cyjax.IndicatorOfCompromise(api_key="346568ecf85f0b5ca98f389908e8b803")
Get indicators of compromise in the last 5 minutes
import cyjax
from datetime import timedelta
cyjax.api_key = "346568ecf85f0b5ca98f389908e8b803"
indicators = cyjax.IndicatorOfCompromise().list(since=timedelta(minutes=5))
for indicator in indicators:
print(indicator)
Get APT activity in last 6 months
import cyjax
from datetime import timedelta
cyjax.api_key = "346568ecf85f0b5ca98f389908e8b803"
reports = cyjax.IncidentReport().list(query="APT", since=timedelta(days=30*6))
for report in reports:
print("Title: {}" % report['title'])
print("Severity: {}" % report['severity'])
print("Timestamp: {}" % report['last_update'])
Get leaked emails in the last 30 days
import cyjax
from datetime import timedelta
cyjax.api_key = "346568ecf85f0b5ca98f389908e8b803"
for leaked_email in cyjax.LeakedEmail().list(since=timedelta(days=30)):
print("Email: {}" % leaked_email['email'])
print("Source: {}" % leaked_email['source'])
print("Timestamp: {}" % leaked_email['discovered_at'])
Get incident report by ID
import cyjax
cyjax.api_key = "346568ecf85f0b5ca98f389908e8b803"
incident_report = cyjax.IncidentReport().one(10)
print("Report title: {}" % incident_report.get('title'))
print("Report severity: {}" % incident_report.get('severity'))
print("Report content: {}" % incident_report.get('content'))
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cyjax-cti-2.1.0.tar.gz
(47.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
cyjax_cti-2.1.0-py3-none-any.whl
(86.9 kB
view details)
File details
Details for the file cyjax-cti-2.1.0.tar.gz.
File metadata
- Download URL: cyjax-cti-2.1.0.tar.gz
- Upload date:
- Size: 47.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/3.8.0 pkginfo/1.10.0 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.20 tqdm/4.64.1 importlib-metadata/4.2.0 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd3027f37346d70d9a27a38cb7f314fcad51a74583c14714a68db17ae55790b0
|
|
| MD5 |
2688f27fad0ad912e764f6b0c8fae107
|
|
| BLAKE2b-256 |
c87ec76550fc6a9fd2ebe622d4e1906df809e9ded49c2eaca04a395fff1cc681
|
File details
Details for the file cyjax_cti-2.1.0-py3-none-any.whl.
File metadata
- Download URL: cyjax_cti-2.1.0-py3-none-any.whl
- Upload date:
- Size: 86.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/3.8.0 pkginfo/1.10.0 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.20 tqdm/4.64.1 importlib-metadata/4.2.0 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be1533be44c6fce59aed2d68e7198b614acb5c2b672622714d2b944a0f066b1f
|
|
| MD5 |
ce6cdd38fab0a5630f9063c3e6bd77f8
|
|
| BLAKE2b-256 |
0ccc4eb40b7f479c6683736d47e2453afc26d758b46f1749451ffd0b10cfeb4e
|