Security + Study Guide
Security + Study Guide
Security + Study Guide
This guide is brief on purpose. This guide is an excellent resource to review information, to be
reminded of terms you’ve learned about but may have forgotten, and to understand how to
mentally organize the information so you can recall it easier. I don’t believe there was anything
on my test that I had not already written in the guide somewhere, and I scored an 842/900.
This guide is a great companion to Darril Gibsons GCGA Textbook. I took notes on almost
the entire book, and supplemented a lot of the information with my own additional research. If
you haven’t bought his book, seriously, go do it. It’s perfectly crafted to the test, and allowed me
to pass examcompass quizzes with 0 effort.
I really hope this guide helps you pass the test. I know not everyone likes to take notes while
they read, but it helps me process information quickly, and it allows me to give back to the IT
community in some small way.
If you really appreciate this study guide and found it useful, why not buy me a coffee?
You can send a few dollars my way at paypal.me/electricintheforest if you feel so inclined, and if
you guys are generous enough, I’ll put that money to more certifications and keep building out
study guides as I go.
Please Upvote This Guide on Reddit for Visibility! And feel free to share!
Integrity (CIA)
● Ensured data is not tampered with
● Hashing - Creating a derivative code through an algorithm
○ If data is changed, the future hash will too
● Digital Signatures, Certificates, and Non-Repudiation
○ By sending a unique digital signature, you make it clear who sent the message,
which allows the receiver to trust it, and the sender to be held accountable.
○ Other forms of Non-Repudiation include tracking, by user account, who did what
on a system.
○ PKI - Public Key Infrastructure
■ Enables signatures and certificates to function by maintaining encryption
keys and certificate management
Availability (CIA)
● Redundancy and fault tolerance set to ensure that data is retrievable when its needed
● SPOF - Single Point of Failure
○ Any juncture where, if the SPOF fails, the whole system ceases to function
● Disk Redundancy
○ Raid 1, 5, 6, 01, 10
● Server Redundancy
○ Extra clusters! If one server fails, it swaps to the redundant server
○ Virtualization can help
● Load Balancing
○ Multiple servers supporting a service so one doesn’t get overloaded
● Site Redundancies
○ If a fire or flood takes out one location, another backs it up
● Backups
○ Data stored in multiple places
● Alternate Power
○ UPS and generators
● Cooling Systems
○ HVAC
● Patching
○ Keep systems bug free and clear of security issues
Safety
● Safety of People - Emergency escape plans, drills, and training
○ Often, secure facilities will unsecure in case of emergency to ensure human
safety
● Safety of Assets - Physical security measures like locks, lighting, fencing, CCTV, and
more
Layered Security/Defense
● No single approach is enough- mix and match!
● Every step, layer, and phase needs its own security protocols
● CAC - Common Access Card
○ Smart card including readable ID info for secure environments
● PIV - Personal Identity Verification
○ Smart card including readable ID info for secure environments
● HOTP- HMAC-based One-Time Password
○ An example of a rolling key-based password like the ones used in tokens.
○ HOTP passwords are usable once only, but theoretically forever until uses
○ Open-source and affordable systems
○ TOTP - Time-Based HOTP
■ Duh
Authentication Services
● Kerberos
○ Functions on Unix and Windows Active Directory Domains
○ Prevents MitM attacks through use of mutual authentication
○ Uses tickets to prevent repeat incidents
○ Requirements
■ KDC- Key Distribution Center
■ TGT- Ticket Granting Tickets
● Certificates are packaged within digital authentication “tickets” or
tokens
■ Time-Stamping and Synchronization
● Tickets are only valid for a certain amount of time, so systems
must be within 5 minutes of each other.
● Time-outs prevent replay attacks
● Replay Attacks
○ Intercepted authentication data so third party can connect
○ Uses Symmetric Key Cryptography
■ One key encrypts and decrypts
● Asymmetric Encryption Key
○ Utilizes two keys- a public encryption key (hosted by PKI) and a private
decryption key.
● LDAP and Secure LDAP - Lightweight Directory Access Protocol
○ X.500 based that (when secure) can use TLS
○ Specifies formats and methods to query a directory of objects (users, computers,
and directory objects)
○ Microsoft Active Directory is based off LDAP
○ Enables a single location to interact with all resources on a directory
○ Secure LDAP
■ Utilizes TLS - Transport Layer Security Session to encrypt data
■ Secure LDAP v2 used SSL encryption, but v3 uses TLS
● SSO - Single Sign On
○ Feature enabled in both Kerberos and LDAP, wherein a user signs into the
network once and receives a token which can sign them into all necessary
systems
○ Federations
■ Enables two non-homogenous networks to coordinate permissions for
users
■ User holds credentials on both networks, but signs into the federation
which treats them as a single account
○ SAML - Security Assertion Markup Language
■ XML based
■ Allows websites to enable federation like trust privileges so that users can
access resources on both
■ Principle - User
■ Identity Provider - Identity management utility - contains IDs and
passwords
■ Service Provider - Serves principles - redirecting to different hosts or
domains
● RAS - Remote Access Service Authentication
○ Accessed via dial-up or VPN
○ PAP - Password Authentication Protocol
■ Cleartext, insecure, single authentication
■ Utilizes PPP - Point-to-Point Protocol
● Used clear-text because over dial-up, nobody thought wiretaps a
legitimate risk
○ CHAP - Challenge Handshake AP
■ Server challenges client, can happen multiple times a session
■ More difficult to crack because of a hashed code at the start of session
○ MS- CHAP
■ Microsofts CHAP
○ MS-CHAP v2
■ CHAP + Mutual authentication
○ RADIUS - Remote Authentication Dial-in User Service -
■ Centralized method of authentication for multiple remote servers
■ Encrypts password, but not the whole authentication process
■ Utilizes UDP for best effort connection
○ Diameter
■ A fucking pun
■ RADIUS but utilizes EAP for better encryption
■ Utilizes TCP for guaranteed connections
○ XTACACS - Extended Terminal Access Controller Access-Control System
■ Cisco proprietary TACACS improvement
■ Outdated
○ TACACS+
■ Cisco proprietary alternative to RADIUS.
■ Interoperable with Kerberos.
■ Works on a wide host of environments
■ Encrypts full authentication
■ Uses TCP for guaranteed connections
■ Also used to secure network devices like routers by corporations
○ AAA Protocols
■ Authentication
● Proves your identity
■ Authorization
● Determines what you should be able to access
■ Accounting
● Tracks what you do
■ Radius and TACACS+ are AAA protocols, and Kerberos is considered
one, though it does not have accounting.
Management Controls
Also known as administrative controls, these use planning and assessment to reduce risk.
● Risk Assessment
○ Quantitative Assessment
■ Uses cost and asset values to determine how much it’ll cost to protect x-
value of assets
○ Qualitative Assessment
■ Categorizes risks based on probability and impact
● Vulnerability Assessment
○ Used to discover current vulnerabilities and weaknesses to help prioritize the
implementation of additional controls
● Penetration Tests
○ Actual attempts to exploit vulnerabilities to determine how easy it is to do, and
what the actual effects are
Operational Controls
People-implemented practices in compliance with an overall security plan.
● Awareness and Training
○ Prevents social engineering, people writing down passwords, etc.
● Configuration and Change Management
○ Ensures that each system starts in a baseline of security and that changes do not
invalidate security features
● Contingency Planning
○ Reduces overall impact if something goes wrong by having prepared responses
● Media Protection
○ Don’t lose flashdrives with valuable shit
● Physical and Environmental Protection
○ Cameras, door locks, HVAC systems
Control Goals
● Preventative controls
○ Hardening
■ Making a system more secure than default by deactivating unnecessary
features, creating restrictions, disabling accounts
○ Security Awareness and Training
■ Ensuring users are aware of vulnerabilities and social engineering
attempts
○ Security guards
■ Often will deter potential attackers, can verify identities of people
○ Change Management
■ Changes aren’t made on the fly, they’re studied first
○ Account disablement policy
■ If it aint necessary, nix it
● Detective controls
○ Log Monitoring
■ For example, firewall logs track everything blocked to help reveal
incidents
○ Trend Analysis
■ Taking note of an increase of firewall denials, etc
○ Security Audit
■ Can detect if users are using good passwords or if users have more rights
than they need
○ Video Surveillance
■ CCTV yo
○ Motion Detector
■ See above?
● Corrective controls
○ Active IDS
■ Detect attacks and modify environment to stop them
○ Backups and System Recovery
■ Fix shit when it breaks
● Deterrent controls
○ Cable Locks
■ If its hard to take, its less likely to be taken
○ Hardware Locks
■ … ITS A LOCK
● Compensating controls
○ Temporary controls while implementing other things, or when other things go bad
Doors
● In general have less points of entry with more locks, security guards, cameras,
biometrics, and laser beams. But like, be careful of trapping your employees in there
when the place sets on fire.
● Cipher Locks
○ Press buttons in the right order and the door opens
○ These aren’t really all that secure, but you can make them harder to crack
● Proximity Cards
○ Door shoots the card with lightning and if the card goes, “YEAH!” the door opens
○ You can identify people with special cards
○ Prox cards are pretty easy to steal info from, but a few pieces of aluminum in
your wallet can fuck that up
● Biometrics
○ USE YOUR FUCKING EYEBALL AS A KEY
○ This allows identification
● ID Badges
○ Do you look like your picture or nah
● Tailgating
○ Stop holding doors open for other people chivalry is dead let them use their own
security credentials you white-knight piece of crap
○ Man traps are cool
● Access Lists and Logs
○ Track who goes in, and have guards only let certain people in
○ If someone exits a building, but was never logged into the building, they probably
tailgated so fire them
○ Video surveillance is a good partner
■ It’s best for proof. It’s hard to deny footage, but people can tailgate or use
each others credentials
● Motion Detectors + Fences mean you know when someone climbs it
● Motion detectors can also modify lighting so you can save money but still be secure
● Alarms are annoying but secure
● Barricades can make vehicles and people zigzag in, giving more time to prevent or
identify them
○ Bollards, or short vertical polls, look better than heavy barricades but still
prevent people from driving through your walls
● No Trespassing signs supposedly work
● Locks, laptop locks, locking cabinets, and safes.
Network Security
Protocols
Encryption Protocols
● SSH - Encrypts SCP - Secure Copy and SFTP - Secure File Transfer Protocol
among a wide variety of others.
○ SSH can also encrypt TCP Wrappers, a type of access control list on Unix
systems
○ Uses port 22
● SCP - Based on SSH and copies encrypted files over a network
● SSL - Secure Socket Layer
○ Secures HTTP into HTTPS with the use of certificates
○ Can also secure SMTP and LDAP
○ TCP 443 for HTTP
○ TCP 465 for SMTP
○ TCP 636 for LDAP with SSL
● TLS - Transport Layer Security
○ Designated replacement for SSL
○ Same ports as SSL
● IPsec
○ Encrypt IP traffic
○ Native to IPv6 but works on IPv4
○ Encapsulates and encrypts packets and then uses tunnels to protect VPN traffic
○ Authentication Header - AH - Protocol ID number 51
○ Encapsulating Security Payload (ESP) - Protocol ID number 50
○ Uses Internet Key Exchange (IKE) over UDP 500 for VPN security
Application Protocols
● HTTP
○ Port 80
● HTTPS
○ Port 443
● FTP
○ 21 for connection
○ 20 for data
● SFTP - Secure File Transfer
○ 22 for data because it uses SSH
● FTPS - File Transfer Protocol Secure
○ Like SFTP but uses SSL or TLS
○ Ports 989 or 990
● TFTP - Trivial File Transfer
○ UDP port 69
● Telnet - Outdated CLI based remote connection protocol
○ Sometimes still used to connect to routers
○ Cleartext, insecure
○ Port 23
○ PuTTY operates similarly to telnet but includes SSH
● SNMP - Simple Network Management Protocol
○ Monitors and manages network devices like routers and switches
○ Sends requests to SNMP agents on devices on UDP 161
○ Receives info back from agents on UDP 162
● NetBIOS
○ Allows for basic LAN identification and sessions
○ UDP Ports 137 and 138
○ TCP Port 139, and rarely 137
● LDAP
○ Communicates with directories like Microsoft Active Directory and Novell Network
Directors Services (NDS)
○ Provides a single location for object management
○ TCP 389
○ When encrypted with TLS or SSL, Port 636
● Kerberos - Authenticates in Windows domains and some Unix environments
○ Uses KDC - Key Distribution Center to issue timestamped tickets
○ UDP Port 88
● Microsoft SQL Server
○ SQL server hosts databases that web servers and applications use
○ Port 1433
● RDP - Remote Desktop Protocol
○ Connect to systems from remote locations
○ Used in Remote Desktop Services and Remote Assistance
○ TCP or UDP 3389
E-mail Protocols
● SMTP
○ Transfers email between client and SMTP server
○ TCP port 25
○ Secure SMTP with SSL or TLS uses Port 465
● POP3
○ Transfers emails from servers to clients
○ TCP 110
○ Secure POP3 with SSL or TLS uses TCP 995
● IMAP4
○ Stores email on a server
○ Allows user to organize and manage email in folders on server
○ TCP 143
○ Secure IMAP4 with SSL or TLS uses TCP 993
Assorted DNS
● DNS uses UDP 53 for URL queries
● DNS uses TCP 53 for zone transfers- when name servers exchange updated records
● DNS uses BIND - Berkley Internet Name Domain software on Unix/Linux servers
Ports
● IANA - Internet Assigned Numbers Authority maintains a list of official port
assignments
● Ports are default routes that different protocols use for data- this allows administrators to
block certain protocol interactions just by closing or opening ports
● 65,535 UDP and TCP ports
● Well-Known Ports 0-1023
● Registered Ports 1024-49151
These can be registered by single companies for proprietary use, or by multiple
companies to establish a standard.
● Dynamic and Private Ports: 49,151-65,535
Any application can use these and they can be temporarily mapped
● Most attacks are on well-known ports
● Port scanners check what ports are open and then know which data can be tampered
with
● Protocol IDs are not to be confused with ports.
You can allow or block traffic by the protocol ID, but the ID does not match up with ports.
Assorted
Basic Network
Security
● Switches are more secure than hubs because they limit where traffic is sent and
received, thus disabling sniffers
● Switches can be affected by loops- when a cable is connected needlessly between two
ports, and data is unicast looped through the connection
○ STP (Spanning Tree Protocol) and RSTP trivialize this risk by not letting routing
suck that bad
○ STP also protects against attacks because a jerk could always just mess with
two rj45 jacks and slow down the whole network
● Switches can also group several computers into a VLAN, isolating network traffic
○ This allows people who are not in the same physical proximity to work together
securely
● Physical ports that are not being used can also be disabled on the switch to prevent
people from connecting to the network
● Mac address filtering can also accomplish this, where a port only accepts specifically
named mac addresses for connections
● 802.1x is much better security than mac address filtering or physical port disabling.
○ Works as RADIUS or Diameter user
○ Requires authentication to connect
○ Can customize features, such as allowing non-authenticated users internet
access, but no local data
Routers
● Routers don’t pass broadcasts, so segments separated by routers are broadcast
domains
● Routers allow the use of ACLs (just like firewalls) to identify allowed traffic
○ This filtering can be for IP addresses, ports, protocols
○ This means you can block traffic from specific computers or network segments
○ Implicit Deny is pretty important for security, and insists that anything not
specifically allowed is denied
Firewalls
● Offer similar ACL based security features as routers
● A brick wall between inside and out that prevents certain kinds of traffic.
● Advanced firewalls that fall under “Unified Threat Management” can do much more than
simple packet filtering
● Host Based Firewalls operate for a single host and can prevent invasions and
exploitation through an NIC
○ These are essential when using public wifi
● Network Based Firewalls
○ Controls traffic going in and out of larger network segments
○ Best between internal network and internet
○ Usually a dedicated system with monitoring, filtering, and logging
○ Sidewinder is a dedicated server with proprietary firewall software
● Rules
○ Similar to routers ACL
○ Permit/Allow or Deny
■ Protocol ID/Port
■ Source
■ Destination
○ When configuring, start with implicit deny, and allow all traffic that you know you
want
● Web Application Firewall (WAF)
○ Specifically protects web apps hosted on a server
○ Blocks traffic such an NOOP sleds and NOOP ramps
○ Detects malicious code sent to web server
● Advanced Firewalls
○ First Gen - Packet filtering rules, stateless- works only according to ACL
○ Second Gen - Stateful inspection- tracks sessions and inspects traffic based on
session status
○ Third Gen - Application Level firewalls. Aware of specific commands used in
apps or protocols. WAF are third gen that inspect HTTP.
○ Next Gen - Closer to UTM and frequently adding new features
● Firewall Logs and Analysis
○ Log all allowed traffic, all blocked traffic, or both
○ Scripts and apps make it easier to review logs
○ IDS use firewall logs to identify intrusions
■ For example, a port scan attack will query lots of well known logical ports.
If logs are enabled, this is visible and can be used to prevent further
attacks
Securing WLAN
Remote Access
● Dial-up RAS
○ Uses POTS and modems and PPP
○ Not secure if lines are tapped
● VPN and VPN Concentrators
○ VPN Concentrators, often housed on VPN servers, provide all the tools required
to run the VPN, including encryption and authentication.
○ VPNs allow you to run tunnels through public spheres to logically separate and
secure traffic.
○ IPsec and VPN
■ IPsec offers both Tunnel Mode and Transport Mode
■ Tunnel Mode is used with VPN, and encapsulates the entire IP packet
■ Transport Mode only encrypts the payload and is more efficient in
private networks
■ IPsec uses Authentication Headers to provide authentication for hosts
before packet exchange - these headers use Protocol ID 51
■ IPsec also uses ESP (Encapsulating Security Payload) to encrypt data
and provide confidentiality. ESP uses protocol ID 50
■ IPsec uses the IKE (Internet Key Exchange) Protocol over port 500.
● Between the PID and that port, there are lots of ways to customize
ACL rules regarding IPsec
○ L2TP is a good tunneling protocol, but does not encrypt data. IPsec can work in
conjunction with L2TP for a very good tunnel
○ IPsec and NAT issues
■ NAT and IPsec are incompatible
■ Instead of IPsec, you can use tunneling protocols that rely on SSL or TLS
■ SSTP - Secure Socket Tunneling Protocol encrypts VPN traffic over
SSL using port 443
● OpenVPN and OpenConnect are similar programs that use TLS
○ PPTP - Point To Point Tunnelling Protocol
■ Uses Microsofts encryption
■ Unused today because of known vulnerabilities
■ Uses TCP Port 1723
○ Site-to-Site VPN
■ Uses two VPN servers in different locations to form gateways
■ From user end, its as if there’s a single network
■ Can be slow
○ VPN over Open Wireless
■ Two easy methods to secure yourself over open wireless
■ HTTPS connections only
■ Apps like Private Internet Access or TunnelBear that provide VPN
services over open wifi
○ NAC - Network Access Control is essential on VPNs, because Admins lack
complete control over home user computers, so they need to be able to restrict
data and traffic somehow
■ Health and Control
● Systems can be assigned health status based on how updated
their antivirus definitions are, how updated their OS is, and the
status of their personal firewall
● When a client accesses a VPN, an authentication or health agent
queries the status of that client
● If the client doesn’t meet health standards, they can be put on a
quarantine network including resources to upgrade the health of
that client
● For local clients, this may mean they have internet access, but
cannot communicate with other devices on the network
Virtualization
● Virtual Machines or Networks running on a single physical platform
● Hypervisor
○ Software that creates and runs the virtual machine
○ VM-Ware, Microsoft Hyper-V, Windows Virtual PC, Oracle VM Virtual Box
● Host
○ Physical server
○ Lots of processors, tons of memory, shit ton of everything
○ Smaller and cheaper than multiple physical machines
● Guests
○ Operating Systems running on the host
● Patch Compatibility
○ VMs need patched
○ If it works on a physical machine, it’ll work on the virtual one
● Host Availability/Elasticity
○ The ability to redirect resources to the VM guest that needs it
● Sandboxing
○ Creating an isolated testing area that does not affect the physical machine or
other VM machines
○ You can test virus, antivirus, patches, software, etc
● VM Files
○ VHD Files
■ Contains the content of Virtual Hard Disk (VHD)
○ XML Files
■ Contain configuration of VM as well as snapshots
○ AVHD Files
■ Differencing disks- contain the differences between current VHD and
snapshots
○ VSV Files
■ Similar to hibernate for VM
○ BIN Files
■ Memory for systems in a save state
○ Because of VM files, it’s easy to move VM from one server to the next, or to
backup whole servers
● Virtual Network Connectivity
○ Virtual NICs, Virtual switches, and virtual networks
○ You can configure full VLANs on VM servers to segment traffic
○ This also helps testing malware because you can see how it will operate across a
network, though some Malware can detect when its in a virtual environment and
change its behavior
● VM Risks
○ VM Escape
■ A very serious threat where a malware program tries to get access to the
hypervisor from within the virtual machine.
■ Hypervisor runs with elevated admin privileges, so gaining access to
hypervisor allows it to take control of the physical system and all the
virtual hosts
○ Loss of Confidentiality
■ Because all VM is just files, whole systems can be fairly easy to steal
■ Encrypt every’tang
Patches
● Patches keep software secure, kinda
● Auto-deployment of patches works sometimes, but if a conflict occurs, it can be a
serious issue
● Patch tuesday is a big day when microsoft releases patches, so wednesdays are
dangerous
● Also if a patch crashes a system, it can crash a thousand. Test out patches on systems
very like the deployed systems
Protecting Data
● Data Categories
○ Data at Rest - Any data stored on HDD, be that flashdrive, backups, or mobile
phone
○ Data in Transit - Any data traveling over a network. Data Loss Prevention (DLP)
analyze and detect sensitive data over a network, and you can also encrypt data
using IPsec, SSH, or SFTP
○ Data in Use - Data in temporary memory, typically protected by the application
using it
● Protecting Data with Confidentiality
○ ENCRYPT
○ Be careful to encrypt stored data, and keep it encrypted when its transmitted.
○ Other tools besides encryption are less secure; such as NTFS ACL permissions.
If someone takes your NTFS hard-drive and puts it in another computer, they can
give themselves access.
○ Software Based Encryption
■ Slower than hardware encryption, but secure with strong algorithms
■ File- Level Encryption
● Linux uses GNU privacy guard (GPG) which is a command line
tool used to encrypt and decrypt files with a password.
● NTFS includes Encrypting File System (EFS) in windows
explorer.
● File/folder encryption allows you to add one more layer of security,
even against Admin privileges
○ One risk to this is that if you copy to a file system that
doesn’t support NTFS encryption, it may decrypt the files
before copying.
■ Full Disk Encryption
● TrueCrypt is available to do this on linux and many OS
● Requires a password and encrypts/decrypts drive on the fly
■ Encrypting Database Content
● Oracle and Microsoft SQL and others allow you to encrypt specific
elements, or the entire database.
● You could, for example, not encrypt customer first names, but only
their credit card and security code info. This saves processing
power
○ Hardware Based Encryption
■ You can use a Trusted Platform Module or other hardware security
module for higher performance encryption.
■ TPM
● Chip in Mobo
● Full disk encryption
● Performs platform authentication (ensures drive not moved)
● Includes Three keys
○ Endorsement key (burned into chip)
○ Endorsement key is Rivest, Shamir, Adleman (RSA)
○ Storage Root Key generates and protects other keys
○ Application Keys - derived from Storage Root key
● To active the TPM, you often use an application like bitlocker.
● Without access to the TPM chip and authenticated credentials, the
data remains secure
■ Hardware Security Module
● A security device that can be added to a machine to manage,
generate, and securely store keys.
● High-performance HSM are connected to a network with TCP/IP
● Smaller HSM are merely expansion cards plugged into a server
● HSM performs very similar to TPM, but it is removable
● Data Leakage
○ Data Exfiltration - When data is transferred outside of an organization
○ Data Loss Prevention (DLP)
■ Examines data looking for unauthorized leaks
■ Can examine stored data, moving data, and data in use
■ Data in Motion
● UTM devices include DLP to scan emails and files
● A lot of data is labeled as Classified, confidential, private, and
sensitive.
● Once data is labelled, it can be inspected in transit and blocked if
necessary
■ Endpoint Protection
● Can include preventing flash drive usage or printing
Understanding SANS
● Might include Hard-drives, disks, tape, and optical media
● Often configured in fault-tolerant arrays for high-performance
● Robotic devices often assist in loading/unloading optical jukeboxes or tape libraries
● SANs often rely on high speed internal transfers
● Virtual SANS are a newer tech
● Fibre Channel
○ Speeds of up to 16 gigabits per second
○ Require special hardware and cabling
○ Expensive, albeit efficient
○ Some support copper, not just fiber
● iSCSI - Internet Small Computer System Interface
○ Transfers SCSCI commands over IP
○ Utilize existing network infrastructure
○ Allows SAN without specialized hardware
● FCoE - Fibre Channel over Ethernet
○ Uses FC commands, but transmits them over ethernet networks
○ FCoE encapsulated the commands within standard protocols
○ Allows ethernet LAN to act like Fibre Channel without the cost
● Handling Big Data
○ Data sets, like Amazons, that are too large for traditional tools to analyze them
○ Use many of the same tools, plus some special ones
Managing Risk
● Threats and Threat Vectors
○ Natural Threats - “I AM A HURRICANE”
○ Malicious Human Threats - “Muahahahaa”
○ Accidental Human Threats - “Whoops!”
○ Environmental Threats - Long term power failure leading to chemical spills, etc
○ Malicious Insider Threat
■ Someone with legit access to internal resources and seeks to exploit
them
■ Hence, least privilege.
● Threat Assessments
○ How likely are specific things, and what will cause the most harm?
○ Vulnerabilities
■ Lack of Updates
■ Default Configurations
■ Lack of Malware Protection
■ Lack of Firewalls
■ Lack of Organizational Policies
■ Just because it hasn’t been attacked, doesn’t mean it’s not vulnerable.
Audit regularly and look for new things each time.
● Risk Management
○ Risk Avoidance - Don’t participate in risky activity or opt not to provide a risky
service
■ If something requires you to open several unsecure ports, ask yourself if
its worth it
○ Risk Transference - Can you share the risk with another entity, or put it on their
lap?
■ Insurance, outsourcing, etc
○ Risk Acceptance
■ Would it be more expensive to protect the device than the device is
worth?
■ What’s the real cost of a loss, vs the cost of the protection
○ Risk Mitigation
■ Reduce the risk with up-to-date tech
○ Risk Deterrence
■ Security controls make it harder to attack you, and make you a less
appealing target
● Risk Assessment
○ Identify assets and their values
○ Identify threats and vulnerabilities to the highest value assets
○ Set recommendation for what controls will mitigate those risks
○ These assessments should change as conditions do
○ Quantitative Risk Assessment
■ Lists the specific monetary value of assets vs specific cost of mitigating
controls
■ Single Loss Expectancy (SLE)
● Cost of a single loss
■ Annual Rate of Occurrence (ARO)
● How often will that loss occur in a year?
■ Annual Loss Expectancy (ALE)
● SLExARO=ALE
■ Compare the ALE to the Annual cost of mitigating controls. How much do
you spend to save how much more?
■ Qualitative risk might say that even though it costs a little more for the
protection, its worth it (for savings in privacy, company’s status, etc)
○ Qualitative Risk Assessment
■ Judge based on probability and impact
■ Probability is obvious
■ Impact includes loss of confidentiality, integrity, or availability of system
data
■ You might use a host of experts in a focus group to determine the risk
and impact
■ You can assign numbers on a 1-10 scale to make it easier to assess risk
○ Documenting the Assessment
■ File a report including the numerical risk values and recommended
solutions
■ Management can review these reports to make final decisions
■ A final report can document what risks were accepted vs. mitigated
■ DO NOT let an attacker get these reports
○ Metrics to Assess Risk
■ Mean Time Between Failure (MTBF) - System’s reliability in hours. Lists
average hours between failures.
■ Mean Time To Failure (MTTF) - Length of time a device can be in
service before it fails. Primarily indicates a device that cannot be repaired.
■ Mean Time To Recover (MTTR) - Average length of time to restore a
system
Anatomy of an Attack
○ Recon on the larger target, then honing in for details (fingerprinting) of individual
targets.
○ Identifying IP Address of Targets
■ Starts with Geographic Location
■ Use ICMP sweep to identify operational systems in a region using Ping
Scanner
■ Its possible to block ICMP at a firewall to prevent Ping Scanners
○ Identifying Open Ports with a Port Scanner
■ By noting open ports, you know what protocols and applications are likely
in use
■ Advanced Scanners send further queries to some known ports to make
sure a protocol is running and find out more info about the system
■ For instance, HTTP can tell you whether its on Apache or IIS
■ Nmap, Netcat, and Nessus all include port scanning abilities, and sec
professionals use them to perform self-analysis
○ Fingerprint System
■ Sends specific protocol queries to identify what OS is running based on
details of query responses
■ Banner Grabbing
● Gain info about remote server
● Telnet is effective for this
● Telnet into a website and port 80, and it shoots back a HTLM
header with details like OS, web server software, etc
○ Identifying Vulnerabilities
■ Once you know the fingerprint details, you get experts on the specific
infrastructure you’re trying to attack.
■ You can test input validation, default accounts, and use vulnerability
scanners to identify current patches
○ Attack
■ Once everything is planned, attackers try to move quickly so nothing can
be patched or updated, and that its harder to detect them. They’ll smash
and grab, trying to get as much as possible before they’re blocked out
○ APT - Advanced Persistent Threats are very real, and can be government
funded, well-organized, and resourceful. They have the skills and patience to
break through most defenses given enough time.
■ This is why it’s important to segment traffic and data, limit user
permissions, and train people to avoid malware. Attacks are very
reasonably possible, so you must limit the damage that can be caused by
a single attack.
Vulnerability Assessment
● Use vulnerability scanners, port scanners, etc
● Identify assets and risks
● Prioritize what mitigating factors you’ll use
● Vulnerability Scanning
○ Identifies Vulnerabilities
○ Identifies Misconfigurations
■ Open Ports
■ Weak Passwords
■ Default accounts and pws
■ Sensitive Data - DLP
■ Security and Configuration Errors
○ Passively Tests Security Controls
■ Identifies only, does not exploit
■ Does not interfere with normal operations until an admin can assess
○ Identifies Lack of Security Controls
■ Lack of patches or antivirus
● Other Assessments
○ Checking for tailgating spots, social engineering risks, etc
○ See if employees are dumb enough to give out passwords
○ Baseline Reporting
○ Code Review
○ Attack Surface Review
○ Architecture Review
■ Is a database accidently in a DMZ? Add a firewall
○ Design Review
■ How do apps interact? What’s the building layout?
● Credentialed v Noncredentialed
○ Scanners can run with a variety of credentials to see the risk at different levels of
user access
● Penetration Testing
○ Tries to exploit vulnerabilities to detect impact of an attack
○ You can also use this to see how a company will respond in case of an
emergency
○ Verify a Threat
○ Bypass Security Controls
○ Actively Test Security Controls
○ Exploit Vulnerabilities
○ A fake attacker could try an SQL injection to get credentials, then use those
credentials to break in further and test his luck
○ This can disrupt daily ops, but is very informative
● White, Gray, Black Box testing
○ Black Box - Testers have 0 knowledge of environment just like an attacker
○ White Box - Full knowledge of environment and documentation
○ Gray Box - Testers kind of know whats going on
● Obtaining Consent
○ Don’t pentest without consent in writing.
○ Use a “rules of engagement” doc
● Passive v Active Tools
○ Vuln scanning is PASSIVE
○ Pentesting is ACTIVE
● Continuous Monitoring
○ CONSTANT VIGILANCE
Hashing
● An algorithm run on data that can be used again later to confirm that data hasn’t been
changed, without having to parse the entire data
● MD5 - Message Digest 5
○ Produces 128 bit hash in hexadecimal
○ Often used to verify files and downloads
○ Website can display the hash, and then you can test the hash after download to
make sure its the same
● SHA - Secure Hash Algorithm
○ SHA-0 unused
○ SHA-1 creates 160 bit hashes similar to MD5
○ SHA-2 includes SHA-224, SHA-256, SHA-384, and SHA-512
○ SHA-3 uses a different method than SHA-2. Supports 224, 256, 384, and 512
bits as well.
○ Some HIDS and antivirus capture hashes of files when they first scan through,
and then later they capture new hashes to compare. If any hashes are different,
there is a possibility of malware.
● HMAC - Hash-based Message Authentication Code
○ Such as HMAC-MD5 and HMAC-SHA1
○ Uses a standard hash string of bits in conjunction with a secret key only known
by the sender and receiver.
○ Creates the hash with the basic bits, then calculates on top of that with the secret
key.
○ Not only does it protect integrity, but it also adds authenticity by ensuring that the
message could only come from the verifiable sender
○ IPsec and TLS often use HMAC
● Hashing
○ Most applications perform hashes automatically, but programs like md5sum.exe
will allow you to run them manually.
○ Passwords are often stored in hashes for security reasons
○ Now if an attacker can change a message, they could also change a hash, and
that’s why HMAC is more secure, because the hacker can’t properly fake that
hash.
● Other Hash Algorithms
○ RIPEMD - RACE Integrity Primitives Evaluation Message Digest
■ Creates 128, 160, 256, and 320 bit hashes.
○ LANMAN and NTLM
■ Older Microsoft hashing algorithms for passwords
■ LANMAN Lan Manager
● Windows 95, 98, and ME
● Can’t handle passwords longer than 14 characters
● Easy-to-crack because of the way it fills with trailing spaces and
hashes two 7 character codes
● 7 character hashes too easy yo
■ NTLM - NT LAN Manager
● Improved LANMAN
● NTLMv1 uses an MD4 hash and occasionally LANMAN, so its
useless
● NTLMv2 uses an MD5 hash which is hard af to crack
○ Before Vista, many systems leave LANMAN enabled by
default for backwards compatibility, which is baaaad.
● The reason for 15 character passwords is to prevent LANMAN
from being used
Encryption
● Two main parts to encryption
○ Algorithm
■ Always the same
○ Key
■ Provides variability for encryption, goes into the algorithm
■ Either private or changed often
● Symmetric Encryption
○ Same key to encrypt and decrypt
○ Also called Secret Key or Session Key encryption
○ AES uses 128 bit, 192, or 256 bit keys
○ Keys can be changed whenever a session is authenticated or re-authenticated
○ This is how RADIUS works
○ Block v Stream Ciphers
■ Stream are more efficient when… streaming
■ Block are more efficient when size of data is known.
■ WEPs vulnerability came from reusing keys on a stream cipher, so an
attacker just had to be patient.
○ AES
■ Strong symmetric block cipher
■ National Institute of Standards and Technology (NIST) adopted AES
from Rijndael encryption algorithm.
■ AES uses 128 bit, 192, or 256 bit keys
■ Fast, efficient, and strong. Best of the best.
○ DES
■ Symmetric Block Cipher used since the 70s. 64 bit blocks with a key of 56
bits, which is chump work nowadays.
○ 3DES
■ DES improvement. Encrypts in three passes.
■ Strong, but resource intensive.
■ Useful when AES isn’t supported.
○ RC4
■ Used in WEP, but not to blame for WEP.
■ Recommended in SSL and TLS for encrypting HTTPS
■ Speculation that NSA can crack RC4
■ AES is still better, haha.
■ Stream Cipher
○ Blowfish and Twofish
■ 64-bit blocks and keys from 32 to 448 bits.
■ Faster than AES in some situations.
● Twofish
○ 128 bit blocks
○ 128, 192, or 256 bit keys.
○ Almost used for AES, but Rjindael beat it.
○ One-time Pad
■ One of the most secure algorithms, but very labor intensive.
■ Each key is on a page of a pad, and destroyed after use.
■ Tokens and fobs are like digital successors to these.
● Asymmetric encryption
○ Private keys are never shared
○ Public keys are freely shared within a certificate
○ More resource intensive than symmetric encryption.
○ Often asymmetric encryption is only used to privately share a symmetric key
○ Certificates
■ Certificate Authorities (CA) issue and manage certificates.
■ Serial Number - unique to certificate, CA uses to validate, and if its
revoked, a CRL - Certificate Revocation List will update that
■ Issuer
■ Validity Dates
■ Subject
■ Public Key
■ Usage
○ RSA - Rivest, Shamir, Adleman
■ Asymmetric encryption that’s widely used
■ Email often uses RSA to share a symmetric key
■ TPM and HSM both store RSA keys
■ Supports a minimum of 1,024-bit keys, and often 2048 or 4096 are
recommended
○ Static v Ephemeral Keys
■ Static keys are semipermanent
■ Ephemeral keys are recreated each session
■ RSA uses static keys that are valid for the lifetime of a certificate, often a
year
■ Diffie-Hellman can use either static or ephemeral keys.
■ Perfect Forward Secrecy is an important characteristic for ephemeral
keys, and its that the public keys are random, not deterministic.
○ Elliptic Curve Cryptography
■ Often used with wireless devices because it requires less processing
power to encrypt, but is still hard to crack.
■ Even the NSA endorsed ECC
○ Diffie-Hellman
■ Means for sharing symmetric keys securely
■ DHE and ECDHE both use ephemeral keys.
● Steganography
○ Hiding data in other data.
○ Hide data by manipulating bits without affecting the final product.
○ Hide data in the white space of a file. Gifs and Jpegs save in blocks, so can be
modified without changing the file size.
○ Steganalysis uses hashing to detect changes.
● Quantum Cryptography
○ Making photons literally do your bidding.
○ If someone reads the photons, it changes them, and the connection is unsecure.
Using Cryptographic Protocols
● Basics
○ Email Digital Signatures
■ Sender’s private key encrypts.
■ Sender’s public key decrypts.
○ Email Encryption
■ The recipient’s public key encrypts.
■ The recipient’s private key decrypts.
○ Web Site encryption
■ The web site’s public key encrypts (symmetric)
■ The web site’s private key decrypts (symmetric)
■ The symmetric key encrypts data in the web session.
○ Often assymetric encryption is used to securely share symmetric keys.
○ Just knowing that a private key is encrypting is enough to know its being used as
a digital signature.
● Protecting Email
○ To send a digital sig on an email, you click a button which hashes the message
○ App uses her private key and encrypts the hash
○ App sends the hash and message to receiver
○ Receiver’s system uses Lisa’s public key from either the network, or an attached
certificate
○ Email decrypts the hash with lisa’s public key
○ App calculates a hash on the message
○ Compares decrypted hash with calculated hash
● Encrypting Email
○ With Only Assymetric
■ Lisa retrieves Bart’s certificate and public key
■ Lisa encrypts the email with his public key
■ Lisa sends the email
■ Bart uses his private key to decrypt
○ With Both
■ Lisa picks a symmetric key to encrypt her email, let’s say 51
■ Lisa encrypts her email with that key.
■ Lisa gets bart’s certificate to take his public key
■ Lisa uses bart’s public key to encrypt the symmetric key of 51
■ Lisa sends the encrypted email and encrypted symmetric key to bart
■ Bart decrypts the symmetric key of 51 with his private key, and then uses
51 to decrypt the email
○ S/MIME - Secure/Multipurpose Internet Mail Extension
■ Very popular email standard for signing/encryption
■ Uses RSA for asymmetric, and AES for symmetric
■ Requires PKI to distribute and manage certs
○ PGP - Pretty Good Privacy
■ OpenPGP is a PGP standard that circumvents licensing
■ GNU Privacy Guard is free and based on OpenPGP
■ PGP uses asymmetric and symmetric, and some versions follow S/MIME
● Transport Encryption
○ SSH - for SFTP, SCP, and Telnet
○ HTTPS - uses SSL or TLS over port 443
○ IPsec
■ Can encrypt data in tunnel mode with VPNs such as L2TP/IPsec.
■ Uses Authentication Header through HMAC which not only hashes, but
uses a private key encryption on top of the hash.
■ Can use Encapsulating Security Payload (ESP) to provide
confidentiality with AES or 3DES. Protocol ID 50.
■ In ESP packet, there’s an additional IP header over the whole packet,
which doesn’t allow attackers to see anything more than just that this is
an ESP packet.
■ Mandates HMAC, AES/3DES
○ SSL
■ HTTPS and FTPS both utilize to encrypt web traffic
■ Certificate based authentication
■ Both asymmetric and symmetric keys
■ Netscape made SSLv3, but when netscape waned, nobody maintained
SSL properly. TLS fills this gap.
○ TLS
■ Replaces SSL, and TLS 1.0 is actually SSL 3.1.
■ Cert based authentication
■ Asymmetric and symmetric encryption
■ EAP-TLS is the most secure version of EAP (802.1x servers that
authenticate users signing into a network) because it requires certs on
both host and server.
● Cipher Suites
○ Cipher suites are how two systems know which sets of cryptographic algorithms
they’re going to use together.
○ These provide Encryption, Authentication, and Integrity solutions.
○ There are over 200 named cipher suites that identify:
■ Protocol
■ Key Exchange MEthod
■ Authentication
■ Encryption
■ Integrity
○ You can enable or disable cipher suite options in a system
● Strong Versus Weak Ciphers
○ Only use the strength you need to limit resource drain, but also don’t go too
weak.
● Encrypting HTTPS traffic with SSL or TLS
○ Client requests secure session
○ Server sends its certificate including its public key
○ The client creates a symmetric key and and encrypts it with the servers public
key
○ The client sends the encrypted symmetric key to the server
○ The server decrypts the symmetric key using its private key
○ All of the session data from thereon is encrypted with the symmetric key
● Key Stretching
○ Technique used to increase the strength of stored passwords
○ Bcrypt
■ Based on blowfish.
■ Salts passwords by adding extra bits before encrypting with blowfish
○ PBKDF2
■ WPA2 and iOS use this. Salts with at least 64 bits
● In-band v Out-of-Band Key Exchange
○ In-band means you send keys and data in the same channel
○ Out-of-band means you share the key outside of the channel that you share data