SlideShare a Scribd company logo
Chapter Two
Computer Threat
Computer Security/ attacks & threats
A computer security threat is any person, act, or object
that poses a danger to computer security
Threat and attack are commonly used to mean more or less the
same thing.
Computer world is full of threats!
And so is the real world!
Thieves, pick-pockets, burglars, murderers, drunk drivers, …
Attack: an assault on system security that derives from an
intelligent threat; that is, an intelligent act that is a deliberate
attempt (especially in the sense of a method or technique) to
evade security services and violate the security policy of a
system.
Computer security/ Attacks
Computer security/ Attacks
Security Attacks can be passive attack or active attack.
A passive attack attempts to learn or make use of information
from the system but does not affect system resources.

They do not whish to modify the content of the original
message.

It is very difficult to detect as it does not alter the data.
Interception:- is a type of attack that is done without the
permission or knowledge of the users.

It breaks the rules of confidentiality in the principle of security.

It is further categorize into sub types….
Cont…
Release of message
When you send a message to your friend, you want that only that person can
read the message.
 Using certain security mechanism, we can prevent release of message contents.
Traffic analysis
If many message are passes through a single channel then user get confused can
give some information to attacker as it think that message is come from his
party.
Sniffing
Sniffing is a method to sniff the transferred data that was send by the sender.
It just tries to find out what type of message or data is transferred by sender
without the permission of sender.
Key loggers
It is a program that runs in the background, recording all the keystrokes.
Once keystrokes are logged, they are hidden in the machine for later retrieval, or
shipped raw to the attacker.
Cont…
Active attacks involve some modification of the data stream or the
creation of a false stream.

These attacks are very complex and cannot prevent easily.

Can be subdivided into 3 types: Interruption, Fabrication, and
Modification.

Denial of service (DoS), DDoS, SQL Injection, Replay attack,
Masquerading, Man in Middle Attacks are some common attacks.
Interruption

Are active attack, an authorized entity pretends to be another entity.

For example there are three users A, B & C.

User A might be pose as user C and send a message to user B. User B
believe that message came from user C.

It is classified into four types
Cont…
1. Denial of Service (DoS): is blocking access of legitimate users to
a service.
2. Distributed DoS Attack: is accomplished by tricking routers into
attacking a target or using Zumbie hosts to simultaneously attack
a given target with large number of packets.
3. Distributed DoS with Reflectors (DRDoS): It consists a
reflector that helps the attacker to execute a more effective and
secure attack.
 It results in increase of damage and decrease the risk of being
traced back
4. SQL Injection Attack: is a security vulnerability that occurs in
the database layers of an application.
Cont…
Simple illustration of DoS attack
C:>Ping <address of X> -l 65000 –w 0 -t
Ping
Ping
Ping
Ping
Web Server X
Legitimate User
Cont…
Fabrication: In this attack users use some accessing service,
which they are not eligible for.
 Replay Attack: involves the passive
capture of a data unit and its subsequent
retransmission to produce an
unauthorized effect.
 A replay attack can be prevented using
strong digital signatures.
 Masquerading: is a type of attack in
which one system assumes the identity of
another.
 It‟s a technique used by attacker to
pretend himself as an authorized person
in order to gain access of confidential
information in illegal manner.
Cont…
 Man of the middle attack (MITM): It
is an active internet attack that attempts
to intercept, read and alter the
information hovering between the user
of a public network and any requested
website.
• The attacker uses the illegally gained
information for identity theft and other
types of fraud.
Modification: causes losses of integrity principle.
 For example a person did an online transaction of $100. But
the attacker hack this and modify it to $1000.
Computer data are not usually seen directly by users, malicious
people can make programs serve as vehicles to access and
change data and other programs.
Malicious code is written just like any other program on the
system, but is written to exploit vulnerabilities of the system.
Malicious code can do any thing any other program can, such as
writing a message on a computer screen, stopping a running
program, generating a sound, or erasing a stored file.
Malicious code can do nothing at all right now; it can be planted
to lie dormant, undetected, until some event triggers the code to
act.
Computer security/ Malicious Attacks
Cont…
Malware presents arguably the largest security threat to
computer users.
Examples
Viruses
Trojan horses
Spy-wares
New ones: Spam/scam, identity theft, e-payment
frauds, etc.
Cont…
Viruses
“A small program that replicates and hides itself
inside other programs usually without your
knowledge.”
Similar to biological virus: Replicates and Spreads
Viruses can do the following if left unchecked:
• Damage or delete files.
• Slow down your computer.
• Invade your email program.
Cont…
Worms
An independent program that reproduces by copying itself
from one computer to another.
It spreads without the user taking any action and usually
exploits a bug (or vulnerability) in computer system.
They make extensive use of email and security holes in
software or operating systems to spread rapidly.
Do not alter files like viruses do
It can do as much harm as a virus
It often creates denial of service
Example “CODE RED”
Cont…
Trojan horses
 A Trojan horse got its name from the story of the Trojan horse in
