studyhubInformation Assurance & Security

CS 3106N / Cram / Set 2

The next tier, once set 1 sticks: the details set 1 left out, section by section, with practice questions from the bank that test them.

8 modules · 239 facts · 140 questions

  1. 1Read a section: the context line, then the facts.
  2. 2Answer its questions in your head before you look.
  3. 3Finish a module, then drill it as multiple choice.

Module 8 · 30 facts · 18 questions

Linux Overview

Linux is the operating system most SOC work runs on: open source, driven from the command line and built for networks. This module covers the shell, servers and ports, logs, file permissions, links, processes and rootkits.

  1. 8.1Linux Basics
  2. 8.2Working in the Linux Shell
  3. 8.3Linux Servers and Clients
  4. 8.4Basic Server Administration
  5. 8.5The Linux File System
  6. 8.6Working with the Linux GUI
  7. 8.7Working on a Linux Host

8.1Linux Basics

Why a SOC runs on Linux, what the root user can do, and the tool types an analyst works with.

Why Linux in the SOC
open source, a powerful CLI that works on a terminal or remotely, more control over the OS, and better network communication control.
Root user (superuser)
absolute power, down to how the network stack handles packets; needs a strong password shared only with admins.
Value of Linux
admins add only the necessary packages, so the OS becomes a lean, efficient security analysis platform that fits the SOC workflow.
More SOC tools
malware analysis tools run malware safely; log managers cope with huge numbers of log entries; ticketing systems assign alerts to analysts.

Practice2

  1. 01

    A SOC team wants to tailor an operating system into a lean security-analysis platform, adding only the packages it needs. Which property of Linux makes this possible?

    It is open source

  2. 02

    Why is the Linux CLI valued by SOC analysts even though a GUI makes many tasks easier?

    It is powerful and works remotely

8.2Working in the Linux Shell

The commands the quiz names by job: man, pwd, ps, chmod, sudo and the rest.

Terminal emulator
GUI app that opens the CLI, hidden because Linux often boots to the GUI: Terminator, eterm, xterm, konsole, gnome-terminal.
shutdown
can restart, halt, sleep or kick out all connected users. passwd with no parameters changes the current user's password.
apt-get
installs, configures and removes packages on Debian; a front end for dpkg, and the pair is the default on all Debian derivatives, incl. Raspbian.
CLI text editors
main benefit: editing files from a remote computer, since an SSH shell has no GUI; nano shows a two-line shortcut bar at the bottom.
Everything is a file
memory, disks, monitor, directories; showing information on the display means writing to the display device's file.

Practice3

  1. 01

    An admin must restart a server and kick out all currently connected users. Which command can do both?

    shutdown

  2. 02

    An admin connected over SSH must edit a firewall rules file on a remote server that offers no graphical interface. What kind of tool does she need?

    A command-line text editor

  3. 03

    Linux treats memory, disks, directories and the monitor as files. From the OS standpoint, what does showing information on the display mean?

    Writing to the display's file

8.3Linux Servers and Clients

Servers listen on ports and clients talk to them. Learn the well-known port numbers.

Port and listening
a port is a reserved network resource so one computer can serve many services; a server listens once associated to a port.
Client application
talks to one type of server over a well-defined protocol; an FTP client talks to an FTP server, a web browser over HTTP port 80.

8.4Basic Server Administration

Services read config files, devices get hardened, and every event lands in a log file.

Service config files
hold port number, hosted resource location, client authorization; loaded into memory at start; format is the developer's choice.
Config examples
Nginx: lightweight web server; NTP config; Snort: Linux IDS whose ipvar HOME_NET is set to 209.165.200.224/27.
Hardening extras
define admin roles (not all IT staff get the same access), stop default services and block autostart, stop reuse of old passwords.
Log categories
application, event, service and system logs; each line of /var/log/messages is one event, its timestamp at the start.
dmesg and cron
dmesg events happen before syslog runs, so are not seen in real time; a scheduled task is a cron job, its status and errors in /var/log/cron.
MySQL logs
mysqld.log on RedHat, CentOS, Fedora; mysql.log on Debian, Ubuntu; holds mysqld and mysqld_safe debug, failure, success messages.

Practice4

  1. 01

    An admin edits a service's configuration file and saves it, but the service behaves as before. What is usually needed?

    Restart the service

  2. 02

    A new Linux server has several services enabled by default for historical reasons that are no longer required. What hardening step fits?

    Stop them and block autostart

  3. 03

    How does the course categorize Linux log files?

    Application, event, service, system

  4. 04

    On a Debian server, where are the MySQL debug, failure and success messages logged?

    /var/log/mysql.log

8.5The Linux File System

File system types, reading rwx permissions from ls -l, and hard versus symbolic links.

ext lineage
ext2 was default until ext3; ext3 is almost fully compatible with ext2; ext4 came from extensions developers refused in stable ext3.
Apple file systems
Linux kernel has a module to mount HFS+ read-write; APFS gives strong encryption and is optimized for flash and SSDs.
mount
with no options lists mounted file systems; / is the root file system holding all files by default, e.g. ext4 on /dev/sda1.
ls -l fields
2nd: hard link count; 3rd and 4th: owning user and group; 5th: size in bytes; 6th: last modification date and time.
ln arguments
ln space.txt space.hard.txt: existing file first, new name second; the link count goes 1 to 2 and edits show in both.
Symlink
also soft link; single point of failure; no directory hard links because the system uses them for the directory hierarchy.

Practice3

  1. 01

    The mount command shows /dev/sda1 on / type ext4. What does the / represent?

    The root file system

  2. 02

    In the listing -rwxrw-r-- 1 analyst staff 253 May 20 12:49 space.txt, what does the 1 after the permissions show?

    Number of hard links

  3. 03

    Which command creates a hard link named space.hard.txt to the existing file space.txt?

    ln space.txt space.hard.txt

8.6Working with the Linux GUI

X Window draws the desktop; Gnome 3 is the default Ubuntu interface.

X as a server
a remote user starts an app: it runs on the server, X sends the graphics over the network; X leaves the UI to window managers.
Gnome 3
Ubuntu default: Apps Menu, Ubuntu Dock (left launcher), Top Bar, Calendar and System Message Tray, Activities, Status Menu.
Activities vs Status Menu
Activities switches workspaces and apps, searches values in files; Status Menu: network adaptor, logoff, lock, shutdown.

Practice1

  1. 01

    A remote user connects over the network and starts a graphical application on a Linux server running X. Where does the application run?

    On the server

8.7Working on a Linux Host

Installing and updating packages, managing processes, and finding rootkits.

Arch vs Debian
install pacman -S / apt install; remove pacman -Rs / apt remove; update pacman -Syy / apt-get update; upgrade pacman -Syu / apt-get upgrade.
Fork and ps
forking lets Apache serve many requests with fewer resources; listing processes needs no root, killing others' processes does.
Linux attack vector
services and processes; attackers probe open ports (telnet IP 80 reveals nginx/1.12.0), then research that version's flaws.
Rootkit inspection
behavioral, signature, difference scanning, memory dump analysis; most need root access; firmware ones need new hardware.

Practice5

  1. 01

    On Arch Linux, which command installs a package by name?

    pacman -S

  2. 02

    Which Arch Linux command does the same job as apt-get update on Debian?

    pacman -Syy

  3. 03

    A regular user can list everyone's processes with ps. What is needed to kill another user's process?

    Root privileges

  4. 04

    An attacker runs telnet 209.165.200.224 80 and the reply includes Server: nginx/1.12.0. What is the attacker's likely next step?

    Research nginx 1.12.0 flaws

  5. 05

    After mounting a compromised drive from a trusted live CD, which set of methods can be used to inspect it for a rootkit?

    Behavioral, signature, difference, memory dump

Module 9 · 30 facts · 18 questions

System & Endpoint Protection

Every endpoint is a way into the network, so protection layers host-based tools (antimalware, host firewall, HIDS/HIPS) on top of network-based ones. This module covers OS hardening, patching, antimalware, host intrusion detection, boot integrity and shrinking the attack surface.

  1. 9.1Defending Systems and Devices
  2. 9.2Antimalware Protection
  3. 9.3Host-Based Intrusion Prevention
  4. 9.4Application Security

9.1Defending Systems and Devices

Hardening an OS: patches, antimalware, host-based tools, encryption, secure boot and locks.

Running antimalware
removing everything may take different programs and multiple scans, but only one program should run at a time.
Unapproved software
may not be malicious yet violates security policy and can interfere with services; remove non-compliant software immediately.
Patch management tool
test a patch before deploying it; the tool manages patches locally instead of the vendor's online update service.
Host-based solution
software on the endpoint working with the OS; host firewall restricts its traffic; HIDS watches system calls and file system access.
HIPS, EDR, DLP, NGFW
HIPS: known attacks and anomalies; EDR: collects, analyzes, responds; DLP: keeps sensitive data from loss; NGFW: firewall plus filtering.
Encryption
an algorithm makes data unreadable, a key restores it; full disk encryption covers temp files and memory; BitLocker To Go needs a password.
Firmware
basic computer instructions on a motherboard chip; UEFI defines a standard interface between the OS, firmware and external devices.
Secure Boot scope
firmware checks UEFI firmware drivers, UEFI apps and the OS; Measured Boot spots untrusted apps and lets antimalware load earlier.
Apple hardware
Boot ROM runs only genuine Apple OS; FileVault uses the AES engine without exposing keys; biometric data kept apart from the OS.
MRT detail
removes existing infections when Apple updates detection rules, and checks for malware at system restart and user login.
More countermeasures
auto antivirus scans of inserted CDs, DVDs, USB drives; annual security awareness training; access control policies and guidelines.
Keyed locks and RFID
any key lock fails if keys are lost, stolen or duplicated; RFID tags (chip plus antenna) also lock or configure devices wirelessly.

Practice9

  1. 01

    A technician needs several antimalware programs to clean an infected PC completely. How should she run them?

    One program at a time

  2. 02

    Software that may not be malicious but breaks security policy and can interfere with the organisation's software or network services.

    Unapproved software

  3. 03

    What does HIPS stand for?

    Host-based Intrusion Prevention System

  4. 04

    What does EDR stand for?

    Endpoint Detection and Response

  5. 05

    What does DLP stand for?

    Data Loss Prevention

  6. 06

    What does NGFW stand for?

    Next-Generation Firewall

  7. 07

    Encryption of the entire contents of a drive, including temporary files and memory, which Windows provides through BitLocker.

    Full disk encryption

  8. 08

    The Apple component that protects low-level hardware and lets only genuine, unaltered Apple OS software run.

    Boot ROM

  9. 09

    An Apple tool that removes existing malware infections when Apple updates detection rules, and checks for infections at restart and login.

    Malware Removal Tool

9.2Antimalware Protection

Why endpoints are the weak spot, and the network and host tools that protect them.

Malware numbers
ransomware victim every 11 seconds and $6 trillion a year by 2021; 8 million cryptojacking attempts in 2018; 8 to 10% of spam malicious.
Perimeter devices
hardened VPN router, next-gen firewall (ASA), IPS appliance, AAA server; external attacks: DoS, web defacement, data theft.
Inside threats
an infiltrated host becomes the attacker's starting point; endpoints: laptops, desktops, printers, servers, IP phones; also LAN storm attacks.
Host-based firewall
allows only connections the host initiated; e.g. Windows Defender Firewall with Advanced Security, Linux iptables, TCP Wrappers.
AV-TEST
independent testing laboratory giving high-quality reviews of host-based protections and other security products.
Borderless network
endpoints use network scanning elements with more layers than one host, sharing information; Cisco WSA also enforces acceptable use.

Practice1

  1. 01

    A company wants independent, high-quality reviews before choosing a host-based security suite. Which organisation provides them?

    AV-TEST

9.3Host-Based Intrusion Prevention

Host firewalls and HIDS: how they log, detect by signature or anomaly, and enforce policy.

Personal firewall
standalone, also on Android; profiles or rules by address, protocol, port; alerts and lets the user allow or block an offending app.
Firewall logs
date and time, allowed or denied, source and destination IPs and ports; routine DNS lookups clutter them, so filter and parse.
Distributed firewall
host-based firewalls plus central management that pushes rules to hosts and may collect their logs.
Windows Firewall
first in Windows XP; logs; managed centrally with group security policies, e.g. from System Center 2012 Configuration Manager.
HIDS functions
aka HIPDS; log analysis, event correlation, integrity checking, policy enforcement, rootkit detection, alerting; has a management server.
Polymorphism
attackers vary a malware family just enough to change its signature; HIDS is proactive (signatures) and reactive (detects unknown attacks).
Anomaly baseline
built from user and system behavior; non-malware changes cause erroneous results that raise workload and lower credibility.
Policy-based rules
most HIDS ship predefined rules; admins can push custom policies centrally; HIDS may shut down violating processes.

Practice4

  1. 01

    An analyst is inspecting a host-based firewall log and is overwhelmed by DNS lookups and other routine events. What should she do?

    Filter and parse the logs

  2. 02

    Host-based firewalls whose rules are managed centrally instead of one machine at a time.

    Distributed firewall

  3. 03

    A trait of some malware families where attackers create variations that change the signature just enough to evade detection.

    Polymorphism

  4. 04

    Security staff complain their anomaly-based HIDS raises many alerts that turn out to be harmless. Why does this happen?

    Non-malware changes alter behaviour

9.4Application Security

Shrinking the attack surface with allowlists and blocklists, and testing files in a sandbox.

Expanding attack surface
IoT, BYOD, cloud, mobility; network surface spans network and transport layers; human surface: malicious insiders, user error.
Blocklist sources
manual or from security services; Cisco Firepower pulls lists from Cisco Talos; The Spamhaus Project is a free blocklist service.
Sandbox workflow
Cisco AMP tracks a file's trajectory and rolls back events for a copy, Threat Grid runs it, results become signatures and detection rules.
Online sandboxes
VirusTotal, Joe Sandbox, CrowdStrike Falcon; ANY.RUN captures screenshots, HTTP and DNS activity, maps tactics to MITRE ATT&CK.

Practice4

  1. 01

    What does BYOD, one of the trends expanding the attack surface, stand for?

    Bring Your Own Device

  2. 02

    A small business wants a free, ready-made blocklist service instead of building its own. Which example does the course name?

    The Spamhaus Project

  3. 03

    Cisco AMP has rolled back network events to get a copy of a suspicious download. Where should the file go next?

    Into a sandbox such as Threat Grid

  4. 04

    An online sandbox with rich interactive reports that captures screenshots of the malware and maps its tactics to the MITRE ATT&CK Matrix.

    ANY.RUN

Module 10 · 30 facts · 18 questions

Cybersecurity Principles, Practices & Processes

Module 10 organises everything in cybersecurity into one model, the cybersecurity cube: what you protect (goals), where the data is (states) and how you protect it (countermeasures). Expect to name all three dimensions and sort examples into them.

  1. 10.1The Three Dimensions
  2. 10.2States of Data
  3. 10.3Cybersecurity Countermeasures

10.1The Three Dimensions

The cybersecurity cube: principles (CIA), data states, and the safeguards that protect them.

Tokenization detail
isolates data elements from other data systems; outside the system a token has no value; suits databases and card payments.
DRM key
media on CD, mp3 or e-book is encrypted and cannot be copied without the decryption key, which only licensed parties get.
Classified information
may belong to a government body; secret, confidential or restricted access (e.g. restricted agency info for a training module).
Business information
anything risky if found by the public or a competitor, including customer information; e.g. an unlaunched new product.
Privacy laws
the type of cybersecurity law that protects you from an organization that might share your sensitive data.
Integrity across the lifecycle
data must stay unaltered by unauthorized entities during capture, storage, retrieval, update and transfer.
High availability methods
system redundancy, backups, increased resiliency, maintenance, updates and patches, proactive disaster recovery plans.
Updates and patches
all systems updated on a regular schedule; professionals subscribe to alerts announcing new update releases.
Backup testing
back up organization, configuration and personal data, then test that backups work and data can be recovered after a loss.
Disaster planning
staff and customers know how to respond; the team practices response protocols, tests backups, knows restore procedures.
Activity monitoring
event logs, system alerts and access logs give real-time info, spotting attacks within seconds.
McCumber Cube
framework developed by John McCumber in 1992 to establish and evaluate information security; 3 dimensions with 3 elements each.
Cube safeguards in the lab
policy and practices = administrative controls; human factors = awareness programs; technology = antivirus, firewalls, IDS/IPS.
Hash before and after archiving
if a file changed by even one character or bit, the hashes will not match; HMAC also verifies integrity.

Practice5

  1. 01

    Encrypting copyrighted music, films and books so they cannot be copied without a key that only licensed parties receive.

    Digital rights management

  2. 02

    Sensitive information that may belong to a government body and is considered secret, confidential or restricted access.

    Classified information

  3. 03

    Analysts watch event logs, system alerts and access logs in real time so they can spot an attack within seconds. Which availability measure is this?

    Activity monitoring

  4. 04

    The security team practises response protocols and restoring critical systems, and staff and customers know how to respond to a disaster. Which availability measure is this?

    Disaster planning

  5. 05

    An administrator restores files from last week's backup just to confirm the data could be recovered after a loss. Which availability measure is this?

    Backup testing

10.2States of Data

Data at rest, in transit and in process, where each lives, and how each gets attacked.

Where data rests
local devices (a user's hard disk) or centralized (an organization's server); data not in transit or in process is at rest.
RAID and NAS benefits
RAID: improved performance and fault tolerance. NAS: flexible and scalable: administrators can increase capacity as needed.
Cloud storage
space at a data center provider, reachable from any computer with Internet, usually by subscription; Google Drive, iCloud, Dropbox.
Protecting stored data
automate and centralize backups; DAS is among the hardest to manage, so limit the types of data stored on it.
Network storage trade-off
RAID, SAN, NAS give performance and redundancy but are complex and hold more data; challenges: configure, test, monitor.
Wired networks
copper and fiber optic media serving a LAN or spanning great distances as a WAN; wireless is replacing wired as it gets faster.
Packet
unit of data between source and destination; IP and HTTP define its structure and format, open source and public.
Input corruption
mislabeling, incorrect or mismatched data formats, data entry errors, disconnected or malfunctioning sensors.
Output
to printers, displays, speakers; corruption: wrong data delimiters, incorrect communication configurations, misconfigured printers.

Practice8

  1. 01

    Combining multiple hard drives in an array so the operating system sees them as a single disk, improving performance and fault tolerance.

    RAID

  2. 02

    Remote storage that uses space at a data center provider and is reachable from any computer with Internet access, usually by subscription.

    Cloud storage

  3. 03

    An organisation moves its data from direct-attached storage to RAID, SAN and NAS. Which challenge does it now take on?

    Configuring, testing and monitoring the system

  4. 04

    To boost security and decrease data loss, what should an organisation do about direct-attached storage devices?

    Limit the types of data stored on them

  5. 05

    Networks using copper and fibre optic media that can serve a LAN or span great distances as a WAN.

    Wired networks

  6. 06

    Which standard protocols define the structure and format of data packets, and are open source and fully available to the public?

    IP and HTTP

  7. 07

    A report prints with jumbled columns because the wrong data delimiters were used. In which stage of data in process did the corruption happen?

    Output

  8. 08

    A disconnected, malfunctioning sensor keeps feeding bad readings into a monitoring database. In which stage of data in process is integrity lost?

    Input

10.3Cybersecurity Countermeasures

Technologies, awareness training and policies, standards, guidelines and procedures.

Host-based IDS
examines activity on host systems only, logs and alarms on unusual activity; for systems with sensitive data or critical services.
Hardware-based access control
biometrics such as fingerprint or iris scanners. Network switch — LAN connection point that adds security.
Awareness program
make it part of onboarding, tie it to job requirements or evaluations, in-person sessions with gamification, online modules.
Awareness is ongoing
once is not enough as new threats keep emerging; needs management leadership and every team member's commitment.
AUP detail
as explicit as possible: lists the specific websites, newsgroups or bandwidth-intensive applications users cannot access.
Why standards
consistency is one of the most important principles; each organization writes standards for its own environment.
Guideline example
turn a memorable phrase like 'I have a dream' into Ihv@dr3@m; guidelines define how standards are developed.

Practice5

  1. 01

    A data centre installs fingerprint and iris scanners to confirm the identity of anyone trying to reach its servers. Which safeguard is this?

    Hardware-based access control

  2. 02

    A manager suggests running security awareness training once and then stopping. Why is that not enough?

    New threats and techniques keep emerging

  3. 03

    Which of these is a recommended way to build a culture of security awareness in an organisation?

    Make it part of onboarding

  4. 04

    Organisations establish standards because of which of the most important security principles?

    Consistency

  5. 05

    A document lists the specific websites, newsgroups and bandwidth-intensive applications users may not access on company computers. Which policy component is this?

    Acceptable use policy

Module 11 · 30 facts · 16 questions

Understanding Defense

Module 11 is about defending an organisation on purpose: know what you own, know what can hurt it, then stack layers so one failure does not expose everything. The exam weights defense-in-depth (onion versus artichoke, the five strategies), asset management and the policy types.

  1. 11.1Defense-in-Depth
  2. 11.2Cybersecurity Operations Management
  3. 11.3Security Policies, Regulations, and Standards

11.1Defense-in-Depth

Know your assets, threats and vulnerabilities, then layer defenses: onion versus artichoke.

Growing assets
assets grow with the organization and through mergers, so many organizations have only a general idea of what to protect.
Asset management scope
protect internal users and resources, mobile workers, and cloud-based and virtual services; know where critical data sits.
Assets vary
retail: card data; engineering firm: designs and software; bank: account and financial data; each draws different threat actors.
Procurement
assets are bought based on needs identified from data gathered to justify the purchase, then added to inventory.
Disposal detail
may dismantle the asset for parts; parts that are environmental hazards are disposed of according to local guidelines.
Lifecycle examples
checking in laptops: procurement; adding barcodes: deployment; rolling out patches: utilization; upgrading outdated assets: maintenance.
Internal system compromise
attacker uses the exposed e-banking servers to break into an internal bank system.
Stolen customer data
attacker takes personal and financial data from the customer database. Data center destruction — a cataclysmic event.
Phony transactions
from an external server (altered app code, impersonating a user) or with a stolen customer PIN or smart card (stolen identity).
Insider attack
a bank employee finds a flaw to mount an attack. Data input errors — a user enters incorrect data or transaction requests.
Identifying vulnerabilities
needs an understanding of key applications and their and the hardware's vulnerabilities; much admin research.
Edge router to firewall
the router (R1) screens traffic before a dedicated firewall appliance, e.g. the Cisco ASA; the internal router is R2.
Security onion note
the analogy only visualizes defense-in-depth; not to be confused with the Security Onion suite of network security tools.
Artichoke heart
holds the most confidential data; each leaf protects yet offers a path to attack; not every leaf must be removed.
Layering example
top-secret documents on a password-protected server in a locked building surrounded by an electric fence; not an impenetrable shield.
Diversity detail
different encryption algorithms and authentication for data in different states; time-delay locks plus staff supervision.
Simplicity failure
systems hard to understand and troubleshoot backfire; an unnecessarily complex account setup is as easy to compromise.

Practice10

  1. 01

    In a bank's e-banking threat list, an attacker uses the exposed e-banking servers to break into an internal bank system. Which identified threat is this?

    Internal system compromise

  2. 02

    A bank employee finds a flaw in the e-banking system and uses it to mount an attack. Which identified threat is this?

    Insider attack on the system

  3. 03

    An attacker alters the code of the e-banking application and makes transactions by impersonating a legitimate user. Which identified threat is this?

    Phony transactions from an external server

  4. 04

    A bank customer types the wrong account number and submits an incorrect transfer request. Which identified e-banking threat does this fall under?

    Data input errors

  5. 05

    IT checks in a new delivery of laptops that was bought after usage data justified the purchase, and adds them to the inventory. Which lifecycle stage is this?

    Procurement

  6. 06

    Staff upgrade the memory and modify the configuration of some ageing workstations to keep them productive for another two years. Which lifecycle stage is this?

    Maintenance

  7. 07

    A model for borderless networks where the attacker only needs to pull off certain pieces, each of which protects but also offers a path toward the most confidential data.

    Security artichoke

  8. 08

    A company's staff mostly work from phones and cloud apps with no clear network edge. An attacker compromises one phone and uses it to reach more data without breaking through any other layer. Which model describes this?

    Security artichoke

  9. 09

    A defense strategy that builds a barrier of several protections, ideally each harder to beat than the last, such as a password-protected server inside a locked building behind a fence.

    Layering

  10. 10

    The defense strategy which holds that complexity does not guarantee security, and that a solution should be simple on the inside but complex on the outside.

    Simplicity

11.2Cybersecurity Operations Management

Configuration management and the logs that show what happened.

Baseline example
deploying Windows workstations with the required applications and settings per a documented configuration.
Documented configuration resources
network maps, cabling/wiring diagrams, app configuration standards, naming conventions, an IP schema.
Secure OS
configure log files and auditing, change default account names and passwords, account policies, file-level access control.
Log
records all events as they occur; entries make up a log file; monitoring shows how an attack occurred and which defenses worked.
OS log events
client requests and server responses (successful authentications), usage info (number and size of transactions in a period).
Security logs
from network- or system-based security software; for auditing analysis, trends, long-term problems, proving legal compliance.

Practice1

  1. 01

    The settings configured for a system that form the template for all similar systems, such as the required applications for every workstation the organisation deploys.

    Baseline configuration

11.3Security Policies, Regulations, and Standards

Business and security policies, the AUP, BYOD rules, and the laws an organization must follow.

Why business policies matter
they govern an organization's actions; on a network they set a baseline of acceptable use, and a violation may signal a breach.
Company vs employee policies
company policies protect workers' rights and employers' business interests; employee policies are given to new hires to review and sign.
Security policy evolves
like a continuity plan, it changes with the threat landscape, vulnerabilities, and business and employee requirements.
AUP update
when a harmful new website appears, change the AUP immediately and have all users sign it; it may state ramifications of violations.
BYOD benefits
productivity, lower IT and operating costs, mobility, appeal in hiring and retaining; risks: data breaches, greater liability.
MDM
lets IT teams apply security settings and software configurations to all devices that connect to company networks.
INFOSEC
Information Systems Security; its professionals must know the binding laws and codes of ethics; many organizations are mandated to have policies.

Practice5

  1. 01

    Increased productivity, reduced IT and operating costs, better mobility for employees and greater appeal for hiring are benefits of which program?

    BYOD

  2. 02

    A firm lets staff read company email on their own phones. IT wants security settings and software configurations pushed to every phone on the network from one console. Which tool should it use?

    MDM software

  3. 03

    A policy written and maintained by HR covering salary, pay schedule, benefits and vacations that new hires review and sign.

    Employee policy

  4. 04

    A constantly evolving document, much like a continuity plan, that sets security objectives, defines rules of behaviour for users and administrators, and specifies system requirements.

    Security policy

  5. 05

    What does INFOSEC stand for?

    Information Systems Security

Module 12 · 30 facts · 18 questions

System & Network Defense

Module 12 is the widest in the unit: it hardens a system from the front door to the data centre, covering physical security, applications, network services, segmentation, wireless and mobile devices, resilience and embedded systems. The exam leans on RAID, availability and five nines, the DMZ zones, and wireless security.

  1. 12.1Physical Security
  2. 12.2Application Security
  3. 12.3Network Hardening: Services and Protocols
  4. 12.4Network Hardening: Segmentation
  5. 12.5Hardening Wireless and Mobile Devices
  6. 12.6Cybersecurity Resilience
  7. 12.7Embedded and Specialized Systems

12.1Physical Security

Fences, biometrics, badges, guards and cameras: keeping people away from the hardware.

Top guard
barbed or concertina wire atop a high-security fence; deters and delays by injury, though a blanket or mattress defeats it.
Choosing biometrics
accuracy matters most; also speed, acceptability, uniqueness, counterfeit resistance, reliability, storage, enrollment time, intrusiveness.
Acceptance rate
% of unenrolled people or imposters accepted as authentic. False rejection matters least for access control but loses retail sales.
Card reader sequence
badge swiped, reader reads its number, number sent to a computer, computer decides access, transaction logged.
Guards vs. cameras
guards adapt and decide on the spot but cost more and err; cameras record long periods and link to motion detection.
RFID asset tags
hidden readers in door frames; no line-of-sight needed, tags need not be visible, many read at once; flags assets leaving.

Practice3

  1. 01

    A security team is choosing a biometric system and lists speed, acceptability, reliability and enrolment time. Which factor does the course call the most important?

    Accuracy

  2. 02

    In a card reader system, an employee swipes an access badge. What happens next?

    The reader reads a number on the badge

  3. 03

    A data center needs access control that can judge unusual situations and respond instantly on the spot. Which control fits best?

    Security guards

12.2Application Security

Secure development, input validation, and the threats an application faces.

