Important Announcement
PubHTML5 Scheduled Server Maintenance on (GMT) Sunday, June 26th, 2:00 am - 8:00 am.
PubHTML5 site will be inoperative during the times indicated!

Home Explore Shobit-MCA Sem II- Network Security and Cryptography (1)

Shobit-MCA Sem II- Network Security and Cryptography (1)

Published by Teamlease Edtech Ltd (Amita Chitroda), 2023-05-18 05:49:20

Description: Shobit-MCA Sem II- Network Security and Cryptography (1)

Keywords: Network Security and Cryptography

Search

Read the Text Version

UNIT 1: NETWORK SECURITY Structure 1.0 Learning Objectives 1.1 Introduction 1.2 Basic concepts: confidentiality, integrity, availability 1.3 Types of Controls 1.4 Access Control Models 1.5 Security policies 1.5.1 Role of the Security Policy in Setting up Protocols 1.5.2 Structure of a Security Policy 15.3 Types of Policies 1.6 Summary 1.7 Key Words/Abbreviations 1.8 Learning Activity 1.9 Unit End Questions (MCQ and Descriptive) 1.10 References 1.0 LEARNING OBJECTIVES At the end of the unit learner will able to understand and have knowledge of followingaspects of Network Security: • Introduction to various basic concepts of security • Understanding various types of control • Having knowledge of various types of Access Control Modes • Knowledge of security policies

1.1 INTRODUCTION First, let’s define information security. If ten different people were asked to define information security, we might well receive ten different answers, but what is surprising is that they might all be correct. Nevertheless, the universal, classic definition of information security is brief and simple: Information security is the confidentiality, integrity, and availability of information. Indeed, all the principles, standards, and mechanisms you will encounter in this book are dedicated to these three abstract but fundamental goals of confidentiality, integrity, and availability of information and information processing resources—also referred to as the C-I-A triad or information security triad. Information security (InfoSec) enables organizations to protect digital and analog information. InfoSec provides coverage for cryptography, mobile computing, social media, aswell as infrastructure and networks containing private, financial, and corporate information. Cybersecurity, on the other hand, protects both raw and meaningful data, but only from internet-based threats. Organizations implement information security for a wide range of reasons. The main objectives of InfoSec are typically related to ensuring confidentiality, integrity, and availability of company information. Since InfoSec covers many areas, it often involves the implementation of various types of security, including application security, infrastructure security, cryptography, incident response, vulnerability management, and disaster recovery. 1.2 BASIC CONCEPTS Confidentiality In the context of information security, confidentiality means that information that should staysecret stays secret and only those persons authorized to access it may

receive access. From ancient times, mankind has known that information is power, and in our information age, access to information is more important than ever. Unauthorized access to confidential information may have devastating consequences, not only in national security applications,but also in commerce and industry. Main mechanisms of protection of confidentiality in information systems are cryptography and access controls. Examples of threats to confidentiality are malware, intruders, social engineering, insecure networks, and poorly administered systems. Integrity Integrity is concerned with the trustworthiness, origin, completeness, and correctness of information as well as the prevention of improper or unauthorized modification of information. Integrity in the information security context refers not only to integrity of information itself but also to the origin integrity—that is, integrity of the source of information. Integrity protection mechanisms may be grouped into two broad types: preventive mechanisms, such as access controls that prevent unauthorized modification of information, and detective mechanisms, which are intended to detect unauthorized modifications when preventive mechanisms have failed. Controls that protect integrity include principles of least privilege, separation, and rotation of duties—these principles areintroduced later in this chapter. Availability Availability of information, although usually mentioned last, is not the least important pillarof information security. Who needs confidentiality and integrity if the authorized users of information cannot access and use it? Who needs sophisticated encryption and access controls if the information being protected is not accessible to authorized users when they need it? Therefore, despite being mentioned last in the C-I-A triad, availability is just as important and as necessary a component of information security as confidentiality and integrity. Attacks against availability are known as denial of service (DoS) attacks. Natural and manmade disasters

obviously may also affect availability as well as confidentiality and integrity of information, though their frequency and severity greatly differ—natural disastersare infrequent but severe, whereas human errors are frequent but usually not as severe as natural disasters. In cases, business continuity and disaster recovery planning (which at the very least includes regular and reliable backups) is intended to minimize losses. Now that the cornerstone concepts of confidentiality, integrity, and availability have been discussed, let’s take a look at identification, authentication, and authorization processes andmethods, which are some of the main controls aimed at protecting the C- I-A triad. Identification Identification is the first step in the identify-authenticate-authorize sequence that is performedevery day countless times by humans and computers alike when access to information or information processing resources are required. While particulars of identification systems differ depending on who or what is being identified, some intrinsic properties of identification apply regardless of these particulars—just three of these properties are the scope, locality, and uniqueness of IDs. Identification name spaces can be local or global in scope. To illustrate this concept, let’s refer to the familiar notation of Internet e-mail addresses: while many e-mail accounts named jack may exist around the world, an e-mail address [email protected] unambiguously refers exactly to one such user in the company .com locality. Provided that the company in question is a small one, and that only one employee is named Jack, inside the company everyone may refer to that particular person bysimply using his first name. That would work because they are in the same locality and onlyone Jack works there. However, if Jack were someone on the other side of the world or evenacross town, to refer to [email protected] as simply jack

would make no sense, because user name jack is not globally unique and refers to different persons in different localities. This is one of the reasons why two user accounts should never use the same name on the same system—not only because you would not be able to enforce access controls based on non-unique and ambiguous user names, but also because you would not be able to establish accountability for user actions. To summarize, for information security purposes, unique names are required and, depending on their scope, they must be locally unique and possiblyglobally unique so that access control may be enforced and accountability established. Authentication Authentication, which happens just after identification and before authorization, verifies the authenticity of the identity declared at the identification stage. In other words, it is at the authentication stage that you prove that you are indeed the person or the system you claim tobe. The three methods of authentication are what you know, what you have, or what you are. Regardless of the particular authentication method used, the aim is to obtain reasonable assurance that the identity declared at the identification stage belongs to the party in communication. It is important to note that reasonable assurance may mean different degreesof assurance, depending on the particular environment and application, and therefore may require different approaches to authentication: authentication requirements of a national security– critical system naturally differ from authentication requirements of a small company. Because different authentication methods have different costs and properties as well as different returns on investment, the choice of authentication method for a particular system or organization should be made after these factors have been carefully considered.

