Lecture 1
Lecture 1
Introduction
Software
Bugs
• Software bugs cost
US economy $59.5
billion annually
(NIST)
Not all
bugs are
equal!
• Why security bugs are
more dangerous?
The Lingo
• What does secure mean anyway? It means
“free from or not exposed to danger or harm;
safe.”
• A vulnerability is simply a design flaw or an
implementation bug that allows a potential
attack on the software in some way.
• A threat is a possible exploit of a vulnerability
while an attack is the actual use of such an
exploit.
Vulnerability
• Informally, a bug with security consequences
• A vulnerability is a weakness or gap in our protection efforts.
Refer to Polydys & Wisseman. “Software Assurance in Acquisition: Mitigating Risks to the Enterprise.” 2007.
https://buildsecurityin.us-cert.gov/daisy/bsi/resources/dhs/908.html?branch=1&language=1
What is Software Security?
• Availability
– Redundancy: Redundancy refers to systems that either are duplicated or fail over to other
systems in the event of a malfunction. Failover refers to the process of reconstructing a
system or switching over to other systems when a failure is detected. In the case of a
server, the server switches to a redundant server when a fault is detected. This strategy
allows service to continue uninterrupted until the primary server can be restored.
Cryptography
• Cryptography is a mathematical approach to
transforming data such that, without the necessary
piece of information, a key to unlock it, the
information cannot be read.
• Cleartext or plaintext is information that is not
encrypted is said to be in the clear.
• Ciphertext is information that has been encrypted.
• Decryption- is the process of using a key you used
for encryption to turn data back to plaintext or
ciphertext.
Public Key Cryptography
Plaintext + key = ciphertext:
hello + 2jd8932kd8 = X5xJCSycg14=
Ciphertext + key = plaintext:
X5xJCSycg14= + 2jd8932kd8 = hello
Source: https://komodoplatform.com/cryptographic-hash-function/
Availability
• Availability is the more difficult attribute of
security to ensure.
• Redundancy can be used to provide
availability.
• Off-site backup may work during an attack,
but it is costly to keep it running when there is
no emergency requiring it.
Prevention
• Prevention is a tremendously difficult task.
This is an assertion that an attack absolutely
cannot happen to or through your system.
• One way to do this is to sandbox the
application, meaning you test to see what it
will do, given user input, before you allow it to
actually process.
Avoidance
• Avoidance is a best attempt at making sure
that attacks do not affect your system. This
means that you make every effort in the
system to avoid compromise.
• A way to provide avoidance is to code
defensively.
• Closing off holes, restricting access, and
limiting points of entry into the system are all
ways to code defensively.
Detection
• Handling exceptions in code is a good way to
approach this. When an attack occurs, it is
generally given that the application will stop
behaving as it is supposed to behave.
• Checkpoints in code are another way to do
this; these are just milestones of execution
that indicate everything is still working
correctly.
Recovery
• The final option for response is recovery. In
this case, the attack is allowed to occur when
it happens.
• An example of this would be rolling back a
database to the state it was in before the
attack (something that can only be
accomplished if transactions are being
recorded) or restarting an application at the
last safe state that was recorded in memory.
The Shape of Things
• Apply defense in depth
• Minimize the attack surface
• Fail safely
• Run with least privilege
• Avoid security by obscurity
• Keep security simple
• Detect intrusions and record compromise
The Shape of Things
• Do not trust infrastructure
• Do not trust services
• Establish secure defaults
Chapter Summary
• Software security is an increasing concern in
the modern era of connectivity with its
consistency of threats from attackers.
• An attacker can be an automated tool, an
intentional insider, an unintentional insider, a
malicious outsider, or even an external system
destruction.
Home Assignment 1
• Visit the web:
https://cwe.mitre.org/top25/archive/2023/2023
_top25_list.html