Sub topic 13
Practicing security configuration
This chapter covers how to rehearse the security objectives in your virtual machine (VM) lab. It assumes you can already create a Windows guest and a Linux guest and take snapshots, which earlier chapters covered. You should also know basic terms such as firewall, permission, and encryption.
Why configuration practice matters
The A+ security objectives are mostly about choosing the right setting, not reciting definitions. Exam questions describe a situation, such as a shared workstation, a lost laptop, or a suspicious pop-up. They then ask which control fits. Clicking through the real settings builds the recall you need to answer these quickly.
Security practice is also the safest part of the lab to break things in. A VM that you lock yourself out of costs one snapshot revert.
Set up a safe practice routine
Use the same loop for every exercise. It protects your lab and teaches you to verify a change instead of assuming it worked.
Change one setting at a time. If you change three things and something breaks, you will not know which setting caused it.
Accounts and authentication
Start with local accounts, since they are easy to test. In an elevated PowerShell window on the Windows guest, create a standard user and set a lockout policy:
$pw = Read-Host -AsSecureString "Password for labuser"
New-LocalUser -Name "labuser" -Password $pw -FullName "Lab User" -Description "Standard test account"
Add-LocalGroupMember -Group "Users" -Member "labuser"
net accounts /lockoutthreshold:5 /lockoutduration:15 /lockoutwindow:15
net accountsThen sign in as labuser and enter a wrong password five times. Watch the account lock, and unlock it from the administrator account. Also try these:
- Open
lusrmgr.mscand compare the membership of the Users and Administrators groups. - Try an administrative action as
labuserand watch the User Account Control (UAC) prompt ask for credentials. - Open Settings, then Accounts, then Sign-in options, and note which methods the guest offers (password, PIN, and others, depending on the VM).
Firewall rules
A firewall is software that allows or blocks network traffic by rule. Check the Windows Defender Firewall profiles, then add a rule and test it:
Get-NetFirewallProfile | Select-Object Name, Enabled
New-NetFirewallRule -DisplayName "Lab Block Outbound Telnet" -Direction Outbound -Protocol TCP -RemotePort 23 -Action Block
Get-NetFirewallRule -DisplayName "Lab Block Outbound Telnet" | Format-List DisplayName, Direction, Action, EnabledOn the Linux guest, use Uncomplicated Firewall (ufw). Allow SSH before enabling the firewall. Otherwise a remote session will drop.
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow 22/tcp
sudo ufw enable
sudo ufw status verboseTest by trying to reach a blocked port from the other guest. Reuse the ping and port tests from the networking chapter. Note that a rule's direction (inbound or outbound) and its profile (Domain, Private, or Public) both decide whether it applies.
File permissions and encryption
Windows uses NTFS permissions, which you view on a folder's Security tab. Create a folder, deny labuser write access, and confirm that the user can read but not save. Then check what happens when a user is in two groups with different permissions. A deny entry overrides allow entries.
Linux uses owner, group, and other permission bits:
mkdir ~/shared && touch ~/shared/report.txt
ls -l ~/shared/report.txt
chmod 640 ~/shared/report.txt
ls -l ~/shared/report.txt640 means the owner can read and write, the group can read, and others get nothing. Practice converting between the numeric form (4 read, 2 write, 1 execute) and the rwx form until it is automatic.
For encryption, learn the difference between full-disk encryption (BitLocker on Windows), file-level encryption (Encrypting File System), and encrypted network traffic.
:::callout :::
Malware response and endpoint protection
Practice the response steps, not the infection. Use Windows Security to confirm real-time protection is on, then run a scan from the Virus and threat protection page. Use the harmless EICAR test file, a standard text string that antivirus products detect on purpose. Search for the current string on the EICAR site and type it into a text file inside the VM. Watch the antivirus quarantine it, and find the quarantine and history pages.
Rehearse the order of response: identify symptoms, quarantine the machine, disable System Restore, remediate, schedule scans, re-enable System Restore, and educate the user. Write the steps from memory, then check them against the objectives.
Common mistakes
| Mistake | What goes wrong | Better habit |
|---|---|---|
| Changing many settings at once | You cannot tell which one broke access | One change, then test |
| Enabling a firewall over a remote session | Your own connection is blocked | Add the allow rule first |
| Skipping verification | You only know the setting exists, not what it does | Always attempt the blocked action |
| Practicing only on the host | A mistake affects your daily machine | Use snapshots in a VM |
| Memorizing menus only | Questions describe scenarios, not menu paths | Say why each control fits a scenario |
Mapping practice to the objectives
For each security objective, log three things: the setting you changed, the test you ran, and the result. Keep this in a short notes file. When a practice exam question about, say, lockout policies appears, you can recall the exact behavior you saw. Mark any objective you could not demonstrate as weak, and carry it into the next weekly review.
Exercise
On your Windows guest you set an account lockout threshold of 5 and then tried six wrong passwords as labuser. Name two checks that confirm the policy works, and say what you would do to recover the lab afterward.
Show answer
First, run net accounts to confirm the lockout threshold reads 5. Second, sign in with wrong passwords and confirm that the account locks, either by seeing the lockout message at the sixth attempt or by seeing the account marked locked in lusrmgr.msc. To recover, unlock the account from an administrator session, or revert to the snapshot taken before the change.
Exercise
A Linux file shows -rw-r----- in ls -l. What is the numeric mode, and who can write to the file?
Show answer
The numeric mode is 640. Only the owner can write to the file. The group can read it, and others have no access.