Anatomy of a Virus

Today, we will be doing something special. We will writing our own virus. Don’t worry, the code is not malicious, but it demonstrates the power of computer viruses, and how easy it is for anyone with a little programming knowledge (like you guys) to make your own viruses.

Please download the following code:

Step 1: Create a new folder somewhere on your computer, preferably on your desktop or in documents, you can call it ‘foofolder’

Step 2: Open Wing and copy/paste the code above into a new file, call it and save it in ‘foofolder’.

Step 3: Open Wing again, and create a new document, type in “Please don’t mess with this file”, and save it as in the ‘foofolder’.

Optional Step 4: Repeat step 3 but type in something else and name it something else but still with the .foo extension.

Step 5: (Do not run your program in Wing) Open up terminal, change directory to ‘foofolder’, and run “python3”

Step 6: Now, open up the files and anything else that is .foo from ‘foofolder’. You should see the results of the virus.

Step 7: Now make another folder somewhere on your computer, call it ‘anotherfoofolder’.

Step 8: Copy from ‘foofolder’ to ‘anotherfoofolder’.

Step 9: Repeat Step 3 but instead this time create any random .foo files in ‘anotherfoofolder’.

Step 10: Open terminal and change directory into ‘anotherfoofolder’. Now type “./”

Step 11: Open any .foo files from ‘anotherfoofolder’, and see the results.

When done, please copy you ‘foofolder’, make sure you rename it to your name so that it will look different than everyone elses, into the server.

What changes could be made to make this code more malicious?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s