Here’s how to get a virus from a .zip file:
For the most part, you can get a virus from a .zip file when you unzip it after downloading it or otherwise putting it on your computer.
Some viruses won’t activate until after you run their installer.
Other malicious software will work in much the same way, meaning zipped folders are usually fine until you unzip them.
So if you want to learn all about how a .zip file can give your computer a virus, then this article is for you.
Let’s jump right into it!
- Internet Viruses: Where Do They Come From?
- Linktr.ee: Legit, Scam, or Virus?
- Phone Virus That Deletes: How To Send?
What Is a .zip File? (2 Functions)
Before I can reasonably explain how you might get a virus from a .zip file, I need to explain what a .zip file is and how it works.
The short answer is that a .zip file is any file made using the ZIP archiving format.
Of course, that answer brings up as many questions as it does explanations, so let’s really get into this for a moment.
Archiving formats are very useful things for computers.
Essentially they are extremely specific sets of instructions that dictate how a file is organized.
By keeping the file organization so strict, an archiving format basically makes it so that every file made using the format follows a specific blueprint.
This blueprint allows the archiving format to actually reconstruct lost data when a file is missing pieces of its own information.
It’s kind of like how you can figure out where all of the bedrooms are supposed to be in a house once it is framed.
The walls aren’t all there, but because houses are mostly framed using the same rules, you can figure out how the house is organized.
Archiving formats do this but on the scale of computerized precision.
The point of all of this is that archiving formats allow for the compression of files.
I’ll explain more about this in the next section, but when a computer compresses files, those files take up less digital space.
So, an archiving format allows you to fit more information on your computer.
Bringing this back to ZIP, it’s an archiving format that is designed for Windows, and .zip files are files made using ZIP.
#1 Compressing Files
Let’s take a closer look at compressing files.
This is a technique that helps with both storing and sharing data.
Let’s say you write a program for Windows computers that is 1 GB large.
That’s a lot of data to take up on a storage drive.
More than that, it’s a lot of data to download.
You want people to be able to download your program (and pay you for that privilege), but it takes a lot of server power to support 1 GB downloads for large numbers of users.
The solution to this problem is pretty simple.
You compress the folders for your program.
By doing this, they take up a lot less space, and instead of everyone downloading 1 GB every time they want your program, they might only have to download a few hundred MB.
It’s a lot less strain on the server.
So, when you download large files, compression is a common technique that helps people share information without using up so much space all the time.
Compression is also useful for storing data.
If you have digital archives, you can compress folders so that you can keep large archives without eating up all of your storage space.
When it comes to ZIP, a compressed file is often called a zipped file, and there is even a little icon on the folder with an image of a zipper.
If the zipper appears closed, the folder is compressed.
If it appears open, it is not compressed.
#2 Decompressing Files
Of course, compression is useful unless files can also be decompressed.
In other words, you need to unzip compressed folders before you can use them normally.
When you unzip a folder, the ZIP archiver looks at the compressed file and the “blueprint” that exists because of the rules of archiving.
It’s able to use this information to reverse engineer the original file in its original form, so any data that was removed during compression is restored completely.
Unzipping a file brings it back to its original state.
This causes it to take up more space, but in many cases, the restored information also makes the file work properly again (especially if it’s an executable or a program).
What Is a Computer Virus?
That was a good crash course on archivers and ZIP, but we’re only halfway home.
We also need to talk about viruses.
In layman’s terms, a computer virus is any type of software that attacks a computer system.
In technical terms, this description isn’t specific enough.
A computer virus is actually a type of malicious software that is able to replicate (much like real-world viruses do).
This replication ability allows a virus to move from one area of a device to another.
It can also potentially move from one device to other devices that share any connectivity (like using the same Wi-Fi).
This infectious nature is part of what makes viruses so scary.
As for what makes them malicious, viruses can do any number of things from completely shutting down a computer to stealing specific bits of information.
The truth is that viruses have been designed for many specific purposes, and there are too many to list them all here.
Ultimately, viruses are designed to be malicious, so one way or another, they intend to cause you problems.
Differences Between Viruses and Other Malicious Software
I want to take a moment to talk about other kinds of malicious software.
The truth is that there are a lot of different types of software out there that can harm you or your computer, and viruses only constitute one form.
In fact, viruses are probably less common today than many other types of malicious software.
I would wager that adware is the most abundant (it’s hard to get a literal count of all of the different malicious programs out there).
There are also keyloggers, ransomware, and plenty of other things to worry about.
The point here is that viruses aren’t the only thing to look out for.
I’m going to explain how you can get a virus from a .zip file, but I’ll also spend time talking about other forms of malicious software.
How Do You Get a Virus From a .zip File? (2 Ways)
Ok. We’ve gone through enough that we can really get into the original question.
When it comes to getting a virus from a .zip file, there are a few possibilities.
The first thing to consider is how you got the .zip file.
Did you download it?
Did you install it from a flash drive?
Did you get it some other way?
This matters a lot.
If the .zip file just showed up on its own, there’s a good chance that the virus is already replicating, and that means your device probably got it from another device on the network.
If you downloaded the .zip file (and it happens to contain a virus), then the virus is most likely inert at that point.
It’s possible for a virus to be active just from a download, but it’s uncommon.
In most cases, the virus needs to be unzipped (like any other program) before it can function properly.
The same would be true if you transferred it from a flash drive.
If you deliberately put the .zip file on your computer and it contains a virus, then it will most likely be inert until you take further action.
You can probably find exceptions, but they will be uncommon.
#1 Unzipping
This is where the real issue starts.
Let’s use an example.
You download a file because you think it will help with something you’re trying to accomplish on your computer.
When you look at the file, you see that it’s called virus.zip (I’m trying to keep the example obvious).
You think, “That’s not what I thought I downloaded. Guess there’s only one way to see what this is,” and you unzip the file.
Clearly, that’s a mistake, but let’s talk about how it works.
Viruses are designed to replicate on their own.
It means that they are self-executing.
Viruses usually don’t give you a pop-up window that asks for your permission every time they do their thing.
What that means is that once you unzip the virus file, it can probably start virusing.
Unzipping is the key step when it comes to viruses that come from a .zip file.
#2 Installing
That said, it’s worth talking about installing software.
If you have ever downloaded a program from the internet, then you probably had to run an installer after the download finished.
So, you went to whatever website, clicked on the download button, and then saw a progress bar.
Eventually, that bar finished, but at that point, you don’t have a working new program.
Instead, you have to go to the downloads folder and double click on the program folder.
Only, that’s when you find out it was compressed, so you unzip it.
After it’s unzipped, you can open the folder, and there’s a bunch of stuff in there, but it’s still not running the program you wanted.
You have to double-click the installer in that folder.
That installer opens a window, walks you through a few steps, and then, at long last, you can use your shiny new program.
So, what happens when the .zip folder has a virus in it?
Well, that depends.
As I already said, plenty of viruses will take off on their own once they are unzipped.
But, more complicated software might not be able to run at that point.
It’s possible that the virus needs you to run an installer.
When that’s the case, you might double-click the installer (usually because you think you’re installing something that isn’t a virus), run through the prompts, and install the software.
Unfortunately, this is a case where the software is malicious and a virus.
The point is that there are cases where an unzipped virus is still inert.
It will never actually work until you give it permission to install.
What About Other Malicious Software?
That covers viruses in .zip files, but what about other malicious software?
For the most part, it’s the same story.
Most malicious programs can’t run while they’re still compressed, so you have to unzip them first.
From there, it depends on how the software is designed.
A lot of malicious software actually won’t run just from being unzipped.
It will wait until you manually install it, and when you do, it will formally ask for your permission to run.
There’s a reason for this.
Windows (and other systems) has security features built into it.
In general, software can’t run without your permission.
Now, it’s certainly possible to construct malicious software that can get around this security, but it takes a lot of work.
A lot of malicious programmers have found that it’s easier to ask you to install their evil programs just like you would any other.
If you give them permission, then they can do their dastardly things, and they didn’t have to outsmart Windows security features along the way.
The point here is simple.
Don’t install things that you don’t recognize.
More importantly, if you didn’t ask for it, don’t give it permission.
One of the most common ways to get malicious software is to download a .zip folder that includes something you really do want.
The malicious software is just stowing away in that folder and trying to sneak past security.
So, when the program you actually want tries to install, you might also get a prompt asking for permission to install something else.
If you click through the prompts without reading them, you can give malicious software permission, and then you’re in a bad spot.