ntp

ntp etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
ntp etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster

8 Kasım 2017 Çarşamba

DNS Amplification DDoS Attack



WHAT İS DNS ?

The Domain Name System (DNS) is a hierarchical decentralized naming system for computers, services, or other resources connected to the Internet or a private network. It associates various information with domain namesassigned to each of the participating entities. Most prominently, it translates more readily memorized domain names to the numerical IP addresses needed for locating and identifying computer services and devices with the underlying network protocols. By providing a worldwide, distributed directory service, the Domain Name System is an essential component of the functionality on the Internet, that has been in use since 1985

(Wikipedia)




When I want to go to berkdusunur.net with Browser, the browser first asks me if i can translate berkdusunur.net address to me


The system looks in the / etc / hosts directory. If there is an ip address on the berkdusunur.net domain it will use it.
Otherwise it goes to the DNS resolver provided by DHCP. If not, it goes to the root server.
The root servers in Turkey are called ODTU. From there it is directed to the domain name.




DNS INQUIRIES

By leaving the DNS recursion query on, you allow an attacker to use your DNS on your behalf.

DNS Amplification attacks, a professional attack technique, attack by sending packets to you via a DNS server that is in your domain


(If 1 DNS packet is 50 bytes, this packet will be returned in response to 10x ie 500 bytes).

Thus, the attacker will not only use your bandwidth, but at the same time will also provide his / her own privacy, creating the perception that the attacker is like you.


How do we know if our DNS server is open for the recursion query?


You can learn in two shapes

1. If you want to check the settings of your DNS server

2. From the outside DNS server will do DNS Recursion query.




NMAP RECURSIVE INQUIRY

Using a script located in Nmap it helps to detect the weakness of the dns server 1 to get 10


Let's first scan the DNS server list that we found using this script of NMAP.




Command

nmap -sU -p 53 --script=dns-recursion -iL /home/ceh/Masaüstü/recursive-amp4.txt 



TSUNAMI - DNS AMPLIFICATION ATTACK

Tsunami is making DNS requests to the servers in the DNS list that I specify.In the answer, the changed source leads to ip address as well as to the victim
I have displayed help parameters
After downloading the tool and installing the necessary packages







Attacks

./tsunami -s 192.168.1.80 -p 100 -f recursive_dns.txt

-s = destination address
-p = request to be made by each DNS server (default 1)
-f = command to open the server list

After launching the attack, we listen to the packages coming through the wireshark in the virtual system that we attacked



give me one take ten :) 


www.berkdusunur.net
berkdusunurx@gmail.com

NTP AMPLIFICATION DDoS ATTACK


    

     NTP AMPLIFICATION DDoS ATTACK




DDoS Saldırıları

Standart DDoS saldırılarında amaç olabildiğince çok fazla sayıda sistem üzerinden hedef sistemlere belirli sayıda paket gönderimi yaparak devre dışı kalmasını sağlamaktır.

Amplification tipi saldırılarında ise trafik kapasitesi yüksek aracı sistemler kullanarak saldırgan sahip olduğu bandwidth miktarından çok daha fazlasını hedef sisteme yönlendirir.

2014 yılında NTP servisindeki monlist özelliğini istismar eden Amplification DDoS saldırısı 400 Gbps (2013 yılı Türkiye internet çıkışına yakın) civarında idi ve bu rakam dünyadaki en ciddi ddos saldırısı olarak tarihe geçmiştir.

NTP Nedir? Ne İşe Yarar?

NTP, zaman senkronize protokolüdür saati sorduğumuzda bize söyleyen bir servis.
Bu servis yardımı ile bilgisayarlar saatlerini eş zamanlayarak oluşabilecek zaman kayma problemlerini düzeltebilmekteler.

UDP/123 portundan çalışır.

Servis, sadece tanıdıklara saati söyleyebilecek şekilde ayarlanabilecek iken, sistem yöneticilerinin servisi standart ayarlarla kurması nedeniyle, dünya üzerinde her sorana saati söyleyebiliyorlar.

Bir NTP sunucusunun durumunu öğrenmek için aşağıdaki komut yeterli olacaktır.

“ ntpq –pn ”



