PING:
IP de la Raspy:
10.1.1.1/30
IP del la tablet:
10.1.1.2/30
El ping recíproco funciona:
Código:
root@kali:~# ping 10.1.1.1
PING 10.1.1.1 (10.1.1.1) 56(84) bytes of data.
64 bytes from 10.1.1.1: icmp_seq=1 ttl=64 time=0.110 ms
root@kali:~# ping 10.1.1.2
PING 10.1.1.2 (10.1.1.2) 56(84) bytes of data.
64 bytes from 10.1.1.2: icmp_seq=1 ttl=64 time=3.68 ms
INTERFACES:
Código:
root@kali:~# cat /etc/network/interfaces
#adhoc
allow-hotplug wlan1
auto wlan1
iface wlan1 inet static
address 10.1.1.1
netmask 255.255.255.252
network 10.1.1.0
wireless-channel 8
wireless-essid mi_red
wireless-mode ad-hoc
wireless-key 1234567890
TARJETAS RED:
Código:
root@kali:~# lsusb
Bus 001 Device 005: ID 148f:2573 Ralink Technology, Corp. RT2501/RT2573 Wireless Adapter
Bus 001 Device 009: ID 0cf3:9271 Atheros Communications, Inc. AR9271 802.11n
RUTAS:
Código:
root@kali:~# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.1.1.0 0.0.0.0 255.255.255.252 U 0 0 0
ARP:
Código:
root@kali:~# arp
Address HWtype HWaddress Flags Mask Iface
10.1.1.2 ether b4:9c:df:XX:b0:a0 C
RED:
Código:
root@kali:~# ifconfig
wlan1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.1.1.1 netmask 255.255.255.252 broadcast 10.1.1.3
inet6 fe80::21d:fff:feb9:1c80 prefixlen 64 scopeid 0x20<link>
ether 00:1d:0f:b9:1c:80 txqueuelen 1000 (Ethernet)
RX packets 639 bytes 92994 (90.8 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 356 bytes 95712 (93.4 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
ELECTRÓNICA:
Código:
root@kali:~# iwconfig
wlan1 IEEE 802.11bg ESSID:"mi_red"
Mode:Ad-Hoc Frequency:2.447 GHz Cell: CE:22:E5:XX:FD:58
Tx-Power=20 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Encryption key:1234-5678-90
Power Management:on
KERNEL:
Código:
root@kali:~# dmesg
(...)
[ 4.334196] usb 1-1.4: New USB device found, idVendor=148f, idProduct=2573
[ 4.334205] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 4.334212] usb 1-1.4: Product: 54M.USB.......
[ 4.334219] usb 1-1.4: Manufacturer: Ralink
[ 4.396530] systemd[1]: Starting Create list of required static device nodes for the current kernel...
[ 4.419557] systemd[1]: Reached target Slices.
(...)
[ 15.944848] wlan1: Trigger new scan to find an IBSS to join
[ 16.709344] wlan1: Creating new IBSS network, BSSID ce:22:e5:XX:fd:58
[ 16.755226] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
SNIFFING (Cuando funciona bien):
Aquí la conversación de una aplicación de la tablet (Emulador de SSH) que se valida correctamente con la Raspy:
Código:
root@kali:~# tshark -i wlan1
Capturing on 'wlan1'
1 0.000000000 10.1.1.2 ‚Üí 10.1.1.1 TCP 78 62315 ‚Üí 22 [SYN] Seq=0 Win=65535 Len=0 MSS=1460 WS=32 TSval=1610465388 TSecr=0 SACK_PERM=1
2 0.000342916 10.1.1.1 ‚Üí 10.1.1.2 TCP 74 22 ‚Üí 62315 [SYN, ACK] Seq=0 Ack=1 Win=28960 Len=0 MSS=1460 SACK_PERM=1 TSval=117859 TSecr=1610465388 WS=128
3 0.993585989 10.1.1.2 ‚Üí 10.1.1.1 TCP 78 [TCP Retransmission] 62315 ‚Üí 22 [SYN] Seq=0 Win=65535 Len=0 MSS=1460 WS=32 TSval=1610466388 TSecr=0 SACK_PERM=1
4 0.993896353 10.1.1.1 ‚Üí 10.1.1.2 TCP 74 [TCP Retransmission] 22 ‚Üí 62315 [SYN, ACK] Seq=0 Ack=1 Win=28960 Len=0 MSS=1460 SACK_PERM=1 TSval=117958 TSecr=1610465388 WS=128
5 1.985299270 10.1.1.1 ‚Üí 10.1.1.2 TCP 74 [TCP Retransmission] 22 ‚Üí 62315 [SYN, ACK] Seq=0 Ack=1 Win=28960 Len=0 MSS=1460 SACK_PERM=1 TSval=118058 TSecr=1610465388 WS=128
6 1.989017864 10.1.1.2 ‚Üí 10.1.1.1 TCP 66 62315 ‚Üí 22 [ACK] Seq=1 Ack=1 Win=131744 Len=0 TSval=1610467384 TSecr=118058
7 1.991597759 10.1.1.2 ‚Üí 10.1.1.1 SSH 84 Client: Protocol (SSH-2.0-vSSH_1.9)
8 1.991936666 10.1.1.1 ‚Üí 10.1.1.2 TCP 66 22 ‚Üí 62315 [ACK] Seq=1 Ack=19 Win=29056 Len=0 TSval=118058 TSecr=1610467385
9 2.039080988 10.1.1.1 ‚Üí 10.1.1.2 SSHv2 98 Server: Protocol (SSH-2.0-OpenSSH_7.1p2 Debian-2)
10 2.235286040 10.1.1.1 ‚Üí 10.1.1.2 SSHv2 1010 Server: Key Exchange Init
11 2.745300311 10.1.1.1 ‚Üí 10.1.1.2 TCP 1042 [TCP Retransmission] 22 ‚Üí 62315 [PSH, ACK] Seq=1 Ack=19 Win=29056 Len=976 TSval=118134 TSecr=1610467385
12 3.765297915 10.1.1.1 ‚Üí 10.1.1.2 TCP 1042 [TCP Retransmission] 22 ‚Üí 62315 [PSH, ACK] Seq=1 Ack=19 Win=29056 Len=976 TSval=118236 TSecr=1610467385
13 5.805298018 10.1.1.1 ‚Üí 10.1.1.2 TCP 1042 [TCP Retransmission] 22 ‚Üí 62315 [PSH, ACK] Seq=1 Ack=19 Win=29056 Len=976 TSval=118440 TSecr=1610467385
14 9.895309944 10.1.1.1 ‚Üí 10.1.1.2 TCP 1042 [TCP Retransmission] 22 ‚Üí 62315 [PSH, ACK] Seq=1 Ack=19 Win=29056 Len=976 TSval=118849 TSecr=1610467385
15 18.085318118 10.1.1.1 ‚Üí 10.1.1.2 TCP 1042 [TCP Retransmission] 22 ‚Üí 62315 [PSH, ACK] Seq=1 Ack=19 Win=29056 Len=976 TSval=119668 TSecr=1610467385
16 34.445332070 10.1.1.1 ‚Üí 10.1.1.2 TCP 1042 [TCP Retransmission] 22 ‚Üí 62315 [PSH, ACK] Seq=1 Ack=19 Win=29056 Len=976 TSval=121304 TSecr=1610467385
17 34.448852487 10.1.1.2 ‚Üí 10.1.1.1 TCP 66 62315 ‚Üí 22 [ACK] Seq=19 Ack=977 Win=130784 Len=0 TSval=1610499830 TSecr=121304
18 34.460779778 10.1.1.2 ‚Üí 10.1.1.1 SSHv2 738 Client: Key Exchange Init
19 34.461069205 10.1.1.1 ‚Üí 10.1.1.2 TCP 66 22 ‚Üí 62315 [ACK] Seq=977 Ack=691 Win=30336 Len=0 TSval=121305 TSecr=1610499839
20 34.464940299 10.1.1.2 ‚Üí 10.1.1.1 SSHv2 90 Client: Diffie-Hellman Group Exchange Request
21 34.465185455 10.1.1.1 ‚Üí 10.1.1.2 TCP 66 22 ‚Üí 62315 [ACK] Seq=977 Ack=715 Win=30336 Len=0 TSval=121305 TSecr=1610499843
22 34.607262539 10.1.1.1 ‚Üí 10.1.1.2 SSHv2 602 Server: Diffie-Hellman Group Exchange Group
23 34.652787695 10.1.1.2 ‚Üí 10.1.1.1 TCP 66 62315 ‚Üí 22 [ACK] Seq=715 Ack=1513 Win=130528 Len=0 TSval=1610500028 TSecr=121320
24 34.778899986 10.1.1.2 ‚Üí 10.1.1.1 SSHv2 594 Client: Diffie-Hellman Group Exchange Init
25 34.779167851 10.1.1.1 ‚Üí 10.1.1.2 TCP 66 22 ‚Üí 62315 [ACK] Seq=1513 Ack=1243 Win=31744 Len=0 TSval=121337 TSecr=1610500152
26 34.933928997 10.1.1.1 ‚Üí 10.1.1.2 SSHv2 1170 Server: Diffie-Hellman Group Exchange Reply, New Keys
27 35.135288268 10.1.1.1 ‚Üí 10.1.1.2 TCP 1170 [TCP Retransmission] 22 ‚Üí 62315 [PSH, ACK] Seq=1513 Ack=1243 Win=31744 Len=1104 TSval=121373 TSecr=1610500152
28 35.345265403 10.1.1.1 ‚Üí 10.1.1.2 TCP 1170 [TCP Retransmission] 22 ‚Üí 62315 [PSH, ACK] Seq=1513 Ack=1243 Win=31744 Len=1104 TSval=121394 TSecr=1610500152
29 35.765306028 10.1.1.1 ‚Üí 10.1.1.2 TCP 1170 [TCP Retransmission] 22 ‚Üí 62315 [PSH, ACK] Seq=1513 Ack=1243 Win=31744 Len=1104 TSval=121436 TSecr=1610500152
30 35.788558163 10.1.1.2 ‚Üí 10.1.1.1 TCP 66 62315 ‚Üí 22 [ACK] Seq=1243 Ack=2617 Win=129952 Len=0 TSval=1610501163 TSecr=121436
31 35.931662173 10.1.1.2 ‚Üí 10.1.1.1 SSHv2 82 Client: New Keys
32 35.931937798 10.1.1.1 ‚Üí 10.1.1.2 TCP 66 22 ‚Üí 62315 [ACK] Seq=2617 Ack=1259 Win=31744 Len=0 TSval=121452 TSecr=1610501307
33 35.950378215 10.1.1.2 ‚Üí 10.1.1.1 SSHv2 130 Client: Encrypted packet (len=64)
34 35.950622278 10.1.1.1 ‚Üí 10.1.1.2 TCP 66 22 ‚Üí 62315 [ACK] Seq=2617 Ack=1323 Win=31744 Len=0 TSval=121454 TSecr=1610501325
35 35.951395663 10.1.1.1 ‚Üí 10.1.1.2 SSHv2 130 Server: Encrypted packet (len=64)
36 35.993183996 10.1.1.2 ‚Üí 10.1.1.1 TCP 66 62315 ‚Üí 22 [ACK] Seq=1323 Ack=2681 Win=131008 Len=0 TSval=1610501365 TSecr=121454
37 35.993716132 10.1.1.2 ‚Üí 10.1.1.1 SSHv2 146 Client: Encrypted packet (len=80)
38 35.995215715 10.1.1.1 ‚Üí 10.1.1.2 SSHv2 146 Server: Encrypted packet (len=80)
39 36.215289882 10.1.1.1 ‚Üí 10.1.1.2 TCP 146 [TCP Retransmission] 22 ‚Üí 62315 [PSH, ACK] Seq=2681 Ack=1403 Win=31744 Len=80 TSval=121481 TSecr=1610501365
40 36.435298059 10.1.1.1 ‚Üí 10.1.1.2 TCP 146 [TCP Retransmission] 22 ‚Üí 62315 [PSH, ACK] Seq=2681 Ack=1403 Win=31744 Len=80 TSval=121503 TSecr=1610501365
41 36.875262798 10.1.1.1 ‚Üí 10.1.1.2 TCP 146 [TCP Retransmission] 22 ‚Üí 62315 [PSH, ACK] Seq=2681 Ack=1403 Win=31744 Len=80 TSval=121547 TSecr=1610501365
42 37.755296808 10.1.1.1 ‚Üí 10.1.1.2 TCP 146 [TCP Retransmission] 22 ‚Üí 62315 [PSH, ACK] Seq=2681 Ack=1403 Win=31744 Len=80 TSval=121635 TSecr=1610501365
43 39.515288891 10.1.1.1 ‚Üí 10.1.1.2 TCP 146 [TCP Retransmission] 22 ‚Üí 62315 [PSH, ACK] Seq=2681 Ack=1403 Win=31744 Len=80 TSval=121811 TSecr=1610501365
44 42.339058629 10.1.1.2 ‚Üí 10.1.1.1 SSHv2 146 Client: [TCP Spurious Retransmission] , Encrypted packet (len=80)
45 42.339364775 10.1.1.1 ‚Üí 10.1.1.2 TCP 78 [TCP Dup ACK 38#1] 22 ‚Üí 62315 [ACK] Seq=2761 Ack=1403 Win=31744 Len=0 TSval=122093 TSecr=1610507708 SLE=1323 SRE=1403
46 43.045293733 10.1.1.1 ‚Üí 10.1.1.2 TCP 146 [TCP Retransmission] 22 ‚Üí 62315 [PSH, ACK] Seq=2681 Ack=1403 Win=31744 Len=80 TSval=122164 TSecr=1610507708
47 43.050879567 10.1.1.2 ‚Üí 10.1.1.1 TCP 66 62315 ‚Üí 22 [ACK] Seq=1403 Ack=2761 Win=130976 Len=0 TSval=1610508419 TSecr=122164
48 43.053022431 10.1.1.2 ‚Üí 10.1.1.1 SSHv2 370 Client: Encrypted packet (len=304)
49 43.053318421 10.1.1.1 ‚Üí 10.1.1.2 TCP 66 22 ‚Üí 62315 [ACK] Seq=2761 Ack=1707 Win=33024 Len=0 TSval=122164 TSecr=1610508422
50 43.252590504 10.1.1.1 ‚Üí 10.1.1.2 SSHv2 114 Server: Encrypted packet (len=48)
51 43.256575035 10.1.1.2 ‚Üí 10.1.1.1 TCP 66 62315 ‚Üí 22 [ACK] Seq=1707 Ack=2809 Win=131008 Len=0 TSval=1610508622 TSecr=122184
52 43.272346442 10.1.1.2 ‚Üí 10.1.1.1 SSHv2 146 Client: Encrypted packet (len=80)
53 43.272654567 10.1.1.1 ‚Üí 10.1.1.2 TCP 66 22 ‚Üí 62315 [ACK] Seq=2809 Ack=1787 Win=33024 Len=0 TSval=122186 TSecr=1610508632
54 43.310877691 10.1.1.1 ‚Üí 10.1.1.2 SSHv2 1026 Server: Encrypted packet (len=960)
55 43.515290243 10.1.1.1 ‚Üí 10.1.1.2 SSHv2 130 Server: Encrypted packet (len=64)
56 43.725277066 10.1.1.1 ‚Üí 10.1.1.2 TCP 1090 [TCP Retransmission] 22 ‚Üí 62315 [PSH, ACK] Seq=2809 Ack=1787 Win=33024 Len=1024 TSval=122232 TSecr=1610508632
57 44.145294358 10.1.1.1 ‚Üí 10.1.1.2 TCP 1090 [TCP Retransmission] 22 ‚Üí 62315 [PSH, ACK] Seq=2809 Ack=1787 Win=33024 Len=1024 TSval=122274 TSecr=1610508632
58 44.985300920 10.1.1.1 ‚Üí 10.1.1.2 TCP 1090 [TCP Retransmission] 22 ‚Üí 62315 [PSH, ACK] Seq=2809 Ack=1787 Win=33024 Len=1024 TSval=122358 TSecr=1610508632
59 44.995441962 10.1.1.2 ‚Üí 10.1.1.1 TCP 66 62315 ‚Üí 22 [ACK] Seq=1787 Ack=3833 Win=130048 Len=0 TSval=1610510359 TSecr=122358
60 44.999485920 10.1.1.2 ‚Üí 10.1.1.1 SSHv2 178 Client: Encrypted packet (len=112)
61 44.999751701 10.1.1.1 ‚Üí 10.1.1.2 TCP 66 22 ‚Üí 62315 [ACK] Seq=3833 Ack=1899 Win=33024 Len=0 TSval=122359 TSecr=1610510364
62 45.001343212 10.1.1.1 ‚Üí 10.1.1.2 SSHv2 114 Server: Encrypted packet (len=48)
63 45.005795555 10.1.1.2 ‚Üí 10.1.1.1 SSHv2 130 Client: Encrypted packet (len=64)
64 45.007625764 10.1.1.1 ‚Üí 10.1.1.2 SSHv2 178 Server: Encrypted packet (len=112)
65 45.008512951 10.1.1.2 ‚Üí 10.1.1.1 TCP 66 62315 ‚Üí 22 [ACK] Seq=1963 Ack=3881 Win=131008 Len=0 TSval=1610510370 TSecr=122359
66 45.015013993 10.1.1.1 ‚Üí 10.1.1.2 SSHv2 466 Server: Encrypted packet (len=400)
67 45.035331389 10.1.1.1 ‚Üí 10.1.1.2 TCP 466 [TCP Retransmission] 22 ‚Üí 62315 [PSH, ACK] Seq=3993 Ack=1963 Win=33024 Len=400 TSval=122363 TSecr=1610510370
68 45.048639826 10.1.1.1 ‚Üí 10.1.1.2 SSHv2 130 Server: Encrypted packet (len=64)
69 45.106201649 10.1.1.2 ‚Üí 10.1.1.1 TCP 78 [TCP Window Update] 62315 ‚Üí 22 [ACK] Seq=1963 Ack=3881 Win=131072 Len=0 TSval=1610510467 TSecr=122359 SLE=3993 SRE=4393
70 45.115286545 10.1.1.1 ‚Üí 10.1.1.2 TCP 178 [TCP Out-Of-Order] 22 ‚Üí 62315 [PSH, ACK] Seq=3881 Ack=1963 Win=33024 Len=112 TSval=122371 TSecr=1610510467
71 45.203071180 10.1.1.2 ‚Üí 10.1.1.1 TCP 66 62315 ‚Üí 22 [ACK] Seq=1963 Ack=4393 Win=130560 Len=0 TSval=1610510565 TSecr=122371
72 45.415308368 10.1.1.1 ‚Üí 10.1.1.2 TCP 130 [TCP Retransmission] 22 ‚Üí 62315 [PSH, ACK] Seq=4393 Ack=1963 Win=33024 Len=64 TSval=122401 TSecr=1610510565
73 45.855264305 10.1.1.1 ‚Üí 10.1.1.2 TCP 130 [TCP Retransmission] 22 ‚Üí 62315 [PSH, ACK] Seq=4393 Ack=1963 Win=33024 Len=64 TSval=122445 TSecr=1610510565
74 46.735295763 10.1.1.1 ‚Üí 10.1.1.2 TCP 130 [TCP Retransmission] 22 ‚Üí 62315 [PSH, ACK] Seq=4393 Ack=1963 Win=33024 Len=64 TSval=122533 TSecr=1610510565
75 46.739193680 10.1.1.2 ‚Üí 10.1.1.1 TCP 66 62315 ‚Üí 22 [ACK] Seq=1963 Ack=4457 Win=131008 Len=0 TSval=1610512100 TSecr=122533
PING/SNIFFING (Cuando funciona mal):
Reacción de la misma aplicación de la tablet (Emulador de SSH) que se intenta comunicar con la Raspy:
Código:
root@kali:~# ping 10.1.1.2
PING 10.1.1.2 (10.1.1.2) 56(84) bytes of data.
From 10.1.1.1 icmp_seq=1 Destination Host Unreachable
From 10.1.1.1 icmp_seq=2 Destination Host Unreachable
From 10.1.1.1 icmp_seq=3 Destination Host Unreachable
root@kali:~# tshark -i wlan1
168 1161.892029804 Raspberr_XX:d5:e3 ‚Üí Broadcast ARP 42 Who has 10.1.1.2? Tell 10.1.1.1
169 1162.882913438 Raspberr_XX:d5:e3 ‚Üí Broadcast ARP 42 Who has 10.1.1.2? Tell 10.1.1.1
170 1163.882965142 Raspberr_XX:d5:e3 ‚Üí Broadcast ARP 42 Who has 10.1.1.2? Tell 10.1.1.1
171 1171.046228839 ba:27:eb:XX:d5:e3 ‚Üí Raspberr_XX:d5:e3 HomePNA 272 [Malformed Packet]
172 1191.081966072 ba:27:eb:XX:d5:e3 ‚Üí Raspberr_XX:d5:e3 HomePNA 272 [Malformed Packet]
(...)
Tener en cuenta que después del reinicio las configuraciones permanecen guardadas.