In a mobile ad-hoc network, MANET, designing a security routing protocol is an important issue since the mobile nodes and wireless medium are prone to be attacked. However, most of wireless routing protocols concentrated on how to reduce the data transmission time and energy consumption. Wireless routing paths in MANET may be broken or fabricated by attacking. Hence, sending data packets to the destination may failure. For defending the active black hole attacks and the passive fabricated routing attacks, we proposed a preventive security mechanism based on ad-hoc on-demand distance vector routing (AODV), called PSM-AODV. PSM-AODV modified some field in RREQ, RREP, and RERR packets based on AODV. PSM-AODV thus may defend the possible black hole and fabricated routing attacks. Simulation results showed that PSM-AODV could promote the packet delivery rate based on little overhead in control packets.