1.3 TYPES OF CONTROLS Central to information security is the concept of controls, which may be categorized by their functionality (preventive, detective, corrective, deterrent, recovery, and compensating, in this order) and plane of application (physical, administrative, or technical). Physical controls include doors, secure facilities, fire extinguishers, flood protection, and air conditioning. Administrative controls are the organization’s policies, procedures, and guidelines intended to facilitate information security. Technical controls are the various technical measures, such as firewalls, authentication systems, intrusion detection systems, and file encryption, among others. Preventive Controls Preventive controls are the first controls met by the adversary. Preventive controls try to prevent security violations and enforce access control. Like other controls, preventive controls may be physical, administrative, or technical: doors, security procedures, and authentication requirements are examples of physical, administrative, and technical preventive controls, respectively. Detective Controls Detective controls are in place to detect security violations and alert the defenders. They come into play when preventive controls have failed or have been circumvented and are no less crucial than detective controls. Detective controls include cryptographic checksums, file integrity checkers, audit trails and logs, and similar mechanisms. Corrective Controls Corrective controls try to correct the situation after a security violation has occurred. Although a violation occurred, not all is lost, so it makes sense to try and fix the situation. Corrective controls vary widely, depending on the area being targeted, and they may be

technical or administrative in nature. Deterrent Controls Deterrent controls are intended to discourage potential attackers and send the message that it is better not to attack, but even if you decide to attack we are able to defend ourselves. Examples of deterrent controls include notices of monitoring and logging as well as the visible practice of sound information security management. Recovery Controls Recovery controls are somewhat like corrective controls, but they are applied in more serious situations to recover from security violations and restore information and information processing resources. Recovery controls may include disaster recovery and business continuity mechanisms, backup systems and data, emergency key management arrangements,and similar controls. Compensating Controls Compensating controls are intended to be alternative arrangements for other controls when the original controls have failed or cannot be used. When a second set of controls addresses the same threats that are addressed by another set of controls, the second set of controls are compensating controls. 1.4 ACCESS CONTROL MODELS Logical access control models are the abstract foundations upon which actual access control mechanisms and systems are built. Access control is among the most important concepts in computer security. Access control models define how computers enforce access of subjects (such as users, other computers, applications, and so on) to objects (such as computers, files, directories, applications, servers, and devices). Three main access control models exist: the discretionary access control model, the mandatory

access control model, and the role-based access control model. Discretionary Access Control (DAC) The discretionary access control model is the most widely used of the three models. In the DAC model, the owner (creator) of information (file or directory) has the discretion to decide about and set access control restrictions on the object in question—which may, for example, be a file or a directory. The advantage of DAC is its flexibility: users may decide who can access information and what they can do with it—read, write, delete, rename, execute, and so on. At the same time, this flexibility is also a disadvantage of DAC because users may make wrong decisions regarding access control restrictions or maliciously set insecure or inappropriate permissions. Nevertheless, the DAC model remains the model of choice for the absolute majority of operating systems today, including Solaris. Mandatory Access Control (MAC) Mandatory access control, as its name suggests, takes a stricter approach to access control. In systems utilizing MAC, users have little or no discretion as to what access permissions they can set on their information. Instead, mandatory access controls specified in a system-wide security policy are enforced by the operating system and applied to all operations on that system. MAC-based systems use data classification levels (such as public, confidential, secret, and top secret) and security clearance labels corresponding to data classification levelsto decide, in accordance with the security policy set by the system administrator, what access control restrictions to enforce. Additionally, per-group and/or per-domain access control restrictions may be imposed—that is, in addition to having the required security clearance level, subjects (users or applications) must also belong to the appropriate group or domain. For example, a file with a confidential label belonging only to the research group may not be accessed by a user from the marketing group, even if that user has a security clearance level higher than confidential (for example, secret or top secret). This concept is known

as compartmentalization or need to know. Although MAC-based systems, when used appropriately, are thought to be more secure than DAC-based systems, they are also much more difficult to use and administer because of the additional restrictions and limitations imposed by the operating system. MAC-based systems are typically used in government, military, and financial environments, where higher than usual security is required and where the added complexity and costs are tolerated. MAC is implemented in Trusted Solaris, a version of the Solaris operating environment intended for high- security environments. Role-Based Access Control (RBAC) In the role-based access control model, rights and permissions are assigned to roles insteadof individual users. This added layer of abstraction permits easier and more flexible administration and enforcement of access controls. For example, access to marketing files may be restricted to the marketing manager role only, and users Ann, David, and Joe may be assigned the role of marketing manager. Later, when David moves from the marketing department elsewhere, it is enough to revoke his role of marketing manager; no other changeswould be necessary. When you apply this approach to an organization with thousands of employees and hundreds of roles, you can see the added security and convenience of using RBAC. Solaris has supported RBAC since release 8. Centralized vs. Decentralized Access Control Further distinction should be made between centralized and decentralized (distributed) accesscontrol models. In environments with centralized access control, a single, central entity makes access control decisions and manages the access control system; whereas in distributedaccess control environments, these decisions are made and enforced in a decentralized manner. Both approaches have their pros and cons, and it is generally inappropriate to say that one is better than the other. The selection of a particular access

control approach should be made only after careful consideration of an organization’s requirements and associated risks. 1.5 SECURITY POLICIES In a way they are the regulatory of the behaviours of your employees towards the use of technology in the workplace, that can minimize the risk of being hacked, information leak, internet bad usage and it also ensures safeguarding of company resources. In real life you will notice the employees of your organization will always tend to click on bad or virus infected URL’s or email attachments with viruses. 1.5.1 Role of the Security Policy in Setting up Protocols Following are some pointers which help in setting u protocols for the security policy of an organization. • Who should have access to the system? • How it should be configured? • How to communicate with third parties or systems? Policies are divided in two categories − • User policies • IT policies. User policies generally define the limit of the users towards the computer resources in a workplace. For example, what are they allowed to install in their computer, if they can use removable storages. Whereas, IT policies are designed for IT department, to secure the procedures and functions of IT fields.

