The success of the Somali pirates (who have gotten over $50 million in ransoms so far) has encouraged pirates, and potential pirates, worldwide. The publicity given to the tactics of the Somali pirates has educated larceny minded boat owners worldwide. These guys know that they aren't going to score a multimillion dollar ransom (you need a place to stow the boat during the negotiations, and only the Somalis have that), but now they know there are splendid robbery prospects with these large ships. Slip aboard in the wee hours, mug the crew, grab everything portable and clean out the safe. In a poor country in West Africa or Southeast Asia, the few thousand bucks you get from a robbery like this is a life changer. And the word is getting around that pulling off stuff like this is easier than you think.
In response to the growing piracy threat, maritime security companies are doing a booming business. One Israeli firm, Mano International Security, has specialized in this kind of work for over three decades. But there is competition, usually divisions of larger firms, and business has never been better. The Israeli firm has long supplied plain clothes security operatives for cruise ships. These men, and women, keep an eye on security matters in general, but they have always been trained to deal with pirates, and terrorists. Other firms are trying to get into this corner of the industry, but the Israelis have set a high standard.
There is plenty of new business from the non-cruise ship segment (over 99 percent of the big ships out there). Most of this consists of training officers and senior crew how to deal with pirates. A lot of this is common sense (like posting lookouts 24/7 when in dangerous waters) and the need to teach crewmembers anti-piracy techniques, and carry out regular drills. The lookouts should be equipped with high end optics, which are useful at sea, even when no pirates are about. Ships that can afford it should upgrade their surface radars to a model that is better at detecting small boats.
There are a lot of simple techniques for fighting off pirates. If your lookouts fail to spot the pirates, and they start to board, having stuff ready to toss overboard at the boarding pirates, often works. Firing a maritime flare gun right at the pirate boat will do lots of damage, because these industrial strength flares use magnesium, which not only burns very bright, but also very, very hot. As in hot enough to burn a hole through the bottom of the pirate boat. You cannot extinguish magnesium with water.
Ships are not supposed to carry guns (many ports forbid armed ships to enter), but some ships have taken to putting a few pistols in the ships safe, and keeping quiet about it. Other ships have installed, or the crews have improvised, a water cannon (basically a very high powered fire hose, with a longer nozzle to provide longer range and a more precise stream of water). A more expensive solution (several thousand dollars) is a sonic cannon (that directs a beam of very loud sound at someone hundreds of meters away), which works in most cases.
But the best defense remains speed. Not only can most large ships outrun speedboats on the high seas (where waves slow down small boats more than huge ones), but the big ship can provide even larger waves with its wake, and that can be enhanced by zig-zagging a bit. Security experts also advise captains to deviate from their official course, because the pirates now have informants in various shipping, insurance and maritime affairs organizations, where they obtain the official course for a ship. Pirates try to use this to set up a night time ambush at sea. But deviating a bit on your official course, the pirates will be left waiting.
Generally, the pirates only get lucky when a merchant ship crew gets sloppy.