2 Linux RedHat 8 questions...VNC / Packet Sniffing

TJN23

Golden Member
May 4, 2002
1,670
0
0
I wanted to do an extra credit project for my Linux class which is in a lab of 29 PCs running Red Hat 8 - they are networked together but totally isolated from the outside world (Internet)

I wanted to be able to install a VNC server on a machine and remotely log into it with a VNC client from another machine.

I've heard that the VNC login sends its password over the network in clear text, so I wanted to demonstrate how a packet sniffer might be able to pick up the password as its packets are sent over the wire.

1) Can this be done?

2) Are there VNC / packet sniffing packages available for RedHat (preferably preinstalled on a typical RedHat 8 setup)?

TIA everyone

Tim
 

sciencewhiz

Diamond Member
Jun 30, 2000
5,885
8
81
not preinstalled, but there are redhat 8 packages for vnc and ethereal (packet sniffer)
 

TJN23

Golden Member
May 4, 2002
1,670
0
0
thanks, i'll look for them

so can anyone else confirm that yes, vnc login procedures will send the password in clear text, and that ethereal (for example) could capture the password?
 

cleverhandle

Diamond Member
Dec 17, 2001
3,566
3
81
Originally posted by: TJN23
so can anyone else confirm that yes, vnc login procedures will send the password in clear text...
Sounds familiar. Been a while since I played with VNC, though.
and that ethereal (for example) could capture the password?
If it's in clear text, then you can capture it. Only one way to know for sure...

 

drag

Elite Member
Jul 4, 2002
8,708
0
0
0
Originally posted by: TJN23

1) Can this be done?

2) Are there VNC / packet sniffing packages available for RedHat (preferably preinstalled on a typical RedHat 8 setup)?

1) sure

2) maybe, tcpdump with some scripts to seperate the vnc packets from the the rest.

For a packet sniffer I prefer ethereal

It supports many different protocols, so you can screen out the chaff using it. Then it makes it easy to discect the individual packets and examine what part means what and so on.

If you want to demostrat what a packet sniffer can do, the two easiest examples are telnet session and a some http internet browsing.

Set up the sniffer on the lan, then have someone log into on of the machines using telnet and demostrate that each letter pressed, including passwords, get sent to the host then echoed back (passwords don't get echoed back.) Then you have the computer they logged into, were they logged in from, and then what their username is and what is their password is. More then likely they use the same username and password for both machines, and whala! you have access to both networks more then likely with a convenent username. A simple exploit later, root kit, and another sniffer later and then you have the tools to capture Administrative passwords as they telnet around the local networks.


(just for reference, not pertaining to the school lab lan)
Of course it's a lot easier on a ethernet lan. If they use (correctly configured) switches it makes it a bit more difficult, if you are on the internet then you have to have access(control over) to one of the hundred networks and routers the info passes thru to sniff passwords.

It's all about the collision domain. Older ethernet stuff based off of hubs had network wide collision domains so that you could get any packet on any part of the network. With good switch deployments the packets get routed only to each specific machines. Nowadays a hacker would have to run a passive tap (physical attachment in a ethernet line) off a backbone line or a line to a server(or control the server) to be likely to get good passwords and info. A lot more risky because it would require physical access, but a passive tap successfull put into a ceiling or something, or a wireless lan would be hard to detect with anything but dumb luck.
(/done)

You could also demostrate easily how a person could monitor web traffic and gleam passwords, information, and such of off regular http traffic. Could be usefull for intellegence to run social engineering scams. (think: Nobody would know about that webpage on our local intranet, so it would be ok to lend my password to him, poor guy all that work and he lost his password...) Or get credit card numbers, social security numbers, names, usernames, passwords, e-mail addresses for spammers, blah blah blah.

Just remember though that the easiest way to sniff packets its off of a ethernet network were the computers are connected by hubs. If it's switches (used commonly to maximize bandwidth in full duplex mode) it would make it a bit more difficult, depending on how nice they are and how they are configured.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Oh ya, be very carefull about how and when you try this. Even if you tell your teacher beforehand, still make sure that he/she makes sure that this is ok.

Depending on how brainless/clueless/lemming-like/moronic or how big of a luddite the people who run your school are you could end up in federal court if you aren't carefull. So watch out.

People are stupid sometimes, but usually the lower the IQ(or in this case, the level network and comuter technology knowledga), the more serious they are about following the rules, even ones they don't understand in the least.

I've read stories about people that were showing public leaders how insecure their city/police/county computer systems were (with full discloser and the said leaders present), only to end up in jail later for their trouble.
 

cleverhandle

Diamond Member
Dec 17, 2001
3,566
3
81
@sciencewhiz: Isn't that page about VNC over SSH, though? That would be different than straight up VNC, correct?

@Nothinman: What do you mean? Like just Base64 encoded, or some kind of simple VNC-specific text encapsulation?
 

sciencewhiz

Diamond Member
Jun 30, 2000
5,885
8
81
VNC uses a random challenge-response system to provide the basic authentication that allows you to connect to a VNC server. This is reasonably secure; the password is not sent over the network. Once you are connected, however, traffic between the viewer and the server is unencrypted, and could be snooped by someone with access to the intervening network. We therefore recommend that if security is important to you, you 'tunnel' the VNC protocol through some more secure channel such as SSH.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Yea seems like VNC uses challenge/response now, I could'a swore they used some cheesy passworth obfuscation before though.
 

TJN23

Golden Member
May 4, 2002
1,670
0
0
The setup of this linux lab is purely for educational and experimental purposes. Anytime a machine is compromised, it can be immediately restored with Norton Ghost in about 7 minutes off a single CD. The lab is totally isolated from the College's network and cannot see the Internet.

That being said, I know this project will not get us in trouble. It's simply an attempt to show off (or exploit) some of the things you can do with Linux (and it's for extra credit!)