• General Policies − this is the policy which defines the rights of the staff and access level to the systems. Generally, it is included even in the communication protocol asa preventive measure in case there are any disasters. • Server Policies − this defines who should have access to the specific server and with what rights. Which software’s should be installed, level of access to internet, how they should be updated. • Firewall Access and Configuration Policies − It defines who should have access to the firewall and what type of access, like monitoring, rules change. Which ports and services should be allowed and if it should be inbound or outbound. • Backup Policies − It defines who is the responsible person for backup, what should be the backup, where it should be backed up, how long it should be kept and the frequency of the backup. • VPN Policies − these policies generally go with the firewall policy; it defines those users who should have a VPN access and with what rights. For site-to- site connections with partners, it defines the access level of the partner to your network, type of encryption to be set. 1.5.2 Structure of a Security Policy When you compile a security policy you should have in mind a basic structure in order to make something practical. Some of the main points which have to be taken into consideration are − • Description of the Policy and what is the usage for? • Where this policy should be applied? • Functions and responsibilities of the employees that are affected by this policy.

• Procedures that are involved in this policy. • Consequences if the policy is not compatible with company standards. 15.3 Types of Policies In this section we will see the most important types of policies. • Permissive Policy − It is a medium restriction policy where we as an administrator block just some well-known ports of malware regarding internet access and just some exploits are taken in consideration. • Prudent Policy − This is a high restriction policy where everything is blocked regarding the internet access, just a small list of websites are allowed, and now extra services are allowed in computers to be installed and logs are maintained for every user. • Acceptance User Policy − This policy regulates the behaviour of the users towards a system or network or even a webpage, so it is explicitly said what a user can do and cannot in a system. Like are they allowed to share access codes, can they share resources, etc. • User Account Policy − this policy defines what a user should do in order to have or maintain another user in a specific system. For example, accessing an e-commerce webpage. To create this policy, you should answer some questions such as − • Should the password be complex or not? • What age should the users have? • Maximum allowed tries or fails to log in?

• When the user should be deleted, activated, blocked? • Information Protection Policy − This policy is to regulate access to information, hotto process information, how to store and how it should be transferred. • Remote Access Policy − this policy is mainly for big companies where the user and their branches are outside their headquarters. It tells what should the users access, when they can work and on which software like SSH, VPN, RDP. • Firewall Management Policy − this policy has explicitly to do with its management,which ports should be blocked, what updates should be taken, how to make changes in the firewall, how long should be the logs be kept. • Special Access Policy − this policy is intended to keep people under control and monitor the special privileges in their systems and the purpose as to why they have it. These employees can be team leaders, managers, senior managers, system administrators, and such high designation based people. • Network Policy − This policy is to restrict the access of anyone towards the network resource and make clear who all will access the network. It will also ensure whether that person should be authenticated or not. This policy also includes other aspects like, who will authorize the new devices that will be connected with network? The documentation of network changes. Web filters and the levels of access. Who shouldhave wireless connection and the type of authentication, validity of connection session? • Email Usage Policy − This is one of the most important policies that should be done because many users use the work email for personal purposes as well. As a result information can leak outside. Some of the key points of this policy are

the employeesshould know the importance of this system that they have the privilege to use. They should not open any attachments that look suspicious. Private and confidential data should not be sent via any encrypted email. • Software Security Policy − This policy has to do with the software’s installed in the user computer and what they should have. Some of the key points of this policy are Software of the company should not be given to third parties. Only the white list of software’s should be allowed, no other software’s should be installed in the computer. Warez and pirated software’s should not be allowed. 1.6 SUMMARY • In this chapter, we explained the fundamental information security concepts and principles, looked at what constitutes good security architectures and practices, and learned that good practices include people, processes, and technology working in concert. • We also discussed the concepts of accountability, authentication, authorization, privacy, confidentiality, integrity, and non-repudiation, as well as types and functionalities of information security controls and the importance of information systems governance. • Network security policies rotate around protecting every resource on a network, right from threats to further exploitation. The policy should be inclusive of all essential network devices,conveyed data; media used for transmission and ought not to only major on the machine established on the network. • By the end of this article, you should have understood the various policy aspects where you can impose policies for reliable, secure, and robust network architecture.

• The policy should be designed by an organization to comply with all its entities to improve its performance and as a defence to possible network vulnerability. Network policy should be strong enough to protect your system against several ways through which it can be compromised such as through code injection, software bugs, malware 1.7 KEY WORDS/ABBREVIATIONS • Information security: is the confidentiality, integrity, and availability of information. • Confidentiality: is the prevention of unauthorized disclosure of information. • Integrity: is the means of ensuring that information is protected from unauthorized orunintentional alteration, modification, or deletion. • Availability: ensures that information is readily accessible to authorized viewers atall times. • Identification: is the means by which a user (human, system, or process) provides aclaimed unique identity to a system. • Authentication: is a method for proving that you are who you say you are. • Trust package: An XML file that contains configuration information about thedeployment. • User Datagram Protocol (UDP): A protocol that allows programs on networked computers to communicate with one another by sending short messages called datagrams. • User ID: A character string that the system uses to identify a user attempting to authenticate

1.8 LEARNING ACTIVITY 1. Discuss the ways to implement information security in any organization 2. Prepare a detail list of Information Security Goals in an Organization 1.9 UNIT END QUESTIONS (MCQ AND DESCRIPTIVE) A. Descriptive Questions 1. Explain C.I.A triad for security. 2. Discuss various types of security policy 3. Discuss and define Access Control Models 4. What are different types of Controls? 5. Describe the role of Network Security Manager in an organization. B. Multiple Choice Questions 1. What type of control is intended to offset deficiencies of other controls? a. Preventive b. Defensive c. Compensating d. Recovery

2. Information systems governance is about what? a. Information security b. Effective and risk-aware use of information systems c. Risk management d. All of these 3. What is the advantage of Role-Based Access Control (RBAC) over Discretionary AccessControl (DAC)? a. RBAC has no advantages over DAC. b. RBAC is an improved version of DAC. c. RBAC improves management of access control and authorizations. d. RBAC is one level below Mandatory Access Control (MAC). E. All of the above 4. Which authentication method is the most complex to administer? a. What you know b. What you have c. What you are d. Who you are e. All of these 5. What is the purpose of authentication? 5.d a. To obtain proof of claimed identity b. To implement access control c. To establish accountability d. All of these Answer 1. c 2.d 3.c 4.c

