Опытно Облако

Материал из Брацка Правки
Перейти к: навигация, поиск

Опытно Облако (здесь и далее по тексту -- Опытно) -- это та часть Брацка Облака, которая существует для экспериментов. Опытно базируется на отдельном "железном" сервере, программное обеспечение которого позволяет создавать те виртуальные сервера, которые задействуются в текущих экспериментах.


Задачи

Опытно oбеспечиваeт сотрудников и подрядчиков площадкой для развития Облака. Каждый пакет программного обеспечения установлен на отдельной виртуальной машине. Доступ к этой машине дан тем сотрудникам и тем подрядчикам, которые работают над конкретным приложением. В Опытно:

  • Все полные приложения имеют свои экспериментальные версии.
  • Размещены все опытные приложения без исключения.
  • Установлены те федеративные и сетевые решения, которые не задействованы для непосредственного обслуживания тех учеников, которые не являются подмастерьями.

Железо

Арендовано у hetzner.de через аукцион. Один эксперт считает, что "всякие i7 десктопные брать не стоит, а вот E3 с DC-grade дисками и iNIC-ами - вполне."

Характеристики Железа

ОС Железа

Конфигурация RAID-ов

Установка виртуализации

Конфигурация инфраструктуры

HW config, iptables/FW config and proxmox settings.

Задокументировать настройки ОС, фаервола, роутинга, настроек виртуализации.

Инциденты с сетью

Стандартные сообщения

We have detected that your server is using different MAC addresses from those allowed by your Robot account. Please take all necessary measures to avoid this in the future and to solve the issue. Please visit our FAQ here, if you are unsure how to proceed: https://docs.hetzner.com/robot/dedicated-server/faq/error-faq/#mac-errors

Работа с сетью

Были попытки разрешить проблемы с сетью; однако, сообщения продолжаются.

Инциденты с портами

В середине декабря, немецкая национальная служба по авариям уведомила hetzner.de о проблемах с разметкой портов Железа.

Сообщение от 15 декабря

Dear Sir or Madam, the Portmapper service (portmap, rpcbind) is required for mapping RPC requests to a network service. The Portmapper service is needed e.g. for mounting network shares using the Network File System (NFS). The Portmapper service runs on port 111 tcp/udp.

In addition to being abused for DDoS reflection attacks, the Portmapper service can be used by attackers to obtain information on the target network like available RPC services or network shares.

Over the past months, systems responding to Portmapper requests from anywhere on the Internet have been increasingly abused DDoS reflection attacks against third parties.

Please find below a list of affected systems hosted on your network. The timestamp (timezone UTC) indicates when the openly accessible Portmapper service was identified.

We would like to ask you to check this issue and take appropriate steps to secure the Portmapper services on the affected systems or notify your customers accordingly.

If you have recently solved the issue but received this notification again, please note the timestamp included below. You should not receive any further notifications with timestamps after the issue has been solved.

Additional information on this notification, advice on how to fix reported issues and answers to frequently asked questions: https://reports.cert-bund.de/en/

Affected systems on your network:

  • Format: ASN | IP | Timestamp (UTC) | RPC response
  • 24940 | наш-IP | 2021-12-14 15:24:55 | 100000 4 111/udp; 100000 3 111/udp; 100000 2 111/udp; 100000 4 111/udp; 100000 3 111/udp; 100000 2 111/udp;

Решение проблемы

Проблема решена посредством установления данных фильтров:

-A INPUT -s наш-IP/24 -p udp -m udp --dport 111 -j ACCEPT

-A INPUT -s 127.0.0.1/32 -p udp -m udp --dport 111 -j ACCEPT

-A INPUT -p udp -m udp --dport 111 -j DROP

Много переделывали и на сервере возникла блокировка данного порта. Возникла из-за того, что у Hetzner есть своя специфика, нужно просто не забывать о ней.

Инциденты атак

В конце января, похоже, что роботы внедрились в среду ProxmoxVE, стали захватывать виртуальные машины и использовать их для атак на другие узлы сети Интернет.

Сообщение от 24 января

An attempt to brute-force account passwords over SSH/FTP by a machine in your domain or in your network has been detected. Attached are the host who attacks and time / date of activity. Please take the necessary action(s) to stop this activity immediately. If you have any questions please reply to this email.

  • Host of attacker: наш-IP => static.   .   .   .clients.your-server.de => your-server.de
  • Responsible email contacts: abuse@hetzner.de, abuse@hetzner.com
  • Attacked hosts in our Network: 77.75.251.49, 37.228.156.186, 77.75.251.92

