### Install TheHive Package Source: https://docs.strangebee.com/thehive/operations/apt-yum-repositories-end/switch-to-manual-download-installation-thehive?q= Commands to install the downloaded package using apt-get or dpkg. ```bash sudo apt-get install /tmp/thehive_5.6.2-1_all.deb ``` ```bash sudo dpkg -i /tmp/thehive_5.6.2-1_all.deb ``` -------------------------------- ### Expected Java Version Output Source: https://docs.strangebee.com/thehive/installation/installation-guide-linux-standalone-server Example output confirming the correct installation of OpenJDK 11. ```text openjdk version "11.0.28" 2025-07-15 OpenJDK Runtime Environment Corretto-11.0.28.6.1 (build 11.0.28+6-LTS) OpenJDK 64-Bit Server VM Corretto-11.0.28.6.1 (build 11.0.28+6-LTS, mixed mode) ``` -------------------------------- ### Install Dependencies for TheHive Source: https://docs.strangebee.com/thehive/operations/apt-yum-repositories-end/switch-to-manual-download-installation-thehive?q= Install required system utilities before proceeding with manual installation. ```bash sudo apt update sudo apt install wget curl gnupg coreutils ``` ```bash sudo yum update sudo yum install wget curl gnupg coreutils ``` -------------------------------- ### Start Cassandra Service Source: https://docs.strangebee.com/thehive/installation/upgrade-from-4.x Command to start the Cassandra service after configuration. ```bash sudo systemctl start cassandra ``` -------------------------------- ### Start and Enable TheHive Service Source: https://docs.strangebee.com/thehive/configuration/secret Use these systemctl commands to start TheHive service and ensure it runs at boot. ```bash sudo systemctl start thehive sudo systemctl enable thehive ``` -------------------------------- ### Install TheHive using apt-get Source: https://docs.strangebee.com/thehive/installation/upgrade-from-5.x Use this command to install TheHive and automatically manage its dependencies using apt-get. ```bash sudo apt-get install /tmp/thehive_5.6.2-1_all.deb ``` -------------------------------- ### Install Cassandra on RPM-based systems Source: https://docs.strangebee.com/thehive/configuration/secret Commands to import keys, configure the repository, install the package, and set directory permissions. ```bash sudo rpm --import https://downloads.apache.org/cassandra/KEYS ``` ```bash error: https://downloads.apache.org/cassandra/KEYS: key 1 not an armored public key. ``` ```bash echo "[cassandra] name=Apache Cassandra baseurl=https://redhat.cassandra.apache.org/41x/ gpgcheck=1 repo_gpgcheck=1 gpgkey=https://downloads.apache.org/cassandra/KEYS" | sudo tee /etc/yum.repos.d/cassandra.repo ``` ```bash sudo yum update sudo yum install cassandra ``` ```bash sudo chown -R cassandra:cassandra /var/lib/cassandra ``` -------------------------------- ### Install Cortex package Source: https://docs.strangebee.com/cortex/operations/switch-to-manual-download-installation-cortex Install the package using apt-get or dpkg. ```bash sudo apt-get install /tmp/cortex_4.0.0-1_all.deb ``` ```bash sudo dpkg -i /tmp/cortex_4.0.0-1_all.deb ``` -------------------------------- ### Install TheHive Package Source: https://docs.strangebee.com/thehive/operations/apt-yum-repositories-end/switch-to-manual-download-installation-thehive?q= Install the TheHive package using dpkg. Ensure you have already downloaded and verified the package integrity. ```bash sudo dpkg -i /tmp/thehive_5.6.2-1_all.deb ``` -------------------------------- ### Start Cortex Service Source: https://docs.strangebee.com/cortex/installation-and-configuration/step-by-step-guide?q= Command to start the Cortex service using systemctl. ```bash sudo systemctl start cortex ``` -------------------------------- ### Install jq Package Source: https://docs.strangebee.com/thehive/operations/backup-restore/backup/hot-backup/hot-backup-cluster?q= Install the jq JSON processor on DEB or RPM-based systems. ```bash sudo apt install jq ``` ```bash sudo yum install jq ``` -------------------------------- ### Install Systemd Service File Source: https://docs.strangebee.com/thehive/configuration/secret Commands to download and install the systemd service unit file for TheHive. ```bash cd /tmp wget https://raw.githubusercontent.com/TheHive-Project/TheHive/master/package/thehive.service sudo cp thehive.service /etc/systemd/system/thehive.service ``` -------------------------------- ### Install Dependencies on Debian/Ubuntu Source: https://docs.strangebee.com/thehive/configuration/secret Installs necessary dependencies for TheHive on Debian-based systems using apt. ```bash sudo apt update sudo apt install wget curl gnupg coreutils apt-transport-https git ca-certificates ca-certificates-java software-properties-common python3-pip lsb-release unzip ``` -------------------------------- ### Nomad Status Output Examples Source: https://docs.strangebee.com/resources/iaas/azure/infra-as-code/ug-secops-instances/docs/upgrade Example outputs for different deployment profiles including TheHive, Cortex, or both. ```text ID Type Priority Status Submit Date thehive-job service 50 running *** ``` ```text ID Type Priority Status Submit Date cortex-job service 50 running *** ``` ```text ID Type Priority Status Submit Date thehive-cortex-job service 50 running *** ``` -------------------------------- ### Start TheHive Service Source: https://docs.strangebee.com/thehive/operations/backup-restore/restore/hot-restore/restore-hot-backup-standalone-server Starts the TheHive system service. Ensure you have the necessary permissions to manage system services. ```bash sudo systemctl start thehive ``` -------------------------------- ### Reload Systemd Daemon and Start Elasticsearch Source: https://docs.strangebee.com/thehive/configuration/secret This sequence reloads the systemd manager configuration and then starts the Elasticsearch service. It's often used after initial setup or significant system changes. ```bash sudo systemctl daemon-reload sudo systemctl start elasticsearch ``` -------------------------------- ### Configure Base URL and Context Path Examples Source: https://docs.strangebee.com/thehive/configuration/update-service-configuration Examples for setting the base URL and context path for root domains or reverse proxy subpaths. ```text application.baseUrl = "https://thehive.example.org" play.http.context = "/" ``` ```text application.baseUrl = "https://thehive.example.org:9000" play.http.context = "/" ``` ```text application.baseUrl = "https://example.org/thehive" play.http.context = "/thehive" ``` ```text application.baseUrl = "https://example.org:9000/thehive" play.http.context = "/thehive" ``` -------------------------------- ### Three-Node Akka Cluster Setup Source: https://docs.strangebee.com/thehive/configuration/akka?q= Example configuration for a three-node cluster. Each node must include the full list of seed nodes. ```hocon akka { cluster.enable = on actor { provider = cluster } remote.artery { canonical { hostname = "10.1.2.1" port = 2551 } } # seed node list contains at least one active node cluster.seed-nodes = [ "akka://application@10.1.2.1:2551", "akka://application@10.1.2.2:2551", "akka://application@10.1.2.3:2551" ] } ``` ```hocon akka { cluster.enable = on actor { provider = cluster } remote.artery { canonical { hostname = "10.1.2.2" port = 2551 } } # seed node list contains at least one active node cluster.seed-nodes = [ "akka://application@10.1.2.1:2551", "akka://application@10.1.2.2:2551", "akka://application@10.1.2.3:2551" ] } ``` ```hocon akka { cluster.enable = on actor { provider = cluster } remote.artery { canonical { hostname = "10.1.2.3" port = 2551 } } # seed node list contains at least one active node cluster.seed-nodes = [ "akka://application@10.1.2.1:2551", "akka://application@10.1.2.2:2551", "akka://application@10.1.2.3:2551" ] } ``` -------------------------------- ### Clustered TheHive Configuration Example Source: https://docs.strangebee.com/thehive/installation/upgrade-from-4.x This configuration sample extends the standalone setup with Akka settings for a clustered TheHive environment. It is intended for multi-node deployments. ```hocon # TheHive configuration - application.conf ``` -------------------------------- ### Akka Configuration for Node 3 Source: https://docs.strangebee.com/thehive/configuration/akka Example Akka configuration for the third node in a three-node cluster setup, specifying its hostname and the seed node list. ```hocon akka { cluster.enable = on actor { provider = cluster } remote.artery { canonical { hostname = "10.1.2.3" port = 2551 } } # seed node list contains at least one active node cluster.seed-nodes = [ "akka://application@10.1.2.1:2551", "akka://application@10.1.2.2:2551", "akka://application@10.1.2.3:2551" ] } ``` -------------------------------- ### Install Cassandra on Debian-based systems Source: https://docs.strangebee.com/thehive/configuration/secret Commands to add the repository, install the package, verify the service status, and set directory permissions. ```bash wget -qO - https://downloads.apache.org/cassandra/KEYS | sudo gpg --dearmor -o /usr/share/keyrings/cassandra-archive.gpg ``` ```bash echo "deb [signed-by=/usr/share/keyrings/cassandra-archive.gpg] https://debian.cassandra.apache.org 41x main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list ``` ```bash sudo apt update sudo apt install cassandra ``` ```bash sudo systemctl status cassandra ``` ```bash sudo chown -R cassandra:cassandra /var/lib/cassandra ``` -------------------------------- ### Akka Configuration for Node 2 Source: https://docs.strangebee.com/thehive/configuration/akka Example Akka configuration for the second node in a three-node cluster setup, specifying its hostname and the seed node list. ```hocon akka { cluster.enable = on actor { provider = cluster } remote.artery { canonical { hostname = "10.1.2.2" port = 2551 } } # seed node list contains at least one active node cluster.seed-nodes = [ "akka://application@10.1.2.1:2551", "akka://application@10.1.2.2:2551", "akka://application@10.1.2.3:2551" ] } ``` -------------------------------- ### Akka Configuration for Node 1 Source: https://docs.strangebee.com/thehive/configuration/akka Example Akka configuration for the first node in a three-node cluster setup, specifying its hostname and the seed node list. ```hocon akka { cluster.enable = on actor { provider = cluster } remote.artery { canonical { hostname = "10.1.2.1" port = 2551 } } # seed node list contains at least one active node cluster.seed-nodes = [ "akka://application@10.1.2.1:2551", "akka://application@10.1.2.2:2551", "akka://application@10.1.2.3:2551" ] } ``` -------------------------------- ### Start and Verify Cassandra Service Source: https://docs.strangebee.com/thehive/configuration/secret Alternative service startup commands and log verification. ```bash sudo systemctl daemon-reload sudo service cassandra start ``` ```bash sudo systemctl enable cassandra ``` ```bash sudo tail -n 50 /var/log/cassandra/system.log ``` ```text INFO [main] ... Startup complete ``` -------------------------------- ### Download TheHive Package using wget Source: https://docs.strangebee.com/thehive/operations/apt-yum-repositories-end/switch-to-manual-download-installation-thehive?q= Use wget to download the installation package, its SHA256 checksum, and signature files. Replace /tmp/ with your desired download path. ```bash wget -O /tmp/thehive-5.6.2-1.noarch.rpm https://thehive.download.strangebee.com/5.6/rpm/thehive-5.6.2-1.noarch.rpm wget -O /tmp/thehive-5.6.2-1.noarch.rpm.sha256 https://thehive.download.strangebee.com/5.6/sha256/thehive-5.6.2-1.noarch.rpm.sha256 wget -O /tmp/thehive-5.6.2-1.noarch.rpm.asc https://thehive.download.strangebee.com/5.6/asc/thehive-5.6.2-1.noarch.rpm.asc ``` -------------------------------- ### VirusTotal Get Report Input Snippet Source: https://docs.strangebee.com/cortex/api/how-to-create-an-analyzer?q= A more concise example of the input JSON for the VirusTotal analyzer's GetReport flavor, focusing on essential observable details. ```json { "data":"d41d8cd98f00b204e9800998ecf8427e", "dataType":"hash", "tlp":0, [..] } ``` -------------------------------- ### Initialize logging Source: https://docs.strangebee.com/thehive/operations/backup-restore/restore/cold-restore/docker-compose Sets up a log file in the current directory and redirects all script output to it. ```bash # Define the log file and start logging. Log file is stored in the current folder DATE="$(date +"%Y%m%d-%H%M%z" | sed 's/+/-/')" LOG_FILE="./restore_log_${DATE}.log" exec &> >(tee -a "$LOG_FILE") # Log the start time echo "Restoration process started at: $(date)" ``` -------------------------------- ### Reload systemd Daemon and Start Cassandra Source: https://docs.strangebee.com/thehive/installation/installation-guide-linux-standalone-server Reload the systemd manager configuration and then start the Cassandra service. This is an alternative method for starting the service. ```bash sudo systemctl daemon-reload sudo service cassandra start ``` -------------------------------- ### Create TheHive System User and Permissions Source: https://docs.strangebee.com/thehive/installation/installation-guide-linux-standalone-server Sets up a dedicated non-privileged user and group for TheHive, assigns ownership of the installation directory, and configures permissions for the application configuration file. ```bash sudo addgroup thehive sudo adduser --system thehive sudo chown -R thehive:thehive /opt/thehive sudo mkdir /etc/thehive sudo touch /etc/thehive/application.conf sudo chown root:thehive /etc/thehive sudo chgrp thehive /etc/thehive/application.conf sudo chmod 640 /etc/thehive/application.conf ``` -------------------------------- ### Display TheHive entrypoint options Source: https://docs.strangebee.com/thehive/configuration/thehive-docker-entrypoint-settings Use this command to list all supported configuration flags and parameters for the TheHive Docker image. ```bash docker run --rm strangebee/thehive: -h ``` -------------------------------- ### Verify Cortex Installation Source: https://docs.strangebee.com/cortex/installation-and-configuration/step-by-step-guide?q= Check the installed version of Cortex. ```bash cortex --version ``` -------------------------------- ### Verify Java Installation Source: https://docs.strangebee.com/cortex/installation-and-configuration/step-by-step-guide?q= Verifies the Java installation by checking the version. ```bash java -version ``` -------------------------------- ### Automate AMI initialization with cloud-init Source: https://docs.strangebee.com/resources/iaas/aws/thehive?q= Use cloud-init user data to map NVMe devices, format filesystems, and initialize TheHive automatically at launch. ```yaml #cloud-config bootcmd: - [ /usr/sbin/nvme-to-block-mapping ] fs_setup: - filesystem: ext4 device: '/dev/sdh' partition: auto overwrite: false - filesystem: ext4 device: '/dev/sdi' partition: auto overwrite: false - filesystem: ext4 device: '/dev/sdj' partition: auto overwrite: false runcmd: - [ /opt/thehive/ops/scripts/ops-thehive-init.sh, /dev/sdh, /dev/sdi, /dev/sdj ] ``` -------------------------------- ### Configure TheHive and Cortex via cloud-init Source: https://docs.strangebee.com/resources/iaas/azure/thehive Use this cloud-init script to partition disks, configure application settings, and launch the initialization script. Ensure the application.baseUrl is updated for your environment. ```yaml #cloud-config disk_setup: /dev/disk/azure/scsi1/lun0: table_type: gpt layout: True overwrite: True /dev/disk/azure/scsi1/lun1: table_type: gpt layout: True overwrite: True fs_setup: - device: /dev/disk/azure/scsi1/lun0 partition: auto filesystem: ext4 - device: /dev/disk/azure/scsi1/lun1 partition: auto filesystem: ext4 write_files: - path: /opt/strangebee/ops/templates/nomad/tasks/thehive/application.conf.d/service.conf content: | application.baseUrl="https://thehive.mydomain.com/thehive" play.http.context="/thehive" - path: /opt/strangebee/ops/templates/nomad/tasks/cortex/application.conf.d/service.conf content: | play.http.context="/cortex" runcmd: - [ /opt/strangebee/ops/scripts/ops-launch.sh, "-t 1", "-c 0", "-p /dev/sdh", "-d /dev/sdi" ] ``` -------------------------------- ### Viewing Available Options Source: https://docs.strangebee.com/thehive/configuration/thehive-docker-entrypoint-settings Display all supported entrypoint options by running the Docker image with the -h flag. ```APIDOC ## Viewing available options To display all supported entrypoint options: ``` docker run --rm strangebee/thehive: -h ``` Replace `` with the TheHive version. ``` -------------------------------- ### Start TheHive Service Source: https://docs.strangebee.com/thehive/installation/upgrade-from-4.x Start the TheHive service after ensuring Cassandra and Elasticsearch are running. The first start may take time due to database schema updates and reindexing. ```bash sudo systemctl start thehive ``` -------------------------------- ### Install Cortex Package with yum Source: https://docs.strangebee.com/cortex/operations/switch-to-manual-download-installation-cortex Install the Cortex RPM package using yum, which will automatically handle dependency resolution. Ensure the package and its signature have been successfully verified prior to installation. ```bash sudo yum install /tmp/cortex-4.0.0-1.noarch.rpm ``` -------------------------------- ### Instance Initialization Behavior Source: https://docs.strangebee.com/resources/iaas/azure/infra-as-code/ug-secops-instances?q= The initialization script automatically detects existing data on persistent disks to determine whether to perform an initial setup or a restore. ```text The instance initialization script will automatically detect if the persistent disks already contain data and will behave accordingly (initial setup or restore). ``` -------------------------------- ### SSH into instances Source: https://docs.strangebee.com/resources/iaas/azure/infra-as-code/ug-secops-instances Commands to initiate SSH connections after configuring the config file. ```bash $ ssh thehive ``` ```bash $ ssh cortex ``` -------------------------------- ### Set up Java 11 on RHEL/Fedora Source: https://docs.strangebee.com/thehive/configuration/secret Installs Amazon Corretto 11 JDK and configures JAVA_HOME environment variable on RHEL/Fedora systems. ```bash sudo rpm --import https://yum.corretto.aws/corretto.key &> /dev/null wget -qO- https://yum.corretto.aws/corretto.repo | sudo tee -a /etc/yum.repos.d/corretto.repo sudo yum install -y java-11-amazon-corretto-devel > /dev/null echo JAVA_HOME="/usr/lib/jvm/java-11-amazon-corretto" | sudo tee -a /etc/environment export JAVA_HOME="/usr/lib/jvm/java-11-amazon-corretto" ``` ```bash java -version ``` -------------------------------- ### Example Organization Response Source: https://docs.strangebee.com/cortex/api/api-guide?q= This is an example JSON response when retrieving organization details. ```json { "id": "demo", "name": "demo", "status": "Active", "description": "Demo organization", "createdAt": 1520258040437, "createdBy": "superadmin", "updatedBy": "superadmin", "updatedAt": 1522077420693 } ``` -------------------------------- ### Verify Java Installation (Debian/Ubuntu) Source: https://docs.strangebee.com/thehive/configuration/secret Verifies the installed Java version on Debian/Ubuntu systems. ```text openjdk version "11.0.28" 2025-07-15 OpenJDK Runtime Environment Corretto-11.0.28.6.1 (build 11.0.28+6-LTS) OpenJDK 64-Bit Server VM Corretto-11.0.28.6.1 (build 11.0.28+6-LTS, mixed mode) ``` -------------------------------- ### Download Package with wget Source: https://docs.strangebee.com/thehive/operations/apt-yum-repositories-end/switch-to-manual-download-installation-thehive Download the installation package, checksum, and signature files using wget. ```bash wget -O /tmp/thehive-5.6.2-1.noarch.rpm https://thehive.download.strangebee.com/5.6/rpm/thehive-5.6.2-1.noarch.rpm wget -O /tmp/thehive-5.6.2-1.noarch.rpm.sha256 https://thehive.download.strangebee.com/5.6/sha256/thehive-5.6.2-1.noarch.rpm.sha256 wget -O /tmp/thehive-5.6.2-1.noarch.rpm.asc https://thehive.download.strangebee.com/5.6/asc/thehive-5.6.2-1.noarch.rpm.asc ``` ```bash wget -O /tmp/.noarch.rpm https://thehive.download.strangebee.com//rpm/.noarch.rpm wget -O /tmp/.noarch.rpm.sha256 https://thehive.download.strangebee.com//sha256/.noarch.rpm.sha256 wget -O /tmp/.noarch.rpm.asc https://thehive.download.strangebee.com//asc/.noarch.rpm.asc ``` -------------------------------- ### Set up Java 11 on Debian/Ubuntu Source: https://docs.strangebee.com/thehive/configuration/secret Installs Amazon Corretto 11 JDK and configures JAVA_HOME environment variable on Debian/Ubuntu systems. ```bash wget -qO- https://apt.corretto.aws/corretto.key | sudo gpg --dearmor -o /usr/share/keyrings/corretto.gpg echo "deb [signed-by=/usr/share/keyrings/corretto.gpg] https://apt.corretto.aws stable main" | sudo tee -a /etc/apt/sources.list.d/corretto.sources.list sudo apt update sudo apt install java-common java-11-amazon-corretto-jdk echo JAVA_HOME="/usr/lib/jvm/java-11-amazon-corretto" | sudo tee -a /etc/environment export JAVA_HOME="/usr/lib/jvm/java-11-amazon-corretto" ``` ```bash java -version ``` -------------------------------- ### Configure Database and Index with Authentication Source: https://docs.strangebee.com/thehive/installation/installation-guide-linux-standalone-server Example configuration for TheHive's database (Cassandra) and index (Elasticsearch) including authentication details. Replace placeholders with actual credentials. ```hocon # Content from /etc/thehive/application.conf db.janusgraph { storage { backend = cql hostname = ["127.0.0.1"] # Cassandra authentication (recommended) username = "thehive" password = "" cql { keyspace = thehive } } index.search { backend = elasticsearch hostname = ["127.0.0.1"] index-name = thehive # Elasticsearch authentication (recommended) elasticsearch { http { auth { type = basic basic { username = "thehive" password = "" } } } } } } [..] ``` -------------------------------- ### Install cortexutils with pip Source: https://docs.strangebee.com/cortex/api/how-to-create-a-responder?q= Install the `cortexutils` library using pip for Python 2. ```bash pip install cortexutils ``` -------------------------------- ### Start Elasticsearch Service Source: https://docs.strangebee.com/thehive/installation/upgrade-from-4.x Start the Elasticsearch service if it is not already running. This is a prerequisite for TheHive. ```bash sudo systemctl start elasticsearch ``` -------------------------------- ### Setup NFS Directory on Server Source: https://docs.strangebee.com/thehive/operations/backup-restore/backup/hot-backup/hot-backup-cluster?q= Create and configure permissions for the Elasticsearch backup directory on the NFS server. ```bash sudo mkdir -p /mnt/backup/elasticsearch sudo chown elasticsearch:elasticsearch /mnt/backup/elasticsearch sudo chmod 770 /mnt/backup/elasticsearch ``` -------------------------------- ### Start Cassandra Service Source: https://docs.strangebee.com/thehive/installation/upgrade-from-4.x Start the Cassandra service if it is not already running. This is a prerequisite for TheHive. ```bash sudo systemctl start cassandra ``` -------------------------------- ### Start Cassandra Snapshot Source: https://docs.strangebee.com/thehive/operations/backup-restore/backup/hot-backup/hot-backup-cluster?q= Initiates a Cassandra snapshot for a specified keyspace. Requires CASSANDRA_SNAPSHOT_NAME, CASSANDRA_KEYSPACE, CASSANDRA_CONNECTION, CASSANDRA_GENERAL_ARCHIVE_PATH, CASSANDRA_DATA_FOLDER, and CASSANDRA_ARCHIVE_PATH to be set. This snippet runs in the background. ```bash { set -e echo "[CASS] Starting snapshot ${CASSANDRA_SNAPSHOT_NAME} for keyspace ${CASSANDRA_KEYSPACE}" if nodetool snapshot -t "${CASSANDRA_SNAPSHOT_NAME}" "${CASSANDRA_KEYSPACE}"; then echo "[CASS] ✓ Snapshot Cassandra created successfully" # Save the cql schema of the keyspace cqlsh ${CASSANDRA_CONNECTION} -e "DESCRIBE KEYSPACE ${CASSANDRA_KEYSPACE}" | grep -v "^WARNING" > "${CASSANDRA_GENERAL_ARCHIVE_PATH}/${CASSANDRA_SNAPSHOT_NAME}/create_keyspace_${CASSANDRA_KEYSPACE}.cql" echo "The keyspace cql definition for ${CASSANDRA_KEYSPACE} is stored in this file: ${CASSANDRA_GENERAL_ARCHIVE_PATH}/${CASSANDRA_SNAPSHOT_NAME}/create_keyspace_${CASSANDRA_KEYSPACE}.cql" # For each table folder in the keyspace folder of the snapshot for TABLE in $(ls ${CASSANDRA_DATA_FOLDER}/data/${CASSANDRA_KEYSPACE}); do # Folder where the snapshot files are stored TABLE_SNAPSHOT_FOLDER=${CASSANDRA_DATA_FOLDER}/data/${CASSANDRA_KEYSPACE}/${TABLE}/snapshots/${CASSANDRA_SNAPSHOT_NAME} if [ -d ${TABLE_SNAPSHOT_FOLDER} ]; then # Create a folder for each table mkdir "${CASSANDRA_ARCHIVE_PATH}/${TABLE}" chown -R cassandra:cassandra ${CASSANDRA_ARCHIVE_PATH}/${TABLE} # Copy the snapshot files to the proper table folder # Snapshots files are hardlinks, # so we use --remove-destination to make sure the files are actually copied and not just linked cp -p --remove-destination ${TABLE_SNAPSHOT_FOLDER}/* ${CASSANDRA_ARCHIVE_PATH}/${TABLE} fi done # Delete Cassandra snapshot once it's backed up nodetool clearsnapshot -t ${CASSANDRA_SNAPSHOT_NAME} > /dev/null # Create a .tar archive with the folder containing the backed up Cassandra data tar cf ${CASSANDRA_GENERAL_ARCHIVE_PATH}/${CASSANDRA_SNAPSHOT_NAME}.tar -C "${CASSANDRA_GENERAL_ARCHIVE_PATH}" ${CASSANDRA_SNAPSHOT_NAME} # Remove the folder once the archive is created rm -rf ${CASSANDRA_GENERAL_ARCHIVE_PATH}/${CASSANDRA_SNAPSHOT_NAME} exit 0 else echo "[CASS] ✗ Cassandra ERROR" exit 1 fi } & PID_CASS=$! ``` -------------------------------- ### Install Analyzer Dependencies Source: https://docs.strangebee.com/cortex/installation-and-configuration/analyzers-responders?q= Iterates through all 'requirements.txt' files within the cloned Cortex-Analyzers directory and installs the specified Python dependencies for each analyzer. The '|| true' ensures the loop continues even if an installation fails. ```bash cd /opt for I in $(find Cortex-Analyzers -name 'requirements.txt'); do sudo -H pip3 install -r $I || true; done ``` -------------------------------- ### Example elasticsearch.yml configuration Source: https://docs.strangebee.com/thehive/configuration/secret A sample configuration file showing cluster name, queue size, paths, and security settings. ```yaml # content from /etc/elasticsearch/elasticsearch.yml [..] cluster.name: hive thread_pool.search.queue_size: 100000 path.logs: "/var/log/elasticsearch" path.data: "/var/lib/elasticsearch" xpack.security.enabled: true [..] ``` -------------------------------- ### Install Dependencies on Linux Source: https://docs.strangebee.com/thehive/installation/installation-guide-linux-standalone-server Install required system packages for TheHive on Debian/Ubuntu or RHEL/Fedora distributions. ```bash sudo apt update sudo apt install wget curl gnupg coreutils apt-transport-https git ca-certificates ca-certificates-java software-properties-common python3-pip lsb-release unzip ``` ```bash sudo yum update sudo yum install wget curl gnupg2 coreutils chkconfig python3-pip git unzip ``` -------------------------------- ### Install Elasticsearch on Debian Source: https://docs.strangebee.com/thehive/configuration/secret Commands to add the Elasticsearch repository and install the package on Debian-based systems. ```bash wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo gpg --dearmor -o /usr/share/keyrings/elasticsearch-keyring.gpg sudo apt-get install apt-transport-https ``` ```bash echo "deb [signed-by=/usr/share/keyrings/elasticsearch-keyring.gpg] https://artifacts.elastic.co/packages/8.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-8.x.list ``` ```bash sudo apt update sudo apt install elasticsearch ```