1.10 REFERENCES • A Role-Based Trusted Network Provides Pervasive Security and Compliance -interview with Jayshree Ullal, senior VP of Cisco • B. A. Forouzan, \"Cryptography & Network Security\", Tata Mc Graw Hill. • Dave Dittrich, Network monitoring/Intrusion Detection Systems (IDS) Archived2006-08-27 at the Way back Machine, University of Washington. • \"Dark Reading: Automating Breach Detection for The Way Security ProfessionalsThink\". October 1, 2015. • \"Honeypots, Honeynets\". Honeypots.net. 2007-05-26. Retrieved 2011-12-09. • Wright, Joe; Jim Harmening (2009) \"15\" Computer and Information Security Handbook Morgan Kaufmann Publications Elsevier Inc p. 257 • \"BIG-IP logout page\" (PDF). Cnss.gov. 1970-01-01. Archived from the original (PDF) on 2012-02-27. Retrieved 2018-09-24. Self-Defending Networks: The Next Generation of Network Security, Duane DeCapite, Cisco Press, Sep. 8, 2006. ISBN 1587052539 • Security Threat Mitigation and Response: Understanding CS-MARS, Dale Tesch/Greg Abelar, Cisco Press, Sep. 26, 2006. ISBN 1587052601 Securing Your Business with Cisco ASA and PIX Firewalls, Greg Abelar, Cisco Press, May 27, 2005. ISBN 1587052148

UNIT 2: INTEGRITY CHECKS AND AUTHENTICATION Structure 2.0 Learning Objectives 2.1 Introduction 2.2 Security Attacks 2.3 Integrity check 2.3.1 Understanding the Network Integrity Environment 2.3.2 Overview of Network Integrity Security 2.3.3 Recommended Deployment Topologies 2.4 Hash Algorithm 2.4.1 Features of Hash Functions 2.4.2 Properties of Hash Functions 2.4.3 Secure Hash Algorithms 2.4.4 Design of Hashing Algorithms 2.4.5 Applications of Hash Functions 2.5 Summary 2.6 Key Words/Abbreviations 2.7 Learning Activity 2.8 Unit End Questions (MCQ and Descriptive) 2.9 References

2.0 LEARNING OBJECTIVES At the end of the unit learner will able to understand and have knowledge of following aspects of Security of the network and alerting the network from various security attack. • Introduction to various types of security attacks and methods for preventing them • Explain the process of Integrity Check to secure the network • Functions and understanding of Hash Algorithm 2.1 INTRODUCTION Internet is today’s bread-giver as many people rely on it for various professional, social, and personal activities. The communication, sharing of data, business transactions, or in short, theentire trade and commerce industry is dependent on the network. Though the internet can network and connect the world-at-large, some people may attempt to damage and disrupt these networks repeatedly for various reasons. These attackers violate privacy and intrude theinternet-connected devices either to retrieve information or to make it inoperable. In the wake of a variety of existing frequent network attacks and the threat of new destructivefuture attacks, network security has gained prominence in the scope of computer networking. Often, network security engineers, analysts, and administrators are held responsible for thesafety of the IT network. Hence, it is important for them to know and understand what thelatest and most prominent network security policies are to combat the rising threats.

2.2 SECURITY ATTACKS An insecure application could expose users and systems to various types of damage. When a malicious party uses vulnerabilities or lack of security features to their advantage to cause damage, it is called an attack. We'll take a look at different types of attacks in this guide so you know what to look for when securing your application. Active attacks vs passive attacks Attacks can be divided into two different types: active and passive. Active attacks With an active attack, the attacker tries to break into the application directly. There are a variety of ways this could be done, from using a false identity to access sensitive data (masquerade attack) to flooding your server with massive amounts of traffic to make your application unresponsive (denial of service attack). Active attacks can also be done to data in transit. An attacker could modify your application data before it gets to a user's browser, showing modified information on the site or direct the user to an unintended destination. This is sometimes called modification of messages. Passive attack With a passive attack, the attacker tries to collect or learn information from the application but does not affect the application itself. Imagine someone is eavesdropping on your conversation with friends and family, collecting information about your personal life, who your friends are, and where you hang out. The same thing could be done on your web traffic. An attacker could capture data between the browser and the server collecting usernames & passwords, users' browsing history, and data exchanged

Common Types of Networking Attacks 1. Virus A virus is not self-executable; it requires the user’s interaction to infects a computer and spread on the network. An example is an email with a malicious link or malicious attachment.When a recipient opens the attachment or clicks the link, the malicious code gets activated and circumvents the systems security controls and makes they inoperable. In this case, the user inadvertently corrupts the device. 2. Malware Malware attack is one of the most severe cyberattacks that is specifically designed to destroy or gain unauthorized access over a targeted computer system. Most malware is self- replicating, i.e., when it infects a particular system, it gains entry over the internet and from thereon, infects all the systems connected to the internet in the network. An external endpoint device if connected will also get infected. It works exceptionally faster than other types of malicious content. 3. Worm A worm can enter a device without the help of the user. When a user runs a vulnerable network application, an attacker on the same internet connection can send malware to that application. The application may accept the malware from the internet and execute it, therebycreating a worm. 4. Phishing Phishing is the most common types of network attacks. It stands for sending emails purporting as from known resources or bankers and creating a sense of urgency to excite user to act on it. The email may contain malicious link or attachment or may ask to share confidential information.

5. Botnet It is a network of private computers which are a victim of malicious software. The attacker controls all the computers on the network without the owner’s knowledge. Each computer on the network is considered as zombies as they serve the purpose of spreading and infecting a large number of devices or as guided by the attacker. 6. DoS (Denial of Service) A Denial of Service is a crucial attack that destroys fully or partially, victim’s network or the entire IT infrastructure to make it unavailable to the legitimate users. The DoS attacks can be categorized in the following three parts – 1. Connection flooding: The attacker bogs down the host by establishing a large number of TCP connections atthe targeted host. These fake connections block the network and make it unavailable tolegitimate users. 2. Vulnerability attack: By sending a few well-crafted messages to the vulnerable operating system or application running on the targeted host, stops the service or make it worse to the extentthat the host crashes. 3. Bandwidth flooding: The attacker prevents legitimate packets from reaching the server by sending a deluge ofpackets. The packets sent are large in number so that the target’s link gets blocked for others to access.

