Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
differenza ARP - vanilla/hardened
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Forum di discussione italiano
View previous topic :: View next topic  
Author Message
g3Ko
n00b
n00b


Joined: 17 Sep 2007
Posts: 39

PostPosted: Wed Jun 18, 2008 1:51 am    Post subject: differenza ARP - vanilla/hardened Reply with quote

Salve forumandoli, vi scrivo per provi il mio dubbio riguardo all'implementazione del suddetto protocollo. Mi trovo a giocare con nemesis, e allora mi collego in ssh a due macchine distinte installate rispettivamente con Gentoo Hardened (192.168.0.26) e Gentoo Vanilla (192.168.0.24). Prima di procedere con la descrizione, vi espongo la corretta tabella ARP:
Code:
eleonore:~ beta$ arp -na
? (192.168.0.1) at 0:18:4d:b4:7e:b4 on en1 [ethernet]
? (192.168.0.24) at 0:11:d8:a2:63:92 on en1 [ethernet]
? (192.168.0.26) at 0:20:18:88:38:34 on en1 [ethernet]

Metto entrambi le macchine a pingare il router, e nel frattempo invio il seguente pacchetto ARP:
Code:
eleonore:~ beta$ sudo nemesis arp -vvv -r -S 192.168.0.1 -D 192.168.0.19 -h 0:18:4d:b4:7e:b9

ARP/RARP Packet Injection -=- The NEMESIS Project Version 1.4beta3 (Build 22)

               [MAC] 00:11:24:22:5B:5F > FF:FF:FF:FF:FF:FF
     [Ethernet type] ARP (0x0806)

  [Protocol addr:IP] 192.168.0.1 > 192.168.0.19
 [Hardware addr:MAC] 00:18:4D:B4:7E:B9 > FF:FF:FF:FF:FF:FF
        [ARP opcode] Reply
  [ARP hardware fmt] Ethernet (1)
  [ARP proto format] IP (0x0800)
  [ARP protocol len] 6
  [ARP hardware len] 4

Wrote 42 byte ARP packet through linktype DLT_EN10MB.

ARP Packet Injected

Come si può vedere il MAC del router è stato cambiato nell'ultimo byte in B9 invece che B4. Mentre entrambi le macchine stanno pingano il router ricevono il pacchetto malformato e interrompono il loro ping: questo comportamento era previsto e corretto. Inietto dunque un secondo pacchetto, questa volta con le corrette informazioni:
Code:
eleonore:~ beta$ sudo nemesis arp -vvv -r -S 192.168.0.1 -D 192.168.0.19 -h 0:18:4d:b4:7e:b4

ARP/RARP Packet Injection -=- The NEMESIS Project Version 1.4beta3 (Build 22)

               [MAC] 00:11:24:22:5B:5F > FF:FF:FF:FF:FF:FF
     [Ethernet type] ARP (0x0806)

  [Protocol addr:IP] 192.168.0.1 > 192.168.0.19
 [Hardware addr:MAC] 00:18:4D:B4:7E:B4 > FF:FF:FF:FF:FF:FF
        [ARP opcode] Reply
  [ARP hardware fmt] Ethernet (1)
  [ARP proto format] IP (0x0800)
  [ARP protocol len] 6
  [ARP hardware len] 4

Wrote 42 byte ARP packet through linktype DLT_EN10MB.

ARP Packet Injected
eleonore:~ beta$

