Docsity

Computer System Secutiry, Summaries of Computer Security

Toggle sidebar
bg1
1
Computer System Security (KNC-401)
UNIT – I
What is Security?
Achieving some goal in the presence of an adversary.
Many systems are connected to the Internet, which has adversaries. Thus, design of many systems might need to
address security, i.e. will the system work when there's an adversary?
Aims of Security (Security Services)
Generally the following are considered to be the aims of computer and information security:
Confidentiality- Certain information must be kept secret from unauthorized access.
Importance of confidentiality
Loss of revenue
Loss of reputation
Loss of clients/customer
Embarrassment
Ensuring confidentiality
Encryption
Access Control
Integrity- ensures that information and systems have not been altered in an unauthorized way.
Ensuring integrity
Regular backups
Availability-
information or systems are accessible and modifiable in a timely fashion by those authorized
to do so.
Authenticity- Verification of claim
Non-repudiation/Accountability- means to ensure that a transferred message has been sent and received
by the parties claiming to have sent and received the message. Nonrepudiation is a way to guarantee that
the sender of a message cannot later deny having sent the message and that the recipient cannot deny
having received the message.
Nonrepudiation can be obtained through the use of:
digital signatures-- function as a unique identifier for an individual, much like a written
signature.
A digital code that can be attached to an electronically transmitted message
that uniquely identifies the sender.
Computer security, also known as cyber security or IT security, is the protection of information systems from theft or
damage to the hardware, the software, and to the information on them, as well as from disruption or misdirection of
the services they provide.
“Computer security can be defined as controls that are put in place to provide confidentiality, integrity, and
availability for all components of computer systems.”
Information security (IS) is designed to protect the confidentiality, integrity and availability of computer system data
from those with malicious intentions.
Cyber security refers to the body of technologies, processes, and practices designed to protect networks, devices,
programs, and data from attack, damage, or unauthorized access.
Attack is any attempt to expose, alter, disable, destroy, steal or gain unauthorized access to or make unauthorized
use of an Asset.
What is a Threat?
A threat to a computing system is a set of circumstances that has the potential to cause loss or harm.
A threat can be either "intentional" (i.e. hacking: an individual cracker or a criminal organization) or "accidental" (e.g.
the possibility of a computer malfunctioning, or the possibility of a natural disaster such as an earthquake, a fire, or
a tornado) or otherwise a circumstance, capability, action.
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Computer System Secutiry and more Summaries Computer Security in PDF only on Docsity!

Computer System Security (KNC-401)

UNIT – I

What is Security? Achieving some goal in the presence of an adversary. Many systems are connected to the Internet, which has adversaries. Thus, design of many systems might need to address security, i.e. will the system work when there's an adversary? Aims of Security (Security Services) Generally the following are considered to be the aims of computer and information security:  Confidentiality- Certain information must be kept secret from unauthorized access. Importance of confidentiality  Loss of revenue  Loss of reputation  Loss of clients/customer  Embarrassment Ensuring confidentiality  Encryption  Access Control  Integrity- ensures that information and systems have not been altered in an unauthorized way. Ensuring integrity  Regular backups  Availability- information or systems are accessible and modifiable in a timely fashion by those authorized to do so.  Authenticity- Verification of claim  Non-repudiation/Accountability- means to ensure that a transferred message has been sent and received by the parties claiming to have sent and received the message. Nonrepudiation is a way to guarantee that the sender of a message cannot later deny having sent the message and that the recipient cannot deny having received the message. Nonrepudiation can be obtained through the use of:  digital signatures-- function as a unique identifier for an individual, much like a written signature. A digital code that can be attached to an electronically transmitted message that uniquely identifies the sender. Computer security, also known as cyber security or IT security, is the protection of information systems from theft or damage to the hardware, the software, and to the information on them, as well as from disruption or misdirection of the services they provide. “ Computer security can be defined as controls that are put in place to provide confidentiality, integrity, and availability for all components of computer systems.” Information security (IS) is designed to protect the confidentiality, integrity and availability of computer system data from those with malicious intentions. Cyber security refers to the body of technologies, processes, and practices designed to protect networks, devices, programs, and data from attack, damage, or unauthorized access. Attack is any attempt to expose, alter, disable, destroy, steal or gain unauthorized access to or make unauthorized use of an Asset. What is a Threat? A threat to a computing system is a set of circumstances that has the potential to cause loss or harm. A threat can be either "intentional" (i.e. hacking: an individual cracker or a criminal organization) or "accidental" (e.g. the possibility of a computer malfunctioning, or the possibility of a natural disaster such as an earthquake, a fire, or a tornado) or otherwise a circumstance, capability, action.

Types of Attack: There are two types of Attacks-  Active Attacks  Passive Attacks Active attacks are the attacks in which the attacker tries to modify the information or creates a false message. Or An active attack attempts to alter system resources or effect their operations.