7. Distributed Denial of Service (DDoS) It is a complex version of a DoS attack and is much harder to detect and defend compared toa DoS attack. In this attack, the attacker uses multiple compromised systems to target a singleDoS attack targeted system. The DDoS attack also leverages botnets. 8. Man-in-the-middle A man-in-the-middle attack is someone who stands in between the conversation happening between you and the other person. By being in the middle, the attacker captures, monitors, and controls your communication effectively. For example, when the lower layer of the network sends information, the computers in the layer may not be able to determine the recipient with which they are exchanging information. 9. Packet Sniffer When a passive receiver placed in the territory of the wireless transmitter, it records a copy of every packet transmitted. These packets can contain confidential information, sensitive and crucial data, trade secrets, etc. which when flew over a packet receiver will get through it.The packet receiver will then work as a packet sniffer, sniffing all the transmitted packets entering the range. The best defence against packet sniffer is cryptography. 10. DNS Spoofing It is about compromising a computer by corrupting domain name system (DNS) data and thenintroducing in the resolver’s cache. This causes the name server to return an incorrect IP address.

11. IP Spoofing It is the process of injecting packets in the internet using a false source address and is one of the ways to masquerade as another user. An end-point authentication that ensures the certainty of a message originating from the place we determined would help in defending from IP spoofing. 12. Compromised Key An attacker gains unauthorized access to a secured communication using a compromised key. A key refers to a secret number or code required to interpret secured information without any intimation to the sender or receiver. When the key is obtained by the attacker, it is referred to as a compromised key which serves as a tool to retrieve information. 2.3 INTEGRITY CHECK An important asset of a unit of information is its integrity which ensures that, at a certain location and time, each bit of the unit has the same numerical value that it did originally. Threats to the integrity of information can be divided into two classes: malicious threats (e.g. an attack on the security of the system), and natural threats 2.3.1 Understanding the Network Integrity Environment When planning your Network Integrity implementation, consider the following: • Which resources must be protected? For example: • You must protect customer data. • You must protect internal data, such as proprietary source code. • You must protect system components from being disabled by external attacks orintentional system overloads.

• Who are you protecting data from? For example, if your business has service subscribers, you must protect their data from other subscribers, but someone in your organization might have to access that data to manage it. You can analyse your workflows to determine who needs access to the data; for example, a system administrator could manage your system components without needing to access the system data. • What happens if protections on strategic resources fail? In some cases, a fault in your security scheme is nothing more than an inconvenience. In other cases, a fault might cause great damage to you or your customers. Understanding the security ramifications of each resource helps you protect it properly 2.3.2 Overview of Network Integrity Security Figure shows all the various components that can comprise Network Integrity, including the components to which it connects. Each installed or integrated component requires special steps and configurations to ensure system security. Figure 2.1 Understanding the Network Integrity Environment

2.3.3 Recommended Deployment Topologies Figure shows a single-computer installation topology: the simplest Network Integrity deployment architecture. Figure 2.2 Recommended Deployment Topologies In this topology, all the application components and data are kept on a single system, protected from external attacks by a firewall. The firewall can be configured to block known illegal traffic types. There are fewer resources to secure because all the components are on a single system and all the communication is local. Fewer ports have to be opened through the firewall. Conversely, there are fewer points of attack, and if security is compromised, an attacker would have access to the entire system and data. A single-computer installation topology is best suited for test and lab environments: A single-computer deployment is cost effective for small organizations but does not provide high availability because all components are stored on a single system. Figure shows a tiered installation deployment: a scalable Network Integrity deployment offering greater security and high availability.

Figure 2.3 In this topology, the application tier is isolated by firewalls from both the Internet and the intranet. The database and servers are protected from potential attacks by two layers of firewall. Both firewalls can be configured to block known illegal traffic types. The two layersof firewall provide intrusion containment. Although there are a greater number of components to secure, and more ports have to be opened to allow secure communication between the tiers, the attack surface is spread out 2.4 HASH ALGORITHM Hash functions are extremely useful and appear in almost all information security applications. A hash function is a mathematical function that converts a numerical input value into another compressed numerical value. The input to the hash function is of arbitrary length butoutput is always of fixed length. Values returned by a hash function are called message digest or simply hash values. The following picture illustrated hash function −

Figure 2.4 HASH ALGORITHM Use of hash functions Document Integrity Verifying the integrity of files / documents / messages. E.g. a SHA256 checksum mayconfirm that certain file is original (not modified after its checksum was calculated). The above screenshot demonstrates how the SHA256 checksums ensure the integrity of theOpenSSL files at the official Web site of OpenSSL. Storing Passwords Storing passwords and verification of passwords. Instead of keeping a plain-text password inthe database, developers usually keep password hashes or more complex values derived fromthe password (e.g. Scrypt-derived value). The above example comes from the /etc/shadow file in a modern Linux system. The abovepasswords are stored as multiple-round SHA-512 hashes with salt.

Generate Unique ID Generate an (almost) unique ID of certain document / message. Cryptographic hash functionsalmost uniquely identify documents based on their content. In theory collisions are possible with any cryptographic hash function, but are very unlikely to happen, so most systems (like Git) assume that the hash function they use is collision free. Usually a document is hashed and the document ID (hash value) is used later to prove the existence of the document, or to retrieve the document from a storage system. Example of hash-based unique IDs are the commit hashes in Git and GitHub, based on the content of the commit (e.g. 3c3be25bc1757ca99aba55d4157596a8ea217698) and the Bitcoin addresses (e.g. 1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2). In the above example the SHA-1 unique ID identifies a certain commit in GitHub. Pseudorandom Number Generation Pseudorandom generation and key derivation. Hash values can serve as random numbers. A simple way to generate a random sequence is like this: start from a random seed (entropy collected from random events, such like keyboard clicks or mouse moves). Append \"1\" and calculate the hash to obtain the first random number, then append \"2\" and calculate the hash to obtain the second random number, etc. We shall give a Python example, implementing thedescribed idea. Proof-of-Work Algorithms Proof-of-work (PoW) algorithms. Most proof-of-work algorithms calculate a hash valuewhich is bigger than certain value (known as mining difficulty). To

