lecture3-4cybersec
lecture3-4cybersec
• AES has replaced the DES as the cryptographic algorithm standard. It originated in 1997, when
NIST announced the initiation of the AES development effort and made a formal call for algorithms.
• For AES the block length was fixed to 128 bits, and three different key sizes (128, 192 and 256 bits)
were specified. Therefore, AES-128, AES-192 and AES-256 are three different versions of AES.
• The cipher is based on substitution bytes, shifting rows, mixing columns and adding round keys
that are repeated for 10 rounds.
• Each round has a 128-bit round key and the result of the previous round as input. The round keys
can be precomputed or generated out of the input key. Due to its regular structure, it can be
implemented efficiently in hardware.
• Decryption is computed by applying inverse functions of the round operations. The sequence of
operations for the round function differs from encryption, which often results in separated
encryption and decryption circuits.
Digital Signature
• A hashing is a type of cryptographic algorithm that has some specific characteristics. First and
foremost, it is one way. That means you cannot unhash something.
• Second, you get a fixed-length output no matter what input is given.
• Third, there are no collisions. A collision occurs when two different inputs to the same hashing
algorithm produce the same output (called a hash or digest). Ideally we would like to have no
collisions.
• Hashes are exactly how Windows stores passwords. For example, if your password is password,
then Windows will first hash it and produce something like this:
0BD181063899C9239016320B50D3E896693A96DF
• Windows will then store that in the SAM (Security Accounts Manager) file in the Windows System
directory. When you log on, Windows cannot unhash your password (because, remember, it is one
way). So, what Windows does is take whatever password you type in, hash it, and then compare the
result with what is in the SAM file. If they match (exactly), then you can log in.
Hashing
• MD5
• MD5 is a 128-bit hash that is specified in RFC 1321. It was designed by Ron Rivest in 1991 to
replace an earlier hash function, MD4. MD5 produces a 128-bit hash or digest. It has been
found to be not as collision resistant as SHA.
• SHA
• Secure Hash Algorithm (SHA) is perhaps the most widely used hash algorithm today. There are
now several versions of SHA. All versions of SHA are considered to be secure and collision
free:
• SHA-1: This is a 160-bit hash function that resembles the earlier MD5 algorithm. It was designed by
the NSA to be part of the Digital Signature Algorithm (DSA).
• SHA-2: This is actually two similar hash functions, with different block sizes, known as SHA-256 and
SHA-512. They differ in the word size; SHA-256 uses 32-byte (256 bits) words, whereas SHA-512 uses
64-byte (512 bits) words. There are also truncated versions of each standardized, known as SHA-224
and SHA-384. These were also designed by the NSA.
• SHA-3: This latest version of SHA was adopted in October 2012.
Steganography
• Steganography is the art and science of writing hidden messages in such a way that
no one, apart from the sender and intended recipient, suspects the existence of the
message.
• It is a form of security through obscurity. Often the message is hidden in some other
file, such as a digital picture or an audio file, to defy detection.
• The advantage of steganography over cryptography alone is that messages do not
attract attention to themselves. If someone is aware that a message is even there, she
won’t try to decipher it. In many cases, messages are encrypted and hidden via
steganography.
• The most common implementation of steganography utilizes the least significant
bits in a file in order to store data. By altering the least significant bit, you can hide
additional data without altering the original file in any noticeable way.
Cryptography on the Internet
• Secure transport
• In general, symmetric algorithms are faster and require a shorter key length to be as
secure as asymmetric algorithms.
• However, there is the problem of how to securely exchange keys. So most e-
commerce solutions use an asymmetric algorithm to exchange symmetric keys and
then use the symmetric keys to encrypt the actual data.
• When visiting websites that have an HTTPS at the beginning rather than HTTP, the S
denotes Secure.
• It means traffic between your browser and the web server is encrypted—usually with
either SSL (Secure Sockets Layer) or TLS (Transport Layer Security). Both SSL and TLS
are asymmetric systems.
Cryptography on the Internet
• A virus scanner is essentially software that tries to prevent a virus from infecting a system.
• In general, virus scanners work in two ways. First, a virus scanner may contain a list of all known virus
definitions—that is, files that list known viruses and their file sizes, properties, and behaviors.
• Generally, one of the services that vendors of virus scanners provide is to periodically update these
files.
• When you update your virus definitions, what actually occurs is that your current file is replaced by
the more recent one available from the vendor.
• The antivirus program can then scan your PC, network, and incoming email for known virus files.
Any file on your PC or attached to an email is compared to the virus definition file to see whether
there are matches.
• With emails, this can be done by looking for specific subject lines and content. The virus definitions
often also include details on the file, file size, and more. This provides a complete signature of the
virus.
Virus Scanners
• The second way a virus scanner can work is to look for virus-like behavior.
• Essentially, the scanner looks to see if the file in question is doing things that viruses typically
do—things like manipulating the Registry or looking through your address book.
• Obviously, this second technique is essentially a best guess.
Virus-Scanning Techniques
• In general, there are six ways a virus scanner might scan for virus
infections.
• Email and attachment scanning:
• Since the primary propagation method for a virus is email, email and attachment
scanning is the most important function of any virus scanner.
• Some virus scanners actually examine your email on the email server before
downloading it to your machine.
• Other virus scanners work by scanning your emails and attachments on your
computer before passing them to your email program.
• In either case, email and email attachments should be scanned before a user has a
chance to open them and release viruses on the system.
Virus-Scanning Techniques
• Download scanning:
• Any time you download anything from the Internet, either via a web link or through an FTP
program, there is a chance you might download an infected file.
• Download scanning works much like email and attachment scanning but operates on files
you select for downloading.
• File scanning:
• With file scanning, files on your system are checked to see whether they match any known
virus.
• This sort of scanning is generally done on an on-demand basis instead of an ongoing
basis.
• It is a good idea to schedule your virus scanner to do a complete scan of the system
periodically.
Virus-Scanning Techniques
• Heuristic scanning:
• Heuristic scanning, briefly mentioned in the previous section, is perhaps the most advanced form of
virus scanning.
• Because it uses rules to determine whether a file or program is behaving like a virus, heuristic
scanning is one of the best ways to find a virus that is not a known virus.
• A new virus will not be on a virus definition list, so you must examine its behavior to determine
whether it is a virus.
• However, this process is not foolproof. Some actual virus infections will be missed, and some nonvirus
files might be suspected of being viruses.
• Sandbox:
• The sandbox approach basically involves having a separate area, isolated from the operating system,
in which a download or an attachment is run. Then, if it is infected, it won’t infect the operating system.
• Machine learning:
• Most antivirus vendors are now working to implement basic machine learning algorithms into their
antivirus software. This allows the antivirus software to adapt to changing attacks. Machine learning is
only beginning to be used and is not yet well developed.
Firewalls
• There are numerous types of firewalls and variations on those types. But most
firewalls can be grouped into one of the following three families of firewalls:
• Packet inspection
• Basic packet filtering is the simplest form of firewall. It involves looking at packets and checking to see
if each packet meets the firewall rules. For example, it is common for a packet filtering firewall to
consider three questions:
• Is this packet using a protocol that the firewall allows?
• Is this packet destined for a port that the firewall allows?
• Is the packet coming from an IP address that the firewall has not blocked?
• These are three very basic rules. Some packet filter firewalls check additional rules. But what is not
checked is the preceding packets from that same source. Essentially, each packet is treated as a
singular event, without reference to the preceding conversation. This makes packet filtering firewalls
quite susceptible to some DoS attacks, such as SYN floods.
Firewall Types and Components
• Application Gateways
• An application gateway (also known as application proxy or application-level proxy) is a
program that runs on a firewall.
• When a client program, such as a web browser, establishes a connection to a destination
service, such as a web server, it connects to an application gateway, or proxy.
• The client then negotiates with the proxy server in order to gain access to the destination
service. In effect, the proxy establishes the connection with the destination behind the
firewall and acts on behalf of the client, hiding and protecting individual computers on the
network behind the firewall.
• This process actually creates two connections. There is one connection between the client
and the proxy server, and there is another connection between the proxy server and the
destination.
• Once a connection is established, the application gateway makes all decisions about
which packets to forward. Since all communication is conducted through the proxy server,
computers behind the firewall are protected.
Firewall Configurations
• In addition to the various types of firewalls, there are various configuration options.
• The type of firewall tells you how it will evaluate traffic and hence decide what to
allow and not to allow.
• The configuration gives you an idea of how that firewall is set up in relation to the
network it is protecting.
• Some of the major configurations/implementations for firewalls include the
following:
• Network host-based firewall
• Dual-homed host
• Router-based firewall
• Screened host
Firewall Configurations
• Router-Based Firewall
• As was previously mentioned, you can implement firewall protection on a router. In larger
networks with multiple layers of protection, this is commonly the first layer of protection.
• Although you can implement various types of firewalls on a router, the most common type
used is packet filtering.
• If you use a broadband connection in your home or small office, you can get a packet-filtering
firewall router to replace the basic router provided to you by the broadband company.
• In recent years, router-based firewalls have become increasingly common and are in fact the
most common type of firewall used today.
• Screened Host
• A screened host is really a combination of firewalls. In this configuration, you use a
combination of a bastion host and a screening router.
• The screening router adds security by allowing you to deny or permit certain traffic from the
bastion host. It is the first stop for traffic, which can continue only if the screening router lets it
through.
Intrusion Detection System (IDS)
• IDSs have become much more widely used in the past few years. Essentially, an IDS inspects all
inbound and outbound port activity on a machine/firewall/system, looking for patterns that might
indicate break-in attempts.
• For example, if an IDS finds that a series of ICMP packets were sent to each port in sequence, this
probably indicates that the system is being scanned by network-scanning software, such as
Cerberus.
• This type of scan is often a prelude to an attempt to breach system security, and it can be very
important to know that someone is performing preparatory steps to infiltrate your system.
• There are a number of ways in which IDSs can be categorized. The most common IDS
categorizations are as follows:
• Passive IDSs
• Active IDSs (also called intrusion prevention systems, or IPSs)
Identifying an Intrusion
• There are really two ways of identifying an intrusion. The first method is signature
based.
• This is similar to the signatures used by antivirus. However, IDS signatures cover
issues beyond malware. For example, certain DoS attacks have specific signatures
that can be recognized.
• The second method is statistical anomaly. Essentially, any activity that seems outside
normal parameters and far enough outside the given parameters to be a likely
attack is identified as a probable attack.
• Any number of activities can trigger this type of alert, such as a sudden increase in
bandwidth utilization or user accounts accessing resources they have never
accessed before.
• Most IDSs use both forms of attack identification.
Honey Pots
• Essentially, it assumes that an attacker is able to breach your network security, and it
would be best to distract that attacker away from your valuable data.
• Therefore, a honey pot involves creating a server that has fake data—perhaps an SQL
server or Oracle server loaded with fake data, and just a little less secure than your
real servers.
• Then, since none of your actual users ever access this server, monitoring software is
installed to alert you when someone does access this server.
• A honey pot achieves two goals. First, it takes the attacker’s attention away from the
data you wish to protect.
• Second, it provides what appears to be interesting and valuable data, thus leading
the attacker to stay connected to the fake server, giving you time to try to track the
attacker.
Digital Certificates
• The digital certificate contains the user’s public key, along with other
information.
• However, a digital certificate can provide much more. It can provide a means
for authenticating that the holder of the certificate is who she claims to be.
• X.509 is an international standard for the format and information contained
in a digital certificate.
• X.509 is the most common type of digital certificate in the world. It is a
digital document that contains a public key signed by the trusted third party
that is known as a certificate authority, or CA.
Digital Certificates
• The following are the basic items in an X.509 certificate, though there can be
other optional information:
• Version: This is the version of X.509 that this certificate complies with.
• Certificate holder’s public key: This is the primary way of getting someone’s public
key from his X.509 certificate.
• Serial number: This is a unique identifier for this certificate.
• Certificate holder’s distinguished name: This is often a domain name or an email
address associated with a certificate.
• Certificate’s validity period: One year is the most common validity period.
• Unique name of certificate issuer: This is the certificate authority that issued this
certificate.
• Digital signature of issuer: This field and the next are used to verify the certificate.
• Signature algorithm identifier: This identifies the digital signature algorithm used.
Digital Certificates
• Let us see how this works in a common scenario. Say that you visit your bank’s website. In
order to get the bank’s public key, your browser will download that bank’s digital
certificate.
• But there is a problem. Could someone have set up a fake site, claiming to be your bank?
Could that person have also generated a fake certificate, claiming to be the bank? Yes,
it’s possible.
• This is one place digital certificates help us out. Your browser will look at the certificate
issuer listed on the certificate and first ask if that is a CA that your browser trusts.
• If it is, then your browser communicates with that CA to get that CA’s public key. The
browser uses that CA public key to verify the CA signature on the certificate.
• If this is a fake certificate, the digital signature won’t be recognized. This means a
certificate not only provides you with the certificate holder’s public key but also gives you
a method of verifying that entity with a trusted third party.
SSL/TLS
• A VPN (or virtual private network) essentially provides a way to use the
Internet to create a virtual connection between a remote user or site and a
central location.
• The packets sent back and forth over this connection are encrypted, thus
making it private. The VPN must emulate a direct network connection.
• Three different protocols are used to create VPNs:
• Point-to-Point Tunneling Protocol (PPTP)
• Layer 2 Tunneling Protocol (L2TP)
• Internet Protocol Security (IPsec)
Wi-Fi Security
• Wireless networks are commonly used today, and it is important to consider wireless network
security.
• There are three Wi-Fi security protocols, ranging from the oldest and least secure (WEP) to the most
recent and most secure (WPA3).
• Wired Equivalent Privacy (WEP) uses the stream cipher RC4 to secure data and a CRC-32 checksum
for error checking.
• Standard WEP uses a 40-bit key (known as WEP-40) with a 24-bit initialization vector (IV) to
effectively form 64-bit encryption. The IV is reused, which defeats the entire purpose of an IV and
leaves the protocol open to attacks.
• Wi-Fi Protected Access (WPA) was definitely an improvement over WEP. First, WPA uses AES, which
is a very good encryption algorithm. In addition, WPA uses Temporal Key Integrity Protocol (TKIP),
which dynamically generates a new key for each packet.
Lecture 4
Security Management and Risk
Assessment
Cyber Risk Management
• Cyber risk management is a systematic process for analyzing how an organization could
succumb to cyberattacks, and explores options for reducing either the likelihood or the
impact of the attacks that occur.
• Cyber risk analysis involves performing an integrated set of activities, according to a risk
management process, to identify potential security compromises, their consequences, and
ways to mitigate them.
• While there are a number of risk management processes, they generally involve performing
these steps:
Cyber Risk Management Process
• The risk management process identifies assets, vulnerabilities, threats, risks, risk
severity, associated risk treatments, and countermeasures. Risk severity is measured
in terms of risk likelihood and risk impact. These key terms are defined as follows:
• Assets are anything of value to an organization or to attackers. For example, social security
numbers, computers, and servers are all assets, along with customer databases and
proprietary intellectual property.
• Vulnerabilities are weaknesses that attackers may exploit to harm one or more assets that an
organization cares about. For example, computer operating systems may have vulnerabilities
due to missing software updates or patches, or web sites may have vulnerabilities in their
underlying code.
• Threats are the ways attackers exploit vulnerabilities to cause damage to organizational assets.
For example, one type of threat is computer viruses infecting organizational computers due to
missing software updates or patches.
Cyber Risk Management Process
• Risk is the potential damage to assets, causing an impact to the organization. For
example, a risk can be when attackers use compromised computers to steal data,
embezzle money, or take critical systems off line.
• Risk likelihood refers to the likelihood that the risk will manifest itself, resulting in a
consequence. For example, likelihood could be characterized in terms of low likelihood
(unlikely to occur), medium likelihood (possible to occur), or high likelihood (likely to
occur).
• Risk impact refers to how great the consequence of the risk is to the organization’s
business and priorities. For example, the risk could have a low impact (a slight effect), a
medium impact (a moderate effect), or a high impact (a significant effect).
Cyber Risk Management Process
• Risk severity is determined by combining the risk likelihood and risk impact of each potential
threat into an “overall” risk level – a risk severity level. This risk severity level can then be used
to prioritize risks and consider potential risk treatments. For example, a risk that is
characterized as being low risk (unlikely to occur), but having a high impact (significant effect)
on the organization might be assigned an overall risk severity level of “medium.”
• Risk treatments are ways to reduce risk besides just trying to prevent the risk from happening.
For example, an organization can “avoid” the risk by eliminating the vulnerability or threat, or it
can “reduce the likelihood” of the risk manifesting itself through cyberdefenses, or it can
“reduce the impact” by purchasing cyber insurance.
• Countermeasures are security protections designed to reduce risk by eliminating
vulnerabilities or countering potential threats. For example, an organization can implement
cybersecurity controls to “reduce the likelihood” that the risk will occur by blocking potential
cyberattacker activities.
Cyber Risk Management Process
• Security professionals perform the cyber risk management process within the context of
applicable cybersecurity drivers that include the following: (1) laws and regulations, (2)
cybersecurity standards, (3) contractual obligations, and (4) liability and insurance.
• Security professionals should be interested in identifying and addressing the most pressing
organizational risks, while understanding that risk can be reduced but seldom eliminated.
• Risk management involves balancing factors of cost, convenience, and speed to find ways to
reduce risk without getting in the way of the organization too much. Remember, there is no
perfect cyberdefense.
Cyber Risk Management Process
• The figure below shows additional details for the six-step cyber risk management process:
Cyber Risk Management Process
• Once risk statements have been constructed, the risks themselves can then be
considered in terms of two properties: likelihood and impact.
• Likelihood refers to how likely it is that the risk will manifest itself, resulting in a consequence.
• Impact refers to how great the consequence of the risk is, in the grand scheme of things
• The following figure illustrates one way in which risk likelihood and risk impact can be
combined into an overall risk level or risk severity.
Cyber Risk Management Process
• However, organizations can reduce risk by using the following risk treatments:
• Avoid the risk by eliminating the vulnerability or the threat.
• Mitigate the risk by reducing the likelihood that it will occur or the impact when it
does occur.
• Share the risk by introducing a third party (such as an insurance company or a
security service) that compensates the organization in the event that the risk occurs.
• Retain the risk, where the organization simply accepts the possibility that the risk may
occur and deals with the consequences when it happens; self-insurance is a good
example of this strategy
Cyber Risk Management Process
• Security Controls
• Security controls2 are applied to an IT system or business process to prevent, detect,
or investigate specific activities that are undesirable, and respond to those activities
when they occur.
• Security controls can reduce risk by preventing and detecting bad behavior, or
helping to seek out and investigate when something bad has occurred.
• Security controls include the following types:
• Preventive controls. Block undesired activities and prevent them from occurring.
• Detective controls. Generate alerts on suspected attacker activity that can then be acted
upon.
• Response controls. Activated after detective controls “alert” cyber personnel of suspected
attacker activities, and assist defenders in investigating the alert, identifying the
cyberattack, containing the attacker, and ultimately repelling the attack.
• Recovery controls. Engaged to close out cyber incidents and restore normal operations.
Cyber Risk Management Process
• People
• People involved with security countermeasures include employees, partners, and
contractors authorized to have specific access to organizational assets.
• Authorized employees include executives, IT staff, and security staff. Security and IT
professionals should have the knowledge, skills, abilities and industry-accepted
certifications required to carry out their day-to-day security responsibilities.
• Similar comments can be made regarding contractors, third party organizations, or
subject matter experts hired to support an organization’s cybersecurity program.
• An organization’s actual security against a professional attacker is almost entirely
dependent on its people, not its technology.
Cyber Risk Management Process
• Organizations can use a risk register to document and track identified risks, along
with their associated mitigations.
• At this point in the cyber risk management process, a systematic security analysis has
identified assets, vulnerabilities, and threats.
• Risks have been identified and evaluated, and corresponding risk treatments have
been determined.
• Security countermeasures have been selected and now need to be implemented.
• The risk register acts as a repository for tracking and managing these identified risks.
Such registers can be implemented using a spreadsheet, database, or dedicated risk
management software package.
Risk Registers