The active attacks are the different types  Masquerade- A masquerade (is an attack that uses a fake identity) attack in which unauthorized attacker tries to pose as another entity.  Modification - If an unauthorized party accesses and tampers with an asset, the threat is a modification. Modification can be done using two ways replay attack and alteration. In the replay attack, a sequence of events or some data units is captured and resent by them. While alteration of the message involves some change to the original message, either one of them can cause alteration.  Fabrication causes Denial Of Service (DOS) attacks in which attacker prevents normal use of communication facilities or other services. This attack may have a specific target. For example, an entity may suppress all messages directed to a particular destination. (Fabrication: An unauthorized party inserts counterfeit objects into the system and basically attacks the authenticity of the system. Modification: An unauthorized party modifies the assets of the system and basically attacks the integrity of the system. )

Passive Attack - A passive attack, in computing security, is an attack characterized by the attacker monitoring communication or systems. This can take forms such as reading emails, tracking internet use, or using a system's microphone and camera to "spy" on an individual. In a passive attack, the intruder/hacker does not attempt to alter the system or change data. Even though a passive attack sounds less harmful, the damage in the end can be just as severe if the right type of information is obtained. It is possible for passive attacks to be performed for non-malicious reasons, such as marketing research. Types of Passive attacks are as following:

1. The release of message content can be expressed with an example, in which the sender wants to send a confidential message to the receiver. The sender doesn’t want the contents of that message to be read by some interceptor. 2. By using encryption a message could be masked in order to prevent the extraction of the information from the message, even if the message is captured. Though still attacker can analyse the traffic and observe the pattern to retrieve the information. This type of passive attack refers to as traffic analysis. Key Differences between Active and Passive Attacks

  1. The active attack includes modification of the message. On the other hand, in passive attacks, the attacker doesn’t commit any changes to the intercepted information.
  2. The active attack causes a huge amount of harm to the system while the passive attack doesn’t cause any harm to the system resources.

Control Hijacking- Attacks that divert a program’s control flow for malicious purposes are generally known as control- hijacking attacks. (A control - hijacking attack overwrites some data structures in a victim program that affect its control flow, and eventually hijacks the control of the program and possibly the underlying system.) What is needed?  Understanding C functions and the stack  Some familiarity with machine code  Know how systems calls are made  The exec() system call  Attacker needs to know which CPU and OS are running on the target machine: Inter overflow attacks- An integer overflow occurs when you attempt to store inside an integer variable a value that is larger than the maximum value the variable can hold. The C standard defines this situation as undefined behavior. The ISO C99 standard says that an integer overflow causes "undefined behaviour", meaning that compilers conforming to the standard may do anything they like from completely ignoring the overflow to aborting the program. Most compilers seem to ignore the overflow, resulting in an unexpected or erroneous result being stored. However, overflow vulnerabilities are especially dangerous because they may lead to program instability even under normal operation and in many cases, are exploitable as well. Example - print the value ( The range of int type is from -2 15 to +2 15 -1 (-32768 to +32767)) #include<stdio.h> int main() { int x=32770; printf("%d",x); return 0; } Output:

(While printing, the printf() treats it as a negative value by looking 1 at the first bit, so printf() reverts the 2’s and 1’s compliment of binary and prints equal decimal value with -ve sign) A typical control hijacking attack starts by corrupting a pointer to an attacker supplied malicious data, which we refer to as the payload. Then, the attack proceeds by modifying code pointers, which are objects that affect control flow of a program. In order to hijack control successfully, the attacker needs to know the correct target value.

Format string vulnerabilities-

1. A format string is an ASCII (American Standard Code for Information Interchange) string that contains text and format parameters. Example: printf(“my name is:%s\n”,”Ram”); If a program containing the above example is run it will output: My name is: Ram In addition to %d, there are several other format parameters, each having different meaning. %d, %s, %n, %f, %o etc. The stack and its role at format strings- The behavior of the format function is controlled by the format string. The function retrieves the parameters requested by the format string from the stack. printf("a has value %d, b has value %d, c is at address: %08x\n",a, b, &c);

What if there is a miss-match between the format string and the actual arguments? printf("a has value %d, b has value %d, c is at address: %08x\n",a, b);  In the above example, the format string asks for 3 arguments, but the program actually provides only two (i.e. a and b ). In this case there is no way for the compiler to find the miss-match in this case.  The function printf() fetches the three arguments from the stack. Unless the stack is marked with a boundary, printf() does not know that it runs out of the arguments that are provided to it.  Since there is no such a marking. printf() will continue fetching data from the stack. In a miss-match case, it will fetch some data that do not belong to this function call.

2. Attacks on Format strings vulnerability A format string attack begins when an intruder takes aim at the Format Function. Format Function is designed to handle routine tasks. However, if these functions aren’t adequately protected, the application can be at risk for a format string attack. The attacker may explore and test the software by inserting specific formatting characters via a form at a website or another input tool. When an application receives certain conversion characters, such as "%f", "%p", or "%n", the attacker is allowed to execute arbitrary code on a server, read values from an attack, or software crashes. Once an attacker finds a successful intrusion point, he can read data from the stack, read character strings from the process memory, write an integer to locations in the process memory, change security controls, crash applications, or launch a denial of service (DoS) attack crashing the program. Example printf ("%s%s%s%s%s%s%s%s%s%s%s%s");

