🎅 Как установить GRR Server на Ubuntu 18👨⚕️ |

🎅 Как установить GRR Server на Ubuntu 18👨⚕️

Мануал

Пошаговое руководство по установке сервера Google Rapid Response в Ubuntu.

Вступление

GRR (Google Rapid Response) – это структура реагирования на инциденты, основанная на Python, которая может использоваться для оперативной криминалистики и расследований. Это позволяет вам исследовать и атаковать и выполнять анализ удаленно.

GRR может быть развернут в архитектуре сервер-клиент.

Он поставляется с веб-интерфейсом пользователя, который позволяет анализировать данные, полученные от клиентов.

Он поддерживает Linux, Mac OS X и Windows OS.


Сервер под управлением Ubuntu 18.xx
На вашем сервере установлен пароль root

Начало работы

Перед началом необходимо обновить систему до последней версии. Вы можете сделать это, выполнив следующую команду:

apt-get update -y

После обновления перезагрузите систему, чтобы применились все изменения.

Установим и настроим базу данных

Во-первых, вам необходимо установить сервер базы данных MariaDB в вашей системе.

Вы можете установить его с помощью следующей команды:

apt-get install mariadb-server -y

После завершения установки защитите MariaDB, выполнив следующую команду:

mysql_secure_installation

Ответьте на все вопросы, как показано ниже:

 Enter current password for root (enter for none):
Set root password? [Y/n]: N
Remove anonymous users? [Y/n]: Y
Disallow root login remotely? [Y/n]: Y
Remove test database and access to it? [Y/n]: Y
Reload privilege tables now? [Y/n]: Y 

Как только MariaDB защищен, войдите в оболочку MariaDB с помощью следующей команды:

mysql -u root -p

Введите свой пароль root. Затем создайте базу данных и пользователя для GRR с помощью следующей команды:

 MariaDB [(none)]> CREATE DATABASE grr;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON grr.* TO 'grr'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION; 

Затем очистите привилегии и выйдите из оболочки MariaDB с помощью следующей команды:

MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> EXIT; 

Затем перезапустите сервис MariaDB с помощью следующей команды:

systemctl restart mariadb

Вы можете проверить состояние сервиса MariaDB с помощью следующей команды:

systemctl status mariadb

Вы должны увидеть следующий вывод:

● mariadb.service - MariaDB 10.1.38 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2019-04-12 15:11:14 UTC; 54min ago
Docs: man:mysqld(8)
https://mariadb.com/kb/en/library/systemd/
Main PID: 1050 (mysqld)
Status: "Taking your SQL requests now..."
Tasks: 46 (limit: 1113)
CGroup: /system.slice/mariadb.service
└─1050 /usr/sbin/mysqld
Apr 12 15:10:53 ubuntu1804 systemd[1]: Starting MariaDB 10.1.38 database server...
Apr 12 15:11:07 ubuntu1804 mysqld[1050]: 2019-04-12 15:11:07 140152311749760 [Note] /usr/sbin/mysqld (mysqld 10.1.38-MariaDB-0ubuntu0.18.04.1)
Apr 12 15:11:14 ubuntu1804 systemd[1]: Started MariaDB 10.1.38 database server.
Apr 12 15:11:14 ubuntu1804 /etc/mysql/debian-start[1251]: Upgrading MySQL tables if necessary.
Apr 12 15:11:15 ubuntu1804 /etc/mysql/debian-start[1265]: /usr/bin/mysql_upgrade: the '--basedir' option is always ignored
Apr 12 15:11:15 ubuntu1804 /etc/mysql/debian-start[1265]: Looking for 'mysql' as: /usr/bin/mysql
Apr 12 15:11:15 ubuntu1804 /etc/mysql/debian-start[1265]: Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck
Apr 12 15:11:15 ubuntu1804 /etc/mysql/debian-start[1265]: This installation of MySQL is already upgraded to 10.1.38-MariaDB, use --force if you
Apr 12 15:11:15 ubuntu1804 /etc/mysql/debian-start[1306]: Checking for insecure root accounts.
Apr 12 15:11:15 ubuntu1804 /etc/mysql/debian-start[1311]: Triggering myisam-recover for all MyISAM tables and aria-recover for all Aria tables
lines 1-21/21 (END) 

После этого вы можете перейти к следующему шагу.

Установка GRR

Во-первых, вам нужно будет загрузить пакет GRR из их официального репозитория GitHub.

Вы можете скачать его с помощью следующей команды, чтобы загрузить версию GRR 3.2.4.6.

 wget https://storage.googleapis.com/releases.grr-response.com/grr-server_3.2.4-6_amd64.deb 

После завершения загрузки вы можете установить загруженный файл с помощью следующей команды:

