conexão de rede no kali

1

Eu instalei o Kaliv2 64bit (todos os pacotes atualizados) no vmware e eu quero conectar a internet com o usb wlan (tp-link wn722nn) então eu não uso virtual vmware network e apenas conecto diretamente para o meu usb wlan ( dispositivos removíveis ) mas:

  1. Não consigo encontrar nenhum ícone de rede no painel superior como a imagem ilustrada

    Eu tentei reinstalar o gerenciador de rede, mas nada aconteceu

    sudo apt-get install -d --reinstall network-manager network-manager-gnome
    sudo apt-get install wicd-gtk
    sudo apt-get remove network-manager-gnome network-manager
    

    depois reinicie-o]

  2. Eu me conectei à internet como abaixo, mas sempre que eu reinicio o sistema operacional eu deveria fazer isso novamente para poder usar a internet

    ip link set wlan0 up
    iw wlan0 link
    iw wlan0 scan
    wpa_passphrase ssid-name  >> /etc/wpa_supplicant.conf
    wpa_supplicant -B -D wext -i wlan0 -c /etc/wpa_supplicant.conf
    dhclient wlan0
    sudo /etc/init.d/samba stop
    sudo /etc/init.d/samba start
    

PS. meu kali costumava funcionar corretamente !! saída dmesg para usb

    Line 1499: [    1.204511] ACPI: bus type USB registered
    Line 1500: [    1.204534] usbcore: registered new interface driver usbfs
    Line 1500: [    1.204534] usbcore: registered new interface driver usbfs
    Line 1501: [    1.204542] usbcore: registered new interface driver hub
    Line 1502: [    1.204593] usbcore: registered new device driver usb
    Line 1502: [    1.204593] usbcore: registered new device driver usb
    Line 1503: [    1.205082] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    Line 1507: [    1.212797] uhci_hcd: USB Universal Host Controller Interface driver
    Line 1574: [    1.236127] uhci_hcd 0000:02:00.0: new USB bus registered, assigned bus number 1
    Line 1577: [    1.236659] usb usb1: New USB device found, idVendor=1d6b, idProduct=0001
    Line 1577: [    1.236659] usb usb1: New USB device found, idVendor=1d6b, idProduct=0001
    Line 1577: [    1.236659] usb usb1: New USB device found, idVendor=1d6b, idProduct=0001
    Line 1578: [    1.236661] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    Line 1578: [    1.236661] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    Line 1578: [    1.236661] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    Line 1579: [    1.236662] usb usb1: Product: UHCI Host Controller
    Line 1579: [    1.236662] usb usb1: Product: UHCI Host Controller
    Line 1580: [    1.236663] usb usb1: Manufacturer: Linux 4.0.0-kali1-amd64 uhci_hcd
    Line 1580: [    1.236663] usb usb1: Manufacturer: Linux 4.0.0-kali1-amd64 uhci_hcd
    Line 1581: [    1.236664] usb usb1: SerialNumber: 0000:02:00.0
    Line 1581: [    1.236664] usb usb1: SerialNumber: 0000:02:00.0
    Line 1582: [    1.236891] hub 1-0:1.0: USB hub found
    Line 1590: [    1.548303] usb 1-1: new full-speed USB device number 2 using uhci_hcd
    Line 1590: [    1.548303] usb 1-1: new full-speed USB device number 2 using uhci_hcd
    Line 1642: [    1.604783] ehci-pci 0000:02:03.0: new USB bus registered, assigned bus number 2
    Line 1647: [    1.676125] ehci-pci 0000:02:03.0: USB 2.0 started, EHCI 1.00
    Line 1648: [    1.676217] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
    Line 1648: [    1.676217] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
    Line 1648: [    1.676217] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
    Line 1649: [    1.676219] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    Line 1649: [    1.676219] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    Line 1649: [    1.676219] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    Line 1650: [    1.676220] usb usb2: Product: EHCI Host Controller
    Line 1650: [    1.676220] usb usb2: Product: EHCI Host Controller
    Line 1651: [    1.676221] usb usb2: Manufacturer: Linux 4.0.0-kali1-amd64 ehci_hcd
    Line 1651: [    1.676221] usb usb2: Manufacturer: Linux 4.0.0-kali1-amd64 ehci_hcd
    Line 1652: [    1.676222] usb usb2: SerialNumber: 0000:02:03.0
    Line 1652: [    1.676222] usb usb2: SerialNumber: 0000:02:03.0
    Line 1653: [    1.676370] hub 2-0:1.0: USB hub found
    Line 1655: [    1.695859] usb 1-1: New USB device found, idVendor=0e0f, idProduct=0003
    Line 1655: [    1.695859] usb 1-1: New USB device found, idVendor=0e0f, idProduct=0003
    Line 1656: [    1.695862] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    Line 1656: [    1.695862] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    Line 1657: [    1.695864] usb 1-1: Product: VMware Virtual USB Mouse
    Line 1657: [    1.695864] usb 1-1: Product: VMware Virtual USB Mouse
    Line 1658: [    1.695865] usb 1-1: Manufacturer: VMware
    Line 1660: [    1.705993] usbcore: registered new interface driver usbhid
    Line 1660: [    1.705993] usbcore: registered new interface driver usbhid
    Line 1661: [    1.705995] usbhid: USB HID core driver
    Line 1661: [    1.705995] usbhid: USB HID core driver
    Line 1662: [    1.706742] input: VMware VMware Virtual USB Mouse as /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb1/1-1/1-1:1.0/0003:0E0F:0003.0001/input/input2
    Line 1662: [    1.706742] input: VMware VMware Virtual USB Mouse as /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb1/1-1/1-1:1.0/0003:0E0F:0003.0001/input/input2
    Line 1663: [    1.706894] hid-generic 0003:0E0F:0003.0001: input,hidraw0: USB HID v1.10 Mouse [VMware VMware Virtual USB Mouse] on usb-0000:02:00.0-1/input0
    Line 1663: [    1.706894] hid-generic 0003:0E0F:0003.0001: input,hidraw0: USB HID v1.10 Mouse [VMware VMware Virtual USB Mouse] on usb-0000:02:00.0-1/input0
    Line 1663: [    1.706894] hid-generic 0003:0E0F:0003.0001: input,hidraw0: USB HID v1.10 Mouse [VMware VMware Virtual USB Mouse] on usb-0000:02:00.0-1/input0
    Line 1664: [    1.812396] usb 1-2: new full-speed USB device number 3 using uhci_hcd
    Line 1664: [    1.812396] usb 1-2: new full-speed USB device number 3 using uhci_hcd
    Line 1665: [    1.958291] usb 1-2: New USB device found, idVendor=0e0f, idProduct=0002
    Line 1665: [    1.958291] usb 1-2: New USB device found, idVendor=0e0f, idProduct=0002
    Line 1666: [    1.958294] usb 1-2: New USB device strings: Mfr=0, Product=1, SerialNumber=0
    Line 1666: [    1.958294] usb 1-2: New USB device strings: Mfr=0, Product=1, SerialNumber=0
    Line 1667: [    1.958295] usb 1-2: Product: VMware Virtual USB Hub
    Line 1667: [    1.958295] usb 1-2: Product: VMware Virtual USB Hub
    Line 1668: [    1.966265] hub 1-2:1.0: USB hub found
    Line 1670: [    2.263834] usb 1-2.1: new full-speed USB device number 4 using uhci_hcd
    Line 1670: [    2.263834] usb 1-2.1: new full-speed USB device number 4 using uhci_hcd
    Line 1671: [    2.382120] usb 1-2.1: New USB device found, idVendor=0e0f, idProduct=0008
    Line 1671: [    2.382120] usb 1-2.1: New USB device found, idVendor=0e0f, idProduct=0008
    Line 1672: [    2.382123] usb 1-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    Line 1672: [    2.382123] usb 1-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    Line 1673: [    2.382125] usb 1-2.1: Product: Virtual Bluetooth Adapter
    Line 1674: [    2.382126] usb 1-2.1: Manufacturer: VMware
    Line 1675: [    2.382127] usb 1-2.1: SerialNumber: 000650268328
    Line 1755: [   18.549451] usbcore: registered new interface driver btusb
    Line 1755: [   18.549451] usbcore: registered new interface driver btusb
    Line 1774: [   89.624309] usb 2-1: new high-speed USB device number 2 using ehci-pci
    Line 1774: [   89.624309] usb 2-1: new high-speed USB device number 2 using ehci-pci
    Line 1775: [   89.840913] usb 2-1: New USB device found, idVendor=0cf3, idProduct=9271
    Line 1775: [   89.840913] usb 2-1: New USB device found, idVendor=0cf3, idProduct=9271
    Line 1776: [   89.840917] usb 2-1: New USB device strings: Mfr=16, Product=32, SerialNumber=48
    Line 1776: [   89.840917] usb 2-1: New USB device strings: Mfr=16, Product=32, SerialNumber=48
    Line 1777: [   89.840919] usb 2-1: Product: USB2.0 WLAN
    Line 1777: [   89.840919] usb 2-1: Product: USB2.0 WLAN
    Line 1778: [   89.840920] usb 2-1: Manufacturer: ATHEROS
    Line 1779: [   89.840921] usb 2-1: SerialNumber: 12345
    Line 1792: [   91.401663] usb 2-1: ath9k_htc: Firmware htc_9271.fw requested
    Line 1793: [   91.402105] usbcore: registered new interface driver ath9k_htc
    Line 1794: [   91.423668] usb 2-1: firmware: direct-loading firmware htc_9271.fw
    Line 1795: [   91.727156] usb 2-1: ath9k_htc: Transferred FW: htc_9271.fw, size: 50980

