Its been a while since something has been posted about malware. So this time,we gonna develop a mechanism whereby you can spread your malware ie, copy your malware to each and every directory in the system with name same as the name of the directory (if you can provide a ‘folder’ icon to the exe,you can trick the user into executing the file which he apparently thinks as a folder).
The code is straight forward.No rocket science. Just traverse the directories recursively and copy the exe to each directory renaming it to the name of the directory .
I have assumed below that ‘malw.exe‘ is the malware you want to spread and its present in the same directory where the code will be running.
![Malware Replication code [VB 6] Malware Replication code [VB 6]](http://appusajeev.files.wordpress.com/2010/01/rep.png)