Cyber Security: thehive install

From OnnoWiki
Jump to navigation Jump to search

Application Stack TheHive dapat di deploy pada standalone server atau sebagai cluster. Aplikasi TheHive bergantung pada:

  • Apache Cassandra untuk menyimpan data (Versi yang didukung: 4.x).
  • Elasticsearch sebagai mesin pengindeksan (Versi yang didukung: 7.x).
  • Sebuah solusi penyimpanan file juga diperlukan; sistem berkas lokal dari server yang menghosting aplikasi memadai dalam skenario server mandiri; S3 MINIO jika ingin lebih enak.

Arsitektur The Hive

Setiap lapisan, aplikasi TheHive, mesin Database & indeks, dan penyimpanan file, bersifat independen dan dapat diatur sebagai node atau cluster yang berdiri sendiri. Akibatnya, TheHive dapat diatur dan bekerja dalam arsitektur custer yang kompleks, menggunakan alamat IP virtual dan load balancer.

Kebutuhan Hardware

Persyaratan perangkat keras bergantung pada jumlah pengguna bersamaan (termasuk integrasi) dan cara mereka menggunakan sistem. Tabel berikut menampilkan ambang aman saat menghosting semua layanan di mesin yang sama:

Jumlah User	TheHive	Cassandra	ElasticSearch
 < 10	2  / 2 GB 	2  / 2 GB 	2  / 2 GB 
 < 20	2-4  / 4 GB 	2-4  / 4 GB 	2-4  / 4 GB 
 < 50	4-6  / 8 GB 	4-6  / 8 GB 	4-6  / 8 GB 

Pada saat instalasi, biasanya TheHive agak rewel. Spesifikasi yang aman

  • 4 core CPU
  • 16 GB RAM


Sistem Operasi

Sistem operasi yang di dukung,

  • Ubuntu 20.04 LTS & 22.04 LTS
  • Debian 11
  • RHEL 8
  • Fedora 35 & 37

Jika kita menggunakan salah satu OS di atas, kita dapat menjalankan script berikut,

apt update
wget -q -O /tmp/install.sh https://archives.strangebee.com/scripts/install.sh ; sudo -v ; bash /tmp/install.sh


Jika semua syarat di penuhi maka akan tampil pada layar, informasi berikut,

TheHive & Cortex installation script, for Linux operating systems with DEB or RPM packages.
This script supports the installtion of TheHive on x86_64 and ARM servers, and Cortex on x86_64 only. 

Following install options are available:
  - Configure proxy settings
  - Install TheHive 5.1 (x86_64 or ARM)
  - Install Cortex (running Analyzers and Responders with Docker) (x86_64 only)
  - Install Cortex (running Analyzers and Responders on the host -- Not recommended, supported on Ubuntu and Debian ONLY) (x86_64 only)

This script has sucessfully been tested on freshly installed Operating Systems:
  - Fedora 35 & 37
  - RHEL 8.5
  - Ubuntu 20.04 LTS & 22.04 LTS
  - Debian 11

Requirements: 
  - 4vCPU
  - 16 GB of RAM

Usage:
 
   $ wget -q -O /tmp/install.sh https://archives.strangebee.com/scripts/install.sh ; sudo -v ; bash /tmp/install.sh

Maintained by: ©StrangeBee - https://www.strangebee.com

---

1) Setup proxy settings
2) Install TheHive
3) Install Cortex (run Neurons with docker)
4) Install Cortex (run Neurons locally)
5) Quit
Select an option: 

Untuk intalasi TheHive pilih no 2. Kita perlu menunggu beberapa jam sampai proses instalasi selesai.

Cek status

systemctl status cassandra
systemctl status elasticsearch
systemctl status thehive

Pastikan semua kondisi active running.

Edit konfigurasi

vi /etc/thehive/application.conf

Pastikan localhost:9000 diubah menjadi IP address:9000, misalnya,

# Service configuration
# application.baseUrl = "http://localhost:9000"
# application.baseUrl = "http://0.0.0.0:9000"
application.baseUrl = "http://192.168.0.192:9000"
play.http.context = "/"

Restart cassandra, elasticsearch dan thehive

systemctl restart cassandra
systemctl restart elasticsearch
systemctl restart thehive

Tunggu beberapa saat sampai thehive stabil dan sudah beroperasi pada port 9000. Cek menggunakan

netstat -ntlp

Pastikan ada aplikasi yang beroperasi di port 9000

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 127.0.0.1:35261         0.0.0.0:*               LISTEN      1230/java           
tcp        0      0 127.0.0.1:9042          0.0.0.0:*               LISTEN      1230/java           
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      768/sshd: /usr/sbin 
tcp        0      0 127.0.0.1:7000          0.0.0.0:*               LISTEN      1230/java           
tcp        0      0 127.0.0.1:7199          0.0.0.0:*               LISTEN      1230/java           
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      658/systemd-resolve 
tcp6       0      0 127.0.0.1:33621         :::*                    LISTEN      2292/java           
tcp6       0      0 127.0.0.1:9200          :::*                    LISTEN      674/java            
tcp6       0      0 :::9000                 :::*                    LISTEN      2292/java           
tcp6       0      0 127.0.0.1:9300          :::*                    LISTEN      674/java            
tcp6       0      0 :::22                   :::*                    LISTEN      768/sshd: /usr/sbin 


Akses web Menggunakan

http://ip-address-thehive:9000

Menggunakan

username admin@thehive.local
password secret



Referensi

Pranala Menarik