Greek legend.
 It may be some type of file such as a game that users may be
interested in.
 The user would normally install and run this program easily.
 It may or may not use a vulnerability to spread automatically.
 Do not replicate themselves like a virus, but they can be
propagated as attachments to a virus.
 For example, a person may get a program by email or the Internet
that he or she thinks is a computer game; however, when the
person runs the supposed game, the program deletes files on the
computer or injects viruses.
Cont…
Spy-wares
 “A software that literally spies on what you do on your
computer.”
It tracks the user‟s behavior and reports information back
to a central source.
Can be installed on your PC without your consent.
Compromises your data, computing habits, and identity.
Alters PC settings.
Slows down your PC
Example: Simple Cookies and Key Loggers
Cont…
Infection mechanisms
First, the virus should search for and detect objects
to infect
Installation into the infect able object
Writing on the boot sector
Add some code to executable programs
Add some code to initialization/auto-executable
programs
Write a macro in a word file
Most software based attacks are commonly called
Viruses: How do viruses work?
Cont…
Trigger mechanism
 Date or time
 An interval (for example, after 30 minutes)
 Number of infections
 An event(for example, when a particular program is executed)
 A count (for example, the fifth time something happens)
How do viruses work? …
Effects: It can be anything
A message
Deleting files
Formatting disk
Overloading processor/memory
Etc.
Cont…
Controls to protect against malware attack..
Active Protection
 Installing and properly using an Internet security suite
—which includes protection against threats such as
viruses, spyware, and PC intrusion.
 Is vital for proper protection against the hackers,
intruders, and other wrongdoers.
Preventative Measures
 Even though security programs may actively detect and
eliminate any threats your PC encounters, you should
always help prevent these issues from ever arising.
Computer security/Anti-Virus
Three categories
 Scanners
 Activity monitors
 Change detection software
Are software has evolved to include many other security
components.
Depending on the vendor, the antivirus software may also
contain anti-spyware tools, anti-spam filtering, a personal
firewall, and more.
 Generic solutions
Ex. Integrity checking
 Virus specific solution
Ex. Looking for known viruses
Cont…
Functions of anti-viruses
Identification of known viruses
Detection of suspected viruses
Blocking of possible viruses
Disinfection of infected objects
Deletion and overwriting of infected objects
Being human, programmers and other developers make many mistakes,
most of which are un intentional and non-malicious.
Many such errors cause program malfunctions but do not lead to more
serious security vulnerabilities.
A few classes of errors have been more serious errors for programmers
and serious professionals.

Buffer Overflow error

Incomplete mediation

Time-of-check to Time-of-Use errors
Computer security/program flaws
Cont…
Buffer overflow: One of the most common vulnerabilities in
software.
Particularly problematic when present in system libraries and other
code that runs with high execution privileges.
Application reserves adjacent memory locations (buffer) to store
arguments to a function, or variable values.
Attacker gives an argument too long to fit in the buffer.
The application copies the whole argument, overflowing the buffer
and overwriting memory space.
If the conditions are “just right” this will enable to attacker to gain
control over the program flow and execute arbitrary code, with the
same privileges of the original application.
Cont…
For example :
char sample[10];
Sample[10]=„A‟;
The subscript is out of bounds (that is, it does not fall between 0
and 9), so we have a problem.
In some programming languages, buffer sizes need not be
predefined.
 C does not perform array bound checking.
 Similar problem caused by pointers for which there is no way
to define a proper limit.
Cont…
Damage done by buffer overflow

Affects user‟s data (overwrites user data)

Affects user‟s code (change user‟s instruction)

Affects system data(overwrites Os data)

Affects system code(change OS‟s instruction)
Implications of buffer overflow
Attacker can insert malicious data values/instruction codes into
overflow space.
C programming language specifications do not specify how data is
to be laid out in memory.
Some implementations of C may leave space between arrays and
variables on the stack, for instance, to minimize aliasing effects.
Cont…
Buffer overflow security implication
Web server attack is similar to buffer overflow attack:Passes
very long string to web sever.
Buffer overflows are still common

Used by attackers to crash systems and to take over the
system by taking control over.
Large number of vulnerabilities due to buffer overflows still
persists in many software‟s and systems.
Cont…
Incomplete mediation
Inputs to programs are often specified by untrusted users
Web-based applications are a common example
“Untrusted” to do what?
Users sometimes mistype data in web forms
Phone number: 51998884567
Email: iang#cs.uwaterloo.ca
The web application needs to ensure that what the user has entered
constitutes a meaningful request.
This is called mediation.
Incomplete mediation occurs when the application accepts incorrect data
from the user
Sometimes this is hard to avoid
Phone number: 519-886-4567
This is a reasonable entry, that happens to be wrong
Cont…
Client-side mediation
You've probably visited web site with forms that do client-side
mediation.
• When you click “submit”, Javascript code will first run validation
checks on the data you entered
• If you enter invalid data, a popup will prevent you from submitting it
Related issue: client-side state

Many web sites rely on the client to keep state for them

They will put hidden fields in the form which are passed back to the
server when the user submits the form
Cont…
Problem: what if the user

Turns off JavaScript?

Edits the form before submitting it? (Greasemonkey)‫‏‬

Writes a script that interacts with the web server instead of
using a web browser at all?

Connect to the server “manually”? (telnet server.com 80)
Note that the user can send arbitrary (unmediated)
values to the server this way
The user can also modify any client-side state
Cont…
At a bookstore website, the user orders a copy of the course text.
The server replies with a form asking the address to ship to.
This form has hidden fields storing the user's order
What happens if the user changes the “unitprice” value to “50.00”
before submitting the form?
Cont…
Defences against incomplete mediation
Client-side mediation is an OK method to use in order to have
a friendlier user interface, but is useless for security purposes.
You have to do server-side mediation, whether or not you also
do client-side.
For values entered by the user:

Always do very careful checks on the values of all fields

These values can potentially contain completely arbitrary 8-bit data
(including accented chars, control chars, etc.) and be of any length
For state stored by the client:

Make sure the client has not modified the data in any way
Cot…
Time-of-Check to Time-of-Use errors
Access control is a fundamental part of computer security: we want
to make sure that only those who should access an object are
allowed that access.
Every requested access must be governed by mediated access policy
enforcement agent.
Incomplete mediation problem occurs when access is not checked
universally.
The time-of-check to time-of-use (TOCTTOU) flaw concerns
mediation that is performed with a “bait and switch” in the middle.
It is also known as a serialization or synchronization flaw.
Time-of-check to time-of-use flaw exploits the time log between
the time we check and the time we use.
Cont…
Example: DBMS/OS
Pgm 1 reads value of x=10
Pgm 1 adds x=x+5
Pgm 2 reads x=10, adds 3 to x, write x=13
Pgm 1 writes x=15
X ends up with value x=15 while it should be x=18
Prevention
Be aware of time logs.
Use digital signatures and certificates to “lock” data values after
checking them.
 So nobody can modify them after check & before use.
Software development controls and Testing
techniques
Software testing is the process of executing a program or a system with
the intent of finding errors.
Difference between testing types/(level of testing) and testing techniques
Testing types deal with what aspect of the computer software would be
tested, while testing techniques deal with how a specific part of the
software would be tested.
Testing types mean whether we are testing the function or the structure
of the software.

