RANGER GAMEZ

CompTIA Security+ (SY0-701) · chapter 18 of 27

Month 7: Upgrade the defenses

Objective 4.5

Network-level capabilities

Firewalls: rules, ACLs, ports, screened subnets

Firewall rules and access lists (ACLs) are read top-down; the first match wins, with an implicit deny at the end. Allow only the needed ports/protocols (443 for HTTPS, 22 for SSH) from the needed sources. Put public servers in a screened subnet (DMZ) between the internet and the internal network, so a compromised web server still cannot reach inside freely.

#  from     to                 port  act
1  any      DMZ web 10.1.1.10  443   allow
2  DMZ web  DB 10.2.2.5        1433  allow
3  any      any                any   deny

Exam tip Trap: rule order matters. A broad allow above a specific deny means the deny never fires.

IDS/IPS: signatures and trends

Signatures match known attack patterns: precise and low noise, but blind to new attacks. Trends (anomaly or behavior-based detection) learn what normal traffic looks like and flag deviations, so they can catch new attacks but raise more false positives. Keep signatures updated and baselines realistic.

Web filtering

Control which websites users can reach.

  • Agent-based: software on each device filters wherever it goes, even at home.
  • Centralized proxy: all web traffic passes through one proxy at the company edge.
  • URL scanning: checks each requested URL against threat data. Content categorization: blocks by category (gambling, malware).
  • Block rules: explicit allow/deny lists. Reputation: scores sites by their history; block low-reputation domains.

DNS filtering

DNS filtering stops users from resolving known malicious or blocked domains, so connections fail before they begin. It works for every app on the device, not only browsers, and is cheap to deploy at the resolver.

Objective 4.5

Systems, protocols, email and endpoints

Operating system security

Group Policy centrally pushes security settings (password rules, firewall, lock screens, software restrictions) to Windows computers in an Active Directory domain. SELinux (Security-Enhanced Linux) adds mandatory access control to Linux: policies limit what each process can touch, even if it runs as root. Modes: enforcing, permissive (log only) and disabled.

Implementation of secure protocols

Three decisions. Protocol selection: use the secure version (SSH not Telnet, SFTP not FTP, HTTPS not HTTP, LDAPS not LDAP, SNMPv3 not v1/v2c). Port selection: use the right, expected port for the secure service and close the insecure one. Transport method: make sure the data is actually protected in transit, by the protocol itself (TLS) or a tunnel (VPN, IPSec).

Insecure       port   Secure          port
Telnet         23     SSH             22
FTP            20/21  SFTP            22
HTTP           80     HTTPS           443
LDAP           389    LDAPS           636
SNMP v1/v2c    161    SNMPv3          161

Exam tip Trap: moving a service to a non-standard port is not encryption. Telnet on port 2323 is still clear text.

Email security

Three DNS-based checks stop spoofed mail, plus a gateway:

  • SPF (Sender Policy Framework): a DNS TXT record listing which servers may send mail for the domain.
  • DKIM (DomainKeys Identified Mail): the sender signs messages with a private key; receivers check with the public key in DNS.
  • DMARC (Domain-based Message Authentication Reporting and Conformance): tells receivers what to do when SPF/DKIM fail (none, quarantine, reject) and sends reports.
  • Gateway: an email security gateway filters spam, phishing, malware and data leaving by email.

Exam tip Memory trick: SPF = who may send. DKIM = was it signed. DMARC = what to do if not, and tell me.

Endpoint and data capabilities

Know each tool's job:

  • File integrity monitoring (FIM): alerts when important files change (system binaries, configs).
  • DLP: detects and blocks sensitive data leaving the organization.
  • NAC (network access control): checks a device's identity and health (patches, AV) before letting it on the network.
  • EDR/XDR: EDR records and responds to threats on endpoints; XDR extends that across endpoints, network, cloud and email.
  • User behavior analytics (UBA): learns normal user behavior and flags anomalies like 3 a.m. bulk downloads.

Check yourself 1Kibble & Co. wants receiving mail servers to reject messages that claim to be from its domain but fail authentication, and to send back reports. Which record must it publish?

  1. SPF
  2. DKIM
  3. MX
  4. DMARC
Show the answer

Answer: D. DMARC

DMARC sets the policy (none, quarantine, reject) for messages failing SPF/DKIM and requests reports.

Check yourself 2Dev must replace insecure management protocols on the switches. Which TWO changes are correct? (Choose two.)

  1. Replace Telnet with SSH on port 22
  2. Replace SNMPv2c with SNMPv3
  3. Move Telnet to port 2323
  4. Replace HTTPS with HTTP for the web GUI
  5. Replace SSH with FTP for file transfers
Show the answer

Answers: A. Replace Telnet with SSH on port 22, B. Replace SNMPv2c with SNMPv3

SSH encrypts remote management and SNMPv3 adds authentication and encryption. Changing Telnet's port leaves it unencrypted.

Practice questions

Answer in your head, then open the answer. Ranger's Cyber Patrol has 60 questions like these for Security+, with mock exams.

Question 1Only the HR subnet (10.20.8.0/24) should reach the HR app at 10.20.30.10 on TCP 443, yet sales staff (10.20.9.0/24) can open it. Rules are evaluated top-down (exhibit). Which change fixes this while other apps in 10.20.30.0/24 keep working?

  1. Delete rule 2, since rule 1 already covers HR
  2. Move rule 4 to the top of the list
  3. Move rules 2 and 3 above rule 1
  4. Change rule 3's action from deny to drop
Show the answer

Answer: C. Move rules 2 and 3 above rule 1

Rule 1 allows all of 10.20.0.0/16 to the app's subnet before the HR-only allow and the deny are checked, so it shadows them. Placing the specific allow and the deny above the broad rule enforces HR-only access while rule 1 still serves the other servers.

Question 2An audit of network device management found the protocols in the exhibit. Which TWO replacements are correct, secure choices? (Choose two.)

  1. SNMPv3 with noAuthNoPriv for monitoring
  2. HTTPS on TCP 443 for the web admin page
  3. SSH version 1 for the command line
  4. SNMPv3 with authPriv for monitoring
  5. TFTP on UDP 69 for config backups
Show the answer

Answers: B. HTTPS on TCP 443 for the web admin page, D. SNMPv3 with authPriv for monitoring

SNMPv3 in authPriv mode both authenticates and encrypts monitoring traffic, and HTTPS protects the web admin session with TLS. SNMPv3 noAuthNoPriv protects nothing, SSH version 1 is obsolete, and TFTP has no authentication or encryption.

Question 3File integrity monitoring on the shop's Windows web server raised the alerts in the exhibit overnight. Patching ran 01:00-02:00 under an approved change. Which alert should be investigated FIRST?

  1. Alert 4, the application log file
  2. Alert 2, the antivirus definitions file
  3. Alert 1, the 212 system DLLs changed during patching
  4. Alert 3, the new .aspx file in the upload folder
Show the answer

Answer: D. Alert 3, the new .aspx file in the upload folder

A script file created in the upload folder by the web server process, outside the change window, is a classic sign of a web shell. The DLL changes match the approved window and installer, and definition and log files change routinely.

Question 4Kibble & Co. is moving its public web server (172.16.1.10) into a screened subnet. The server must query the order database (10.1.5.20, TCP 1433) on the internal network. Which rule set is BEST?

  1. Internet to web on 443; web to DB on 1433 only; deny other DMZ-to-LAN
  2. Internet to web on any port; web to the LAN on any port; deny the rest
  3. Internet to web on 443 and to the DB on 1433; deny other inbound
  4. Web server and DB both on the LAN; allow internet to both on 443
Show the answer

Answer: A. Internet to web on 443; web to DB on 1433 only; deny other DMZ-to-LAN

The screened subnet exposes only HTTPS on the web server, and the only path inward is the web server to the database on one port, so a compromised web server cannot roam the internal network. The database is never reachable from the internet.

Practice it in Ranger's Cyber PatrolThe same lessons as a story, with drills, hands-on labs and mock exams. Free, in your browser.
Play free

CompTIA, A+, Network+, Security+ and Linux+ are trademarks of CompTIA, Inc. Ranger Gamez is not affiliated with or endorsed by CompTIA. The practice questions are written to the published exam objectives; they are not real exam questions.