A C program declares a 32-byte buffer and a key variable on the stack. It calls gets() - an unsafe function with no bounds checking. Supply more than 32 bytes to overflow the buffer and overwrite key. If key == 0xCAFEBABE, a shell is spawned. Connect via netcat and exploit it remotely.