Категорії

  • Категорії
  • CKC
  • Sophos
  • Remote Ethernet Devices (RED)
  • Secure Wi-Fi
  • Безпека мережі
  • DPI
  • Безопасный удаленный доступ
  • Безпека WAF
  • Запобігання витоку даних DLP
  • Захист від DDoS-атак
  • Захист периметру мережі
  • Мережева інфраструктура
  • Wi-Fi
  • Комутатори
  • Керовані smart-комутатори
  • некеровані комутатори
  • Маршрутизатори
  • Мережеві сховища
  • Сервери
  • Системи зберігання даних
  • Системи відеонагляду
  • IP-камери
  • NVR
  • THD-DVR
  • THD-камери
  • Інше
  • Уніфіковані комунікації
  • АТС на конвергентній платформі
  • Контакт центри
Тестування Juniper SRX240: SYN Flood

Тестування Juniper SRX240: SYN Flood

У компанії Juniper є чудовий ряд фаєрволів SRX яка поділяється на for the Branch і for the Datacenters.Лінійка для Branch включає в себе софтварние моделі SRX100, SRX110, SRX210, SRX220, SRX240, SRX550, SRX650 а для датацентрів апаратні SRX1400, SRX3400, SRX3600, SRX5600.Зрозуміло що апаратний фаєрвол краще софварного за рахунок ASIC'ов які дозволяють виконувати функції зацитую мережі без падіння продуктивності пристрою.

Виявилося що софтварная лінійка має вразливість перед атакою SYN FLOOD, при потоці SYN пакетів> 10Kpps завантаження CPU виростає до максимуму, а сам SRX перестає маршрутизировать трафік.Це було перевірено на SRX240 і SRX650.Причому заявлена ​​продуктивність SX240H 1,5Gbps а максимальна кількість сесій 64K.

Отже, на мережі встановлено Juniper SRX240H з наступними адресами:

WAN: XX70.22 / 30
LAN: XX70.97 / 27
В LAN мережі знаходиться вебсервер з адресою XX70.98

На SRX налаштований screen, а доступ до сервера описується політиками (secure policy) між зовнішньою і внутрішньою зонами.Screen застосований до зовнішньої зони.З якогось сервера з зовнішньої мережі запускаємо досатаку на наш вебсервер, трафік проходить через SRX.

Етап 1.

hping3 -S --rand-source --flood XX70.98 -p 80

Дана команда емулює SYN флуд з підробленими адресами в заголовках source генеруються рандомно, швидкість близько 50 000 запитів в секунду (20mbps).
SRX240H розпізнає атаку.До сервера даний трафік не пропускається, все працює коректно, завантаження процесора Juniper при цьому близько 60%

Етап 2.

hping3 -S --flood XX70.98 -p 80

При даній атаці геніріруется SYN флуд але вже з реальним IP зі швидкістю близько 50к запитів в секунду.SRX240H розпізнає цю атаку, на сервер даний трафік не пропускається але при цьому завантаження процесора Juniper 99-100% і сам Juniper лягає і з великими труднощами відпрацьовує запити, сервер при цьому практично недоступний.

Етап 3.

hping3 -S --flood 95.163.70.98 -p 81

Така ж атака але на ПОРТ не відкритий в контексті (policy), завантаження знову 99-100%, Джуніпер лягає.

Якщо доступ до сервера регулювати c допомогою фільтра фаервола (firewall), і повторити цю ж атаку за закриті 81 порт, то завантаження процесора 25-30%, все працює коректно і не лага.

При цих всіх атаках кількість сесій не збільшується

FPC 0PIC 0CPU utilization: 100%Memory utilization: 68%Current flow session: 37Max flow session: 131072
root @ SRX240> show versionHostname: SRX240Model: srx240hJUNOS Software Release [11.4R6.6]

Конфігурація SRX:

version 11.2R4.3;