dpkg -i grr-server_3.2.4-6_amd64.deb

Затем установите необходимые зависимости с помощью следующей команды:

apt-get install -f

Во время установки вам нужно будет предоставить некоторые данные, такие как хост базы данных, имя пользователя, пароль, GRR URLS и пароль администратора, как показано ниже:

 Running grr_config_updater initialize
To avoid this prompting, set DEBIAN_FRONTEND=noninteractive
#################################################################
Checking write access on config /etc/grr//server.local.yaml
Step 0: Importing Configuration from previous installation.
No old config file found.
Step 1: Setting Basic Configuration Parameters
We are now going to configure the server using a bunch of questions 

-=GRR Datastore=-
For GRR to work each GRR server has to be able to communicate with
the datastore. To do this we need to configure a datastore.

GRR will use MySQL as its database backend. Enter connection details:

MySQL Host [localhost]:
MySQL Port (0 for local socket) [0]:
MySQL Database [grr]:
MySQL Username [root]: grr
Please enter password for database user grr:

Successfully connected to MySQL with the provided details.

-=GRR URLs=-
For GRR to work each client has to be able to communicate with the
server. To do this we normally need a public dns name or IP address
to communicate with. In the standard configuration this will be used
to host both the client facing server and the admin user interface.

Please enter your hostname e.g. grr.example.com [ubuntu1804]: 192.168.0.104

-=Server URL=-
The Server URL specifies the URL that the clients will connect to
communicate with the server. For best results this should be publicly
accessible. By default this will be port 8080 with the URL ending in /control.

Frontend URL [http://192.168.0.104:8080/]:

-=AdminUI URL=-:
The UI URL specifies where the Administrative Web Interface can be found.

AdminUI URL [http://192.168.0.104:8000]:

-=GRR Emails=-
GRR needs to be able to send emails for various logging and
alerting functions. The email domain will be appended to GRR
usernames when sending emails to users.

-=Monitoring/Email Domain=-
Emails concerning alerts or updates must be sent to this domain.

Email Domain e.g example.com [localhost]:

-=Alert Email Address=-
Address where monitoring events get sent, e.g. crashed clients,
broken server, etc.

Alert Email Address [grr-monitoring@localhost]:

-=Emergency Email Address=-
Address where high priority events such as an emergency ACL bypass are sent.

Emergency Access Email Address [grr-emergency@localhost]:
Rekall is no longer actively supported. Enable anyway? [yN]: [N]:

Step 2: Key Generation
All keys will have a bit length of 2048.
Generating executable signing key
Generating CA keys
Generating Server keys
Generating secret key for csrf protection.

Repacked into /usr/share/grr-server/executables/installers/grr_3.2.4.6_amd64.deb

GRR Initialization complete! You can edit the new configuration in /etc/grr//server.local.yaml.

Please restart the service for the new configuration to take effect.

#################################################################
Install complete.

Теперь перезапустите сервис GRR, чтобы применились все изменения:

systemctl restart grr-server

Теперь вы можете проверить состояние GRR с помощью следующей команды:

systemctl status grr-server

Вы должны увидеть следующий вывод:

● grr-server.service - GRR Service
Loaded: loaded (/lib/systemd/system/grr-server.service; enabled; vendor preset: enabled)
Active: active (exited) since Fri 2019-04-12 15:57:09 UTC; 6s ago
Docs: https://github.com/google/grr
Process: 7178 ExecStop=/bin/systemctl --no-block stop grr-server@admin_ui.service grr-server@frontend.service grr-server@worker.service grr-s
Process: 7215 ExecStart=/bin/systemctl --no-block start grr-server@admin_ui.service grr-server@frontend.service grr-server@worker.service grr
Main PID: 7215 (code=exited, status=0/SUCCESS)
Apr 12 15:57:09 ubuntu1804 systemd[1]: Starting GRR Service...
Apr 12 15:57:09 ubuntu1804 systemd[1]: Started GRR Service. х

Доступ к веб-интерфейсу GRR

GRR теперь установлен и прослушивает порты 8000 (Admin) и 8080 (Frontend).

Чтобы получить доступ к интерфейсу администратора GRR, откройте веб-браузер и введите URL-адрес http://192.168.0.104:8000.

Вам будет предложено ввести имя пользователя и пароль администратора, используйте admin в качестве пользователя и пароль, который вы установили во время установки.

Затем нажмите на кнопку ОК. Вы будете перенаправлены на следующую страницу:

Поздравляем! Мы успешно установили сервер GRR на Ubuntu.

Пожалуйста, не спамьте и никого не оскорбляйте. Это поле для комментариев, а не спамбокс. Рекламные ссылки не индексируются!
Добавить комментарий