Sub topic 9
Windows Defender Antivirus, Windows Firewall, and UAC
This chapter assumes you know the malware types from earlier chapters, basic networking terms such as ports and profiles, and the difference between standard and administrator accounts. Three built-in Windows tools cover most of what the exam asks here: Microsoft Defender Antivirus, Windows Defender Firewall, and User Account Control (UAC).
What each tool does
| Tool | Protects against | Works at |
|---|---|---|
| Microsoft Defender Antivirus | Malware on the system | Files and processes |
| Windows Defender Firewall | Unwanted network connections | Ports, programs, and network profiles |
| UAC | Unapproved changes to the system | Privilege elevation |
Microsoft Defender Antivirus
Defender Antivirus is the default anti-malware engine in Windows. It scans files when they are opened (real-time protection) and on demand. It also checks for new signatures through Windows Update. A signature is a pattern that identifies known malware.
You manage it in Windows Security under Virus & threat protection. Know these settings:
- Real-time protection: Scans continuously. Turning it off is only temporary and Windows turns it back on.
- Cloud-delivered protection: Checks suspicious files against Microsoft's online data.
- Tamper protection: Blocks other software from changing Defender settings.
- Exclusions: Paths or file types that are not scanned. Use them sparingly, because malware can hide in an excluded folder.
To start a quick scan from an elevated PowerShell session:
Start-MpScan -ScanType QuickScanWindows Defender Firewall
The firewall filters traffic by rules. Inbound rules control traffic coming in, and outbound rules control traffic going out. By default, inbound traffic is blocked unless a rule allows it.
Rules apply per network profile:
- Domain: The PC is joined to an Active Directory domain.
- Private: A trusted network, such as home.
- Public: An untrusted network, such as a café. This profile is the most restrictive.
Make sure the firewall is on for all three profiles:
netsh advfirewall set allprofiles state onUser Account Control
UAC prompts before an action that needs administrator rights. Even an administrator normally runs with a standard token, and the elevated token is used only after approval. A standard user sees a prompt asking for administrator credentials. An administrator sees a consent prompt.
The slider has four levels. The highest, "Always notify," prompts for every change. The default prompts when programs change the computer but not when you change Windows settings. The lowest level turns notifications off, which leaves the system open to silent changes. UAC limits what malware can do when a user runs it unknowingly.
Choosing the right tool
Match the symptom to the tool. A suspicious file points to Defender Antivirus. A blocked or unwanted network connection points to the firewall. An unexpected request to install software or change settings points to UAC, and you should deny it if you did not start the action.
Exercise
A user installs a game that needs inbound connections, and a coworker suggests turning off the firewall. What is the better fix, and which profile should the rule apply to on a café Wi-Fi network?
Show answer
Create an inbound rule that allows only that program or port, and leave the firewall on. On a café network the active profile is Public, so the rule should be limited to the profiles the user actually needs. Allowing it on Public is the riskiest choice.