赞
踩
前言:关于OpenCTI的简介就不相信说明了,本篇重点在搭建环节。之前调研过OpenCTI平台一段时间,但是建立在官网的demo体验之上,最近抽出一些时间自己搭建了OpenCTI平台,整个搭建过程没有花费太多时间,搭建步骤及遇到的问题及解决办法总结如下,希望能对大家的入门提供一些力所能及的帮助。
官网提供了四种部署方式,详情请参考官方文档。
yum install -y yum-utils device-mapper-persistent-data lvm2 git
curl -sSL https://get.daocloud.io/docker | sh
sudo systemctl daemon-reload
sudo systemctl restart docker
docker -v
curl -L https://get.daocloud.io/docker/compose/releases/download/v2.1.1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
docker-compose -v
cd /home/open_cti/
git clone https://github.com/OpenCTI-Platform/docker.git
yum install -y jq
(cat <<EOF
OPENCTI_ADMIN_EMAIL=admin@opencti.io
OPENCTI_ADMIN_PASSWORD=PLEASECHANGEME
OPENCTI_ADMIN_TOKEN=$(cat /proc/sys/kernel/random/uuid)
MINIO_ROOT_USER=$(cat /proc/sys/kernel/random/uuid)
MINIO_ROOT_PASSWORD=$(cat /proc/sys/kernel/random/uuid)
RABBITMQ_DEFAULT_USER=guest
RABBITMQ_DEFAULT_PASS=guest
CONNECTOR_HISTORY_ID=$(cat /proc/sys/kernel/random/uuid)
CONNECTOR_EXPORT_FILE_STIX_ID=$(cat /proc/sys/kernel/random/uuid)
CONNECTOR_EXPORT_FILE_CSV_ID=$(cat /proc/sys/kernel/random/uuid)
CONNECTOR_IMPORT_FILE_STIX_ID=$(cat /proc/sys/kernel/random/uuid)
CONNECTOR_IMPORT_REPORT_ID=$(cat /proc/sys/kernel/random/uuid)
EOF
) > .env
注意:修改以下两个参数
OPENCTI_ADMIN_EMAIL=登录账户邮箱
OPENCTI_ADMIN_PASSWORD=登录账户密码
source .env
echo "vm.max_map_count=1048575" >> /etc/sysctl.conf
docker-compose pull
注意:
在拉取镜像的过程中可能会存在问题:Error response from daemon: Get https://docker.elastic.co/v2/: x509: certificate signed by unknown authority
解决方式:
(1)获取证书信息
openssl s_client -connect docker.elastic.co:443 -showcerts
(2)拷贝证书内容,注:从-----BEGIN CERTIFICATE----- 到 -----END CERTIFICATE-----的全部内容,cert中包含两个-----BEGIN CERTIFICATE----- 和两个-----END CERTIFICATE-----,这两部分内容都要拷贝(也即以下内容全部拷贝)。
-----BEGIN CERTIFICATE-----
something…
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
something…
-----END CERTIFICATE-----
(3)在/etc/pki/ca-trust/source/anchors/目录下创建一个文件:cert.crt,将(2)中拷贝的证书信息复制到该文件中。
(4)更新证书信任
update-ca-trust
(5)重启docker【重要】
systemctl restart docker.service
如果拉取过程中没有报错就可以继续执行下一步了。
docker-compose up -d
connector-alienvault: image: opencti/connector-alienvault:5.2.1 environment: - OPENCTI_URL=http://opencti:8080 - OPENCTI_TOKEN=${OPENCTI_ADMIN_TOKEN} - CONNECTOR_ID=自动生成的UUID - CONNECTOR_TYPE=EXTERNAL_IMPORT - CONNECTOR_NAME=AlienVault - CONNECTOR_SCOPE=alienvault - CONNECTOR_CONFIDENCE_LEVEL=15 # From 0 (Unknown) to 100 (Fully trusted) - CONNECTOR_UPDATE_EXISTING_DATA=false - CONNECTOR_LOG_LEVEL=info - ALIENVAULT_BASE_URL=https://otx.alienvault.com - ALIENVAULT_API_KEY=注册alienvault之后生成的API的KEY - ALIENVAULT_CREATE_OBSERVABLES=true - ALIENVAULT_CREATE_INDICATORS=true - ALIENVAULT_PULSE_START_TIMESTAMP=2020-05-01T00:00:00 # BEWARE! Could be a lot of pulses! - ALIENVAULT_REPORT_TYPE=threat-report - ALIENVAULT_REPORT_STATUS=New - ALIENVAULT_GUESS_MALWARE=false # Use tags to guess malware. - ALIENVAULT_GUESS_CVE=false # Use tags to guess CVE. - ALIENVAULT_EXCLUDED_PULSE_INDICATOR_TYPES=FileHash-MD5,FileHash-SHA1 # Excluded Pulse indicator types. - ALIENVAULT_ENABLE_RELATIONSHIPS=true # Enable/Disable relationship creation between SDOs. - ALIENVAULT_ENABLE_ATTACK_PATTERNS_INDICATES=true # Enable/Disable "indicates" relationships between indicators and attack patterns - ALIENVAULT_INTERVAL_SEC=3600 restart: always
docker-compose up -d
[1] https://www.opencti.io/en/
[2] https://luatix.notion.site/OpenCTI-Public-Knowledge-Base-d411e5e477734c59887dad3649f20518
[3] https://mp.weixin.qq.com/s/O5g314Nc_fO_NsO3NX_ZJg
[4] https://www.uuidgenerator.net/
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。