output de interfaces: (durante o meu diagnóstico eu adicionei as linhas para eth0 e wlan0 e depois comentei)

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# allow-hotplug eth0
# iface eth0 inet dhcp

# auto wlan0
# iface wlan0 inet dhcp
    
por Mohammad Yousefi 18.11.2015 / 14:17

2 respostas

1

Chegamos à conclusão de que, descomentando o wlan0 e adicionando uma diretiva para executar o wpa_supplicant, funcionou. Por favor, note que ter o dhcp na interface já faz a invocação do dhclient.

auto wlan0
iface wlan0 inet dhcp
    wpa-conf /etc/wpa_supplicant.conf
    
por 18.11.2015 / 15:54
1

Eu dei a você a resposta tecnicamente correta e, como de costume, recebi uma "resposta melhor", as perguntas que você deveria ter feito.

Usando o kali, eu diria que não é a melhor idéia usar essa caneta para Internet. Você usaria a ethernet da VM (eth0) para ter internet (não importa se a máquina real tem eth0 ou wifi, eth0 na VM usará a conexão com a internet) ... e que a caneta que você tem será de longe melhor usar tanto para fabricar pacotes ou como hostap para atrair PCs para se conectar a ele. Afinal de contas, é provavelmente por isso que você comprou uma caneta especial como essa para Kali.

Vou deixar para você como um exercício para configurar eth0 e bridge ou NAT no VMware.

Atenciosamente

    
por 18.11.2015 / 17:17