In other words, we may test each function of the software to see if it
is operational or we may test the internal components of the software
to check if its internal workings are according to the specification.
On the other hand, „Testing technique‟ means what methods or ways
would be applied to calculations would be done to test a particular
feature of a software (sometimes we test the interfaces, sometimes we
test the segments, sometimes loops etc.).
Classification of software testing
Testing types can be.
Static testing
Dynamic testing (further categorized (white box testing and Black
box testing )
In static testing, the main aim is to check whether the work being done
is going as the per the set standards or not.
It does not involve the execution of the software.
Static testing is generally in the form of: Reviews, Walkthroughs, Inspection
For
Source code
Documentation
Design document
Requirements specification
Project plan and other project related documents
The goal of static testing is to prevent defects as early as possible.
Cont…
Dynamic testing
It refers to examination of an application‟s response from the system
to variables that are not constant and change with time.
It involves working with the software, giving input values and
checking if the output is as expected.
White box and Black Box are two major Dynamic testing
methodologies.
Black Bock testing
Test cases are built around specifications and requirements, i.e what
the application is supposed to do.
It uses external descriptions of the software, including specifications,
requirements, and designs to derive test cases.
The tester never examines the programming code and does not need
any further knowledge of the program other than its specifications.
Cont…
White box testing
It is a testing technique where the internal working of an
application is tested.
White box testing uses specific knowledge of programming code to
examine outputs.

The test is accurate only if the tester knows what the program is
supposed to do.
White-box testing can be applied at the unit, integration and system
levels of the software testing process, and is usually done at the unit
level.
Also called as glass, structural, clear box or transparent box
testing.
Cont…
White and black box testing techniques
 Black box testing techniques
 Boundary value analysis
 Equivalent partitioning
 Race conditions
 Error guessing
White Box testing techniques
 Path testing
o Line coverage
o Branch coverage
o Condition coverage
 Cyclomatic complexity
 Control structure testing
 Loop testing
Computer security/Database security
Data is valuable resource that must be strictly controlled and
managed, as with any corporate resource.
Part or all of the corporate data may have strategic importance and
therefore needs to be kept secure and confidential.
Security considerations do not only apply to the data held in a
database.

Breaches of security may affect other parts of the system, which may
in turn affect the database.
Involves measures to avoid:

Theft and fraud

Loss of confidentiality (secrecy)

Loss of privacy

Loss of availability
Computer security/ computer-based controls
Concerned with physical controls to administrative procedures and
includes:

Authorization

Access controls

Views

Backup and recovery

Integrity

Encryption

Raid technology
Authorization
The granting of a right or privilege, which enables a subject to
legitimately have access to a system or a system‟s object.
Is a mechanism that determines whether a user is, who he or she
claims to be.
Cont…
Access control
Based on the granting and revoking of privileges.
A privilege allows a user to create or access (that is read, write, or
modify) some database object (such as a relation, view, and index) or
to run certain DBMS utilities.
Privileges are granted to users to accomplish the tasks required for
their jobs.
Most DBMS provides an approach called Discretionary access control
(DAC).
SQL standard supports DAC through the GRANT and REVOKE
command.
The GRANT command gives privileges to users, and the privileges
command takes away privileges.
Cont…
DAC while effective has certain weakness.
An additional approach is required called mandatory access control
(MAC).
DAC based on system-wide policies that cannot be changed by
individual users.
Each database object is assigned a security class and each user is
assigned a clearance for security class, and rules are imposed on
reading and writing of database objects by users.
DAC determines whether a user can read or write an object based on
rules that involve the security level of the object and the clearance of
the user.
These rules ensure that sensitive data can never be passed on to
another user without the necessary clearance.
The SQL standard does not include support for MAC.
Cont…
View

Is the dynamic result of one or more relational operations
operating on the base elations to produce another relation.

A view is a virtual relation that does not actually exist in the
database, but is produced upon request by a particular user, at the
time of request.
Backup

Process of periodically taking a copy of the database and log file
(and possibly programs) to offline storage media.
Journaling

Process of keeping and maintaining a log file (or journal) of all
changes made to database to enable effective recovery in the event
of failure.
Cont…
Integrity

Prevents data from becoming invalid, and hence giving misleading
or incorrect results.
Encryption

The encoding of the data by a special algorithm that renders the
data unreadable by any program without the decryption key.
RAID

Hardware that the DBMS is running on must be fault-tolerant.

Suggests having redundant components that can be seamlessly
integrated into the working system whenever there is one or more
component failures.

The main hardware components that should be fault-tolerant
include disk drives, disk controller , CPU, power supplies, and
cooling fans.
Cont…
Disk drives are the most vulnerable components with the shortest
times between failure of any of the hardware components.
The solution is to provide a large disk array comprising an
arrangement of several independent disks that are organized to
improve reliability and performance .

Performance is increased through data striping.

Reliability is improved through storing redundant information
across disks using parity scheme.
END OF CHAPTER !

More Related Content

PPT
Computer Securityyyyyyyy - Chapter 2.ppt
PDF
Chapter 2 konsep dasar keamanan
PDF
Chapter 2 konsep dasar keamanan
PDF
Mim Attack Essay
PPTX
Cyber.pptx
PPTX
Security & threats Presentation => (Presenter: Komal Mehfooz)
PPTX
Types of attacks in cyber security
PDF
Chapter 5 information assurance and security
Computer Securityyyyyyyy - Chapter 2.ppt
Chapter 2 konsep dasar keamanan
Chapter 2 konsep dasar keamanan
Mim Attack Essay
Cyber.pptx
Security & threats Presentation => (Presenter: Komal Mehfooz)
Types of attacks in cyber security
Chapter 5 information assurance and security

Similar to 2.Security (1).pdfccccccccccccccccccccccccccccccccccccccccccccc (20)

PPTX
Computer security
PDF
4 threatsandvulnerabilities
PDF
Type of Security Threats and its Prevention
PPTX
Network security and viruses
PDF
Network security
PPTX
Common Types of Cyber Attacks & How to Prevent Them.pptx
PPTX
OSI_Security_Architecture Computer Science.pptx
PDF
Cybersecurity - Poland.pdf
PDF
What Is Denial Of Service Attack
PPT
L N Yadav Cyber SECURITY2.ppt
PPT
L N Yadav Cyber SECURITY.ppt
PDF
Computer crimes
PPT
Cyber-Security-CIT good for 1st year engineering students
PPTX
Cyber security
DOCX
Cyber Security Company.docx
PDF
Implications of Computer Misuse and Cyber Security (Teaching) (1).pdf
PDF
What-is-computer-security
PPTX
INTERNET SECURITY.pptx
PPTX
2nd Class PPT.pptx
PDF
Information Security Lecture Notes
Computer security
4 threatsandvulnerabilities
Type of Security Threats and its Prevention
Network security and viruses
Network security
Common Types of Cyber Attacks & How to Prevent Them.pptx
OSI_Security_Architecture Computer Science.pptx
Cybersecurity - Poland.pdf
What Is Denial Of Service Attack
L N Yadav Cyber SECURITY2.ppt
L N Yadav Cyber SECURITY.ppt
Computer crimes
Cyber-Security-CIT good for 1st year engineering students
Cyber security
Cyber Security Company.docx
Implications of Computer Misuse and Cyber Security (Teaching) (1).pdf
What-is-computer-security
INTERNET SECURITY.pptx
2nd Class PPT.pptx
Information Security Lecture Notes
Ad

More from jacobdiriba (8)

PPTX
Chapter Two networking.pptxvggggggggggg n n n n n n n n n n n n n n n
PDF
rk ch 4.pdfBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
PDF
AI Chapter 3.pdfvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
PPT
ch01-Introduction Databases and Database Users.ppt
PPTX
SE_Sumerized.pptx nccccccccccmmmmmmmmmmmmmmmmmmmmmmmmmmmm
PPT
Automata_and_Complexity_Theommmmmmmry-RevisionforExitExam.ppt
PDF
All chapters C++ - Copy.pdfyttttttttttttttttttttttttttttt
PPTX
chapter 4&5 system analysis ppt.puyyyyyyyyyyyyyyyyyyyyyyyyptx
Chapter Two networking.pptxvggggggggggg n n n n n n n n n n n n n n n
rk ch 4.pdfBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
AI Chapter 3.pdfvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
ch01-Introduction Databases and Database Users.ppt
SE_Sumerized.pptx nccccccccccmmmmmmmmmmmmmmmmmmmmmmmmmmmm
Automata_and_Complexity_Theommmmmmmry-RevisionforExitExam.ppt
All chapters C++ - Copy.pdfyttttttttttttttttttttttttttttt
chapter 4&5 system analysis ppt.puyyyyyyyyyyyyyyyyyyyyyyyyptx
Ad

Recently uploaded (20)

PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
PPTX
Institutional Correction lecture only . . .
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
PPH.pptx obstetrics and gynecology in nursing
PPTX
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
PDF
Pre independence Education in Inndia.pdf
PDF
Insiders guide to clinical Medicine.pdf
PPTX
master seminar digital applications in india
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PDF
Complications of Minimal Access Surgery at WLH
PDF
Classroom Observation Tools for Teachers
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Module 4: Burden of Disease Tutorial Slides S2 2025
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
Institutional Correction lecture only . . .
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Microbial disease of the cardiovascular and lymphatic systems
TR - Agricultural Crops Production NC III.pdf
Abdominal Access Techniques with Prof. Dr. R K Mishra
102 student loan defaulters named and shamed – Is someone you know on the list?
PPH.pptx obstetrics and gynecology in nursing
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
Pre independence Education in Inndia.pdf
Insiders guide to clinical Medicine.pdf
master seminar digital applications in india
FourierSeries-QuestionsWithAnswers(Part-A).pdf
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
Complications of Minimal Access Surgery at WLH
Classroom Observation Tools for Teachers
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf

2.Security (1).pdfccccccccccccccccccccccccccccccccccccccccccccc

  • 2. Computer Security/ attacks & threats A computer security threat is any person, act, or object that poses a danger to computer security Threat and attack are commonly used to mean more or less the same thing. Computer world is full of threats! And so is the real world! Thieves, pick-pockets, burglars, murderers, drunk drivers, … Attack: an assault on system security that derives from an intelligent threat; that is, an intelligent act that is a deliberate attempt (especially in the sense of a method or technique) to evade security services and violate the security policy of a system.
  • 4. Computer security/ Attacks Security Attacks can be passive attack or active attack. A passive attack attempts to learn or make use of information from the system but does not affect system resources.  They do not whish to modify the content of the original message.  It is very difficult to detect as it does not alter the data. Interception:- is a type of attack that is done without the permission or knowledge of the users.  It breaks the rules of confidentiality in the principle of security.  It is further categorize into sub types….
  • 5. Cont… Release of message When you send a message to your friend, you want that only that person can read the message.  Using certain security mechanism, we can prevent release of message contents. Traffic analysis If many message are passes through a single channel then user get confused can give some information to attacker as it think that message is come from his party. Sniffing Sniffing is a method to sniff the transferred data that was send by the sender. It just tries to find out what type of message or data is transferred by sender without the permission of sender. Key loggers It is a program that runs in the background, recording all the keystrokes. Once keystrokes are logged, they are hidden in the machine for later retrieval, or shipped raw to the attacker.
  • 6. Cont… Active attacks involve some modification of the data stream or the creation of a false stream.  These attacks are very complex and cannot prevent easily.  Can be subdivided into 3 types: Interruption, Fabrication, and Modification.  Denial of service (DoS), DDoS, SQL Injection, Replay attack, Masquerading, Man in Middle Attacks are some common attacks. Interruption  Are active attack, an authorized entity pretends to be another entity.  For example there are three users A, B & C.  User A might be pose as user C and send a message to user B. User B believe that message came from user C.  It is classified into four types
  • 7. Cont… 1. Denial of Service (DoS): is blocking access of legitimate users to a service. 2. Distributed DoS Attack: is accomplished by tricking routers into attacking a target or using Zumbie hosts to simultaneously attack a given target with large number of packets. 3. Distributed DoS with Reflectors (DRDoS): It consists a reflector that helps the attacker to execute a more effective and secure attack.  It results in increase of damage and decrease the risk of being traced back 4. SQL Injection Attack: is a security vulnerability that occurs in the database layers of an application.
  • 8. Cont… Simple illustration of DoS attack C:>Ping <address of X> -l 65000 –w 0 -t Ping Ping Ping Ping Web Server X Legitimate User
  • 9. Cont… Fabrication: In this attack users use some accessing service, which they are not eligible for.  Replay Attack: involves the passive capture of a data unit and its subsequent retransmission to produce an unauthorized effect.  A replay attack can be prevented using strong digital signatures.  Masquerading: is a type of attack in which one system assumes the identity of another.  It‟s a technique used by attacker to pretend himself as an authorized person in order to gain access of confidential information in illegal manner.
  • 10. Cont…  Man of the middle attack (MITM): It is an active internet attack that attempts to intercept, read and alter the information hovering between the user of a public network and any requested website. • The attacker uses the illegally gained information for identity theft and other types of fraud. Modification: causes losses of integrity principle.  For example a person did an online transaction of $100. But the attacker hack this and modify it to $1000.
  • 11. Computer data are not usually seen directly by users, malicious people can make programs serve as vehicles to access and change data and other programs. Malicious code is written just like any other program on the system, but is written to exploit vulnerabilities of the system. Malicious code can do any thing any other program can, such as writing a message on a computer screen, stopping a running program, generating a sound, or erasing a stored file. Malicious code can do nothing at all right now; it can be planted to lie dormant, undetected, until some event triggers the code to act. Computer security/ Malicious Attacks
  • 12. Cont… Malware presents arguably the largest security threat to computer users. Examples Viruses Trojan horses Spy-wares New ones: Spam/scam, identity theft, e-payment frauds, etc.
  • 13. Cont… Viruses “A small program that replicates and hides itself inside other programs usually without your knowledge.” Similar to biological virus: Replicates and Spreads Viruses can do the following if left unchecked: • Damage or delete files. • Slow down your computer. • Invade your email program.
  • 14. Cont… Worms An independent program that reproduces by copying itself from one computer to another. It spreads without the user taking any action and usually exploits a bug (or vulnerability) in computer system. They make extensive use of email and security holes in software or operating systems to spread rapidly. Do not alter files like viruses do It can do as much harm as a virus It often creates denial of service Example “CODE RED”
  • 15. Cont… Trojan horses  A Trojan horse got its name from the story of the Trojan horse in Greek legend.  It may be some type of file such as a game that users may be interested in.  The user would normally install and run this program easily.  It may or may not use a vulnerability to spread automatically.  Do not replicate themselves like a virus, but they can be propagated as attachments to a virus.  For example, a person may get a program by email or the Internet that he or she thinks is a computer game; however, when the person runs the supposed game, the program deletes files on the computer or injects viruses.
  • 16. Cont… Spy-wares  “A software that literally spies on what you do on your computer.” It tracks the user‟s behavior and reports information back to a central source. Can be installed on your PC without your consent. Compromises your data, computing habits, and identity. Alters PC settings. Slows down your PC Example: Simple Cookies and Key Loggers
  • 17. Cont… Infection mechanisms First, the virus should search for and detect objects to infect Installation into the infect able object Writing on the boot sector Add some code to executable programs Add some code to initialization/auto-executable programs Write a macro in a word file Most software based attacks are commonly called Viruses: How do viruses work?
  • 18. Cont… Trigger mechanism  Date or time  An interval (for example, after 30 minutes)  Number of infections  An event(for example, when a particular program is executed)  A count (for example, the fifth time something happens) How do viruses work? … Effects: It can be anything A message Deleting files Formatting disk Overloading processor/memory Etc.
  • 19. Cont… Controls to protect against malware attack.. Active Protection  Installing and properly using an Internet security suite —which includes protection against threats such as viruses, spyware, and PC intrusion.  Is vital for proper protection against the hackers, intruders, and other wrongdoers. Preventative Measures  Even though security programs may actively detect and eliminate any threats your PC encounters, you should always help prevent these issues from ever arising.
  • 20. Computer security/Anti-Virus Three categories  Scanners  Activity monitors  Change detection software Are software has evolved to include many other security components. Depending on the vendor, the antivirus software may also contain anti-spyware tools, anti-spam filtering, a personal firewall, and more.  Generic solutions Ex. Integrity checking  Virus specific solution Ex. Looking for known viruses
  • 21. Cont… Functions of anti-viruses Identification of known viruses Detection of suspected viruses Blocking of possible viruses Disinfection of infected objects Deletion and overwriting of infected objects
  • 22. Being human, programmers and other developers make many mistakes, most of which are un intentional and non-malicious. Many such errors cause program malfunctions but do not lead to more serious security vulnerabilities. A few classes of errors have been more serious errors for programmers and serious professionals.  Buffer Overflow error  Incomplete mediation  Time-of-check to Time-of-Use errors Computer security/program flaws
  • 23. Cont… Buffer overflow: One of the most common vulnerabilities in software. Particularly problematic when present in system libraries and other code that runs with high execution privileges. Application reserves adjacent memory locations (buffer) to store arguments to a function, or variable values. Attacker gives an argument too long to fit in the buffer. The application copies the whole argument, overflowing the buffer and overwriting memory space. If the conditions are “just right” this will enable to attacker to gain control over the program flow and execute arbitrary code, with the same privileges of the original application.
  • 24. Cont… For example : char sample[10]; Sample[10]=„A‟; The subscript is out of bounds (that is, it does not fall between 0 and 9), so we have a problem. In some programming languages, buffer sizes need not be predefined.  C does not perform array bound checking.  Similar problem caused by pointers for which there is no way to define a proper limit.
  • 25. Cont… Damage done by buffer overflow  Affects user‟s data (overwrites user data)  Affects user‟s code (change user‟s instruction)  Affects system data(overwrites Os data)  Affects system code(change OS‟s instruction) Implications of buffer overflow Attacker can insert malicious data values/instruction codes into overflow space. C programming language specifications do not specify how data is to be laid out in memory. Some implementations of C may leave space between arrays and variables on the stack, for instance, to minimize aliasing effects.
  • 26. Cont… Buffer overflow security implication Web server attack is similar to buffer overflow attack:Passes very long string to web sever. Buffer overflows are still common  Used by attackers to crash systems and to take over the system by taking control over. Large number of vulnerabilities due to buffer overflows still persists in many software‟s and systems.
  • 27. Cont… Incomplete mediation Inputs to programs are often specified by untrusted users Web-based applications are a common example “Untrusted” to do what? Users sometimes mistype data in web forms Phone number: 51998884567 Email: iang#cs.uwaterloo.ca The web application needs to ensure that what the user has entered constitutes a meaningful request. This is called mediation. Incomplete mediation occurs when the application accepts incorrect data from the user Sometimes this is hard to avoid Phone number: 519-886-4567 This is a reasonable entry, that happens to be wrong
  • 28. Cont… Client-side mediation You've probably visited web site with forms that do client-side mediation. • When you click “submit”, Javascript code will first run validation checks on the data you entered • If you enter invalid data, a popup will prevent you from submitting it Related issue: client-side state  Many web sites rely on the client to keep state for them  They will put hidden fields in the form which are passed back to the server when the user submits the form
  • 29. Cont… Problem: what if the user  Turns off JavaScript?  Edits the form before submitting it? (Greasemonkey)‫‏‬  Writes a script that interacts with the web server instead of using a web browser at all?  Connect to the server “manually”? (telnet server.com 80) Note that the user can send arbitrary (unmediated) values to the server this way The user can also modify any client-side state
  • 30. Cont… At a bookstore website, the user orders a copy of the course text. The server replies with a form asking the address to ship to. This form has hidden fields storing the user's order What happens if the user changes the “unitprice” value to “50.00” before submitting the form?
  • 31. Cont… Defences against incomplete mediation Client-side mediation is an OK method to use in order to have a friendlier user interface, but is useless for security purposes. You have to do server-side mediation, whether or not you also do client-side. For values entered by the user:  Always do very careful checks on the values of all fields  These values can potentially contain completely arbitrary 8-bit data (including accented chars, control chars, etc.) and be of any length For state stored by the client:  Make sure the client has not modified the data in any way
  • 32. Cot… Time-of-Check to Time-of-Use errors Access control is a fundamental part of computer security: we want to make sure that only those who should access an object are allowed that access. Every requested access must be governed by mediated access policy enforcement agent. Incomplete mediation problem occurs when access is not checked universally. The time-of-check to time-of-use (TOCTTOU) flaw concerns mediation that is performed with a “bait and switch” in the middle. It is also known as a serialization or synchronization flaw. Time-of-check to time-of-use flaw exploits the time log between the time we check and the time we use.
  • 33. Cont… Example: DBMS/OS Pgm 1 reads value of x=10 Pgm 1 adds x=x+5 Pgm 2 reads x=10, adds 3 to x, write x=13 Pgm 1 writes x=15 X ends up with value x=15 while it should be x=18 Prevention Be aware of time logs. Use digital signatures and certificates to “lock” data values after checking them.  So nobody can modify them after check & before use.
  • 34. Software development controls and Testing techniques Software testing is the process of executing a program or a system with the intent of finding errors. Difference between testing types/(level of testing) and testing techniques Testing types deal with what aspect of the computer software would be tested, while testing techniques deal with how a specific part of the software would be tested. Testing types mean whether we are testing the function or the structure of the software.  In other words, we may test each function of the software to see if it is operational or we may test the internal components of the software to check if its internal workings are according to the specification. On the other hand, „Testing technique‟ means what methods or ways would be applied to calculations would be done to test a particular feature of a software (sometimes we test the interfaces, sometimes we test the segments, sometimes loops etc.).
  • 35. Classification of software testing Testing types can be. Static testing Dynamic testing (further categorized (white box testing and Black box testing ) In static testing, the main aim is to check whether the work being done is going as the per the set standards or not. It does not involve the execution of the software. Static testing is generally in the form of: Reviews, Walkthroughs, Inspection For Source code Documentation Design document Requirements specification Project plan and other project related documents The goal of static testing is to prevent defects as early as possible.
  • 36. Cont… Dynamic testing It refers to examination of an application‟s response from the system to variables that are not constant and change with time. It involves working with the software, giving input values and checking if the output is as expected. White box and Black Box are two major Dynamic testing methodologies. Black Bock testing Test cases are built around specifications and requirements, i.e what the application is supposed to do. It uses external descriptions of the software, including specifications, requirements, and designs to derive test cases. The tester never examines the programming code and does not need any further knowledge of the program other than its specifications.
  • 37. Cont… White box testing It is a testing technique where the internal working of an application is tested. White box testing uses specific knowledge of programming code to examine outputs.  The test is accurate only if the tester knows what the program is supposed to do. White-box testing can be applied at the unit, integration and system levels of the software testing process, and is usually done at the unit level. Also called as glass, structural, clear box or transparent box testing.
  • 38. Cont… White and black box testing techniques  Black box testing techniques  Boundary value analysis  Equivalent partitioning  Race conditions  Error guessing White Box testing techniques  Path testing o Line coverage o Branch coverage o Condition coverage  Cyclomatic complexity  Control structure testing  Loop testing
  • 39. Computer security/Database security Data is valuable resource that must be strictly controlled and managed, as with any corporate resource. Part or all of the corporate data may have strategic importance and therefore needs to be kept secure and confidential. Security considerations do not only apply to the data held in a database.  Breaches of security may affect other parts of the system, which may in turn affect the database. Involves measures to avoid:  Theft and fraud  Loss of confidentiality (secrecy)  Loss of privacy  Loss of availability
  • 40. Computer security/ computer-based controls Concerned with physical controls to administrative procedures and includes:  Authorization  Access controls  Views  Backup and recovery  Integrity  Encryption  Raid technology Authorization The granting of a right or privilege, which enables a subject to legitimately have access to a system or a system‟s object. Is a mechanism that determines whether a user is, who he or she claims to be.
  • 41. Cont… Access control Based on the granting and revoking of privileges. A privilege allows a user to create or access (that is read, write, or modify) some database object (such as a relation, view, and index) or to run certain DBMS utilities. Privileges are granted to users to accomplish the tasks required for their jobs. Most DBMS provides an approach called Discretionary access control (DAC). SQL standard supports DAC through the GRANT and REVOKE command. The GRANT command gives privileges to users, and the privileges command takes away privileges.
  • 42. Cont… DAC while effective has certain weakness. An additional approach is required called mandatory access control (MAC). DAC based on system-wide policies that cannot be changed by individual users. Each database object is assigned a security class and each user is assigned a clearance for security class, and rules are imposed on reading and writing of database objects by users. DAC determines whether a user can read or write an object based on rules that involve the security level of the object and the clearance of the user. These rules ensure that sensitive data can never be passed on to another user without the necessary clearance. The SQL standard does not include support for MAC.
  • 43. Cont… View  Is the dynamic result of one or more relational operations operating on the base elations to produce another relation.  A view is a virtual relation that does not actually exist in the database, but is produced upon request by a particular user, at the time of request. Backup  Process of periodically taking a copy of the database and log file (and possibly programs) to offline storage media. Journaling  Process of keeping and maintaining a log file (or journal) of all changes made to database to enable effective recovery in the event of failure.
  • 44. Cont… Integrity  Prevents data from becoming invalid, and hence giving misleading or incorrect results. Encryption  The encoding of the data by a special algorithm that renders the data unreadable by any program without the decryption key. RAID  Hardware that the DBMS is running on must be fault-tolerant.  Suggests having redundant components that can be seamlessly integrated into the working system whenever there is one or more component failures.  The main hardware components that should be fault-tolerant include disk drives, disk controller , CPU, power supplies, and cooling fans.
  • 45. Cont… Disk drives are the most vulnerable components with the shortest times between failure of any of the hardware components. The solution is to provide a large disk array comprising an arrangement of several independent disks that are organized to improve reliability and performance .  Performance is increased through data striping.  Reliability is improved through storing redundant information across disks using parity scheme.