The terrorist group fired missiles from Yemen on a commercial ship registered in Barbados, officials said.