The MMSI is normally pre-programmed into the AIS unit by the manufacturer or protected by an admin-password. However, on most units the name and type of vessel can be altered by the user.
Most states consider faulty AIS data as a reason for a closer inspection, but around 5 percent of the ships transmitting AIS data today transmit faulty data anyway (has decreased from around 15-20 percent when AIS was mandated last year).