Sameer-Ambilpure/-OpenCTI-Powered-Threat-Intelligence-and-IOC-Correlation-Dashboard
GitHub: Sameer-Ambilpure/-OpenCTI-Powered-Threat-Intelligence-and-IOC-Correlation-Dashboard
基于 OpenCTI 平台的威胁情报与 IOC 关联仪表盘项目,通过官方 Python 客户端(pycti)封装 OpenCTI API,提供便捷的情报管理与指标关联分析能力。
Stars: 0 | Forks: 0
# OpenCTI 威胁情报与 IOC 关联仪表盘
[](https://opencti.io)
[](https://circleci.com/gh/OpenCTI-Platform/client-python/tree/master)
[](https://opencti-client-for-python.readthedocs.io/en/latest/)
[](https://github.com/OpenCTI-Platform/client-python/releases/latest)
[](https://pypi.python.org/pypi/pycti/)
[](https://community.filigran.io)
官方 OpenCTI Python 客户端通过提供易于使用的方法和工具,帮助开发者使用 OpenCTI API。
此客户端也被一些 OpenCTI 组件所使用。
## 安装
要安装最新的 Python 客户端库,请使用 `pip`:
```
$ pip3 install pycti
```
## 本地开发
```
# Fork 当前仓库,然后 clone 你的 fork
$ git clone https://github.com/YOUR-USERNAME/client-python
$ cd client-python
$ git remote add upstream https://github.com/OpenCTI-Platform/client-python.git
# 为你的 feature/fix 创建分支
$ git checkout -b [branch-name]
# 创建 virtualenv
$ python3 -m venv .venv
$ source .venv/bin/activate
# 安装用于开发和文档的 client-python 及依赖
$ python3 -m pip install -e .[dev,doc]
# 设置 git hook 脚本
$ pre-commit install
# 创建你的 feature/fix
# 为你的更改创建测试
$ pytest
# 在 Github 上推送你的 feature/fix
$ git add [file(s)]
$ git commit -m "[descriptive message]"
$ git push origin [branch-name]
# 发起 pull request
```
### 在本地安装该包
```
$ pip install -e .
```
## 测试
### 安装依赖
```
$ pip install -r ./test-requirements.txt
```
使用 [pytest](https://docs.pytest.org/en/7.2.x/) 来运行测试。
### 启动测试
#### 前置条件
您的 OpenCTI API 应当处于运行状态。
您的 `conftest.py` 应当配置好您的 API URL、您的 token,以及(如果适用的话)您的 mTLS 证书/密钥。
#### 启动
单元测试
```
$ pytest ./tests/01-unit/
```
集成测试
```
$ pytest ./tests/02-integration/
```
示例测试:
```
cd examples
# 使用你的本地 OpenCTI 实例进行配置
export OPENCTI_API_URL="http://localhost:4000"
export OPENCTI_API_TOKEN="xxxxxxxxxxxxxxxxxxxxxx"
#Run one example file
python get_indicators_of_malware.py
```
标签:API集成, IOC关联, OpenCTI, pycti, Python客户端, Shodan, 可观测性, 威胁分析, 威胁情报, 安全仪表盘, 安全规则引擎, 安全运营, 开发者工具, 扫描框架, 网络安全, 自动化侦查工具, 逆向工具, 隐私保护