I dont think its in the engine or gearbox, the engine would have gone bang, when your in the car switch off the engine while holding the gear lever (assuning its manual) see if you feel the rattle through the gear stick. 2nd thing, have you opened the bonnet and had somone else turn the engine off, it sounds more like a pump mounting, or bearing problem, if you can only hear it when the engine is not under strain.