Now days everything is communicated via network because everybody is running a short of time. There are so many types of networks but in wireless network when data moves from one place to another, then it becomes susceptible to vulnerabilities. So there is need of secure transmission among the users. In the mobile adoc networks, moving nodes make a network with no special infrastructure and they communicate each other. So communication can be made more secure with the help of mobile agents which are the small programs which collect information from the nodes and send this information to the place where it is decided whether not there is an intrusion into the system.