Zaafiyet Neresinde ?
NTP Monlist Özelliği ve İstismarı
NTP sunucular, kendine daha önce sorgu yapan ip adreslerini bellekte tutar ve bunu aşşagıdaki sorgu ile öğrenmemize fırsat tanır.

“ ntpdc -n -c monlist xxx.xxx.xx.xx|more ”

NTP, UDP tabanlı olduğu için gönderilecek isteklerde kaynak ip adresi olarak ddos saldırısı gerçekleştirilmek istenen hedef verilirse saldırgan 10 Mbps ile 300 Mbps trafik üretebilir.
Bunun gibi 100lerce açık NTP sunucusu bularak yoğun bir trafik çıkartılıyor. Bu yükü’de hedef makineye yönlendiriyor.



Monlist Özelliği Aktif Sistemlerin Tespiti

Nmap’in “ntp monlist” scripti kullanarak bir ağdaki monlist özelliği aktif olan NTP sunucuları tespit edilebilir.



Komut

nmap -sU -pU:123 -Pn -n –script=ntp-monlist xxx.xxx.xx.xx





NTP DDoS SCRİPT


NTPDOS belirttiğimiz dizin altındaki zaafiyetli ntp servislerini kullanarak bu servisler üzerinden DDoS saldırısı yapıyor

Github depolarından “git clone https://github.com/vpnguy/ntpdos.git” komudu ile çekiyoruz

Yardım parametlerini görüntülediğimizde aşşagıdaki gibi bir çıktı veriyor.

Gerekli parametreleri girdiğimiz takdirde NTP servisleri üzerinden servis dışı bırakma saldırısı yapıyor.


NTPDOS ARACI İLE NTP SALDIRILARI NASIL YAPILIR?

Ntpdos isimli toolumuz, gerekli kullanım yönergeleri izlendiğinde istediğimiz şekilde yani ntp üzerinden DDoS atakları gerçekleştirebiliyoruz.

İlk olarak yukarıda anlattığımız gibi monlist özelliği aktif olan ntp sunucularımızı buluyor ve bir dosyaya liste halinde kaydediyoruz.

Gerekli serverları bulmak için bir başka yöntem olarak shodan.io adlı search enginede “ntp port:123” aratarak çıkan serverları da bir liste halinde kaydedersek aynı şekilde bir serverlist elde etmiş oluruz.


Daha sonra ntpdos.py dosyamızı ihtiyacımız olan parametrelerle çalıştırıyoruz.

 

Sırasıyla Komutlar

- hedef ip
- ntp serverların listesinin bulunduğu dosya yolu
- thread sayısı (kaydettiğimiz server sayısından fazla olmamalı)


Şimdi örnek olması açısından biz bir saldırı gerçekleştirelim ve çalışıp çalışmadığını görelim:


 

Ctrl ­+ C komudu ile saldırıyı durdurduk

Neler Yaptık ?
Saldırmak istediğimiz ip adresini ilk parametre olarak ekledik. Daha sonra server listemizin yerini full path olarak belirttik.

En son olarak thread sayısını yani kaç parça kullanacağımızı, kaç serverı atak yaparken kullanacağımızı seçtik, enterladık.

Saldırımız sending yazısından itibaren başladı. Durdurmadığımız sürece saldırı işlemi devam edecektir.

Peki sadece ntpdos mu var?

Elbette hayır. Ntpdos ne kadar rahat kullanıma sahip olsa da alternatif olarak kullanabileceğimiz 2 adet daha araç bulunmakta:
-Saddam
-Ntpdoser


Saddam :
Saddam; Python 2.7 ile yazılmış, sadece ntp amplification değil aynı zamanda dns snmp ssdp amplification atakları da yapılabilen bir araçtır.


Ezber Değil Mantık!
Yaptığımız saldırıda tam olarak istekte bulunduğumuz ntp servislerinin bize döndürdükleri cevabı biz değil hedefe yönelttik.
Böylelikle NTP servislerinin monlist zafiyetini kullanarak hedefimizin bandwitchini doldurmaya yönelik bir DDoS saldırısı gerçekleştirdik

Not:
NTP Monlist özelliği, NTP 4.2.7 ve üzeri sürümlerde getirilen yama ile devredışı bırakılmıştır.