Chapter 2. Security Tuneup
2.3 Block Files and Viruses
Learning Objectives
- Block specific file types
- Explore and “apply” advanced firewall features
Prerequisites:
- SNAT for the Internet
- Security policy for Inside to Outside
- Interface configuration
- Enable block pages
- Knowledge of previous labs
Scenario: Here we will test out the file blocking, anti-malware, spyware, and spam features of Palo Alto. Sometimes we should block clients from downloading certain file types, and on top of that, implement some sort of antivirus and antispyware solution. We’ll also be “testing” wildfire. A feature that thwarts new exploits from happening.
![Main scenario](https://opentextbc.ca/wp-content/uploads/sites/445/2022/04/2022-04-23-12-21-06-image.png)
Device | Configuration |
---|---|
PaloAlto-1 | management: 192.168.0.1/24 Ethernet1/1: 10.0.0.1/24 Ethernet1/2: DHCP |
Client (webterm) | eth0: 10.0.0.2/24 GW: 10.0.0.1 DNS: 8.8.8.8 |
Management (webterm) | eth0: 192.168.0.2/24 |
Zone | Interface |
---|---|
Inside | Ethernet1/1 |
Outside | Ethernet1/2 |
Create an Antivirus Profile
Under Objects > Security Profiles > Antivirus. Click on default, then Clone.
![Creating an Antivirus Profile](https://opentextbc.ca/wp-content/uploads/sites/445/2023/11/Vir1.jpg)
Click on OK for the next window.
![Cloning the Antivirus profile](https://opentextbc.ca/wp-content/uploads/sites/445/2023/11/Vir2.jpg)
Select the new profile it clones (should be something like default-1).
![Verify the Antivirus profile](https://opentextbc.ca/wp-content/uploads/sites/445/2023/11/Vir3.jpg)
Rename the profile, and tick the option for packet capture.
![Enable Packet Captures under Antivirus Profile](https://opentextbc.ca/wp-content/uploads/sites/445/2023/11/Vir4.jpg)
Then press OK.
Create an Anti-Spyware Profile
Under Objects > Security Profiles > Anti-Spyware. Click Add.
![Add an Anti-Spyware Profile](https://opentextbc.ca/wp-content/uploads/sites/445/2023/11/Vir5.jpg)
Under the signature policies tab, click Add, name it, then configure these:
Rule | Configuration |
---|---|
Medium | Action: Alert Severity: Medium, Low, Informational |
HighAlert | Action: Drop Severity: Critical, High |
![Verify an Anti-Spyware Profile](https://opentextbc.ca/wp-content/uploads/sites/445/2023/11/2022-04-23-12-47-38-image.png)
Then press OK.
Create a File Blocking Profile
Under Objects > Security Profiles > File Blocking. Click Add.
![Add File blocking Profile](https://opentextbc.ca/wp-content/uploads/sites/445/2023/11/Vir6.jpg)
Configure these settings using the add button on the new window that just spawned.
Name | Properties |
---|---|
Applications: any File Types: pdf, encrypted-pdf Action: Block |
|
EXE | Applications: any File Types: exe, com Action: Block |
![Configure the File blocking profile](https://opentextbc.ca/wp-content/uploads/sites/445/2023/11/2022-04-23-12-53-46-image.png)
Then click OK.
Create a WildFire Profile
Under Objects, Security Profiles > WildFire Analysis, click Add.
![Add a WildFire Profile](https://opentextbc.ca/wp-content/uploads/sites/445/2023/11/Vir7.jpg)
Configure these settings using the add button on the new window that just spawned.
Name | Properties |
---|---|
Detect | Applications: any File Types: archive, jar, ms-office |
![Add a WildFire Profile](https://opentextbc.ca/wp-content/uploads/sites/445/2023/11/2022-04-23-13-01-44-image.png)
Then press OK.
Apply Security Profiles to a Security Policy
Under Polices > Security. Click the policy for inside to outside you created.
![Add a Security Policy](https://opentextbc.ca/wp-content/uploads/sites/445/2023/11/Vir8.jpg)
Under the Actions tab, in the Profile Setting subsection. Configure these:
Parameters | Value |
---|---|
Profile Type | Profiles |
Antivirus | Select the one you created |
Anti-Spyware | Select the one you created |
File Blocking | Select the one you created |
WildFire Analysis | Select the one you created |
![Assigning security profiles](https://opentextbc.ca/wp-content/uploads/sites/445/2023/11/2022-04-23-13-05-54-image.png)
Then click OK. Remember to commit your changes!
Test the Security Profiles
Since I do not have a licence, we cannot demonstrate all of these profile features, as you can see when you commit.
![Commit the configuration](https://opentextbc.ca/wp-content/uploads/sites/445/2023/11/Vir9.jpg)
This is ok, we can still test out the file blocking features.
On the client, navigate to a website that hosts PDF files (I used panedufiles.com).
![Verify the configuration](https://opentextbc.ca/wp-content/uploads/sites/445/2023/11/2022-04-23-13-09-01-image.png)
Try and open one of these. If it shows the file blocking screen, it means that the file blocking worked!
![File Transfer Blocked](https://opentextbc.ca/wp-content/uploads/sites/445/2023/11/2022-04-23-13-09-42-image.png)