system {

host-name SRX240;

domain-name gw.test.net;

domain-search test.net;

time-zone Europe / Moscow;
root-authentication {
encrypted-password «$ 1 $ p.f8J / jo $ UgJ1XYdN2VXxyGB.»;## SECRET-DATA
}
name-server {
8.8.8.8;
8.8.4.4;
}
services {
ssh;
telnet;
xnm-clear-text;
web-management {
management-url admin;
http {
interface [vlan.0 ge-0/0 / 0.0];
}
https {
system-generated-certificate;
interface [vlan.0 ge-0/0 / 0.0];
}
}
}
syslog {
archive size 100k files 3;
user * {
any emergency;
}
file messages {
any critical;
authorization info;
}
file interactive-commands {
interactive-commands error;
}
}
license {
autoupdate {
url https://ae1.juniper.net/junos/key_retrieval;
}
}
}
interfaces {
interface-range interfaces-trust {
member-range ge-0/0/1 to ge-0/0/12;
unit 0 {
family ethernet-switching {
vlan {
members vlan-trust;
}
}
}
}
ge-0/0/0 {
description «- to uplink»;
speed 1g;
link-mode full-duplex;
unit 0 {
family inet {
address XX70.22 / 30;
}
}
}
ge-0/0/1 {
description «- to sr01.test.net»;
speed 1g;
link-mode full-duplex;
}
ge-0/0/2 {
description «- to sr02.test.net»;
speed 1g;
link-mode full-duplex;
}
ge-0/0/3 {
description «- to sr03.test.net»;
}
ge-0/0/4 {
description «- to sr04.test.net»;
}
ge-0/0/5 {
description «- to sr05.test.net»;
}
ge-0/0/6 {
description «- to sr06.test.net»;
}
ge-0/0/13 {
unit 0 {
family ethernet-switching;
}
}
ge-0/0/14 {
unit 0 {
family ethernet-switching;
}
}
ge-0/0/15 {
unit 0 {
family ethernet-switching;
}
}
lo0 {
unit 0 {
family inet {
filter {
input protect-re;
}
address 10.255.255.1/32;
}
}
}
vlan {
unit 0 {
description »- to LAN-1";
family inet {
address 192.168.1.222/24;
address XX70.97 / 27;
}
}
}
}
routing-options {
static {
/ * Mikhail Server for emergancy access * /
route 2.2.2.20/32 next-hop XX70.21;
route 2.2.2.19/32 next-hop 1.1.1.185;
route 0.0.0.0/0 next-hop XX70.21;
}
}
protocols {
stp;
}
policy-options {
prefix-list manage-ip {
1.1.1.186/32;
1.1.5.30/32;
XX70.96 / 27;
2.2.2.19/32;
2.2.2.20/32;
}
}
security {
ike {
proposal VPN-Clients {
description VPN-Clients;
authentication-method pre-shared-keys;
dh-group group2;
authentication-algorithm sha1;
encryption-algorithm aes-128-cbc;
lifetime-seconds 28800;
}
policy VPN-Clients {
mode aggressive;
description VPN-Clients;
proposals VPN-Clients;
pre-shared-key ascii-text «$ 9 $ CmbIuORKvL7NbuO7Vs4DjfTzF6Au0ISyKBILN»;## SECRET-DATA
}
gateway VPN-Clients {
ike-policy VPN-Clients;
dynamic {
hostname vpn.test;
connections-limit 10;
ike-user-type shared-ike-id;
}
external-interface ge-0/0 / 0,0;
xauth access-profile VPN-Clients;
}
}
ipsec {
proposal VPN-Clients {
description VPN-Clients;
protocol esp;
authentication-algorithm hmac-sha1-96;
encryption-algorithm 3des-cbc;
lifetime-seconds 3600;
}
policy VPN-Clients {
description VPN-Clients;
perfect-forward-secrecy {
keys group2;
}
proposals VPN-Clients;
}
vpn VPN-Users {
ike {
gateway VPN-Clients;
idle-time 3600;
ipsec-policy VPN-Clients;
}
}
}
dynamic-vpn {
access-profile VPN-Clients;
clients {
VPN-test-users {
remote-protected-resources {
XX70.96 / 27;
}
remote-exceptions {
0.0.0.0/0;
}
ipsec-vpn VPN-Users;
user {
admin;
}
}
}
}
screen {
ids-option default-screen {
icmp {
fragment;
large;
ping-death;
}
ip {
spoofing;
source-route-option;
unknown-protocol;
block-frag;
tear-drop;
}
tcp {
syn-fin;
fin-no-ack;
tcp-no-flag;
syn-frag;
syn-flood {
alarm-threshold 1024;
attack-threshold 200;
source-threshold 1024;
destination-threshold 2048;
timeout 20;
}
land;
winnuke;
}
}
ids-option untrusted-screen {
icmp {
ip-sweep threshold 1000;
fragment;
large;
flood threshold 100;
ping-death;
}
ip {
bad-option;
record-route-option;
timestamp-option;
security-option;
stream-option;
spoofing;
loose-source-route-option;
unknown-protocol;
block-frag;
tear-drop;
}
tcp {
syn-fin;
fin-no-ack;
tcp-no-flag;
syn-frag;
port-scan threshold 1000;
syn-ack-ack-proxy threshold 256;
syn-flood {
alarm-threshold 150;
attack-threshold 100;
source-threshold 100;
destination-threshold 100;
timeout 1;
}
land;
winnuke;
}
udp {
flood threshold 100;
}
limit-session {
source-ip-based 30;
destination-ip-based 70;
}
}
traceoptions {
file screen.log size 50000 world-readable;
flag all;
}
}
policies {
from-zone PUB-LAN1 to-zone UNTRUST {
policy permit_all {
match {
source-address any;
destination-address any;
application any;
}
then {
permit;
}
}
}
from-zone UNTRUST to-zone PUB-LAN1 {
policy WEB {
match {
source-address any;
destination-address [98.sr01.test.net 99.sr01.test.net];
application [junos-http tcp-8888];
}
then {
permit;
}
}
policy MAIL {
match {
source-address any;
destination-address [98.sr01.test.net 99.sr01.test.net];
application [junos-smtp junos-pop3];
}
then {
permit;
}
}
policy SSH {
match {
source-address any;
destination-address [98.sr01.test.net 99.sr01.test.net];
application tcp-5117;
}
then {
permit;
}
}
policy FTP {
match {
source-address any;
destination-address [98.sr01.test.net 99.sr01.test.net];
application ftp-passive;
}
then {
permit;
}
}
policy DNS {
match {
source-address any;
destination-address [100.sr01.test.net 101.sr01.test.net];
application [junos-dns-tcp junos-dns-udp];
}
then {
permit;
}
}
policy MySQL-SR02 {
match {
source-address any;
destination-address 103.sr02.test.net;
application tcp-3306;
}
then {
permit;
}
}
policy SSH-SR02 {
match {
source-address any;
destination-address sr02.test.net;
application tcp-5117;
}
then {
permit;
}
}
policy GS104-SR02 {
match {
source-address any;
destination-address 104.sr02.test.net;
application gs-guard104;
}
then {
permit;
}
}
policy GS106-SR02 {
match {
source-address any;
destination-address 106.sr02.test.net;
application gs-guard106;
}
then {
permit;
}
}
policy GS107-SR02 {
match {
source-address any;
destination-address 107.sr02.test.net;
application gs-guard107;
}
then {
permit;
}
}
policy WEBDMIN {
match {
source-address dep;
destination-address 98.sr01.test.net;
application tcp-10000;
}
then {
permit;
}
}
policy VPN-access {
match {
source-address any;
destination-address sr01.test.net;
application any;
}
then {
permit {
tunnel {
ipsec-vpn VPN-Users;
}
}
}
}
}
}
zones {
security-zone PUB-LAN1 {
address-book {
address 98.sr01.test.net XX70.98 / 32;
address 99.sr01.test.net XX70.99 / 32;
address 100.sr01.test.net XX70.100 / 32;
address 101.sr01.test.net XX70.101 / 32;
address 102.sr01.test.net XX70.102 / 32;
address 103.sr02.test.net XX70.103 / 32;
address 104.sr02.test.net XX70.104 / 32;
address 105.sr02.test.net XX70.105 / 32;
address 106.sr02.test.net XX70.106 / 32;
address 107.sr02.test.net XX70.107 / 32;
address 108.sr03.test.net XX70.108 / 32;
address 109.sr03.test.net XX70.109 / 32;
address 110.sr03.test.net XX70.110 / 32;
address 111.sr03.test.net XX70.111 / 32;
address 112.sr03.test.net XX70.112 / 32;
address-set sr01.test.net {
address 98.sr01.test.net;
address 99.sr01.test.net;
address 100.sr01.test.net;
address 101.sr01.test.net;
address 102.sr01.test.net;
}
address-set sr02.test.net {
address 103.sr02.test.net;
address 104.sr02.test.net;
address 105.sr02.test.net;
address 106.sr02.test.net;
address 107.sr02.test.net;
}
address-set sr03.test.net {
address 108.sr03.test.net;
address 109.sr03.test.net;
address 110.sr03.test.net;
address 111.sr03.test.net;
address 112.sr03.test.net;
}
}
interfaces {
vlan.0 {
host-inbound-traffic {
system-services {
all;
}
}
}
}
}
security-zone UNTRUST {
address-book {
address dep 1.1.1.186/32;
address mikhail-home-1 1.1.5.30/32;
}
screen untrusted-screen;
interfaces {
ge-0/0 / 0.0 {
host-inbound-traffic {
system-services {
ping;
ssh;
https;
ike;
}
}
}
}
}
}
}
firewall {
filter protect-re {
term deny-all {
from {
source-address {
0.0.0.0/0;
}
source-prefix-list {
manage-ip except;
}
protocol tcp;
destination-port [ssh http https];
}
then {
discard;
}
}
term default {
then accept;
}
}
}
access {
profile VPN-Clients {
authentication-order password;
client admin {
firewall-user {
password «$ 9 $ 8 / .XxdGUHhSeMN-k.P5TFn61F3Wx»;## SECRET-DATA
}
}
address-assignment {
pool VPN-Clients;
}
}
address-assignment {
pool VPN-Clients {
family inet {
network 10.255.255.0/24;
range VPN-Clients {
low 10.255.255.50;
high 10.255.255.100;
}
dhcp-attributes {
maximum-lease-time 20000;
domain-name vpn.test.net;
}
}
}
}
firewall-authentication {
web-authentication {
default-profile VPN-Clients;
}
}
}
applications {
application tcp-8888 {
protocol tcp;
destination-port 8888;
}
application ftp-passive {
term ftp-control protocol tcp destination-port 21;
term dynamic-ports protocol tcp destination-port 30000-50000;
}
application tcp-3306 {
protocol tcp;
destination-port 3306;
}
application tcp-5117 {
protocol tcp;
destination-port 5117;
}
application tcp-10000 {
protocol tcp;
destination-port 10000;
}
application gs-guard104 {
term ls-port protocol tcp destination-port 2106;
term gs-port protocol tcp destination-port 7777;
term guard-ls protocol tcp destination-port 37800-37900;
term guard-gs protocol tcp destination-port 48200-48300;
}
application gs-guard106 {
term ls-port protocol tcp destination-port 2106;
term gs-port protocol tcp destination-port 7777;
term guard-ls protocol tcp destination-port 47300-47400;
term guard-gs protocol tcp destination-port 59200-59300;
}
application gs-guard107 {
term ls-port protocol tcp destination-port 2106;
term gs-port protocol tcp destination-port 7777;
term guard-ls protocol tcp destination-port 39000-39100;
term guard-gs protocol tcp destination-port 48700-48800;
}
}
vlans {
vlan-trust {
vlan-id 3;
l3-interface vlan.0;
}
}

