I have lived in Saudi Arabia (1991 and 1997). Freemasonry, and all such organizations are totally illegal in Saudi Arabia. You should be very cautious and circumspect about Freemasonry in any country, with a muslim-majority population. Nevertheless, there are lodges which operate in some of these countries. The Saudi government turns a "blind eye", to organizations which operate on the camps and compounds where foreign oil workers live, as long they operate quietly.
I work internationally, and I am returning to Afghanistan in a couple of weeks. On the military bases, there are USA lodges, all sponsored and chartered by USA Prince Hall Grand Lodges. Sadly, no USA Grand Lodge has never issued a charter for a military traveling lodge, during the longest military conflict in USA history. This is a shame and a disgrace, for USA Freemasonry. Believe me, I have been trying since 2005, to get a lodge underway in Iraq or Afghanistan.
The Grand Lodge of Ontario (Canada) issued a charter for a lodge to operate at Kandahar, and I participated, when I lived there.
I plan to start an informal "Square and Compasses club , when I return to Kabul. We will not be a tyled, chartered lodge, and we will do no Masonic work, but we can fellowship.
Read more at
http://www.cemab4y.blogspot.com