find this hash value,miners calculate billions of different hashes and take the biggest of them, because hash numbers are unpredictable. For example, the proof of work problem might be defined asfollows: find a number p, such that hash(x + p) holds 10 zero bits at its beginning. 2.4.1 Features of Hash Functions The typical features of hash functions are − • Fixed Length Output (Hash Value) • Hash function coverts data of arbitrary length to a fixed length. This processis often referred to as hashing the data. • In general, the hash is much smaller than the input data, hence hash functionsare sometimes called compression functions. • Since a hash is a smaller representation of a larger data, it is also referred to asa digest. • Hash function with n bit output is referred to as an n-bit hash function. Popular hash functions generate values between 160 and 512 bits. • Efficiency of Operation • Generally for any hash function h with input x, computation of h(x) is a fastoperation. • Computationally hash functions are much faster than a symmetric encryption.

2.4.2 Properties of Hash Functions In order to be an effective cryptographic tool, the hash function is desired to possessfollowing properties − • Pre-Image Resistance • This property means that it should be computationally hard to reverse a hash function. • In other words, if a hash function h produced a hash value z, then it should bea difficult process to find any input value x that hashes to z. • This property protects against an attacker who only has a hash value and is trying to find the input. • Second Pre-Image Resistance • This property means given an input and its hash, it should be hard to find a different input with the same hash. • In other words, if a hash function h for an input x produces hash value h(x), then it should be difficult to find any other input value y such that h(y) = h(x). • This property of hash function protects against an attacker who has an input value and its hash, and wants to substitute different value as legitimate value in place of original input value. • Collision Resistance • This property means it should be hard to find two different inputs of any length that result in the same hash. This property is also referred to as collision free hash function.

• In other words, for a hash function h, it is hard to find any two different inputsx and y such that h(x) = h(y). • Since, hash function is compressing function with fixed hash length, it is impossible for a hash function not to have collisions. This property of collision free only confirms that these collisions should be hard to find. • This property makes it very difficult for an attacker to find two input values with the same hash. • Also, if a hash function is collision-resistant then it is second pre- image resistant. 2.4.3 Secure Hash Algorithms The Secure Hash Algorithms are a family of cryptographic hash functions published by the National Institute of Standards and Technology (NIST) as a U.S. Federal Information Processing Standard (FIPS), including: • SHA-0: A retronym applied to the original version of the 160-bit hash function published in 1993 under the name “SHA”. It was withdrawn shortly after publication due to an undisclosed “significant flaw” and replaced by the slightly revised version SHA-1. • SHA-1: A 160-bit hash function which resembles the earlier MD5 algorithm. This was designed by the National Security Agency (NSA) to be part of the Digital Signature Algorithm. Cryptographic weaknesses were discovered in SHA-1, and the standard was no longer approved for most cryptographic uses after 2010. • SHA-2: A family of two similar hash functions, with different block sizes, known as SHA-256 and SHA-512. They differ in the word size; SHA-256 uses 32-

bit words where SHA-512 uses 64-bit words. There are also truncated versions of each standard, known as SHA-224, SHA-384, SHA-512/224 and SHA-512/256. These were also designed by the NSA. • SHA-3: A hash function formerly called Keccak, chosen in 2012 after a public competition among non-NSA designers. It supports the same hash lengths as SHA-2, and its internal structure differs significantly from the rest of the SHA family. 2.4.4 Design of Hashing Algorithms At the heart of a hashing is a mathematical function that operates on two fixed-size blocks ofdata to create a hash code. This hash function forms the part of the hashing algorithm. The size of each data block varies depending on the algorithm. Typically the block sizes are from 128 bits to 512 bits. The following illustration demonstrates hash function − Figure 2.5 Design of Hashing Algorithms Hashing algorithm involves rounds of above hash function like a block cipher. Each round takes an input of a fixed size, typically a combination of the most recent message block and the output of the last round.

This process is repeated for as many rounds as are required to hash the entire message. Schematic of hashing algorithm is depicted in the following illustration − Figure 2.6 Since, the hash value of first message block becomes an input to the second hash operation, output of which alters the result of the third operation, and so on. This effect, known asan avalanche effect of hashing. Avalanche effect results in substantially different hash values for two messages that differby even a single bit of data. Understand the difference between hash function and algorithm correctly. The hash functiongenerates a hash code by operating on two blocks of fixed-length binary data. Hashing algorithm is a process for using the hash function, specifying how the message willbe broken up and how the results from previous message blocks are chained together. 2.4.5 Applications of Hash Functions There are two direct applications of hash function based on its cryptographic properties.Password Storage Hash functions provide protection to password storage.

• Instead of storing password in clear, mostly all logon processes store the hash valuesof passwords in the file. • The Password file consists of a table of pairs which are in the form (user id, h(P)). • The process of logon is depicted in the following illustration − Figure 2.7 Applications of Hash Functions • An intruder can only see the hashes of passwords, even if he accessed the password. He can neither logon using hash nor can he derive the password from hash valuesince hash function possesses the property of pre-image resistance. 2.5 SUMMARY • The global cyber threat continues to evolve at a rapid pace, with a rising number of data breaches each year. A report by Risk Based Security revealed that a shocking 7.9 billion records have been exposed by data breaches in the

first nine months of 2019 alone. This figure is more than double (112%) the number of records exposed in the same period in 2018. Medical services, retailers and public entities experienced the most breaches, with malicious criminals responsible for most incidents. Some of these sectors are more appealing to cybercriminals because they collect financial and medical data, but all businesses that use networks can be targeted for customer data, corporate espionage, or customer attacks. • With the scale of the cyber threat set to continue to rise, the International Data Corporation predicts that worldwide spending on cyber-security solutions will reach a massive $133.7 billion by 2022. Governments across the globe have responded to the rising cyber threat with guidance to help organizations implement effective cyber-security practices. • In the U.S., the National Institute of Standards and Technology (NIST) has created a cyber- security framework. To combat the proliferation of malicious code and aid in early detection, the framework recommends continuous, real- time monitoring of all electronic resources. • The importance of system monitoring is echoed in the “10 steps to cyber security”, guidance provided by the U.K. government’s National Cyber Security Centre. In Australia, The Australian Cyber Security Centre (ACSC) regularly publishes guidance on how organizations can counter the latest cyber-security threats.

