Melinda, attacks on yachts are extremely rare. The 12 years we lived off the Malacca Strait in Langkawi and Phuket, we heard of only one serious case there of yacht piracy. It was by a couple Burmese punks who fled from a fishing boat they were working on. They tried to steal food from a British yacht. One thing led to another and the bastards killed the captain.
There are cases of ships being attacked and robbed, many allegedly for insurance purposes, but that really does not affect cruisers. The marinas and anchorages in Langkawi and Phuket are busy happy places. Don't worry about bad things happening.