I'm TAing a particular course on system security. A specific example is transitting the password in plain text when developing a web application (as part of a class project).
Over the years a bunch of students don't really 'care about encrypting the passwords' or avoid using SSL as a possible solution (i.e., an SHA-128/256 hash of the password is sent over the wire in case of plain text but still no SSL. So I can conduct a replay attack as a result).
I want to be able to 'demo the dangers' of the man-in-the-middle (MITM) and am not sure how to go about it. Students question if someone is really able to pull it off and are curious on the how. I thought it'd be good to 'show it to them'.
So here are the scenarios:
- Same wifi connection but no control over the wifi settings (i.e. university wifi)
- Same wifi where I can control whatever wifi settings I want (i.e. router etc., under my control in our lab)
- Arbitrary adversary over the internet
Now, I think a 'demo' of 2 and 3 should suffice with an 'idea' of how is #3 exploited in practice (I do not intend to breed hackers. But if there is a way to demo that too it would be an icing on the cake ;)
How exactly can I demo the MITM attack and show them that I got access to their 'plain text' or 'hashed' password and gained access to the said system? Tools to use, scripts to write or a tutorial on 'how to do it' would suffice.