2.6 KEY WORDS/ABBREVIATIONS • A hash: is a function that converts one value to another. • Hashing: is a natural fit for cryptography because it masks the original data with another value. • A hash function: can be used to generate a value that can only be decoded by lookingup the value from a hash table. The table may be an array, database, or other data structure. • A checksum: is a small value that is generated based on the bits in a file or block of data such as a disk image. • Virtual host: Physical computer on which a virtual machine is installed. A virtual host helps manage traffic between web-based applications, web-tier deployments, andthe associated primary instance and replica instances. • Virtual hostname: the publicly-accessible hostname. End users use this virtual hostname to authenticate through the web tier. The system also generates SSL information based on the virtual hostname. • Web tier: A web tier is a platform for installing and deploying the Self- Service Console, Dynamic Seed Provisioning, and the risk-based authentication (RBA) service in the DMZ. 2.7 LEARNING ACTIVITY 1. Draw a detailed study of different application of Hashing in real life

2. Discuss how different hashing functions help to resolve various security needs oforganization. 2.8 UNIT END QUESTIONS A. Descriptive Questions 1. Discuss different types of Security attacks 2. What is Integrity Check? 3. Define Hash Algorithm with the help of proper diagram. 4. Explain Distributed denial of services. 5. Discuss various features of Hashing. B. Multiple Choice Questions 1. Which scheme uses a randomization approach? a. hashing by division b. hashing by multiplication c. universal hashing d. open addressing 2. Which hash function satisfies the condition of simple uniform hashing? a. h(k) = lowerbound(km) b. h(k)= upperbound(mk) c. h(k)= lowerbound(k) d. h(k)= upperbound(k)

3. What is a hash table? a. A structure that maps values to keys b. A structure that maps keys to values c. A structure used for storage d. A structure used to implement stack and queue 4. If several elements are competing for the same bucket in the hash table, what is it called? a. Diffusion b. Replication c. Collision d. Duplication 5. Basically, in SHA-512, the message is divided into blocks of size bits for the hashcomputation. a. 1024 b. 512 c. 256 d. 1248 Answer 1.c 2.a 3.b 4.c 5.a

2.9 REFERENCES • A Role-Based Trusted Network Provides Pervasive Security and Compliance -interview with Jayshree Ullal, senior VP of Cisco • W. Stallings, \"Cryptography and Network Security\", Pearson Education. • Dave Dittrich, Network monitoring/Intrusion Detection Systems (IDS) Archived2006-08-27 at the Way back Machine, University of Washington. • \"Dark Reading: Automating Breach Detection for The Way Security ProfessionalsThink\". October 1, 2015. • \"Honeypots, Honeynets\". Honeypots.net. 2007-05-26. Retrieved 2011-12-09. • Wright, Joe; Jim Harmening (2009) \"15\" Computer and Information SecurityHandbook Morgan Kaufmann Publications Elsevier Inc p. 257 • \"BIG-IP logout page\" (PDF). Cnss.gov. 1970-01-01. Archived from the original(PDF) on 2012-02-27. Retrieved 2018-09-24. • Deploying Zone-Based Firewalls, Ivan Pepelnjak, Cisco Press, Oct. 5, 2006. ISBN 1587053101 • Network Security: PRIVATE Communication in a PUBLIC World, Charlie Kaufman | Radia Perlman | Mike Speciner, Prentice-Hall, 2002. ISBN 9780137155880 Network Infrastructure Security, Angus Wong and Alan Yeung, Springer,2009. ISBN 978-1-4419-0165-1

UNIT 3: CRYPTOGRAPHY Structure 3.0 Learning Objectives 3.1 Introduction 3.2 Secret Key Cryptography 3.2.1 Algorithms and Techniques 3.2.2 Substitutions and Transpositions 3.3 Block Encryption 3.3.1 Block Cipher Principles 3.3.2 Block Cipher Modes of Operation 3.4 DES rounds 3.4.1 Initial and Final Permutation 3.4.2 Round Function 3.4.3 Key Generation 3.4.4 DES Analysis 3.5 S-Boxes 3.6 Summary 3.7 Key Words/Abbreviations 3.8 Learning Activity 3.9 Unit End Questions (MCQ and Descriptive) 3.10 References 42

3.0 LEARNING OBJECTIVES At the end of the unit learner will able to understand and have knowledge of followingaspects of Cryptography: • Knowledge of basic concepts Cryptography • Introduction to Secret Key Cryptography • Function of Bock Encryption • Concepts of DES rounds • Fundamentals of S-Boxes 3.1 INTRODUCTION The primary purpose of cryptography is to make it difficult for an unauthorized third party to access and understand private communication between two parties. It is not always possibleto restrict all unauthorized access to data, but private data can be made unintelligible to unauthorized parties through the process of encryption. Encryption uses complex algorithms to convert the original message, or cleartext, to an encoded message, called ciphertext. The algorithms used to encrypt and decrypt data that is transferred over a network typically come in two categories: secret key cryptography and public key cryptography. These forms of cryptography are explained in the following subsections. Both secret key cryptography and public key cryptography depend on the use of an agreed- upon cryptographic key or pair of keys. A key is a string of bits that is used by the cryptographic algorithm or algorithms during the process of encrypting and decrypting the data. A cryptographic key is like a key for a lock: only with the correct key can you open the lock. 43

Safely transmitting a key between two communicating parties is not a trivial matter. 97 A public key certificate allows a party to safely transmit its public key, while ensuring 44 the receiver of the authenticity of the public key. Cryptosystems use a set of procedures known as cryptographic algorithms, or ciphers, to encrypt and decrypt messages to secure communications among computer systems, devices such as smartphones, and applications. A cipher suite uses one algorithm for encryption, another algorithm for message authentication, and another for key exchange. This process, embedded in protocols and written in software that runs on operating systems and networked computer systems, involves public and private key generation for data encryption/decryption,digital signing and verification for message authentication, and key exchange. 3.2 SECRET KEY CRYPTOGRAPHY With secret key cryptography, both communicating parties, Alice and Bob, use the same key to encrypt and decrypt the messages. Before any encrypted data can be sent over the network,both Alice and Bob must have the key and must agree on the cryptographic algorithm that they will use for encryption and decryption. One of the major problems with secret key cryptography is the logistical issue of how to get the key from one party to the other without allowing access to an attacker. If Alice and Bob are securing their data with secret key cryptography, and if Charlie gains access to their key, Charlie can understand any secret messages he intercepts between Alice and Bob. Not only can Charlie decrypt Alice's and Bob's messages, but he can also pretend that he is Alice and send encrypted data to Bob. Bob will not know that the message came from Charlie, not Alice. When the problem of secret key distribution is solved, secret key cryptography can

