what's to stop idiots or terrorists (if there's a difference) from getting one of these radio themselves and giving flight directives that could lead to something bad happen?
While this sounds plausible in a b-movie sort of way (the movie Die Hard 2
comes immediately to mind), the reality is that there are many other barriers that would prevent a pilot from actually flying a complete sequence of vectors that would put the aircraft in jeopardy.
First, there is the fact that pilots recognize the controller's voice, if only long enough that had a third party attempted to issue an instruction it would raise a flag in the pilot's mind that something has changed.
Secondly, the so-called terrorist would have to have a radio/tower powerful enough to be able to transmit clearly. A simple aviation handheld radio based on the ground might be able to receive clearly, but transmitting clearly is another story entirely.
Thirdly, assuming a pilot blindly decided to follow the instruction, the pilot would read the instruction back as s/he started the process of following it. At this point the "real" controller would catch this readback and immediately respond if nothing else with a "What are you doing?" that would quickly correct the errant instruction.
Fourthly, an ATC impostor would need access to real-time radar data in order to issue believable instructions that would result in either a mid-air or controlled flight into terrain. While there are ways to do this, it is not as simple as pulling up a website and getting the data. However, since US-based commercial aircraft have both TCAS (traffic collision) and TWAS (terrain warning) systems on board, this type of accident would be very unlikely.
And finally, pilots are the ultimate responsibility for the safety of the flight. Thus, assuming the very unlikely event that the impostor were able to get away with one or more instructions that lead an aircraft into some type of dangerous scenario, the pilots have enough on-board systems to provide a real-time situational picture surrounding the aircraft. Couple that with the pilot's authority to "UNABLE" any command that might put the aircraft in danger, and you have a very poor method for attempting to cause harm to a flight simply by acting like a controller on the frequency.