Hi,
I'm doing a project for school and was wondering if anyone knew whether it is possible to obtain the default gateway (only MAC is required) without prior network knowledge or DHCP? If not i'll have to resort to broadcasting everything which is ugly and messy.
I'm in a man-in-the-middle position, so listening to traffic is not a problem. I was thinking ARP, but cannot find a consistent way of determining the gateway. Something like TCP is also not very reliable, because it only will have gateway MAC if the request is sent outside of subnet.
The man-in-the-middle is achieved with brctl, so I have a list of MAC addresses in which the gateway is always present, looks something like this:
port no mac addr is local? ageing timer 3 00:00:5e:00:01:c9 no 0.11 3 00:01:6c:40:2d:94 no 0.53 3 00:01:6c:40:4f:a3 yes 0.00 3 00:01:6c:55:3a:72 no 55.33 3 00:02:b3:8d:48:a7 no 0.53 3 00:0a:e4:2f:53:bb no 0.59 3 00:0b:82:0a:bc:cc no 16.98 3 00:0c:29:07:3e:de no 9.12
Been cracking my brain over it for a few days now, but have not yet found a reliable way to achieve this. Anyone an idea (or can say for sure it's not possible)?
Thank you!
No comments:
Post a Comment