Dev, staging, provisioning
dev is less restrictive; staging mirrors production to test security settings; deprovisioning removes software.
Automated input attack
attackers alter confirmation-email links and script it to flood a newsletter database with bogus subscribers.
ISBN check digit
multiply digits by 10 down to 2, sum (233), add what reaches a multiple of 11: 9, giving 242.
Version control
two users cannot update the same object at once; the second opener of a document gets only a read-only copy.
Application threats
unauthorized access: MFA and log monitoring; downtime: BCP and DRP; data loss: classification and backups; dev flaws: test pre-launch.

Practice4

  1. 01

    Attackers modify the confirmation links in a newsletter's sign-up emails and script the process to flood the database with thousands of bogus subscribers. What kind of attack is this?

    Automated input attack

  2. 02

    A system multiplies the first nine digits of an ISBN by 10 down to 2, adds the results and computes the number needed to reach a multiple of 11. Which validation criterion is this?

    Check digit

  3. 03

    Two staff open the same record. The first can edit it, but the second only gets a read-only version until the first finishes. What practice is this?

    Version control

  4. 04

    An organisation sees repeated unauthorised access to its systems. Which countermeasures does the course recommend?

    Use MFA and monitor log files

12.3Network Hardening: Services and Protocols

Closing unneeded ports and replacing insecure protocols with secure ones.

Port scanner
sends a message to each port and waits for a reply to show which ports are open; attackers use it too.
DNS hardening
separate internal and external DNS, hide the version string, restrict zone transfers, use transaction signatures, sign zones.
ICMP abuse
attackers misuse ICMP for reconnaissance, DoS and covert channels, so many networks filter ICMP; use NTP Authentication for timeservers.
SCP vs. TLS vs. SSH use
send a payment file to a remote colleague: SCP; instant message: TLS; log in to a remote Linux lab: SSH.

Practice1

  1. 01

    A finance lead needs to transfer a customer payment file securely to a colleague's remote system. Which protocol fits?

    SCP

12.4Network Hardening: Segmentation

VLANs, the DMZ and security zones, and how traffic flows between them.

East-west vs. north-south
east-west moves between servers inside the data center; north-south moves into and out of the network.
LAN countermeasures
rogue users: wireless passphrases; data in transit: encryption; probing and port scans: post-configuration penetration tests.

Practice1

  1. 01

    An administrator finds unauthorised network probing and port scanning on the LAN. Which countermeasure matches this threat?

    Run post-configuration penetration tests

12.5Hardening Wireless and Mobile Devices

Wireless standards and their security, and keeping phones and tablets under control.

Mobile communication
Wi-Fi, Bluetooth, NFC (contactless), IR (short range, needs a receiver) and USB, the only wired one.
COPE vs. BYOD
COPE: corporate-owned, personally enabled; containerization isolates apps, controls them and can delete the container or wipe the device.
Mobile safeguards
screen locks, biometrics, context-aware authentication (ML on normal behavior), remote wiping of lost devices, full device encryption.
GPS and geofencing
GPS pinpoints to about 5 meters; geofencing uses RFID to set an area; attackers abuse push notifications to capture data.

Practice2

  1. 01

    Of the ways a smartphone can communicate, such as Wi-Fi, Bluetooth, NFC, IR and USB, which one is wired?

    USB

  2. 02

    An employee's company phone is stolen on a train. What lets the organisation delete the data on it?

    Remote wiping

12.6Cybersecurity Resilience

Staying up: five nines, redundancy, RAID, backups and disaster recovery.

Single point of failure
hardware, a process, data, a utility or a skilled staff member; fix by not relying on any single element.
Router redundancy
PCs use a virtual gateway IP (192.0.2.100); if the forwarder's periodic messages stop, the standby router takes over.
Replication
synchronous: real time, high bandwidth, sites close; asynchronous: near real time, farther apart; point-in-time: periodic, least bandwidth.
Application resilience
fault tolerant hardware, cluster architecture, backup and restore; cost and complexity rise with availability.
Facility threats
social engineering: awareness training; theft: asset tagging; unauthorized entry: badge encryption; natural threats: DRP and BCP.

Practice3

  1. 01

    PCs on a network use 192.0.2.100 as their gateway. The forwarding router fails and the standby router takes over, yet the PCs stay online. Why?

    They use the virtual router IP address

  2. 02

    Staff keep falling for callers who pretend to be IT support. Which physical facility countermeasure addresses this social engineering threat?

    Regular security awareness training

  3. 03

    Laptops keep going missing from an office. Which physical facility countermeasure matches this threat?

    An asset tagging system

12.7Embedded and Specialized Systems

SCADA, IoT, VoIP and other devices that are hard to patch and easy to attack.

Stuxnet and SCADA
the worm hit SCADA industrial control systems; prevent it by segregating the SCADA network from the organization's LAN.
SoC devices
Raspberry Pi and Arduino, FPGA-based; often poor authentication and unpatchable, so a level of implied trust is required.
VoIP attacks
registration spoofing steals incoming calls, proxy impersonating, call hijacking; an IDS detects ARP poisoning.
Vehicles and aircraft
cars: secure software design, encrypted controller traffic, firewalls; aircraft: hard-coded logins, insecure protocols, backdoors.

Practice4

  1. 01

    A team deploys Raspberry Pi based sensors and notes they have poor authentication and cannot be patched. What does the course say must therefore be accepted?

    A level of implied trust

  2. 02

    An intrusion detection system is added to a VoIP network. Which attack does the course say it helps detect?

    ARP poisoning

  3. 03

    A car maker wants to protect in-vehicle systems against unauthorised tracking, wireless jamming and spoofing. Which countermeasure is recommended?

    Encrypt communication between controllers

  4. 04

    A plant operator worries that a worm like Stuxnet could reach the industrial controllers from the office LAN. What is the recommended prevention?

    Segregate the SCADA network from the LAN

Module 13 · 30 facts · 17 questions

Access Control

Access control decides who gets in (authentication), what they may do (authorization) and what they did (accounting), under least privilege and zero trust. Expect questions on control types, the access control models, the authentication factors and RADIUS versus TACACS+.

  1. 13.1Access Controls
  2. 13.2Access Control Concepts
  3. 13.3Account Management
  4. 13.4AAA usage and operation

13.1Access Controls

Physical, logical and administrative controls, and the steps of AAA: identify, authenticate, authorize, account.

Mantrap
entry system that staggers the flow of people into a secured area and traps unwanted visitors; guard dogs and locked doors are also physical.
Clipping level
an allowed threshold for errors before a red flag is triggered; a logical control, like smart cards (embedded microchip).
Authorization in practice
logging on to the network does not mean you may use the color printer; it can also lock users out after hours.
AAA accounting
not financial accounting: tracks what users access, for how long and what they change, in real time; like auditing a bank account.
Identification
enforces the authorization policy's rules via a unique identifier; a username is most common, also a PIN, smart card or biometric.
Federated identity risk
broadens scope and raises the chance of a cascading attack; it shares identity across castle boundaries, so vet shared data.
Passwords
the most popular method; at least eight characters mixing cases, numbers and symbols; one password everywhere means one crack opens all.
Smart card vs. key fob
smart card: credit-card size, chip that processes, stores and safeguards data; fob: fits a keyring, shows a number for 2FA.
Authorization attributes
answer what read, copy, edit, create and delete privileges a user has; applied automatically right after authentication.
Group membership vs. authority-level
an authorization policy sets rules: group policy by group (only IT reaches the server room), authority by position.
Accountability
traces an action to the person or process; collects login time, success or failure and resources used, for auditing or billing.
Providing accountability
technologies, policies, procedures and education; data retention, media disposal and compliance; login failures may mean hacking.

