Os Unit - 5
Os Unit - 5
UNIT : P BHAVYA
PREPARED BY
:
System Security: Introduction
Program threats
System and network threats
Cryptography as a security
User authentication
Implementing security defenses
Firewalling to protect systems and networks
Computer security classification.
General model of protection can be viewed abstractly as a matrix, called an Access
matrix.
The rows (i) of the access matrix represent domains, and
The columns ( j ) represent objects.
Each entry in the matrix consists of a set of access rights.
The entry access (i , j) defines the set of operations that a process executing in
domain Di can invoke on object Oj.
The copy and owner rights allow a process to change the entries in a column.
A mechanism is also needed to change the entries in a row. The control right is
applicable only to domain objects.
If access(i,j) includes the control right, then a process executing in domain Di can
remove any access right from row j.
1. Global table:
The simplest implementation of the access matrix is a global table consisting of
a set of ordered triples<domain, object, rights-set>.
Whenever an operation M is executed on an object Oj within domain Di, the
global table is searched for a triple< Di , Oj , Rk >,with M ∈ Rk.
If this triple is found, the operation is allowed to continue; otherwise, an
exception (or error) condition is raised.
Drawbacks:
1. The table is usually large and thus cannot be kept in main memory, so additional
I/O is needed. Virtual memory techniques are often used for managing this table.
Capabilities are usually distinguished from other data in one of two ways:
1. Each object has a tag to denote whether it is a capability or accessible data. The
tags themselves must not be directly accessible by an application program.
Hardware or firmware support may be used to enforce this restriction.
2. The address space associated with a program can be split into two parts.
One part is accessible to the program and contains the program’s normal data
and instructions.
The other part, containing the capability list, is accessible only by the operating
system.
→ In a large system with long access lists, this search can be time consuming.
Comparison :
Capability lists do not correspond directly to the needs of users, but they are
useful for localizing information for a given process.
→ The process attempting access must present a capability for that access. Then,
the protection system needs only to verify that the capability is valid.
Ex: Solaris 10(sun micro systems) advances
the protection available in the operating system
by explicitly adding the principle of least
privilege via role-based access
control(RBAC).
This facility revolves around privileges.
Easy to implement with Access List.
With an access-list scheme, revocation is easy.
Simple - The access list is searched for any access rights to be revoked, and they are
delete Access rights from the access list.
Revocation is immediate and can be general or selective, total or partial, and
permanent or temporary.
✦ unauthorized access.
Security of a system can be threatened via two violations:
Threat: A program which has the potential to cause serious damage to the system.
A Trojan must be executed by its victim to do its work. Trojan malware can infect
devices in several ways.
(Malware : software that is specifically designed to disrupt, damage, or gain
unauthorized access to a computer system.)
For example:
A user sees a pop-up for a fake antivirus program that claims your computer is
infected and invites you to run a program to clean it up. This is known as
“scareware”. In reality, users are downloading a Trojan onto their device.
A user downloads a program whose publisher is unknown from an untrustworthy
website.
Attackers install a Trojan through exploiting a software vulnerability or through
unauthorized access.
Hackers create a fake Wi-Fi hotspot network that looks like one a user is trying to
connect to. When the user connects to this network, they can be redirected to fake
websites containing browser exploits that redirect any file they try to download.
COURSE:OS UNIT: 5 Pg. 46
Trojan Horse:
One dangerous opening for Trojan horses is long search paths, and in particular
paths which include the current directory ( "." ) as part of the path. If a
dangerous program having the same name as a legitimate program ( or a
common mis-spelling, such as "sl" instead of "ls" ) is placed anywhere on the
path, then an unsuspecting user may be fooled into running the wrong program
by mistake.
Another classic Trojan Horse is a login emulator, which records a users account
name and password, issues a "password incorrect" message, and then logs off
the system. The user then tries again ( with a proper login prompt ), logs in
successfully, and doesn't realize that their information has been stolen.
This type of attack can be defeated by having the operating system print a usage
message at the end of an interactive session or by a non- trappable key
sequence, such as the control-alt-delete combination used by all modern
Windows operating systems.
Stack and Buffer Overflow:
Exploits a bug (Malicious user creates bug ) in a program (overflow either the
stack or memory buffers)
Failure to check bounds on inputs, arguments
Write past arguments on the stack into the return address on stack
When routine returns from call, returns to hacked address
A buffer overflow is the result of stuffing more data into a buffer than it can
handle.
Code fragment(Small peace of code) embedded in legitimate program.
Self-replicating (Duplication), designed to infect other computers.
Ex : Memory Size of 1 TB – It Duplicate the file – Memory is killed. So replace
the OS or Update the OS. In order to protect the System install Anti Virus.
Viruses are more likely to infect PCs than UNIX or other multi-user systems,
because programs in the latter systems have limited authority to modify other
programs or to access critical system structures
Viruses are delivered to systems in a virus dropper, usually some form of a Trojan
Horse, and usually via e-mail or unsafe downloads.
Usually borne via email or as a macro.
Visual Basic Macro to reformat hard drive
Sub AutoOpen()
Dim oFS
Set oFS = Create Object(’’Scripting.FileSystemObject’’)
vs = Shell(’’c:command.com /k format c:’’,vbHide)
End Sub
COURSE:OS UNIT: 5 Pg. 58
Program Threats :
Virus dropper inserts virus onto the system
Many categories of viruses, literally many thousands of viruses
File : A standard file virus infects a system by appending itself to a file. File viruses
are sometimes known as parasitic viruses, as they leave no full files behind and
leave the host program still functional.
Boot/Memory : A boot virus infects the boot sector of the system, executing every
time the system is booted and before the operating system is loaded.
Macro : Macro viruses are written in a high-level language, such as Visual
Basic. These viruses are triggered when a program capable of executing
the macro is run. For example Microsoft office-(Microsoft word, Excel, PPT) It may
destroy or steal the data depends upon the virus.
Source code: A source code virus looks for source code and modifies it to
include the virus and to help spread the virus.
Polymorphic : A polymorphic virus changes each time it is installed to avoid
detection by antivirus software.
→ Most common
→ Everyone is an administrator
→ Licensing required?
Cryptography enables a recipient of a message to verify that the message was
created by some computer possessing a certain key. Similarly, a sender can
encode its message so that only a computer with a certain key can decode the
message.
→ Confirmation of source
→ Private key – key known only to individual user used to decrypt data
Must be an encryption scheme that can be made public without making it easy to
figure out the decryption scheme
→ If we share k with only one entity, know where the message originated