ICMP yönlendirmeleri nelerdir ve engellenmeleri gerekir mi?


22

Ufw ve Tiger güvenlik denetçisini etkinleştirdikten sonra, şunu söyleyen uyarıları görüyorum:

The system accepts ICMP redirection messages

ICMP yönlendirme mesajları nedir? Güvenlik nedeniyle devre dışı bırakılmalı mı? Öyleyse, ufw güvenlik duvarını kullanarak bunu yapmanın doğru yolu nedir?

Yanıtlar:


28

Bu yazıya göre

ICMP paketlerinin bir ağa saldırmak için kullanılabileceği bazı durumlar vardır. Bu tür bir sorun bugün yaygın olmasa da, bu tür sorunların olduğu durumlar vardır. ICMP yönlendirmesi veya ICMP Tip 5 paketi ile ilgili durum budur. ICMP yönlendirmeleri, ana bilgisayar seçimine bağlı olarak, tek bir ağdan daha iyi yönlendirme yolları belirlemek için yönlendiriciler tarafından kullanılır, bu nedenle temel olarak paketlerin yönlendirilme şeklini ve hedefleri etkiler.

ICMP yönlendirmeleri aracılığıyla, bir ana bilgisayar hangi ağlara yerel ağ içinden erişilebileceğini ve hangilerinin bu tür ağlar için kullanılacak yönlendiriciler olduğunu öğrenebilir. Güvenlik sorunu, ICMP yeniden yönlendirmesi de dahil olmak üzere ICMP paketlerinin sahte olması son derece kolaydır ve bir saldırganın ICMP yeniden yönlendirme paketleri oluşturması oldukça kolaydır.

Atacker daha sonra temel olarak, ana makinenizin yönlendirme tablolarını değiştirebilir ve trafiğini istediği bir yolda dış ana bilgisayarlara yönlendirebilir; yeni yol yönlendirici tarafından 10 dakika boyunca aktif tutulur. Bu durum ve bu senaryoda yer alan güvenlik riskleri nedeniyle, tüm genel arayüzlerden ICMP yönlendirme mesajlarını devre dışı bırakmak (onları yoksaymak) hala önerilen bir uygulamadır.

Dosyayı düzenlemeniz gerekir /etc/sysctl.conf

ve değişim

###################################################################
# Additional settings - these settings can improve the network
# security of the host and prevent against some network attacks
# including spoofing attacks and man in the middle attacks through
# redirection. Some network environments, however, require that these
# settings are disabled so review and enable them as needed.
#
# Do not accept ICMP redirects (prevent MITM attacks)
#net.ipv4.conf.all.accept_redirects = 0
#net.ipv6.conf.all.accept_redirects = 0
# _or_
# Accept ICMP redirects only for gateways listed in our default
# gateway list (enabled by default)
# net.ipv4.conf.all.secure_redirects = 1
#
# Do not send ICMP redirects (we are not a router)
#net.ipv4.conf.all.send_redirects = 0

TO

###################################################################
# Additional settings - these settings can improve the network
# security of the host and prevent against some network attacks
# including spoofing attacks and man in the middle attacks through
# redirection. Some network environments, however, require that these
# settings are disabled so review and enable them as needed.
#
# Do not accept ICMP redirects (prevent MITM attacks)
net.ipv4.conf.all.accept_redirects = 0
net.ipv6.conf.all.accept_redirects = 0
# _or_
# Accept ICMP redirects only for gateways listed in our default
# gateway list (enabled by default)
# net.ipv4.conf.all.secure_redirects = 1
#
# Do not send ICMP redirects (we are not a router)
net.ipv4.conf.all.send_redirects = 0

Sonra yukarıdaki çekirdek parametre değişikliklerini uygulayın:

$ sudo sysctl -p

Teşekkürler. Muhtemelen bu satırları da açman gerek, değil mi? :)
jrdioko

Oh evet. Benim hatam. Onu güncelledi.
Manish Sinha,

4
Değişiklikleri kabul etmek için bunu yapmak zorundasınız: sudo sysctl -p

Net.ipv4.conf.all.accept_redirects = 0 ayarını yapmak hiçbir şey yapmıyor; Dosyadaki or_ dikkat edin . Secure_redirects [ frozentux.net/ipsysctl-tutorial/chunkyhtml/… ] doğru okuyorsam , bu net.ipv4.conf.all.accept_redirects = 0
gerardw

3

Yönlendirme devre dışı bırakılırsa (yönlendirici değilsek) net.ipvX.conf.all.accept_redirects değerinin ORed arayüze özgü değer olacağını unutmayın, örneğin net.ipvX.conf.eth0.accept_redirects. send_redirects her zaman ORed'dir.

Tam düzeltme o zaman olurdu:

net.ipv4.conf.all.accept_redirects = 0
net.ipv6.conf.all.accept_redirects = 0
net.ipv4.conf.all.send_redirects = 0

net.ipv4.conf.default.accept_redirects = 0
net.ipv6.conf.default.accept_redirects = 0
net.ipv4.conf.default.send_redirects = 0

'Varsayılan' ayarları kullanabilmek için ağ arayüzleri tekrar kurulmalıdır.

Sitemizi kullandığınızda şunları okuyup anladığınızı kabul etmiş olursunuz: Çerez Politikası ve Gizlilik Politikası.
Licensed under cc by-sa 3.0 with attribution required.