Practice10

  1. 01

    A user logs on to the corporate network successfully but gets an error when trying to use the high-speed colour printer. Which AAA service has stopped her?

    Authorization

  2. 02

    An auditor sees a log entry that says user student accessed host server XYZ using SSH for 15 minutes. Which AAA service produced it?

    Accounting

  3. 03

    A user wants one password for every system so it is easy to remember. What is the main risk the course warns about?

    One cracked password opens every account

  4. 04

    An entry system that staggers the flow of people into a secured area and traps unwanted visitors, usually a two-door vestibule holding one person at a time.

    Mantrap

  5. 05

    An allowed threshold for errors, such as failed logins, before a red flag is raised.

    Clipping level

  6. 06

    The AAA service that tracks what users access, how long they use it and any changes they make. It is not financial bookkeeping.

    Accounting

  7. 07

    The control that enforces the rules set by the authorization policy, using a unique identifier such as a username so the system can tell each user apart.

    Identification

  8. 08

    A credit-card-sized plastic card with an embedded chip that processes, stores and safeguards data such as digital signatures, used as something you have.

    Smart card

  9. 09

    An authorization policy that grants access based on an employee's position within the organization.

    Authority-level policy

  10. 10

    Tracing an action back to the person or process that made a change to a system, then collecting and reporting that usage data for auditing or billing.

    Accountability

13.2Access Control Concepts

Zero trust, and the access control models: MAC, DAC, RBAC, ABAC and rule-based.

Zero trust in depth
users may authenticate several times in different ways for different layers; it limits an attacker's lateral movement.
Workloads vs. workplace
workloads: an API, microservice or container reaching a database; workplace: endpoints, printers, cameras, HVAC, infusion pumps.
Rule-based naming
rule-based access control is also called Rule Based RBAC; rules may permit or deny IP addresses or protocols.
NAC capabilities
enforce policies fast, profile users and devices, give guests access via registration portals, block, isolate or repair non-compliant devices.

Practice2

  1. 01

    A device fails the security checks when it joins the network, and the system blocks, isolates or repairs it automatically. What kind of system is doing this?

    Network access control

  2. 02

    The zero trust pillar concerned with applications in the cloud and data centers, such as an API, microservice or container accessing a database.

    Workloads

13.3Account Management

Account types, permissions, password and lockout policies, and authentication protocols.

More privileged practices
record privileged sessions, change embedded script passwords, disable inactive accounts, revoke on job change, alert on oddities.
Permissions and inheritance
rules limiting file or folder access; items created in a parent folder inherit its permissions, and can propagate to subfolders.
Domain vs. local policy
Active Directory domain policy applies to all members; secpol.msc (not in Home edition) is for non-domain PCs.
Password policy example
change every 90 days, keep at least one day, eight characters with three of four categories, reuse only after 24.
Audit policy
security log of account logons, account management, directory service and object access, policy changes, privilege use, process, system.
HMAC exchange
basic authentication leaves credentials unencrypted; with HMAC the user sends a key identifier and HMAC, and the server recomputes to match.
EAP vs. 802.1x
EAP sends the password as a hash and only the server needs a certificate; 802.1x credentials or certificate are confirmed by RADIUS.
RADIUS weaknesses
username, accounting and services go in cleartext and replay protection is needed; TACACS+ suits corporate networks needing control.
Kerberos server
holds user IDs and hashed passwords plus shared secret keys with every server it grants tickets for; the whole session can be encrypted.
Hash uses
authenticity with a symmetric key (IPsec, routing protocol auth), one-time challenge responses, integrity of signed contracts and PKI certs.
Combining strategies
RBAC can enforce DAC or MAC policies and suits large organizations; MAC can be implemented with a rule-based approach.

Practice3

  1. 01

    A Windows local policy that creates a security log tracking events such as account logons, object access, policy changes and privilege use.

    Audit policy

  2. 02

    An authentication protocol where the client's password is sent as a hash and only the authentication server needs a certificate.

    EAP

  3. 03

    A standard in which an organization authenticates your identity and authorizes network access, with credentials or a certificate confirmed by a RADIUS server.

    802.1x

13.4AAA usage and operation

Local versus server-based AAA, RADIUS versus TACACS+, and what accounting records.

Centralized AAA
can use Active Directory or LDAP for authentication and groups; sends every device's accounting records to one repository for auditing.
Challenge-response
TACACS+ is bidirectional, as in CHAP, and leaves a standard header unencrypted; RADIUS is unidirectional, server to client.
Accounting logs
start and stop messages; record times, commands, packets and bytes; resource accounting adds stop records for failed authentications.

Practice2

  1. 01

    A security team wants accounting records from every router and switch kept in one place so auditing user actions is simpler. Which setup gives this?

    Centralized AAA

  2. 02

    What does LDAP stand for, a directory a centralized AAA server can use for user authentication and group membership?

    Lightweight Directory Access Protocol

Module 14 · 30 facts · 17 questions

Access Control Lists

An ACL is an ordered list of permit and deny statements a router checks top-down, first match wins, with a hidden deny at the end. Expect wildcard masks, standard versus extended, placement and writing the IOS commands.

  1. 14.1Introduction to Access Control Lists
  2. 14.2Wildcard Masking
  3. 14.3Configure ACLs
  4. 14.4Named Standard IPv4 ACL Syntax
  5. 14.5Implement ACLs
  6. 14.6Mitigate Attacks with ACLs
  7. 14.7IPv6 ACLs

14.1Introduction to Access Control Lists

What an ACL is, standard versus extended, numbered versus named, inbound versus outbound.

Packet filtering
comparing a packet against each ACE in order to forward or discard it; works at Layer 3 or 4. ACEs are also called ACL statements.
ACL tasks (1)
limit traffic for performance (block video); traffic flow control (routing updates only from a known source); basic security (only authorized users reach HR).
ACL tasks (2)
filter by traffic type (email in, Telnet denied); screen hosts to services (FTP/HTTP by user group); priority for traffic classes (voice, with QoS).
FTP-FILTER example
ip access-list extended FTP-FILTER, then permit tcp 192.168.10.0 0.0.0.255 any eq ftp and eq ftp-data; far clearer than a numbered ACL 100.

Practice4

  1. 01

    Comparing each packet against ordered entries using Layer 3 and Layer 4 header information to decide whether to forward or drop it.

    Packet filtering

  2. 02

    Corporate policy says voice traffic must be forwarded as fast as possible to avoid interruption. Which ACL task does this describe?

    Provide priority to traffic classes

  3. 03

    Policy demands that access to the Human Resources network be restricted to authorized users only. Which ACL task does this describe?

    Basic security for network access

  4. 04

    What does QoS stand for, used with ACLs to identify voice traffic and forward it first?

    Quality of Service

14.2Wildcard Masking

0 means match and 1 means ignore. Work out masks from subnets, and use host and any.

Wildcard ANDing
like a subnet mask it uses ANDing, but reversed; 0.0.0.63 ignores the last 6 bits, 0.0.0.252 ignores the six leftmost bits of the last octet.
Summarize, then subtract
192.168.10.0 + 11.0 = /23, ACE 192.168.10.0 0.0.1.255; 192.168.16.0 to 31.0 = /20, ACE 192.168.16.0 0.0.15.255.
Keyword equivalents
permit host 192.168.10.10 = permit 192.168.10.10 0.0.0.0; permit any = permit 0.0.0.0 255.255.255.255. A plain IP without host also means one host.

