Is it possible to "fake" being connected to a router?
Well, obviously it's not "foolproof". Depending on your capabilities, there are plenty of ways to cheat.
Your professor has a point in that your standard wireless network card won't simply support a simultaneous connection to multiple different APs, thus preventing your from using that particular interface for an Internet connection. (Although with some tinkering you could possibly alternate between networks without letting the professor's AP take notice by tweaking your driver to omit the layer-2 management frames that are supposed to notify the AP of your intent to dis-/reassociate.)
However, there are also easy workarounds:
- Build in a second network adapter (or plug in an external USB one, once the professor leaves) to connect to a network with Internet access. You can easily do this without interrupting your existing connection.
- Connect with your phone or another device instead of your real computer. On that device you can configure the broadcasted MAC address to match the one of your computer. This could fool your professor but probably wouldn't withstand a forensic investigation of the traffic.
Use Bluetooth. Most laptops have built-in BT, so you could just tunnel your traffic via BT to a hidden device that itself is connected to the internet.
Get creative. There are plenty of ways to bridge an apparent air gap. You might use your sound card to transmit data in a small range (or even your hard drive for that matter) - but then again you could also spend that time studying for the exam.
One effective countermeasure might be capturing every student's screen during the exam, but personally I find that very intrusive. Ultimately, if the professor allows students to use their own computers there will always be some way to prepare the devices to cheat.
You don't need to fake being connected to a router. The simplest way to ensure that you're detected as being connected to a router is to be genuinely connected to that router. That doesn't mean you're connected only to that router.
A $10 USB wifi adapter or a slightly more expensive 3G/4G adapter can connect a PC to the Internet, bypassing any other network connection that they might have. The PC would of course need to be configured carefully, make sure that it isn't forwarding packets between its connection to the Internet and its connection to the professor's router or the game would be up.
The only way for the professor to know that the students are cheating would be to retain full control over the computers, i.e. ensure that the students can't make changes to the network configuration and can't activate any hotplugged peripherals. And of course the professor should ensure that the students aren't discreetly using a mobile phone.
In addition to the existing answers: some laptops have built-in SIM card slots. My previous laptop had one which could only be accessed by removing the battery. You could connect the built-in wifi card to the wifi provided by the router, and use the mobile internet for your cheating. This has the advantages that there is no additional wifi network - which the professor could easily track down - and no dongle that the professor might find suspicious. On the downside, you need to have a laptop with that feature (or use a dongle which provides this feature, destroying one of the advantages).