be a valuable tool. The algorithms provide excellent security and encrypt data relatively quickly. The majority of the sensitive data sent in an SSL session is sent using secret key cryptography. Secret key cryptography is also called symmetric cryptography because the same key is used to both encrypt and decrypt the data. Well-known secret key cryptographic algorithms include the Data Encryption Standard (DES), triple-strength DES (3DES), Rivest Cipher 2 (RC2), and Rivest Cipher 4 (RC4). Algorithms and Techniques In this section, we examine the most common cryptographic algorithms that are based on theuse of a secret key. Substitutions and Transpositions Some very early cryptographic algorithms manipulated the original plaintext, character bycharacter, using the techniques of substitution and transposition. • A substitution, or permutation, replaces a character of the input stream by a character from the alphabet set of the target ciphertext. • A transposition replaces a character from the original plaintext by another characterof that same plaintext. This results in shuffling yet still preserving the characters of the original plaintext. An example of a substitution is the famous Caesar Cipher, which is said to have been used byJulius Caesar to communicate with his army. The Caesar Cipher replaces each character of the input text by the third character to its right in the alphabet set. In Figure the value 3 is added to the position of the input character; then modulo 26 is taken to yield the replacement character. If we assign numerical equivalents of 0– 25 to the 26-letter alphabet A–Z, the transformation sends each plain character with 45

position P onto the character with position f(P) := P + 3 (mod 26). Fig. 3.1 The Caesar Cipher A transposition cipher consists of breaking the original plaintext into separate blocks first. A deterministic procedure is then applied to shuffle characters across different blocks. For example, a transposition can split the secret message \"PHONE HOME\" into the two separate blocks \"PHONE\" and \" HOME\". Then, characters are cyclically shuffled across the twoblocks to result in the ciphertext of \"POMHE HOEN\". Another example of a simple transposition cipher consists of writing the plaintext along a two- dimensional matrix of fixed rows and columns and then simply transposing the matrix, as shown in Figure Fig. 3.2 Transposition Matrix 46

Generally, transposition ciphers are easy to break. However, composing them by setting the result of one transposition as the input of another one greatly enhances the ciphering against attacks. With the age of computers, early modern cryptography carried on these same concepts, using the various elementary transformations that we have listed. The primary difference is that these transformations now apply at the bit level of the binary representation of data instead ofcharacters only. 3.3 BLOCK ENCRYPTION Block cipher is an encryption and decryption method which operates on the blocks of plain text, instead of operating on each bit of plain text separately. Each block is of equal size and has fixed no of bits. The generated ciphertext has blocks equal to the number of blocks in plaintext and also has the same number of bits in each block as of plain text. Block cipher uses the same key for encryption and decryption. Block cipher is an encryption method which divides the plain text into blocks of fixed size. Each block has an equal number of bits. At a time, block cipher operates only on one block ofplain text and applies key on it to produce the corresponding block of ciphertext. While decryption also only one block of ciphertext is operated to produce its corresponding plain text. Data Encryption Standard (DES) is the best example of it. DES divides the plain text into the number of blocks, each of 64-bit. DES operates on one block of plain text at a time. Key of 56-bit is applied to each block of plain text to produce its corresponding ciphertext of 64-bit. During decryption also only one block of ciphertext is operated at a time to produce its corresponding block plain text. In DES the decryption algorithm is the same as the 47

encryptionone. On an all the block cipher operates on a block of bits at a time instead of one bit a time. Operating bit by bit is a very time-consuming process and as block cipher is a computer- based cryptographic algorithm it needs to be fast. That’s why operating one block of bits at a time makes it faster as compared to a stream cipher. But there was a limitation in the block cipher as it would generate the same ciphertext for therepeating text pattern in plain text. However, this limitation was resolved by implementing chaining in the block cipher. Block Cipher Principles A block cipher is designed by considering its three critical aspects which are listed as below: 1. Number of Rounds 2. Design of Function F 3. Key Schedule Algorithm 1. Number of Rounds The number of rounds judges the strength of the block cipher algorithm. It is considered thatmore is the number of rounds, difficult is for cryptanalysis to break the algorithm. It is considered that even if the function F is relatively weak, the number of rounds wouldmake the algorithm tough to break. 2. Design of Function F The function F of the block cipher must be designed such that it must be impossible for any cryptanalysis to unscramble the substitution. The criterion that strengthens the 48

function F is itnon-linearity. More the function F is nonlinear, more it would be difficult to crack it. Well, while designing the function F it should be confirmed that it has a good avalanche property which states that achange in one-bit of input must reflect the change in many bits of output. The Function F should be designed such that it possesses a bit independence criterion which states that the output bits must change independently if there is any change in the input bit. 3. Key Schedule Algorithm It is suggested that the key schedule should confirm the strict avalanche effect and bitindependence criterion. Block Cipher Modes of Operation There are five important block cipher modes of operation defined by NIST. These five modesof operation enhance the algorithm so that it can be adapted by a wide range of applications which uses block cipher for encryption. 1. Electronic Code Book Mode 2. Cipher Block Chaining Mode 3. Cipher Feedback Mode 4. Output Feedback Mode 5. Counter Mode 1. Electronic Feedback Mode This is considered to be the easiest block cipher mode of operation. In electronic codebook mode (ECB) the plain text is divided into the blocks, each of 64-bit. Each block is encrypted one at a time to produce the cipher block. The same key is used to 49

encrypt each block. When the receiver receives the message i.e., ciphertext. This ciphertext is again divided into blocks, each of 64-bit and each block is decrypted independently one at a time to obtain the corresponding plain text block. Here also the same key is used to decrypt each block which was used to encrypt each block. As the same key used to encrypt each block of plain text there arises an issue that for a repeating plain text block it would generate the same cipher and will ease the cryptanalysis tocrack the algorithm. Hence, ECB is considered for encrypting the small messages which havea rare possibility of repeating text. 50


Like this book? You can publish your book online for free in a few minutes!
Create your own flipbook