Practice1

  1. 01

    One ACE in ACL 10 must permit only networks 192.168.10.0/24 and 192.168.11.0/24. Which address and wildcard pair fits?

    192.168.10.0 0.0.1.255

14.3Configure ACLs

The commands for standard and extended ACLs, ports, and the established keyword.

Planning a complex ACL
write the policy in a text editor, add the IOS commands, include remarks, copy and paste onto the device, then always thoroughly test it.
Standard ACE syntax
access-list number {deny | permit | remark text} source [source-wildcard] [log]; log message shows ACL number, permit/deny, source, packet count.
Name case sensitivity
Web and WEB are two different ACLs; capitals are not required but make names stand out and avoid such duplicates. Prompt: R1(config-std-nacl)#.
Removing a named ACL
no ip access-list standard NAME (or extended NAME); numbered ACLs use no access-list number.
Extended ACE order
protocol, source + wildcard, [operator port], destination + wildcard, [operator port], [established], [log]; established is TCP only.
Extended ACE processing
the internal reordering applied to standard ACEs does not apply to extended; they are displayed and processed in the order entered.
Protocol options
ahp, eigrp, esp, gre, icmp, igmp, ip, ospf, pim, tcp, udp; the chosen protocol decides the port options (TCP ports, UDP ports or ICMP messages).
Port names
ftp-data 20, ftp 21, telnet 23, smtp 25, tacacs 49, domain 53, pop3 110, bgp 179; eq www and eq 80 give exactly the same result.
established example
access-list 120 permit tcp any 192.168.10.0 0.0.0.255 established, applied out on G0/0/0; without it, all traffic would be permitted.
SURFING and BROWSING
SURFING permits inside HTTP (80) and HTTPS (443), applied in on G0/0/0; BROWSING permits established replies, applied out on G0/0/0.

Practice3

  1. 01

    Before configuring a complex ACL with many ACEs, what does the course recommend doing first?

    Write the policy in a text editor

  2. 02

    An admin creates one named ACL called Web and later another called WEB. How does the router treat them?

    As two different ACLs

  3. 03

    The named ACL BROWSING permits tcp any 192.168.10.0 0.0.0.255 established so web replies reach inside hosts. How is it applied on R1 G0/0/0?

    ip access-group BROWSING out

14.4Named Standard IPv4 ACL Syntax

Editing an ACL by its sequence numbers instead of retyping it.

Editing by sequence number
use ip access-list standard 1 even for a numbered ACL; a used number cannot be overwritten, so no 10 first, then 10 deny host 192.168.10.10.

Practice1

  1. 01

    An editing approach that deletes one faulty line by its ID shown in show access-lists, then re-enters it under that same ID.

    Sequence number method

14.5Implement ACLs

Applying ACLs to interfaces and VTY lines, and where to place standard versus extended ACLs.

VTY_ACCESS example
permit 192.168.10.10 log, deny any, then line vty 0 4 and access-class VTY_ACCESS in; only that host can open Telnet or SSH to the router.
Other ACL uses
ACLs are also integral to NAT, zone-based firewalls and VPNs; the log parameter seriously affects device performance, so use it only under attack.
Placement trade-offs
bandwidth favours filtering at the source; ACL at the destination is easier but wastes bandwidth; at the source needs extended ACLs on several routers.
Standard placement example
block 192.168.10.0/24 from 192.168.30.0/24: R3 G0/0/0 outbound, not S0/1/1 inbound, which would also block .10 traffic to the .31 network.
Extended placement example
Company A lacks control of R3, so R1 G0/0/1 inbound; S0/1/0 outbound would process all packets leaving R1, including 192.168.10.0/24.

Practice4

  1. 01

    An administrator wants only the PC at 192.168.10.10 to open Telnet or SSH sessions to the router itself. Which configuration fits?

    access-class on vty lines

  2. 02

    The ACL placement factor that asks whether the organization controls both the source and the destination networks.

    Extent of organizational control

  3. 03

    Priya places a standard ACL on the router right next to the subnet she wants to restrict, intending to block it from one server only. What goes wrong?

    Subnet is blocked everywhere

  4. 04

    Company A wants to block Telnet and FTP from its 192.168.11.0/24 LAN to Company B, but does not control Company B's router. Where should the extended ACL go on R1?

    G0/0/1 inbound, on the LAN side

14.6Mitigate Attacks with ACLs

Stopping spoofing, allowing only needed services, and filtering ICMP.

Anti-spoofing ACEs
deny 10.0.0.0 0.255.255.255, 172.16.0.0 0.15.255.255, 192.168.0.0 0.0.255.255, 224.0.0.0 15.255.255.255; the LAN interface permits only its own subnet.
Permitting services
DNS, SMTP and FTP are often allowed through a firewall; SSH, syslog and SNMP for admin remote access. Useful, but control and monitor them.
ICMP details
unreachable is generated for packets an ACL administratively denied; echo reply lets users ping out; block all other ICMP types outbound.
SNMP ACL limit
interface ACLs filter SNMP from non-authorized systems, but an exploit is still possible from a spoofed source address the ACL permits.

Practice2

  1. 01

    R1 G0/0 connects to the 192.168.1.0/24 LAN. To stop spoofed packets from the inside, what should its inbound ACL permit?

    Only sources in 192.168.1.0/24

  2. 02

    A firewall ACL should explicitly permit only the services outside users need from a company server. Which services does the course name as often allowed?

    DNS, SMTP and FTP

14.7IPv6 ACLs

IPv6 ACLs are all named and extended, and have their own implicit rules.

IPv6 exploit chain
foothold via IPv4, rogue router advertisements (RAs) make dual-stack hosts get IPv6, IPv4 firewall allows the UDP; mitigate by filtering at the edge.
IPv6 ACE options
operators lt, gt, eq, neq and range; dscp 0–63; sequence 1–4294967295; log-input adds the input interface; fragments matches non-initial fragments.
LAN_ONLY example
NDP sends neighbor advertisements (NA) and solicitations (NS); configuring the implicit rules explicitly documents them. Verify: show ipv6 access-list.

Practice2

  1. 01

    What does RA stand for in rogue IPv6 RAs that make dual-stack hosts obtain an IPv6 address?

    Router Advertisement

  2. 02

    In the IPv6 ACL keyword nd-ns, what does NS stand for?

    Neighbor Solicitation

Module 18 · 29 facts · 18 questions

Cryptography

Cryptography protects data on the wire: encryption hides it, hashes and signatures prove it was not changed and who sent it, and PKI says whose public key you are holding. The exam asks you to pick the right tool for each goal, and to do RSA and Diffie-Hellman by hand with small numbers.

  1. 18.1Confidentiality
  2. 18.2Obscuring Data
  3. 18.4Using Hashes
  4. 18.5Public Key Cryptography
  5. 18.6Authorities and the PKI Trust System
  6. 18.7Applications and Impacts of Cryptography

18.1Confidentiality

Classic ciphers, then modern symmetric and asymmetric encryption, and how keys are managed.

