How does Malicious Website Infect You?

Countless experts are warning the public about online threats. Malicious software is rapidly evolving. It continuously grows from a pure annoyance to financially damaging applications. Users are often oblivious to such dangers. Most people think that visiting “trusted” websites protect them from such threats. They are usually careful about downloading apps from the Internet.

TotalAv Logo

Stay malware-free with reliable antivirus

Don't compromise your Data and Privacy. TotalAV is a top-notch antivirus program that handles various viruses, trojans, and other malware that may target your devices. It will safeguard your devices and enhance your system performance.


Editor's Choice

✔️ Excellent Malware Detection
✔️ Multiple set of Features
✔️ 30 Day Money-Back

Get TotalAV >

However, a question remains: is it possible to get infected by just visiting a website?

How are Websites Infected?

People often have the belief that malicious websites have a specific “look”. They imagine a poorly-designed site with hundreds of ads and poor content. However, even the most popular or trusted websites can carry infections. Having millions of visitors makes these websites a target of hackers.

There are different methods to infect a website. Hackers take advantage of server vulnerabilities. Servers and hosting services have different security layers. A small vulnerability may be enough for a hacker to take control of a website. For example, Apache and Microsoft Internet Information Services run a significant percent of websites. Both have vulnerabilities which hackers can exploit.

Additionally, the dynamic content in websites can be floodgates to malicious attacks. Such examples are WordPress plugins with known vulnerabilities. Most websites are no longer designed from scratch. WordPress, Drupal, and Joomla! Offer easy-to-use platforms. Wix, Weebly, and other drag-and-drop builders are also popular. Using these platforms make it easy for anyone without in-depth technical knowledge to create a website. It also means they overlook security most of the time.

Also, even websites created by developers rely on different tools and packages to create a dynamic experience. Ads, animation, and other parts of a website use third-party systems. The website itself may have robust protection against malware, but the third tools may not.

  What is PUP Malware?

​​Do you get ​infected just by Opening Site?

​Yes. While having a clean browsing habit reduces the chances of infection, you are still vulnerable online. Here are a few ways:

Drive-bys and Exploit Kits

A drive-by download is a general term which refers to automatically downloading malware on a computer without the user’s knowledge. A malware downloads and installs itself without prompting the user.

How can it do that? Infected websites may contain exploit kits. Exploit kits are pieces of a program which aims to examine software and operating systems for vulnerabilities. Once it identifies any weakness, it downloads malware to “exploit” the vulnerability. It can happen without you noticing anything.

Malicious Advertising

Malicious advertising or malvertising takes advantage of the prolific nature of ads. There are millions of ads on the Internet. And, not all of it is legitimate and follows ethical standards. In 2016, Google took down close to 2 billion advertisements which violated their policies.

Hackers can hack ad networks and spread malware to millions of users. Ads can create pop-ups, redirect users, and use small pieces of programs. These are vulnerable to any attacks.

JavaScript Infections

Javascript infections are specific cases of drive-bys and malicious attacks. JS is a widely popular programming language for creating dynamic content and web applications. W3Techs estimates that around 95% of all websites use Javascript. Sites use Javascript from small animations to full-blown apps such as Google Docs.

Your browser automatically runs Javascript files. An infected website may contain malicious .js files. Once these files are running on your computer, it can download other kinds of malware. Here is an illustration from Heimdal Security:

How does Malicious Websites infect you

  Java Security Issues – How to Fix

Vulnerable Websites

Many websites have several layers of protection. However, you should be on the lookout for these types websites. These sites are commonly malicious and can infect your system.


Porn is ubiquitous as the Internet for obvious reasons. Such websites are a few of the most visited as well. As of the writing of this article (January 2018), sites like xvideos and PornHub are in top 5 and top 15 of the most visited websites according to SimilarWeb.

Porn websites, especially community generated ones, earn through ads. Hackers can use ads to download malware or redirect you to malicious websites.

Piracy and Torrents

Piracy sites and torrent aggregators illegally offer content for free. Torrents itself is not an illegal method of downloading. However, it is a popular option to download pirated movies, music, and other content because of its private nature. Small torrent aggregators are still pop-up even with the crackdown of popular sites in the past years.

These websites often rely on ads for revenue. That is why you will see torrent sites with multiple ads on the page. They are also not known to have the best security layers. It also attracts questionable visitors because of its nature, which makes it open for hackers to use the website to infect computers.

Download Websites

Download websites are one-stop shops to download software. Some may offer free, cracked, or paid software. Favorite sites like CNET’s download, Softpedia, and Ninite are secure as software developers support them. However, much like torrent websites, there are countless smaller sites with similar purposes.

Just like the sites above, these often have multiple ads, low security, and vulnerable to hackers. Moreover, these sites load advertisements and scripts upon opening its web pages. You might be downloading malicious scripts by just visiting the site. Confusing download methods also contribute to the spread of malware. Ads with “download” buttons may redirect you to malicious websites.

  What is Adware?

How to Protect yourself

Protecting yourself against malicious websites is similar to defending yourself against any malware attacks. Everything begins with a clean browsing habit. Stick to reputable websites. Popular websites often have protections in place. Also, here are a few tools you can use:


VirusTotal is a robust online tool to check if a website is malicious. It inspects files, websites (using URLs), and file hash for any viruses, worms, and other malware. It employs over 70 antivirus scanners to catch any threats effectively. Copy and paste a URL before even visiting a website. It runs fast and rates the trustworthiness of a site. It is always updated because it lives online. You can also check for detailed results.

Get VirusTotal

Sucuri SiteCheck

Sucuri SiteCheck is a free website scanner. It accepts URLs and scans a website for malware and other vulnerabilities. Sucuri SiteCheck digs a bit deeper by checking for any exploitations and even blacklisting. It also reviews if a web application uses out of date software. Additionally, it scans DNS, SSL certifications, and WhoIS records. It is useful for both website visitors and website owners alike.

Get Sucuri SiteCheck

MalwareFox Anti-Malware

The best way to protect yourself is to have both an online and offline security. Installing an excellent anti-malware, such as MalwareFox, ensures the protection all the time. MalwareFox protects you from various threats while browsing. It prevents ads, pop-ups, and toolbars from infecting your system. The anti-malware solution is lightweight enough to run in the background all the time.

Moreover, it checks malicious files on your computer. It quarantines a file once it detects malicious activities. MalwareFox’s Zero-Day Attack Protection ensures that your machine is protected even from new threats.

Get MalwareFox Anti-malware Now!

  10 Hacking Techniques Used By Cyber Criminals

Final Thoughts

The options above are just some of the tools you can use to prevent malicious websites from infecting your system. You also have to make sure that everything on your machine is updated, including browsers, antivirus, anti-malware, and your operating system. There are new threats every day, and it takes a little bit of extra effort to adequately protect yourself.

Leave a Comment