Mobile Ad-hoc Network (MANET) is an association of large number of sensor nodes and having self directed commands using the un protected wire less connections. The individual nodes in the network can accompany and leave the network with out any permission. MANET is an infrastructureless network. The network topology is rapidly change due to nodes mobility, resource constraint and bandwidth limitation of wireless medias. This nature of nodes leads to different types of security threats. MANET suffers from disruption so that node not able to take part in path finding methods with a target to spoil the full network functioning. A number of protocols have been found for efficient routing. There are many types of security attacks which disturb the net work operation. In this survey paper focuses of many proposed routing protocols for MANET and types of security attacks and a survey of the existing techniques of detection and prevention of attacks is presented.