Block vs stream cipher
block encrypts fixed 64- or 128-bit blocks (DES 64, AES 128); stream encrypts a bit or byte at a time and is faster (RC4, A5 for GSM).
Why asymmetric is slow
built on factoring or discrete logs of huge numbers, so used for low-volume jobs; key management is simpler because one key can be public.
RSA example 2: keys
p = 5, q = 11: n = 55, φ(n) = 4 × 10 = 40, e = 3, d = 27 since 3 × 27 = 81 = 2 × 40 + 1. Public (3, 55), private (27, 55).
Finding d by hand
list multiples of φ(n) plus 1 (41, 81, 121…) and stop at the first one e divides: 81 ÷ 3 = 27. Real keys use the extended Euclidean algorithm.
Choosing e
e must share no factor with φ(n). For φ(n) = 40, e = 3 or 7 works; 2, 4, 5, 8 and 10 do not, because no d exists for them.
RSA example 2: encrypt
M = 9 with (3, 55): 9³ = 729, and 729 − 13 × 55 = 729 − 715 = 14, so C = 14.
RSA example 2: decrypt
14²⁷ mod 55 by squaring: 14² → 31, 14⁴ → 26, 14⁸ → 16, 14¹⁶ → 36. 27 = 16 + 8 + 2 + 1, so 36 × 16 × 31 × 14 mod 55 = 9.
Mistake: φ(n) vs n
find d with e × d mod φ(n) = 1, never mod n. Mod 55 gives d = 37, which fails: M = 2 encrypts to 8 but decrypts to 13.
Mistake: the wrong modulus or none
9³ = 729 is not the ciphertext; reduce mod n (14). Reducing mod φ(n) instead (729 mod 40 = 9) is also wrong.
RSA signing example
keys (3, 33) and (7, 33): sign M = 4 with d, S = 4⁷ mod 33 = 16; verify with e, 16³ = 4096 and 4096 mod 33 = 4 = M.
Mistake: which key signs
sign with your own private key, verify with your public key; encrypt for Bob with Bob's public key. Private-key encryption hides nothing.
All three at once
encrypt the message with Bob's public key (confidentiality) and its hash with Alice's private key (authentication and integrity).
DH example 2: public values
p = 17, g = 3, a = 4, b = 6. Alice: A = 3⁴ = 81, 81 mod 17 = 13. Bob: B = 3⁶ = 729, 729 − 714 = 15.
DH example 2: Alice's key
K = Bᵃ mod p = 15⁴ mod 17. 15 ≡ −2 (mod 17), so (−2)⁴ = 16 and K = 16.
DH example 2: Bob's key
K = Aᵇ mod p = 13⁶ mod 17. 13 ≡ −4, so (−4)⁶ = 4096 = 240 × 17 + 16 and K = 16. Both match: 3²⁴ mod 17 = 16 too.
Mistake: raising your own value
Alice raises Bob's B to her a, not her own A. In example 2, A⁴ = 13⁴ mod 17 = 1, which is not the key.
Mistake: DH encrypts data
DH only agrees a key; AES or 3DES then encrypts the traffic with it. DH alone gives no message encryption and no signature.
Private values stay home
a and b never leave their owners; only p, g, A and B cross the network. Anyone who learns a can compute the key from B.
DH man-in-the-middle
DH checks nobody's identity, so an attacker can run one exchange with Alice and one with Bob; sign the values (RSA, DSA) or use certificates.
Small-number tricks
reduce mod p after every multiplication, and swap a base near p for a small negative: 19 ≡ −4 (mod 23), 15 ≡ −2 (mod 17).
RSA in the labs
JCrypTool creates an RSA key pair in its keystore and encrypts a text file; OpenSSL genpkey -algorithm RSA makes the keys used to sign a document.

Practice17

  1. 01

    RSA key setup: p = 5, q = 11. What is φ(n)?

    40

  2. 02

    RSA with p = 5, q = 11 and public exponent e = 3. What is the private exponent d?

    27

  3. 03

    RSA public key (e, n) = (3, 55). Encrypt the message M = 9.

    14

  4. 04

    RSA private key (d, n) = (27, 55). The ciphertext C = 14 arrives. What message does decryption recover?

    9

  5. 05

    With p = 5, q = 11 and e = 3, a student solves 3 × d mod 55 = 1 and gets d = 37. What went wrong?

    Used n instead of φ(n)

  6. 06

    An RSA key has φ(n) = 40. Which of these is a valid public exponent e?

    7

  7. 07

    RSA with p = 7, q = 13 and e = 5. What is the private exponent d?

    29

  8. 08

    An RSA key pair is (3, 33) public and (7, 33) private. Bob signs M = 4 with his private key. What signature does he send?

    16

  9. 09

    Bob wants every reader to be sure a message really came from him. Which key does he encrypt it with?

    Bob's private key

  10. 10

    A message decrypts correctly with Alice's public key. What does that prove?

    Alice sent it

  11. 11

    Diffie-Hellman with p = 17, g = 3. Alice's private value is a = 4. What is her public value A?

    13

  12. 12

    Diffie-Hellman with p = 17, g = 3, a = 4, b = 6, so A = 13 and B = 15. What is the shared key?

    16

  13. 13

    Diffie-Hellman with p = 13. Alice's private value is a = 5 and she receives B = 11 from Bob. What shared key does she compute?

    7

  14. 14

    An attacker records an entire Diffie-Hellman exchange. Which values has the attacker seen?

    p, g, A and B

  15. 15

    Mallory sits between Alice and Bob and runs one Diffie-Hellman exchange with each of them. Why does plain DH not stop this?

    DH does not authenticate either party

  16. 16

    A colleague says the VPN is secure because Diffie-Hellman encrypts all its data. What is the correct view?

    DH only creates the key; another cipher encrypts data

  17. 17

    Alice wants only Bob to read her message and also wants Bob to know it came from her unchanged. What should she send?

    Message under Bob's public key, hash under her private key

18.2Obscuring Data

Masking, steganography and obfuscation: hiding data instead of encrypting it.

Steganography
hides data in an image, audio or text file without attracting attention; LSB hides 3 bits per pixel; steganalysis looks for the hidden data.

18.4Using Hashes

Hashing passwords with salt, and the attacks on them.

Fixity
matching hashes prove a forensic bit-for-bit copy is identical to the original; a file whose hash does not match was tampered with, so do not use it.
Salt
random value added before hashing so equal passwords hash differently; unique per password, made by a CSPRNG; defeats dictionary, lookup and rainbow tables.

18.5Public Key Cryptography

Public and private key pairs, digital signatures, and Diffie-Hellman key exchange.

Certificate vs signature
a digital certificate (electronic passport) verifies an identity; a signature verifies that something comes from that identity.

18.6Authorities and the PKI Trust System

Certificate authorities, X.509 certificates, and how PKI builds trust.

PKI and CA
PKI creates, manages, distributes and revokes certificates; the CA, a trusted third party, signs them with its private key; RA = subordinate CA.
X.509 v3
certificate format used by SSL/TLS, IPsec (IKE with RSA authentication), S/MIME and EAP-TLS. LDAP and X.500 are directory protocols, not X.509 apps.

18.7Applications and Impacts of Cryptography

Where cryptography is used, and how it hides traffic from security monitoring.

Cipher suite and validity
suite = MAC, encryption, key exchange and authentication algorithms; an X.509v3 validity range has not before and not after dates.
HTTPS monitoring challenge
end-to-end encryption hides traffic from inspection; place the IPS where traffic is decrypted, or decrypt it with an SSL appliance.

Practice1

  1. 01

    Malware on an infected host talks to its command and control server over TLS, and the firewall cannot see the commands. How can this traffic be detected?

    Decrypt it and compare with attack signatures