I'm not sure if the ethernet LAN is configured via switches or hubs, but if I had to say, I would think switches would be used.

Are you guys saying it would be much harder for a packet sniffer to detect a telnet password or http traffic on a switched LAN as opposed to a LAN operated by hubs?
 

cleverhandle

Diamond Member
Dec 17, 2001
3,566
3
81
Originally posted by: TJN23
Are you guys saying it would be much harder for a packet sniffer to detect a telnet password or http traffic on a switched LAN as opposed to a LAN operated by hubs?
Yes. Loosely speaking, with hubs you can easily get in the way of other people's traffic. With switches, you cannot.

 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Are you guys saying it would be much harder for a packet sniffer to detect a telnet password or http traffic on a switched LAN as opposed to a LAN operated by hubs?

Yes, switches by definition only sent packets to the port hosting the machine they're destined for but hubs send every packet to every port.
 

TJN23

Golden Member
May 4, 2002
1,670
0
0
hmm, so i suppose I am SOL??....would there be any way to make a meaningful project using a packet sniffer even though it's a switched network??....

tia

Tim
 

sciencewhiz

Diamond Member
Jun 30, 2000
5,885
8
81
The result of being on a switched network is that you can't snoop other machines, only the one you are on. It would be the same as running ethereal or tcpdump as a nonroot user, because you couldn't put the ethernet card in promiscuous mode.

You could run tcpdump as a background process on one of the machines, and analyze the data afterwards. Ethereal will open files created by tcpdump (they use the same format).
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
There are tools to 'break' switches and turn them into hubs through firmware bugs and such but I've never tried any of them because I'm sure the security guys at work would get pissed =)
 

chsh1ca

Golden Member
Feb 17, 2003
1,179
0
0
There are a lot of other attacks you could try (ARP spoofing, for instance) to pick up the pass, but sniffing would be harder on a properly switched LAN.
 

TJN23

Golden Member
May 4, 2002
1,670
0
0
Originally posted by: chsh1ca
There are a lot of other attacks you could try (ARP spoofing, for instance) to pick up the pass, but sniffing would be harder on a properly switched LAN.

ARP Spoofing, could you tell me more about it? :)
 

mboy

Diamond Member
Jul 29, 2001
3,309
0
0
Originally posted by: TJN23
Originally posted by: chsh1ca
There are a lot of other attacks you could try (ARP spoofing, for instance) to pick up the pass, but sniffing would be harder on a properly switched LAN.

ARP Spoofing, could you tell me more about it? :)

MAC flooding of the Switch would do that to, but better go and do your own research on those as this isn't really the place to discuss that stuff.