e questa volta soltanto la macchina Vanilla riprende il ping. La macchina Hardened (e soltanto lei) continua imperterrita a inviare ARP query:
Code:
03:20:23.300492 ARP, Ethernet (len 6), IPv4 (len 4), Reply 192.168.0.1 is-at 00:18:4d:b4:7e:b9, length 28     #primo pacchetto malformato
03:20:23.694253 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.0.1 tell 192.168.0.26, length 28
03:20:24.694119 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.0.1 tell 192.168.0.26, length 28
03:20:25.694103 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.0.1 tell 192.168.0.26, length 28
03:20:26.694055 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.0.1 tell 192.168.0.26, length 28
03:20:27.694111 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.0.1 tell 192.168.0.26, length 28
03:20:28.694078 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.0.1 tell 192.168.0.26, length 28
03:20:29.693957 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.0.1 tell 192.168.0.26, length 28
03:20:30.694000 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.0.1 tell 192.168.0.26, length 28
03:20:31.693938 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.0.1 tell 192.168.0.26, length 28
03:20:32.693971 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.0.1 tell 192.168.0.26, length 28
03:20:33.038337 ARP, Ethernet (len 6), IPv4 (len 4), Reply 192.168.0.1 is-at 00:18:4d:b4:7e:b4, length 28     #secondo pacchetto malformato
03:20:33.693929 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.0.1 tell 192.168.0.26, length 28
03:20:34.693937 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.0.1 tell 192.168.0.26, length 28
03:20:35.693986 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.0.1 tell 192.168.0.26, length 28
03:20:36.693842 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.0.1 tell 192.168.0.26, length 28
03:20:37.694178 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.0.1 tell 192.168.0.26, length 28
03:20:38.693777 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.0.1 tell 192.168.0.26, length 28
03:20:39.693744 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.0.1 tell 192.168.0.26, length 28
03:20:40.693715 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.0.1 tell 192.168.0.26, length 28
03:20:41.693680 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.0.1 tell 192.168.0.26, length 28
cio che non capisco, è il perche la macchina Hardened per quanto continui a inviare query e riceva anche risposte (con il secondo pacchetto) non riprenda il ping, mentre la macchina Vanilla, che non invia query come fa la Hardened dopo la ricezione del primo pacchetto malformato, riprende a funzionare all'istante quando riceve il secondo pacchetto malformato con le informazioni corrette. Da notare che il router non risponde alle query fatte dalla Hardened. La tabella ARP della Hardened prima del primo pacchetto è corretta, e cambia (ovviamente) dopo che ha ricevuto il primo pacchetto. La cosa strana è che mentre pinga il router, accetta il primo pacchetto malformato, modificando la sua tabella ARP, ma non la ri-modifica al secondo pacchetto: devo interrompere ping e re-inviare il pacchetto (con le informazioni corrette) per ristabilire la ARP table.
Ho controllato e ricontrollato, ma –forse a motivo della stanchezza– non riesco a capire il perche di questo comportamento. Grazie per la pazienza!
Back to top
View user's profile Send private message
djinnZ
Advocate
Advocate


Joined: 02 Nov 2006
Posts: 4831
Location: somewhere in L.O.S.

PostPosted: Wed Jun 18, 2008 11:59 am    Post subject: Reply with quote

dire hardened contro vanilla è dire niente, rivedi quali kernel, quali versioni degli ip tools e quale configurazione hai.
_________________
scita et risus abundant in ore stultorum sed etiam semper severi insani sunt:wink:
mala tempora currunt...mater stultorum semper pregna est :evil:
Murpy'sLaw:If anything can go wrong, it will - O'Toole's Corollary:Murphy was an optimist :wink:
Back to top
View user's profile Send private message
g3Ko
n00b
n00b


Joined: 17 Sep 2007
Posts: 39

PostPosted: Thu Jun 19, 2008 12:13 am    Post subject: Reply with quote

La tua osservazione è piu che giusta:

1. Linux xeno 2.6.23-hardened-r4 #4 SMP Mon Feb 18 03:11:19 CET 2008 i686 Intel(R) Pentium(R) 4 CPU 1500MHz GenuineIntel GNU/Linux
2. Linux argon 2.6.24-gentoo-r8 #1 Wed Jun 4 17:34:03 Local time zone must be set--see zic manua x86_64 GNU/Linux

al di la dell'orologio da impostare, sono due installazioni comuni, senza particolari attenzioni, se non quelle trovate nell'handbook. Cos'altro potrebbe essere utile ai fini della discussione, e come posso ricavare tali informazioni?

Grazie
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Forum di discussione italiano All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum