Security Baselines and Hardening Techniques
Security Baselines and Hardening Techniques
1 - Secure Baselines
Secure baselines Deploy baselines
• The security of an application environment should be • We now have established detailed security baselines
well defined – How do we put those baselines into action?
– All application instances must follow this baseline • Deploy the baselines
– Firewall settings, patch levels, OS file versions – Usually managed through a centrally
– May require constant updates administered console
• Integrity measurements check for the secure baseline • May require multiple deployment mechanisms
– These should be performed often – Active Directory group policy, MDM, etc.
– Check against well-documented baselines • Automation is the key
– Failure requires an immediate correction – Deploy to hundreds or thousands of devices
Establish baselines Maintain baselines
• Create a series of baselines • Many of these are best practices
– Foundational security policies – They rarely change
• Security baselines are often available from the • Other baselines may require ongoing updates
manufacturer – A new vulnerability is discovered
– Application developer – An updated application has been deployed
– Operating system manufacturer – A new operating system is installed
– Appliance manufacturer
• Test and measure to avoid conflicts
• Many operating systems have extensive options – Some baselines may contradict others
– There are over 3,000 group policy settings in Windows 10 – Enterprise environments are complex
– Only some of those are associated with security
© 2023 Messer Studios, LLC Professor Messer’s CompTIA SY0-701 Security+ Course Notes - Page 61 [Link]
4.1 - Wireless Security Settings (continued)
Wireless authentication methods RADIUS (Remote Authentication Dial-in User Service)
• Gain access to a wireless network • One of the more common AAA protocols
– Mobile users, temporary users – Supported on a wide variety of platforms and devices
• Credentials – Not just for dial-in
– Shared password / pre-shared key (PSK) • Centralize authentication for users
– Centralized authentication (802.1X) – Routers, switches, firewalls
• Configuration – Server authentication
– Part of the wireless network connection – Remote VPN access
– Prompted during the connection process – 802.1X network access
Wireless security modes • RADIUS services available on almost any server
• Configure the authentication on your wireless access operating system
point / wireless router IEEE 802.1X
• Open System • Port-based Network Access Control (NAC)
– No authentication password is required – You don’t get access to the network until you
• WPA3-Personal / WPA3-PSK authenticate
– WPA2 or WPA3 with a pre-shared key • Used in conjunction with an access database
– Everyone uses the same 256-bit key – RADIUS, LDAP, TACACS+
• WPA3-Enterprise / WPA3-802.1X EAP
– Authenticates users individually with an • Extensible Authentication Protocol (EAP)
authentication server (i.e., RADIUS) – An authentication framework
AAA framework • Many different ways to authenticate based on
• Identification RFC standards
– This is who you claim to be - Usually your username – Manufacturers can build their own EAP methods
• Authentication • EAP integrates with 802.1X
– Prove you are who you say you are – Prevents access to the network until the
– Password and other authentication factors authentication succeeds
• Authorization IEEE 802.1X and EAP
– Based on your identification and authentication, • Supplicant - the client
what access do you have? • Authenticator - The device that provides access
• Accounting • Authentication server - Validates the client credentials
– Resources used: Login time, data sent and received,
logout time
© 2023 Messer Studios, LLC Professor Messer’s CompTIA SY0-701 Security+ Course Notes - Page 63 [Link]
4.2 - Asset Management (continued)
Physical destruction Data retention
• Shredder / pulverizer • Backup your data
– Heavy machinery - complete destruction – How much and where?
• Drill / Hammer – Copies, versions of copies, lifecycle of data,
– Quick and easy purging old data
– Platters, all the way through • Regulatory compliance
• Electromagnetic (degaussing) – A certain amount of data backup may be required
– Remove the magnetic field – Emails, corporate financial data
– Destroys the drive data and renders the drive unusable • Operational needs
• Incineration – Accidental deletion
– Fire hot. – Disaster recovery
Certificate of destruction • Differentiate by type and application
• Destruction is often done by a 3rd party – Recover the data you need when you need it
– How many drills and degaussers do you have?
• Need confirmation that your data is destroyed
– Service should include a certificate
• A paper trail of broken data
– You know exactly what happened
© 2023 Messer Studios, LLC Professor Messer’s CompTIA SY0-701 Security+ Course Notes - Page 66 [Link]
4.3 - Analyzing Vulnerabilities (continued)
Environmental variables Risk tolerance
• What type of environment is associated with this • The amount of risk acceptable to an organization
vulnerability? – It’s impractical to remove all risk
– Internal server, public cloud, test lab • The timing of security patches
• Prioritization and patching frequency – Patching immediately doesn’t allow for proper
– A device in an isolated test lab testing
– A database server in the public cloud • Testing takes time
– Which environment gets priority? – While you’re testing, you’re also vulnerable
• Every environment is different • There’s a middle ground
– Number and type of users (internal, external) – May change based on the severity
– Revenue generating application
– Potential for exploit
Industry/organizational impact
• Some exploits have significant consequences
– The type of organization is an important consideration
• Tallahassee Memorial HealthCare - February 2023
– Ransomware - closed for two weeks
– Diverted emergency cases, surgeries canceled
• Power utilities - Salt Lake City, LA County CA - March 2019
– DDoS attacks from an unpatched known vulnerability
© 2023 Messer Studios, LLC Professor Messer’s CompTIA SY0-701 Security+ Course Notes - Page 69 [Link]
4.4 - Security Tools (continued)
Data Loss Prevention (DLP) NetFlow
• Where’s your data? • Gather traffic statistics from all traffic flows
– Social Security numbers, credit card numbers, – Shared communication between devices
medical records • NetFlow
• Stop the data before the attacker gets it – Standard collection method
– Data “leakage” – Many products and options
• So many sources, so many destinations • Probe and collector
– Often requires multiple solutions – Probe watches network communication
– Endpoint clients – Summary records are sent to the collector
– Cloud-based systems • Usually a separate reporting app
– Email, cloud storage, collaboration tools – Closely tied to the collector
SNMP Vulnerability scanners
• Simple Network Management Protocol • Usually minimally invasive
– A database of data (MIB) - Management Information Base – Unlike a penetration test
– The database contains OIDs - Object Identifiers • Port scan
– Poll devices over udp/161 – Poke around and see what’s open
• Request statistics from a device • Identify systems
– Server, firewall, workstation, switch, router, etc. – And security devices
• Poll devices at fixed intervals • Test from the outside and inside
– Create historical performance graphs – Don’t dismiss insider threats
SNMP traps • Gather as much information as possible
• Most SNMP operations expect a poll – We’ll separate wheat from chaff later
– Devices then respond to the SNMP request
– This requires constant polling
• SNMP traps can be configured on the monitored device
– Communicates over udp/162
• Set a threshold for alerts
– If the number of CRC errors increases by 5, send a trap
– Monitoring station can react immediately
4.5 - Firewalls
Network-based firewalls Ports and protocols
• Filter traffic by port number or application • Make forwarding decisions based on protocol
– Traditional vs. NGFW (TCP or UDP) and port number
• Encrypt traffic – Traditional port-based firewalls
– VPN between sites – Add to an NGFW for additional security
• Most firewalls can be layer 3 devices (routers) policy options
– Often sits on the ingress/egress of the network • Based on destination protocol and port
– Network Address Translation (NAT) – Web server: tcp/80, tcp/443
– Dynamic routing – SSH server: tcp/22
– Microsoft RDP: tcp/3389
Next-generation Firewalls (NGFW)
– DNS query: udp/53
• The OSI Application Layer
– NTP: udp/123
– Layer 7 firewall
• Can be called different names
– Application layer gateway
– Stateful multilayer inspection
– Deep packet inspection
• Requires some advanced decodes
– Every packet must be analyzed, categorized, and
a security decision determined
© 2023 Messer Studios, LLC Professor Messer’s CompTIA SY0-701 Security+ Course Notes - Page 70 [Link]
4.5 - Firewalls (continued)
Firewall rules IPS rules
• A logical path • Intrusion Prevention System
– Usually top-to-bottom – Usually integrated into an NGFW
• Can be very general or very specific • Different ways to find malicious traffic
– Specific rules are usually at the top – Look at traffic as it passes by
• Implicit deny • Signature-based - Look for a perfect match
– Most firewalls include a deny at the bottom • Anomaly-based
– Even if you didn’t put one – Build a baseline of what’s “normal”
• Access control lists (ACLs) – Unusual traffic patterns are flagged
– Allow or disallow traffic • You determine what happens when unwanted
– Groupings of categories - traffic appears
– Source IP, Destination IP, port number, time of day, – Block, allow, send an alert, etc.
application, etc. • Thousands of rules - Or more
Screened subnet • Rules can be customized by group
• An additional layer of security between the you and – Or as individual rules
the Internet • This can take time to find the right balance
– Public access to public resources – Security / alert “noise” / false positives
– Private data remains inaccessible
© 2023 Messer Studios, LLC Professor Messer’s CompTIA SY0-701 Security+ Course Notes - Page 71 [Link]
4.5 - Web Filtering (continued)
Reputation DNS filtering
• Filter URLs based on perceived risk • Before connecting to a website, get the IP address
– A good reputation is allowed – Perform a DNS lookup
– A bad reputation is blocked • DNS is updated with real-time threat intelligence
– Risk: Trustworthy, Low risk, Medium risk, Suspicious, – Both commercial and public lists
High risk • Harmful sites are not resolved
• Automated reputation – No IP address, no connection
– Sites are scanned and assigned a reputation • This works for any DNS lookup
• Manual reputation – Not just web filtering
– Managers can administratively assign a rep
• Add these dispositions to the URL filter
– High risk: Block, Trustworthy: Allow
© 2023 Messer Studios, LLC Professor Messer’s CompTIA SY0-701 Security+ Course Notes - Page 72 [Link]
4.5 - Secure Protocols (continued)
Transport method • Virtual Private Network (VPN)
• Don’t rely on the application – Create an encrypted tunnel
– Encrypt everything over the current – All traffic is encrypted and protected
network transport – Often requires third-party services and software
• 802.11 Wireless
– Open access point: No transport-level encryption
– WPA3: All user data is encrypted
© 2023 Messer Studios, LLC Professor Messer’s CompTIA SY0-701 Security+ Course Notes - Page 73 [Link]
4.5 - Monitoring Data (continued)
Cloud-based DLP • Inbound
• Located between users and the Internet – Block keywords, identify impostors, quarantine email messages
– Watch every byte of network traffic • Outbound
– No hardware, no software – Fake wire transfers, W-2 transmissions, employee information
• Block custom defined data strings Emailing a spreadsheet template
– Unique data for your organization • November 2016
• Manage access to URLs • Boeing employee emails spouse a spreadsheet to use as a
– Prevent file transfers to cloud storage template
• Block viruses and malware • Contained the personal information of 36,000
– Anything traversing the network Boeing employees
DLP and email – In hidden columns
• Email continues to be the most critical risk vector – Social security numbers, date of birth, etc.
– Inbound threats, outbound data loss • Boeing sells its own DLP software
• Check every email inbound and outbound – But only uses it for classified work
– Internal system or cloud-based
© 2023 Messer Studios, LLC Professor Messer’s CompTIA SY0-701 Security+ Course Notes - Page 75 [Link]
4.6 - Identity and Access Management (continued)
LDAP (Lightweight Directory Access Protocol) Federation
• Protocol for reading and writing directories over • Provide network access to others
an IP network – Not just employees - Partners, suppliers,
– An organized set of records, like a phone directory customers, etc.
• X.500 specification was written by the International – Provides SSO and more
Telecommunications Union (ITU) • Third-parties can establish a federated network
– They know directories! – Authenticate and authorize between the two
• DAP ran on the OSI protocol stack organizations
– LDAP is lightweight – Login with your Facebook credentials
• LDAP is the protocol used to query and update an • The third-parties must establish a trust relationship
X.500 directory – And the degree of the trust
– Used in Windows Active Directory, Apple OpenDirectory, Interoperability
Novell eDirectory, etc. • Many different ways to communicate with an
X.500 Directory Information Tree authentication server
• Hierarchical structure – More than a simple login process
– Builds a tree • Often determined by what is at hand
• Container objects – VPN concentrator can talk to a LDAP server
– Country, organization, organizational units – We have an LDAP server
• Leaf objects • A new app uses OAuth
– Users, computers, printers, files – Need to allow authentication API access
Security Assertion Markup Language (SAML) • The interoperability is dependent on the
• Open standard for authentication and authorization environment
– You can authenticate through a third-party to – This is often part of a much larger IAM strategy
gain access
– One standard does it all, sort of
• Not originally designed for mobile apps
– This has been SAML’s largest roadblock
OAuth
• Authorization framework
– Determines what resources a user will be able to access
• Created by Twitter, Google, and many others
– Significant industry support
• Not an authentication protocol
– OpenID Connect handles the single sign-on
authentication
– OAuth provides authorization between applications
• Relatively popular
– Used by Twitter, Google, Facebook, LinkedIn, and more
© 2023 Messer Studios, LLC Professor Messer’s CompTIA SY0-701 Security+ Course Notes - Page 76 [Link]
4.6 - Access Controls
Access control Role-based access control (RBAC)
• Authorization • You have a role in your organization
– The process of ensuring only authorized rights are – Manager, director, team lead, project manager
exercised • Administrators provide access based on the role of the
– Policy enforcement user
– The process of determining rights – Rights are gained implicitly instead of explicitly
– Policy definition • In Windows, use Groups to provide role-based access
• Users receive rights based on control
– Access Control models – You are in shipping and receiving, so you can use the
– Different business needs or mission requirements shipping software
Least privilege – You are the manager, so you can review shipping logs
• Rights and permissions should be set to the bare Rule-based access control
minimum • Generic term for following rules
– You only get exactly what’s needed to complete your – Conditions other than who you are
objective • Access is determined through system-enforced rules
• All user accounts must be limited – System administrators, not users
– Applications should run with minimal privileges • The rule is associated with the object
• Don’t allow users to run with administrative privileges – System checks the ACLs for that object
– Limits the scope of malicious behavior • Rule examples
Mandatory Access Control (MAC) – Lab network access is only available between 9 AM
• The operating system limits the operation on an object and 5 PM
– Based on security clearance levels – Only Chrome browsers may complete this web form
• Every object gets a label Attribute-based access control (ABAC)
– Confidential, secret, top secret, etc. • Users can have complex relationships to applications
• Labeling of objects uses predefined rules and data
– The administrator decides who gets access to what – Access may be based on many different criteria
security level • ABAC can consider many parameters
– Users cannot change these settings – A “next generation” authorization model
Discretionary Access Control (DAC) – Aware of context
• Used in most operating systems • Combine and evaluate multiple parameters
– A familiar access control model – Resource information, IP address, time of day, desired
• You create a spreadsheet action, relationship to the data, etc.
– As the owner, you control who has access Time-of-day restrictions
– You can modify access at any time • Almost all security devices include a time-of-day option
• Very flexible access control – Restrict access during certain times or days of the
– And very weak security week
– Usually not the only access control
• Can be difficult to implement
– Especially in a 24-hour environment
• Time-of-day restrictions
– Training room network is inaccessible between
midnight and 6 AM
– Conference room access is limited after 8 PM
– R&D databases are only after between 8 AM and 6 PM
© 2023 Messer Studios, LLC Professor Messer’s CompTIA SY0-701 Security+ Course Notes - Page 77 [Link]
4.6 - Multifactor Authentication
Multifactor authentication • Hardware or software tokens
• Prove who you are – Generates pseudo-random authentication codes
– Use different methods • Your phone
– A memorized password – SMS a code to your phone
– A mobile app
Something you are
– Your GPS location
• Biometric authentication
• Factors – Fingerprint, iris scan, voice print
– Something you know
• Usually stores a mathematical representation of your
– Something you have
biometric
– Something you are
– Your actual fingerprint isn’t usually saved
– Somewhere you are
• Difficult to change
• There are other factors as well
– You can change your password
Something you know – You can’t change your fingerprint
• Password • Used in very specific situations
– Secret word/phrase, string of characters – Not foolproof
– Very common authentication factor
Somewhere you are
• PIN
• Provide a factor based on your location
– Personal identification number
– The transaction only completes if you are in a
– Not typically contained anywhere on a smart card
particular geography
or ATM card
• IP address
• Pattern
– Not perfect, but can help provide more info
– Complete a series of patterns
– Works with IPv4, not so much with IPv6
– Only you know the right format
• Mobile device location services
Something you have – Geolocation to a very specific area
• Smart card – Must be in a location that can receive GPS information
– Integrates with devices or near an identified mobile or 802.11 network
– May require a PIN – Still not a perfect identifier of location
• USB security key - Certificate is on the USB device
© 2023 Messer Studios, LLC Professor Messer’s CompTIA SY0-701 Security+ Course Notes - Page 80 [Link]
4.8 - Incident Response (continued)
Recovery after an incident Answer the tough questions
• Get things back to normal • What happened, exactly?
– Remove the bad, keep the good – Timestamp of the events
• Eradicate the bug • How did your incident plans work?
– Remove malware – Did the process operate successfully?
– Disable breached user accounts • What would you do differently next time?
– Fix vulnerabilities – Retrospective views provide context
• Recover the system • Which indicators would you watch next time?
– Restore from backups – Different precursors may give you better alerts
– Rebuild from scratch
Training for an incident
– Replace compromised files
• There’s limited on-the-job training when a security event occurs
– Tighten down the perimeter
– Be ready when an incident is identified
Lessons learned • Train the team prior to an incident
• Learn and improve – Initial response
– No system is perfect – Investigation plans
• Post-incident meeting – Incident reporting
– Invite everyone affected by the incident – And more
• Don’t wait too long • This can be an expensive endeavor
– Memories fade over time – Especially with larger response teams
– Some recommendations can be applied to
the next event
© 2023 Messer Studios, LLC Professor Messer’s CompTIA SY0-701 Security+ Course Notes - Page 82 [Link]
4.9 - Log Data
Security log files IPS/IDS logs
• Detailed security-related information • Intrusion prevention system/Intrusion detection system
– Blocked and allowed traffic flows – Usually integrated into an NGFW
– Exploit attempts • Logs contain information about predefined
– Blocked URL categories vulnerabilities
– DNS sinkhole traffic – Known OS vulnerabilities, generic security events
• Critical security information • Common data points
– Documentation of every traffic flow – Timestamp
– Summary of attack info – Type or class of attack
– Correlate with other logs – Source and destination IP
Firewall logs – Source and destination port
• Traffic flows through the firewall Network logs
– Source/destination IP, port numbers, disposition • Switches, routers, access points, VPN concentrators
• Next Generation Firewalls (NGFW) – And other infrastructure devices
– Logs the application used, • Network changes
– URL filtering categories, anomalies and suspicious data – Routing updates
Application logs – Authentication issues
• Specific to the application – Network security issues
– Information varies widely Metadata
• Windows • Metadata
– Event Viewer / Application Log – Data that describes other data sources
• Linux / macOS/ • Email
– var/log – Header details, sending servers, destination address
• Parse the log details on the SIEM • Mobile
– Filter out unneeded info – Type of phone, GPS location
Endpoint logs • Web
• Attackers often gain access to endpoints – Operating system, browser type, IP address
– Phones, laptops, tablets, desktops, servers, etc. • Files
• There’s a lot of data on the endpoint – Name, address, phone number, title
– Logon events, policy changes, system events, Vulnerability scans
processes, account management, directory services, • Lack of security controls
etc. – No firewall
• Everything rolls up to the SIEM – No anti-virus
– Security Information and Event Manager – No anti-spyware
• Use with correlation of security events • Misconfigurations
– Combine IPS events with endpoint status – Open shares
OS-specific security logs – Guest access
• OS security events • Real vulnerabilities
– Monitoring apps – Especially newer ones
– Brute force, file changes – Occasionally the old ones
– Authentication details
• Find problems before they happen
– Brute force attacks
– Disabled services
• May require filtering
– Don’t forward everything
© 2023 Messer Studios, LLC Professor Messer’s CompTIA SY0-701 Security+ Course Notes - Page 83 [Link]
4.9 - Log Data (continued)
Automated reports Dashboards
• Most SIEMs include a report generator • Real-time status information
– Automate common security reports – Get summaries on a single screen
• May be easy or complex to create • Add or remove information
– The SIEM may have its own report generator – Most SIEMs and reporting systems allow for customization
– Third-party report generators may be able to • Shows the most important data
access the database – Not designed for long-term analysis
• Requires human intervention Packet captures
– Someone has to read the reports • Solve complex application issues
• These can be involved to create – Get into the details
– Huge data storage and extensive processing time • Gathers packets on the network
– Or in the air
– Sometimes built into the device
• View detailed traffic information
– Identify unknown traffic
– Verify packet filtering and security controls
– View a plain-language description of the application data