I learned that malware, short for malicious software, refers to any intrusive software developed by cybercriminals (often called hackers) to steal data and damage or destroy computers and computer systems. Examples of common malware include viruses, worms, Trojan horses, spyware, adware, and ransomware.
Firewalls are like physical security walls situated between an organization's internal network and any external public networks such as the internet. The firewall protects an internal network from access by unauthorized users on an external network.
Users need access to the internet for business reasons, but they can inadvertently download malware, which can impact network and data security.
Malware threats can be present, and organizations can use various techniques and services to mitigate these threats (for example, firewalls, antivirus software, and user control best practice). This work focused on countermeasure techniques using a firewall.
I was hired by AnyCompany as a new security engineer, and the company tasked me with hardening the company's security perimeter. There had been reports of users accidentally downloading malware after accessing specific websites. The IT team for AnyCompany provided me with the URLs of the sites hosting the malware. It was my job to find a solution to mitigate access to these malicious actor files.
After completion, I was able to:
First, I needed to confirm that the malware sites were accessible through the current network and network firewall that AnyCompany was using. I used an isolated TestInstance EC2 instance to run commands and download the same malicious files that users had downloaded.
I used the ls command to confirm that the malware files were downloaded. The output showed the java_jre17_exec.html and js_crypto_miner.html files that were downloaded.
In this task, I confirmed that the URL hosting the malware files was accessible through the current network and network firewall that AnyCompany was using. I used an isolated TestInstance EC2 instance to run commands and download the same malicious files that users downloaded. I now needed to fix the AnyCompany network firewall to stop access to this site.
In this task, I inspected the AWS Network Firewall firewall that was pre-configured during setup. Updating this firewall was the top priority that AnyCompany had issued to me as the new security engineer.
I followed these steps:
A firewall policy defines the behavior of the firewall in a collection of stateless and stateful rule groups and other settings.
These settings now forward all packets to a stateful rule group for further inspection.
In this task, I inspected the network firewall and updated the firewall policy. I then updated the firewall policy to forward all packets for stateful rule inspection.
In this task, I created a network firewall rule group with rules that block access to the malicious URLs. I later attached this rule group to my firewall policy.
A network firewall rule group is a reusable set of criteria for inspecting and handling network traffic. You add one or more rule groups to a firewall policy as part of policy configuration. This rule group blocks access to the malicious actor URLs.
The two Suricata rules that I added now block traffic that matches the http_uri contents /data/js_crypto_miner.html and http_uri contents /data/js_crypto_miner.html URLs when the traffic is initiated from the LabVPC to the public network.
In this task, I created a stateful network firewall rule group that uses Suricata rules. Once I attached this rule group to the network firewall, it blocks the malicious websites that AnyCompany users accessed.
In this task, I attached the network firewall rule group that I created to the network firewall.
At the top of the page, I saw a green You successfully updated FirewallPolicy banner.
I scrolled to the Stateful rule groups section to see the successfully added firewall rule group.
I attached the rule group to the firewall, which blocks attempts to access the malicious actor files hosted within the website.
In this task, I logged back into the TestInstance to test that the network firewall properly blocks attempts to access the malicious website files.
The output displayed the following:
This output showed that the malware site and file were no longer accessible and had been successfully blocked by the network firewall.
The output displayed the following:
I saw a blank output, which confirmed that the files had been removed.
In this task, I verified that the network firewall had been updated and configured properly to block the malicious websites. I confirmed that access was blocked by logging into the TestInstance EC2 instance and running wget commands to these files. Users are now unable to access these malicious files from this website.
Congratulations! I successfully: