scoobydope
04-13-2001, 08:47 PM
Ok, to be honest, i couldn't figure out which area to post this in. Its sorta software related.... it could definately fit into security related, and also the networking area would have an interest/solution in the topic. Not to mention the programming folk.
So I am posting it in "General" for lack of a better place to put it.
Basically this is the situation: I have around 600 hosts on a network. Recently it became clear that I have to maintain an absolute sentinel on the IP addresses that are connected to the network. Its fairly easy for a computer to anonymously connect to the network without me seeing it right away. (this is a residential complex with all these apartments connected) The system HAS to run DHCP off an NT server for several reasons.... This, however, leaves open the possibility of anybody connecting their PC to the network and successfully obtaining an IP address. There are live RJ45 jacks located in every suite. (all 550 of them in both 38 story highrises)
Of course, Windows NT has no way to stop assigning DHCP IP addresses. It just gleefully keeps giving them out (192.168.0.0/16). That's like sixtyfive thousand some odd addresses. Sure, i have blocked most of them from being assigned, but there are still many possibilities for getting an IP.
The other crazy thing about NT is that even if you are running DHCP and NEVER assigning static IP addresses, there is nothing stopping someone from assigning themselves their own IP as long as they knew the gateway, subnet and DNS settings. (which they can copy from any legitimately connected system on the network).
The worst part about that is that the only way I, as the administrator, have any idea what is going on with the IP assignments, is through NT's DHCP log that is generated on the fly every day. It gives me the time, IP and mac address of the system connecting. Great, but anybody on the network can set up their system with a static IP and get a solid connection to the network WITHOUT making any entries in the DHCP log or any other log for that matter.
The only way i have found to keep an eye on ALL the systems connected to the network was by running 'superscan' for win98 and sweeping the entire subnet. This worked of course, but i had to run it manually and try to mentally keep track of the differences.
Enter Linux.
I built a new box to connect to the network. I blocked all the ports and servers on it (identd, wu-ftp etc) and set it up running ethereal, portsentry and arpwatch.
the little snoop doggy dogg on the network.
This successfully logs every change of IP address, every new system and every time a MAC address gets a new IP on the whole network.
This also alerts me to people popping onto the network with statically assigned IP addresses.
The only problem is that they have to remain connected to the network in order for me to catch them. Kinda like the old movies where the police have to keep the kidnapper on the phone for as long as possible to complete the trace.
That is me running from hubcloset to hubcloset with my laptop, pinging the new IP and systematically unplugging each hub feed off the switch, then isolating the mother hub, and finally in that closet, ping the new IP and watch the led's on the hubs for a twin flash, connecting me to the final port that the computer is connected to. Then i trace that port to the punchdown panel and read the suite number.
faaaaarhhhgg.
unfortunately, most of these people are connecting at like 9:00am on a sunday morning, and disconnecting at noon the same day. I see that in the log files, but its too late for me to find out where they were coming from.
So what i am looking for, is something that will keep a watchful eye on the /var/log/messages file, and look for things like "flip flop, swapped IP address:"
and as soon as it sees an entry like that generated in the logfile
(cat /var/log/messages | grep flip) and as soon as it picks up the flag i set, ...
it triggers a script which emails my pager with a textline to alert me to the fact that two minutes ago, i got a new visitor on the network.
anyone? anyone?
So I am posting it in "General" for lack of a better place to put it.
Basically this is the situation: I have around 600 hosts on a network. Recently it became clear that I have to maintain an absolute sentinel on the IP addresses that are connected to the network. Its fairly easy for a computer to anonymously connect to the network without me seeing it right away. (this is a residential complex with all these apartments connected) The system HAS to run DHCP off an NT server for several reasons.... This, however, leaves open the possibility of anybody connecting their PC to the network and successfully obtaining an IP address. There are live RJ45 jacks located in every suite. (all 550 of them in both 38 story highrises)
Of course, Windows NT has no way to stop assigning DHCP IP addresses. It just gleefully keeps giving them out (192.168.0.0/16). That's like sixtyfive thousand some odd addresses. Sure, i have blocked most of them from being assigned, but there are still many possibilities for getting an IP.
The other crazy thing about NT is that even if you are running DHCP and NEVER assigning static IP addresses, there is nothing stopping someone from assigning themselves their own IP as long as they knew the gateway, subnet and DNS settings. (which they can copy from any legitimately connected system on the network).
The worst part about that is that the only way I, as the administrator, have any idea what is going on with the IP assignments, is through NT's DHCP log that is generated on the fly every day. It gives me the time, IP and mac address of the system connecting. Great, but anybody on the network can set up their system with a static IP and get a solid connection to the network WITHOUT making any entries in the DHCP log or any other log for that matter.
The only way i have found to keep an eye on ALL the systems connected to the network was by running 'superscan' for win98 and sweeping the entire subnet. This worked of course, but i had to run it manually and try to mentally keep track of the differences.
Enter Linux.
I built a new box to connect to the network. I blocked all the ports and servers on it (identd, wu-ftp etc) and set it up running ethereal, portsentry and arpwatch.
the little snoop doggy dogg on the network.
This successfully logs every change of IP address, every new system and every time a MAC address gets a new IP on the whole network.
This also alerts me to people popping onto the network with statically assigned IP addresses.
The only problem is that they have to remain connected to the network in order for me to catch them. Kinda like the old movies where the police have to keep the kidnapper on the phone for as long as possible to complete the trace.
That is me running from hubcloset to hubcloset with my laptop, pinging the new IP and systematically unplugging each hub feed off the switch, then isolating the mother hub, and finally in that closet, ping the new IP and watch the led's on the hubs for a twin flash, connecting me to the final port that the computer is connected to. Then i trace that port to the punchdown panel and read the suite number.
faaaaarhhhgg.
unfortunately, most of these people are connecting at like 9:00am on a sunday morning, and disconnecting at noon the same day. I see that in the log files, but its too late for me to find out where they were coming from.
So what i am looking for, is something that will keep a watchful eye on the /var/log/messages file, and look for things like "flip flop, swapped IP address:"
and as soon as it sees an entry like that generated in the logfile
(cat /var/log/messages | grep flip) and as soon as it picks up the flag i set, ...
it triggers a script which emails my pager with a textline to alert me to the fact that two minutes ago, i got a new visitor on the network.
anyone? anyone?