Computer Security Note
Computer Security Note
protection of information from theft, corruption, or natural disaster, while allowing the
information to remain accessible and productive to its intended users.
Computer Security - generic name for the collection of tools designed to protect.
Internet Security - measures to protect data during their transmission over a collection of
interconnected networks.
Data/ Information
Resources
Valuable
Vulnerable
Vulnerability
Security threat
Natural disasters
Flood
Lightening
Fire
Security threats
Reasons
• Human Errors.
• SW design flats.
• SW Failures.
Security threats
Interception
• An interception means that some unauthorized party has gained access to an asset.
Ex:
Interruption
Ex:
◦ unauthorized party not only accesses but also alter the asset
Ex:
Human
Another System
Method:
Passive Attack
Security Controls
Security Concepts
Security Concepts
Confidentiality
Accuracy of data
Security
of Data
Computer Criminals
Computer Crime
Encryption
Formal notation
Plain text
P= {p1, sp2, p3, …}
Cipher text
C= {c1, c2, c3, ….}
C=E(P)
Formal notation
Key
k
C=E(k, P)
Decryption
Formal notation
◦ P=D(C)
Encryption Types
Number of keys
Pirate Key
Public Key
How input process
Stream cipher
Block cipher
Operations / technique
Substitution
Transposition/permutation
Encryption
◦ both sender and receiver use the same key to encrypt and decrypt the message.
single-key
secret-key
conventional encryption
Asymmetric key algorithm
o sender and receiver use two deferent keys to encrypt and decrypt the message.
o two-key
o public-key encryption
Comparison
Symmetric key algorithm
Advantages
Authentication
Integrity
Disadvantages
Key distribution
N(n-1)/2 keys for n users
Asymmetric key algorithm
Advantages
Authentication
Integrity
Disadvantages
Less number of keys
Asymmetric Vs. Symmetric
Number of keys 1 2
Protection of One key must be kept secret; the other can be freely
key Must be kept secret exposed
Secrecy and integrity of
Best uses data Key exchange, authentication
Stream Cipher
Cipher techniques
Substitution ciphers
Caesar cipher
Monoalphabetic ciphers
Polialphebatic ciphers
◦ Transposition ciphers
Rail fence
Columnar
Caesar Cipher
C = E(3, p)
= (p + 3) mod 26
C = E(k, p)
= (p + k) mod 26
◦ Plain: a b c d e f g h i j k l m n o p q r s t u v w x y z
◦ cipher: D E F G H I J K L M N O P Q R S T U V W X Y Z A B C
Monoalphabetic Ciphers
Plain: abcdefghijklmnopqrstuvwxyz
Cipher: DKVQFIBJWPESCXHTMYAUOLRGZN
Example
Plaintext: ifwewishtoreplaceletters
Cipher text: WIRFRWAJUHYFTSDVFSFUUFYA
Algorithm
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
A a b c d e f g h i j k l m n o p q r s t u v w x y z
B b c d e f g h i j k l m n o p q r s t u v w x y z a
C c d e f g h i j k l m n o p q r s t u v w x y z a b
D d e f g h i j k l m n o p q r s t u v w x y z a b c
E e f g h i j k l m n o p q r s t u v w x y z a b c d
F f g h i j k l m n o p q r s t u v w x y z a b c d f
G g h i j k l m n o p q r s t u v w x y z a b c d e g
H h i j k l m n o p q r s t u v w x y z a b c d e f g
I j k l m n o p q r s t u v w x y z a b c d e f g h i
J k l m n o p q r s t u v w x y z a b c d e f g h i j
Rail fence
mematrhtgpry
etefeteoaat
MEMATRHTGPRYETEFETEOAAT
Columnar transposition
Key: 4 3 1 2 5 6 7
Quality
Confusion
Analyze the algorithm and plaintext to deduce the meaning of cipher text message
Hash Function
Input
MAC
variable-length message
Secret Key
Drawback
Symmetric key
Key Exchange
E(KR-Pub,E(KS-Prv,K))
Digital Signature
o Must be authentic
Other properties
Not alterable
Not reusable
Digital Signature
Time Stamped
Use
Software distribution
Financial transactions
Message authentication
Key generation algorithm
produces a signature.
A signature verifying algorithm
Certificate
◦ Public key ?
Certifies a user
Signed by a third
party
Signer’s private
key
Time -stamped
Certificate authority
Trusted third party
Issue certificates
Certify particular user
Sign – for certifying
Program security
Software failure
Unexpected behavior
A departure from the systems required behavior.
Error in operation
Loss of data
Secure program- Program source code that is written to withstand failures.
Flow
Felt
Frailer
Solutions
Patch
Program Security
Programmer mistakes
Program malfunctions
malicious programs
Software designed to does something that user did not intend to do
Malicious attacker can exploit non malicious program flow for malicious purposes
1. Buffer overflows
2. Incomplete mediation
3. Time of check to Time of use error
Buffer
Data structure
Program or process store data
Temporary data storage area
Finite amount of data
Resource sharing
Buffer overflows
Overflow
Program or process tries to store data in a buffer than it was intended to hold.
Translator
Some languages
◦ buffer sizes do not have to be predefined
Incomplete mediation
TOCTTO error
Attacker gains access to a low security object, but switches it with a high security
File name
Access mode
Authorized
Malicious code
Date or time -
Event –program execution, program end , file access
Condition – particular user activity
Count –
Malicious code runs under the user authority
Source
Downloads
Software plug-in
ActiveX controls
Applets
Setup programs
Installing downloads
Independents
Needs host :
Virus
Replicate itself
Pass malicious code to other programs
Modify files
ham the data and operations
Two types
Transient : life depends on the life of it’s host: the virus runs when the
host does
Trojan Hose
Defenses
Prevention
Cure
Prevention
Development controls
Administrative controls
Development controls
Specifying
Designing
Coding
Testing
◦ Modularity
◦ Mutual Suspicion
◦ Confinement
◦ Generic diversity
◦ Peer Reviews
Modularity
Each component
◦ Single purpose
◦ Small
◦ Simple:
◦ Independent
Encapsulation
◦ Isolation
Abstraction
◦ Information hiding
◦ Maintenance
◦ Understandability
◦ Reuse
◦ Correctness
◦ Testing
Coupling
Cohesion
Abstraction
Hiding detail
Hiding complexity
Sharing is minimized
Encapsulation
Limited interfaces
Mutual Suspicion
Limited access
Confinement
Genetic Diversity
Software Development
Peer reviews
Hazard analysis
Testing
Good design
Prediction
Static analysis
Configuration management
Analysis of mistakes
Peer Reviews
Review
Sharing a product
Hazard Analysis
◦ hazard lists
◦ Hazard and operability studies (HAZOP) Failure modes and effects analysis
(FMEA) and Fault tree analysis (FTA)
Testing
Unit testing
Integration testing
Acceptance test
Function testing
performance testing
◦ Test cases
Installation testing
Good Design
Design patterns
◦ Anticipate faults
◦ Handle
Fault Tolerance
Correcting fault
◦ Too risky
◦ Inconvenient
◦ Expensive
Minimizing disruption
Policy
Retrying:
Correcting
◦ Correcting
Reporting
Prediction
Un expected events
Decide controls
Static Analysis
Aspects
◦ Data structure
Configuration Management
Activities
◦ Configuration identification
◦ Configuration auditing
◦ Status accounting
Configuration Identification
Separate files
Deltas
Conditional compilation
Configuration Auditing
Documentation
Independent parties
Status accounting
◦ current version
◦ change history
Document
◦ Failures
◦ Fixes
◦ Check list
Secure Programs
Operating systems
Features
◦ Different access to different items
Operating System
Multi user
Multi tasking
Access control
Protected Objects
Memory
Networks
Data
◦ Supported by hardware
Separation
◦ logical separation: users operate under the illusion that no other processes exist
Sharing
Do not protect
Isolate
◦ Files
Share by capabilities
Fence
◦ Drawback
R
elocation
Fence register
Base & Bounds Registers
◦ starting address
Bounds register
◦ context switch
◦ OS perform
◦ Change in execution
Read-only data
Modifiable data
Drawbacks
Tagged Architecture
◦ (operating system)
Segmentation
Dividing a program into separate pieces
OS maintain a table of
◦ Segment names
◦ Segment addresses
Segmentation
Advantages
Security benefits
Program can generate a reference to a invalid offset beyond the end of the segment
No solution
Solution
◦ Efficiency issues
Paging
OS maintain a table of
◦ Page numbers
◦ Page addresses
Address
◦ <page, offset>
◦
Fixed-size pages
Additional hardware
Access Control to General Objects
◦ Objects
◦ Subjects
User wise
Maintained by OS
Rights
◦ Read
◦ Write
◦ Execute
◦ Owner
Directory
Disadvantages
Capability
Access to an object
Un-forgeable
◦ OS holds
Encrypted
Domain
Collection of capabilities
Procedure Calls
Deferent domain
Passing rights
◦ R,RW
Deferent users
◦ Administrators
◦ Users or guests
Associate privileges
◦ Users
◦ Groups
All-None Protection
◦ Drawbacks
Lack of trust
Complexity
File listings
Group Protection
◦ User groups
◦ Common requirements
Common project
Department
class
◦ Drawbacks
Limited sharing
Individual Permissions
◦ Persistent permissions
User Authentication
◦ Driver's license
◦ Fingerprint
◦ Voice pattern
Passwords
Problems
◦ Loss
forgotten password
◦ Use
Time consuming
◦ Disclosure
Unauthorized individual
◦ Revocation.
Change password
Additional Authentication
Multifactor authentication
◦ Department
◦ Branch
◦ Workstation
◦ Time period
Attacks on Passwords
◦ Qwe,asd
◦ Meaningful to user
Good Practice
Good passwords
Unlikely password
Loose-Lipped Systems
Exhaustive Attack
◦ Break key
◦ Ctrl+Alt+Del
Operating System
Services
◦ Memory protection
◦ File protection
◦ User authentication
Consistent
Effective
Trusted Program
Functional correctness
Enforcement of integrity
Limited privilege
A plan
◦ What is to be secured
◦ Why
◦ How
Need-to-know rule
◦ Limit access
◦ Least privilege
User , Program
◦ Economy of mechanism
◦ Open design
Potential attackers
◦ Complete mediation
◦ Separation of privilege
◦ Ease of use
Features of Ordinary OS
Features of Protected OS
Features of Ordinary OS
User authentication
◦ password comparison.
Memory protection.
Enforced sharing
Features of Protected OS
Trusted Path
Setting a password
Trusted communication
Accountability and Audit
Intrusion Detection
◦ Identify patterns
◦ Warning
Kernelized Design
Kernel/nucleus or core
◦ Interprocess communication
◦ Message passing
◦ Interrupt handling
Security kernel
Coverage
Separation
◦ Isolating security mechanisms both from the rest of the operating system and from
the user space
Unity
Modifiability
◦ Changes to the security mechanisms are easier to make and easier to test
Compactness
Verifiability
◦ Relatively small
◦ Analyzable
Reference monitor
◦ Unbypassable
◦ Unbypassable
Everything in the trusted operating system necessary to enforce the security policy
◦ HW,SW
◦ Security activities
◦ Other functions
Virtual machine
◦ Deferent resources
◦ Hardware
◦ Kernel
◦ Operating system
◦ User
System Data
System data
◦ OS data
◦ User data
◦ Application data
Database
◦ Dat
◦ Txt
◦ Log
◦ …..
Database Components
Records
Fields, Column
Attribute
Elements
Name Address Location code Reference
212 Market
ADAMS St. Columbus OH 43210
501 Union
BENCHLY St. Chicago IL 60603
Structure
212
ADAM Charle Mark Columb 432
S s et St. us OH 10 CMH
212
ADAM Edwar Mark Columb 432
S d et St. us OH 10 CMH
501
BENCH Union 606
LY Zeke St. Chicago IL 03 ORD
411
CARTE Marle Elm Columb 432
R ne St. us OH 10 CMH
411
CARTE Elm Columb 432
R Ben St. us OH 10 CMH
411
CARTE Lisabe Elm Columb 432
R th St. us OH 10 CMH
411
CARTE Elm Columb 432
R Mary St. us OH 10 CMH
Shared access
◦ Reduce db size
Data consistency
Data integrity
Controlled access
Security Requirements
Power failures
Reconstruct
OS protection
Integrity of a database
Authorized individuals
Element integrity
Access control
Change log
Auditability
◦ Audit record
Access control
User authentication
Availability
◦ Repaired or upgraded?
Reliability
◦ Dimensions
Disk failure
DB Corruption
Operating system
DBMS
◦ Element accuracy: Accuracy of values in elements
Constraint conditions
OS Protection Features
◦ Backing up
◦ Restore
◦ Redundancy/Internal Consistency
◦ Concurrency control/Consistency
◦ Monitor
Two-Phase Update
◦ Intent
Open files
◦ Commit
Redundancy/Consistency
◦ Recovery features
Concurrency/Consistency
◦ Updating in Transactions
Monitor
◦ Filter
State Constraints
◦ Shouldn't violate
◦ Commit
◦ Primary keys
Transition Constraints
Sensitive Data
Sensitivity/Access control
◦ Important
◦ Shouldn't public
◦ Database administrator
◦ Access policy
◦ DBMS
Inference
Direct Attack
Indirect Attack
Sum, avg
Controls
Mechanisms
◦ Query Analysis
Multilevel Databases
Sensitivity
◦ Attribute
◦ Granularity
Efficiency
Flexibility
Simplicity
Trustworthiness
Multilevel Databases
Implementation Mechanisms
◦ Partitioning
◦ Encryption
Deferent keys
◦ Integrity Lock
Limited access
Integrity
Implementation Mechanisms
◦ Sensitivity Lock
Encrypted
Data item
Sensitivity
Designs of Multilevel Security
Process efficiency
◦ Encoding
◦ Decoding
Additional space
◦ Reference monitor
Database Manager
◦ I/O access
Commutative Filters
Improve efficiency
Distributed Databases
◦ Multiple databases
◦ Complex implementation
◦ View/window
◦ Subset of data
◦ Filtering original DB
TCB
Data Mining
Order
Categorize
Search
Patterns
Relations
Summerize
Automated
Advantages
◦ Audit logs
Prevention tools
Prevention techniques
Security Concerns
Confidentiality
◦ Inference
Availability
◦ Combining databases
◦ Structure
Integrity
◦ Redundancy
Security in Networks
Vulnerability
Anonymity
◦ Targets
◦ Origins
Sharing
◦ Access
Complexity of system
◦ Deferent networks
◦ Deferent Systems
Vulnerability
Unknown path
◦ Routing
◦ Unsecure paths
Unknown perimeter
◦ Network boundary
◦ Accessibility
◦ Malicious users
Attackers
Earn in illegally
Organized criminals
Steel information
Sabotage
Terrorists
Script kiddies
◦ Not creative
Identify Vulnerabilities
Reconnaissance / Investigation
Port Scan
◦ Running services
◦ Running applications
◦ Versions
Social Engineering
Intelligence
◦ eavesdropping
◦ Knowledge sharing
Documentation
Methods
Eavesdropping
Interception
Impersonation
Denial of Service
Connection Flooding
◦ ICMP
Methods/Medium
Wiretap
◦ Passive wiretapping
◦ Active wiretapping
Inductance
◦ Radiation
Microwave interception
Satellite, wireless
◦ Impersonate
◦ Interfere
Optical fiber
Completely exposed
◦ Visible code
Able to download
Buffer overflow
Incomplete mediation
Code errors
Denial of Service
Denial of Service
Flood
◦ Smurf
◦ Teardrop
◦ Traffic Redirection
◦ DNS Attacks
Denial of Service
◦ Trojan Horse
◦ Zombie
Computer
◦ Same time
Server resources
Band width
◦ Active X Controls
◦ Java applets
Cookies
Bots
Good principles of
◦ System analysis
◦ Design
◦ Implementation
◦ Maintenance
Architecture Design
◦ Segmentation
Application code
Databases
Redundancy
◦ Multiple Servers
Application / DB
Encryption
Link Encryption
End-to-End Encryption
◦ Software
◦ Hardware
End-to-End Encryption
Comparison
All or no data encrypted User chooses to encrypt or not, for each data item
Implementation concerns
Requires one key per host pair Requires one key per user pair
Tunnel mode
SSH Encryption
SSL Encryption
◦ TLS
SSL Encryption
Server authenticity
IP Security
Spoofing
Eavesdropping
Session hijacking
◦ Similar to SSL
Honeypots
Attracting
Host based
Network based
◦ Stealth Mode
Functions
◦ Auditing
Misconfigurations
Types of IDSs
◦ Statistical analysis
◦ Anomaly based