Інтегратор провів свої тести на SRX100 і отримав такі ж результати.
Вони використовували такі параметри screen

ids-option test {tcp {syn-flood {attack-threshold 4;source-threshold 4;destination-threshold 4;timeout 50;}}}

Syn-flood генерували наступною командою:

# Hping2 -S -rand-source -i uX -p 21 -c Y victim_IP де X - таймаут між пакетами, Y - кількість пакетів, victim_IP - адреса жертви, розміри пакетів 54bytes

========

тест №1

852pps, 440Kbps

syn-proxy - cpu-load 27%

syn-cookie - cpu-load 4%

========

тест №2

5573pps, 2560Kbps

syn-proxy - cpu-load 100%

syn-cookie - cpu-load 30%

========

тест №2

38724pps, 18400Kbps

syn-proxy - cpu-load 100%

syn-cookie - cpu-load 100%

========

PPS - приблизне (вважали в wireshark'e)

При цьому для SRX100 по даташіта FW (IMIX) 200Mbps, 70Kpps

У Джуніпер був відкритий кейс, де вони визнали що подібна проблема є.

висновки:

Якщо атака SYN FLOOD йде з підміною адрес - софтварний SRX флуд відсіче.Якщо атака йде з реального IP, тоді SRX перестане працювати при будь-якому режимі захисту від SYN Flood (syn-cookie або syn-proxy).2,5 Мбіт / с такого флуду заблокують роботу вашого офісу або веб сервера.Рішення - вибір апаратного SRX у яких такої проблеми не спостерігається.

Потрібна консультація