Soviet Cosmonauts went into space armed with the TP-82 - essentially the Swiss army knife of firearms. A shotgun, carbine, and machete all in one.
However, those were taken most for reentry into the Russian wilderness and incase they landed in hostile territory, rather than an armed defense against aliens.
To my knowledge there hasn't ever been specific, definitive training for astronauts(Or cosmonauts) for first contact.
On a related note, does any country on earth have any official procedure whatsoever when it comes to dealing with extra-terrestrials?
I think many people may have very bad concepts of the size of our solar system with respect to the size of the galaxy and greater universe. Preparing lunar astronauts for First Contact is like giving an American child a beginner's course in Chinese before he leaves bed to brush his teeth so that he can communicate with any Chinese people he might bump into on his way to the bathroom.
Another noteworthy bit of info on this. SETI uses the RIO scale for gauging how important any extra terrestrial communication is. It's described by the website as, "It is an ordinal scale between zero and ten, used to quantify the impact of any public announcement regarding evidence of extraterrestrial intelligence." http://www.setileague.org/iaaseti/rioscale.htm
Post Script: I know that the YouTube channel, "V sauce", has an interesting video on the topic as well, it's worth observing of you're interested in this subject.