Logfile entries (time is CE(S)T):

  • Mon Jan 24 13:37:16 2022: user: root service: ssh target: 77.75.251.49 source: наш-IP
  • Mon Jan 24 13:36:09 2022: user: root service: ssh target: 37.228.156.186 source: наш-IP
  • Mon Jan 24 13:35:58 2022: user: root service: ssh target: 77.75.251.92 source: наш-IP

The recipient address of this report was provided by the Abuse Contact DB by abusix.com. Abusix provides a free proxy DB service which provides the abuse@ address for all global RIRs. Abusix does not maintain the core DB content but provides a service built on top of the RIR databases. If you wish to change or report a non-working abuse contact address, please contact the appropriate RIR responsible for managing the underlying data. If you have any further questions about using the Abusix Abuse Contact DB, please either contact abusix.com directly via email (info@abusix.com) or visit the URL here: https://abusix.com/contactdb. Abusix is neither responsible nor liable for the content or accuracy of this message.

Попытка запрета на выход

В качестве реакции, была предпринята первая попытка запрета на исходящий траффик:
:INPUT DROP [1:40]
:FORWARD DROP [54:2844]
:OUTPUT DROP [27:13812]

Сообщения от 24 и 26 января

Netscan detected from host наш-IP
timeprotocolsrc_ipsrc_port dest_ipdest_port
Wed Jan 26 05:16:08 2022TCPнаш-IP49896=>192.168.0.122
Wed Jan 26 05:16:08 2022TCPнаш-IP35838=>192.168.0.222
Wed Jan 26 05:16:08 2022TCPнаш-IP52894=>192.168.0.322

Чтобы сохранить место, только верхние линии таблицы опубликованы. Аналогичные атаки повторились 26-го января.

Обновлённая попытка запрета

В качестве реакции, была предпринята новая попытка запрета на исходящий траффик:
-A FORWARD -p tcp -m tcp --dport 22 -j LOG
-A FORWARD -o vmbr0 -p tcp -m tcp --dport 22 -j DROP
-A OUTPUT -p tcp -m tcp --dport 22 -j LOG
:OUTPUT DROP

Сообщение от 27 января

We have received information regarding spam and/or abuse from botnet.tracker@gmail.com. Please would you take all necessary measures to avoid this in the future:

This is a notification of unauthorized uses of systems or networks.

On January 26, 2022, a total of 29 IP addresses from your networks probed my servers for TCP open ports. Due to their dubious behavior, they are suspected to be compromised botnet computers.

The log of TCP port scans is included below for your reference (time zone is UTC). To prevent this mail from getting too big in size, at most 5 attempts from each attacker IP are included. Those connection attempts have all passed TCP's 3-way handshake, so you can trust the source IP addresses to be correct.

If you regularly collect IP traffic information of your network, you will see the IPs listed connected to various TCP ports of my server at the time logged, and I suspect that they also connected to TCP ports of many other IPs.

If a Linux system was at the attacker's IP, you might want to use the command "netstat -ntp" to list its active network connections. If there is still some suspicious connection, find out what PID/program/user ID they belong to. You might find something to help you solve this problem.

Please notify the victims (owners of those botnet computers) so that they can take appropriate action to clean their computers, before even more severe incidents, like data leakage, DDoS, and the rumored NSA spying through hijacked botnets, arise. This also helps prevent botnets from taking up your network bandwidth.

Daily Botnet Statistics

  • (time in UTC)=2022-01-26T21:50:03 (attacker's IP)=наш-IP (IP being scanned)=140^238^215^81 (TCP port being scanned)=4234
  • (time in UTC)=2022-01-26T23:39:58 (attacker's IP)=наш-IP (IP being scanned)=61^61^170^210 (TCP port being scanned)=10056
  • (time in UTC)=2022-01-26T23:56:33 (attacker's IP)=наш-IP (IP being scanned)=172^245^241^177 (TCP port being scanned)=6240
  • (time in UTC)=2022-01-26T23:56:55 (attacker's IP)=наш-IP (IP being scanned)=185^219^132^53 (TCP port being scanned)=1001
  • (time in UTC)=2022-01-26T23:57:45 (attacker's IP)=наш-IP (IP being scanned)=185^219^132^53 (TCP port being scanned)=10081

Отключение машин

Изучение логов показало, что изначальные проблемы связаны с той виртуальной машиной, на которой была установка WordPress. Эта машина была отключена. Далее в логах показалась машина с установкой Moodle. После этого, было решено отключить все машины до выяснения причин и нахождения средств защиты. Фактически, заражённое Железо отправлено на карантин.

Связанные лектио