if(pass) { /* Now Give root or admin rights to user*/ printf ("\n Root privileges given to the user \n"); } return 0; } However, there is a possibility of buffer overflow in this program because the gets() function does not check the array bounds. Here is an example of what an attacker could do with this coding error: Enter the password: hhhhhhhhhhhhhhhhhhhh Wrong Password Root privileges given to the user In the above example, the program gives the user root privileges, even though the user entered an incorrect password. The gets() function does not check the array bounds and can even write string of length greater than the size of the buffer to which the string is written. Now, can you even imagine what can an attacker do with this kind of a loophole? Defenses against Control Flow Hijacking- A variety of defensive mechanisms have been proposed to mitigate (reduce) control-flow hijacking attacks. Some of them are as follows:  Platform Defenses - In this case prevent attack code execution Remote code execution (RCE) refers to the ability of a cyber attacker to access and make changes to a computer owned by another, without authority and regardless of where the computer is geographically located. Attacker to

take over a computer or a server by running arbitrary malicious software (malware) which is most dangerous. Prevention  Timely installation of software update ranks as the top cyber security measure.  To prevent attackers which trying to infect vulnerable servers with crypto currency mining malware, the initial attack must be blocked.  Data Execution Prevention – It is security features that can help prevent damage to your computer from viruses and other security threats. Harmful programs can try to attack Windows by attempting to run code from your computer's memory reserved for Windows and other authorized programs. These types of attacks can harm your programs and files.  Run time Defenses - Add runtime code to detect overflows exploits Runtime Malware Defense (RMD) is endpoint protection software that acts as a last line of defense against damage from malicious attacks. Unlike antivirus and next-generation antivirus, which attempt to identify and stop malware pre execution, RMD blocks malware at the time of execution by recognizing malicious activity. Importantly, runtime malware defense is preventative; it blocks malware before damage is done, preventing data loss, data theft, and downtime.

Types of Cyber Attacks- It is the illegal attempt to harm someone's computer system or the information on it, using the internet. Cyber-attacks can be classified into the following categories:

 System - based attacks  Web - based attacks System – Based Attacks- These are the attacks which are intended to compromise a computer or a computer network. Some of the important system-based attacks are as follows-

1. Virus- A computer virus is a program or piece of code that can link itself to the executable files of a computer. It corrupt and erase a file or program. 2. Worm – It is a type of malware ( Malware ” is short for “ malicious software ”) whose primary function is to replicate itself to spread to uninfected computers .It consumes system resources and slow down it, and halt the system completely. Worms often originate from email attachments that appear to be from trusted senders. 3. Trojan horse- It is the malware which misleads users of its true intent. It appears to be a normal application but when opened/executed some malicious code will run in the background. Web – Based Attacks- These are the attacks which occur on a website or web applications. Some of the important web-based attacks are as follows- 1. Injection attacks- It is the attack in which some data will be injected into a web application to manipulate the application and fetch the required information. Example- SQL Injection, code Injection; log Injection, XML Injection etc. 2. Spoofing- A technique used to gain unauthorized access to computers, whereby the intruder sends messages to a computer with an IP address indicating that the message is coming from a trusted host. (In simple words, I. Spoofing means to pretend (deceive) to be someone else. II. Sniffing means to illegally listen into another’s conversation ) 3. Phishing- Phishing is the fraudulent use of electronic communications that appear to come from a reputable source (to deceive) and take advantage of users. Phishing attacks attempt to gain sensitive, confidential information such as usernames, passwords, credit card information. 4. Denial of Service - A denial-of-service attack is a event that occurs when an attacker prevents legitimate (legal) users from accessing specific computer systems, devices, services or other IT resources. 5. Man in the middle attacks- A MitM attack occurs when a hacker inserts itself between the communications of a client and a server. Some common types of man-in-the-middle attacks are : I. Session hijacking II. DNS hijacking

Session Hijacking – A session refers to a limited time of communication between two systems. The session ID is shared between the browser and web server at every request helps to indentify authenticated user.

For example, the time between you first log into your bank account, and then log off after your operation, is a session. During a session hijacking, a malicious hacker places himself in between your computer and the website’s server (Facebook for instance), while you are engaged in an active session. At this point, the malicious hacker actively monitors everything that happens on your account, and can even kick you out and take control of it. Prevention Use Secure connection (HTTPS) Don’t log in on open wireless networks Don’t click directly links received in your mail. Copy and paste Use a good antivirus Log out at the end of every session Keep your browser updated and other software updated at all times Session Hijacking attack methods  Man is the middle attack  Session Sniffing- capturing network traffic between victim and website using sniffing tools  Cross Site Scripting  SQL Injection – SQL Injection (SQLi) is a type of an injection attack that makes it possible to execute malicious SQL statements by embedded in poorly designed application. These statements access the information that was not intended to be displayed. Criminals may use it to gain unauthorized access to your sensitive data: customer information, personal data, trade secrets, intellectual property, and more. Therefore, a successful SQL Injection attack can have very serious consequences.  To gain complete access to all data in a database server.  Alter data in a database and add new data. Like alter balances, void transactions, or transfer money to their account.  Delete records from a database, even drop tables.