swk23C8 / Information-Security

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Information Security


Table of Contents


How to use this guide

Here is a collection of important topics covered throughout the course (all this info is taken from the QUT pre-reading slides or the after lecture content). This is a good document to read in part with the lecture videos.

Please make sure to read further into topics you don’t understand, this guide is to give you a brief description on each topic so you know what you need to study more into.

There is a lot of information for each week, the best way to use this study guide is to skim everything and research deeper into things you don't understand or to have it as a reminder for things you can’t remember.
*note: Everything written here is based off the QUT course content and most content is directly copy and pasted.


Information Security



Week 1: Introduction

Definitions

  • Confidentiality: Preventing unauthorised disclosure of information.
  • Integrity: Preventing unauthorised (accidental or deliberate) modification or destruction of information.
  • Availability: Ensuring resources accessible when required by an authorised user
  • Entity Authentication: The process of verifying a claimed identity (Is this person actually who they say they are? How can I be sure?)
  • Data Origin Authentication: Verify the source (and integrity) of a received message (Is this message from the place/sender it claims to be)
  • Non-repudiation: Create evidence that an action has occurred, so that the user cannot falsely deny the action later
  • Vulnerability: Characteristics of, or weaknesses in a system that could be used to cause harm if acted on by a threat
  • Threat: Sets of circumstances with the potential to cause harm by compromising stated security goals
  • Attack: An attack is when vulnerabilities are deliberately exploited by someone with malicious intent

What is Information Security

Information Security is the act of protecting information, digital or physical, from damage or harm.

Information Assets

When dealing with information security it's important to know what your assets may be. Information assets are any collection of data, stored in any manner, that have some form of value to someone. This typically contains your phone and email contacts, photos, passwords and private/confidential data.

CIA Triad

The CIA triad is a common, respected model that forms the basis for the development of security systems and policies. These are used for the identification of vulnerabilities and methods for addressing problems and creating effective solutions.
  • Confidentiality: Preventing unauthorised disclosure of information.
  • Integrity: Preventing unauthorised (accidental or deliberate) modification or destruction of information.
  • Availability: Ensuring resources accessible when required by an authorised user.

Information States

There are 3 states that information can be in:
  • In Storage: Data that is stored somewhere whether that be electronically (database), physical (file cabinet), or human.
  • In transmission: Data that is being sent over a network, a local transfer between devices or physical transit.
  • Being processed (in use): Data that is currently being processed.

Threats and Vulnerabilities

There are a few ways information assets can be harmed.
  • Threats: Sets of circumstances with the potential to cause harm by compromising stated security goals
  • Vulnerabilities: Characteristics of, or weaknesses in a system that could be used to cause harm if acted on by a threat

Security incident

A security incident or event occurs when threats and vulnerabilities coincide. That is, the threat acts on the vulnerability, resulting in harm to the information asset. This is referred to as an attack if the vulnerabilities are deliberately exploited.

Controls

Controls (also called security measures or countermeasures) are used to protect information assets or business goals by countering threats or reducing vulnerabilities.
Controls can be classified based on their objective
  • Preventive: Aim to prevent or reduce the likelihood of an incident happening
  • Detective: Monitoring to identify attempts or successfully exploited vulnerabilities
  • Corrective: Aim to recover from harm to information assets or business goals

Week 2: Threats, Vulnerabilities, Security Incidents and Attacks

Definitions

  • Threat actor: Person or entity whose actions impact or have the potential to impact information security
  • Threat action: What was done or intended to harm the information asset
  • Passive attack: An attack done to gain information without direct interaction with the information system
  • Active attack: An attack done to gain information which involves some alteration to the information asset
  • DoS and DDoS: Where the objective is to make an information asset or resource unavailable to authorized users
  • Malware: Malicious Software used to gain access to information
  • Man-in-the-Middle attack: "A man-in-the-middle attack (MITM attack) is a cyber attack where an attacker relays and possibly alters communication between two parties who believe they are communicating directly." - Upguard
  • Phishing: "Phishing is a type of social engineering where an attacker sends a fraudulent message designed to trick a human victim into revealing sensitive information to the attacker or to deploy malicious software on the victim's infrastructure like ransomware." - Wiki
  • Replay attack: A valid data transmission is captured (recorded), stored and retransmitted at a later time
  • Security incident: Occurs when threats and vulnerabilities coincide
  • Spoofing: Where one entity pretends to be another to deceive others
  • Social Engineering: "Social engineering is a manipulation technique that exploits human error to gain private information, access, or valuables." - Kaspersky

Threats

There are many threats that may compromise the security, integrity or confidentiality of a certain asset. These can come in the form of external threats such as people who are not authorized to use the information systems or internal threat such as people who are authorized to use information systems, but might use them in unauthorized manner. Ontop of this there are 2 threat types that may compromise an information system such as natural events (flooding, earthquake) or human action, whether with intent or by accident.

Deliberate Human Threats

Deliberate human threats can come in many forms however the most prominent ones are self-made malicious code designed to compromise an information systems CIA.

Common malware types

  • Viruses: Programs with ability to replicate
    • Spreads by copying itself into other files (infecting) and is activated when infected files are opened or exe’s run
  • Worms: Programs with ability to self replicate
    • Spreads from computer to computer without human interaction
  • Trojan horses: Programs with known desirable properties and hidden undesirable property
    • User downloads the program and knowingly uses desirable features
    • Undesirable feature runs without user knowledge

Attack

Attacks can generally be categorised into 2 main types: Passive and Active attacks. Passive attacks are done without direct interaction with the information system while an active attack involves some alteration to the information asset.



Passive Attack Examples:

  • Eavesdropping: Listening to the conversations of others without their knowledge or consent
  • Shoulder surfing: Watching the actions of others (especially at data entry) without their knowledge or consent
  • Network monitoring and eavesdropping: A packet sniffer or network analyzer can monitor network traffic

Active Attack Examples:

  • Denial of Service (DoS) Attack: Where the objective is to make an information asset or resource unavailable to authorized users
    • Damage the resource, so that it can not be used
    • Deliberately interrupt communications between users and resource, so that it can not be accessed
    • Overload the resource by making a large number of requests for service, so it cannot respond to legitimate requests
  • Distributed Denial of Service (DDoS) Attack: Objective is same as DoS attack
    • Use multiple sources to make resource requests
    • Overloads resource, so it cannot respond to legitimate requests
  • Masquerade/Spoofing: Where one entity pretends to be another to deceive others
    • Caller ID spoofing
    • Email address spoofing
    • Webpage spoofing
  • Social Engineering: Using social skills to convince people to reveal information or permit access to resources
  • Phishing: "Phishing is a type of social engineering where an attacker sends a fraudulent message designed to trick a human victim into revealing sensitive information to the attacker or to deploy malicious software on the victim's infrastructure like ransomware." - Wiki
  • Replay attack: A valid data transmission is captured (recorded), stored and retransmitted at a later time
    1. Access to a system requires use of password, but password is encrypted during transmission
    2. Attacker records encrypted password, and replays this information in order to gain access
    3. Doesn’t matter that attacker doesn’t know the password – they can provide the expected credential on request

Week 3: No Classes


Week 4: Managing Information Security

Definitions

  • Risk: Effect of uncertainty on objectives
  • Consequence: Outcome of an event affecting objectives
  • Likelihood: Chance of something happening
  • Stakeholder: People and organizations who may affect, be affected by, or perceive themselves to be affected by, a decision or activity
  • Risk Assessment: The process used to assess a risk generally using 3 principles; identification, Analysis and Evaluation of a risk
  • Risk Identification: Identifying what, where and when a risk can happen, why and how it can happen and finally the tools and techniues to be used to identify risks
  • Risk Analysis: Defining the magnitude of the risk through qualitatively, quantitatively, or semi-quantitatively scales
  • Risk Evaluation: The process of comparing risks and deciding which need treatement first
  • Risk Treatment: "The process of choosing risk treatment options, determining appropriate controls to implement such options, formulating a risk treatment plan and obtaining approval of the Risk treatment plan" - Infosavvy

Managing Information Security

When it comes to managing infosec there are a few things that need to be asked, what information needs to be secured?, why does this information need securing?, how can this information be secured?, and what happens if this information is secured. It's important to note that when thinking about these questions it's important to remember that we don't have access to unlimited resources so certain trade-offs might have to be made.

Risks

Infosec risks are expressed in terms of likelihood and consequences, how likely are these events to occur and what are the consequences. The consequences of these events have magnitude and impacts, what is the magnitude of these consequences and what impact to they have to the information and relating entities. The threat source of these risks are either natural (natural events) or human action, whether accidental or deliberate.

Risk Management

Due to the fact that we can't eliminate ever vulnerability in our systems a process to manage which risks first needed to be created, thus came the creation of the Australian Standards (AS/NZS 27005:2012 Information security risk management). When managing risks it's important to consider 3 aspects, external context, internal context, and risk management context. Risk management is usually performed in 3 steps, risk identification, risk analysis, and risk evaluation.

Risk Identification

Risk identification is all about identifying what, where and when a risk can happen, why and how it can happen and finally the tools and techniques to be used to identify these risks.

Risk Analysis

Risk analysis is all about defining the magnitude of the risk, this can be done qualitatively (using descriptive scales with words), quantitatively (using numeric values for scales), and semi-quantitatively (using qualitative scales, then assigning numerical values to categories).

Risk Evaluation

When evaluating risks we first need to decide which risk needs treatment first and when they should be treated. There are a few ways we can treat these risks
  • Risk Avoidance: Stop doing the activity that gives rise to the risk
  • Risk Modification: Apply controls to the change the likelihood of the event or change the consequences to reduce the magnitude
  • Risk Sharing: Share with another party that can effectively manage risk
  • Risk Retention: Know the risk exists, but decide to do nothing

Risk Management Processes

When going through the process of managing a risk it's important to realise that multiple treatment options may need to be used. The first stage of managing is to document how the chosen methods of risk reduction will be implemented allowing the risk residule to be checked (how likely this implementation will fix it). The next step is to create a communication plan for all parties involved in the process as communication and consultation should be considered at every step. The last phase of the process is an ongoing review and re-iteration of the ongoing risk identifying any new risks and the effectiveness of the original risk management plan.

Australian Standards

When it comes to managing infosec there are 2 main guidelines to follow, the ISO27K (which is what the Australian Standards are based on) and the NIST CSF. There are many standards listing in these 2 guidelines however the 3 important to note are:
  • AS/NZS 27001:2015: Information security management systems - Requirements
  • AS/NZS 27002:2015: Code of practice for information security management
  • AS/NZS 27005:2015: Information security risk management

Typically 27001 and 27002 are used in conjunction as 27001 is all about management and 27002 is the code of practice. When it comes to who enforces and conforms to these standards it's easy to point and say the management team of the business however the actions of any one entity can cause consequences for others. Everyone has their role to play no matter what role in the business they take, collaboration and co-operation is needed at all levels.

AS/NZS 27001:2015

AS/NZS 27001:2015 contains 10 clauses that focus on management of risks:
  1. Scope
  2. Normative references
  3. Terms and definitions
  4. Context of the organization
  5. Leadership
  6. Planning
  7. Support
  8. Operation
  9. Performance evaluation
  10. Improvement

AS/NZS 27002:2015

AS/NZS 27002:2015 contains 18 clauses that focus on the code of practice when it comes to risks:
  1. Scope
  2. Normative references
  3. Terms and definitions
  4. Structure of this standard
  5. Information security policies
  6. Organization of information security
  7. Human resource security
  8. Asset management
  9. Access control
  10. Cryptography
  11. Physical and environmental security
  12. Operations security
  13. Communications security
  14. System acquisition, development and maintenance
  15. Supplier relationships
  16. Information security incident management
  17. Information security aspects of business continuity management
  18. Compliance

Week 5: Identity and User Authentication

Definitions

  • Identification: The act of identifying someone or something
  • Authentication: The process of verifying the identity of someone
  • Authenticator: A private thing only the authentic user could provide
  • Hash function: A method of encryption
  • Token: A unique phrase or combination of characters that are generated to confirm an identity
  • Biometric system: Automated methods of verifying or recognising a person based upon a physiological or behavioural characteristic
  • False match: Mistaking biometric measurements from two different persons to be from the same person
  • False non-match: Mistaking two biometric measurements from the same person to be from two different persons
  • Multifactor authentication: The combination of authentication techniques from two or more different categories

Identity Management

Identity management is the management of who a user is and what data they have access to. The identity of a user in a company is important as it allows us to manage what data they have access to and allows us to hold these users accountable for the actions they take.

User Authentication

User authentication is the process of verifying a user is who they say they are. This is done through the use of 2 important items, a user identifier and a way to verify this identity (an authenticator). User identifiers must be unique and public while authenticators must be something only the authentic user could provide.

Responsibilities

The user has the responsibility of maintaining security of their credentials while the system has the responsibility of maintaining security of all stored values and correctly perfoming user authentication.

Authenticators

An authenticator is a way for our user authenticator to verify that the person logging in is the correct person. These usually take the forms of passwords, pin numbers, and security questions. These can be catagorised into 4 main catagories:
  • Knowledge-Based: Something you know (should be a secret only the entity knows)
  • Object-Based: Something you have (physical item only the entity possesses)
  • ID-Based: Something you are (physical characteristic of person - biometric)
  • Location-based: Somewhere you are

Passwords

Passwords are the most commonly used authenticator, users store their passwords securely while the system securely store all user passwords. Passwords are user or computer generated collections of characters or phrases which can be used to verify a users identity. While passwords are the most common authenticator it doesn't mean they're perfect, passwords come with many disadvantages such as the user forgetting their password, passwords being shared among other users and these passwords may be compromised from data leaks without the users knowledge. Computer generated passwords are much stronger than user created ones as computer generated passwords are created with strong security in mind. There are however disadvantages with this too, due to computer generated passwords having much higher complexity users are required to remember more random phrases, this can cause users to write these passwords down or leave them in vulnerable locations.

Storing Passwords

Passwords need to be secure when in storage, through transmission or through use. If clear plaintext passwords are handled through any of these stages the chance of comprability goes up. Due to these requirements passwords are encrypted when stored in data tables and when a user enters a password the hashed passwords are compared, not the plaintext versions. This allows for maximum security as the only time a plaintext password is used is in the initial input box.

Common Hash Functions

  • MD4 and MD5: Produce 128-bit hash values.
  • SHA-1: Produces a 160-bit hash value.
  • SHA-2 set of hash functions: Output lengths 224, 256, 384, and 512.
  • SHA-3 set of hash functions: Output lengths 224, 256, 384, and 512.

Salting

Due to the fact that hashing creates a fixed output if 2 users have the same password the same hash is going to be produced, although this doesn't directly give away the users passwords it does give people information that could cause issues if one of the passwords gets cracked. It's because of this issue that salting was created, salting is the process of adding random data to the input to force a unique hash output even if 2 passwords are the same.

Object-Based Authenticators

Object-Based authenticators are based around the things we can posses, such as a security card or a generated token. There are 2 common methods when it comes to generating tokens, clock-based and counter-based.
  • Clock-Based Tokens
    • Token display shows a constantly changing value
    • To log in to system user must provided an ID, then types in current value on token as authenticator
    • System fails if clocks in token & host not synchronized
  • Counter-Based Tokens
    • Instead of a clock value, use an internal counter value
    • Increment the counter with each successful login
    • Token device generates ‘password’ value as a function of the counter value and other internal data, without external inputs

ID-Based Authenticators

ID-Based authenticators are based around the things that are unique to an individual such as an eye or a fingerprint. There are 4 requirememts when it comes to a biometric system:
  • Universality: Each person should have the characteristic
  • Distinctiveness: Any two persons should be sufficiently different in terms of the characteristic
  • Permanence: The characteristic should be sufficiently invariant (with respect to the matching criterion) over a period of time
  • Collectability: The characteristic can be measured quantitatively

Location-Based Authenticators

Location-Based authenticators are based around your location or location identifiers such your GPS location or your IP address.

Week 6: Access Control

Definitions

  • Controls: The countermeasures that companies implement to detect, prevent, reduce, or counteract security risks.
  • Countermeasures: Control measures are the things we put in place to help reduce the risk of security incidents happening.
  • Whitelist: Whitelisting is a cybersecurity strategy under which a user can only take actions on their computer that an administrator has explicitly allowed in advance.
  • Blacklist: Access generally permitted unless expressly forbidden.
  • Need to know principle: The principle of least privledge (or the need to know principle) is the method of restricting all but whats needed for the task (or needed to know to complete said task).
  • Separation of duties: The separation of duties method is that for any critical task that needs to be done, divide up the task into a series of steps and ensure that no single entity is authorised to complete all steps needed.
  • Subjects: Entities requesting access to a resource.
  • Objects: Resources or entities which contain information.
  • Resource owners: The owners of the resources.
  • Discretionary access control (DAC): Access rights to an object or resource are granted at the discretion of the owner.
  • Mandatory access control (MAC): A central authority assigns attributes to objects and to subjects
  • Role-based access control (RBAC): Access rights based on the role of the subject, rather than the subject’s individual identity.

Control Measures

Control measures are the things we put in place to help reduce the risk of security incidents happening. These control measures can be categorised based on the approach taken, the McCumber model uses 3 categories:
  • Technology: Hardware and software applied to protect assets
  • Policy and Practices: Policies, procedures and guidlines defining how people can use information systems and assets
  • Education, Training and Awareness: So human users interacting with information assets understand the security implications of their actions, know what they need to do, and are trained appropriately

Control measures can also be categorised on how they can be implemented:

  • Preventive Controls: Aim to prevent the incident from happening in the first place
  • Detective Controls: Monitor to receive warning of attempts to exploit vulnerabilities, indicators of incident in progress or has occurred
  • Corrective Controls: Aim to correct errors or irregularities that have been detected, repair damage

Access Control

Access control is the controlling or restricting of information depending on who is trying to use or access it. This is put in place to make sure all unauthorised users can't access the information they don't need and to allow users who need certain information can access it. When considering access control it's important to consider what information do I have, who should have access to this data, how will access control decisions be made, and how will an access control policy be implemented. When dealing with who should have access it's important to remember that authorised users should have access to the resources necessary for their task but should not be able to perform any other actions while unauthorised users shouldn't have access at all.



Blacklist: Access generally permitted unless expressly forbidden

  • If your name is on the list, you will be denied access
  • These are the sites that you are not permitted to visit
  • This software must not be installed

Whitelist: Access generally forbidden unless expressly permitted
  • If your name is on the list, you will be granted access
  • These are the only sites that you are permitted to visit
  • These are the only applications that you are permitted to install

Principle of least privledge (need to know principle)

The principle of least privledge (or the need to know principle) is the method of restricting all but whats needed for the task (or needed to know to complete said task). The person is given access to the least amount of information they need to know to perform their role or task.

Separation of Duties

The separation of duties method is that for any critical task that needs to be done, divide up the task into a series of steps and ensure that no single entity is authorised to complete all steps needed. This minimises the amount of error in a system as there is more entities required to complete the job and no insider can abuse the system to gain information.

Access Control Decisions

Access control decisions are made through 3 major approaches:
  • Discretionary access control: Decision at the discretion of some individual, possibly the information asset owner
  • Mandatory access control: System wide set of rules applied
  • Role-based access control: Access permissions based on the role of the individual, rather than the individual identity

Implementing Access Control

When implementing an access control policy it's important that control mechanisms are in place to enforce the policy. To do this users will need user accounts which can then be assigned certain privileges for resources, this also helps keep users accountable for any actions they take. There are generally 2 phases of access control:
  1. Policy definition phase where privilege is allocated and administered
    1. Authorise subject by defining the AC policy
    2. Distribute access credentials/token to subject
    3. Change/revoke authorisation whenever necessary
  2. Policy enforcement (grant access) phase where privilege is required to gain access
    1. Authenticate subject
    2. Grant access as authorised by policy
    3. Monitor access

Administration of Privileges

  • How are users informed of their access privileges: Which assets does the user have access to and are there any conditions on use of privileges
  • Is the handover of privileges secure: Are identities check through ID badges or passwords
  • How are details of users and privileges recorded: Are the records secure from modification and can you easily identify privileges associated with a user or recourse
  • How will he privileges be revoked when needed: is there an expiry time or a procedure for automatic revocation under certain conditions

Policy Enforcement

Before we give access to a user or resource it's important to check that the user is actually authorised for the requested access. This can be done through a 3 step plan:
  • Identification: Who are you? (provide user ID)
  • Authentication: Is it really you? (provide credentials)
  • Authorization: Are you allowed to access this resource and in what mode (read/write)? (check system records)

Monitoring Access

Monitoring access is important for detecting unauthorised activities, providing evidence of security incidents and providing a model of normal system behaviour.

Week 7: Privacy and Identity Theft

Definitions

  • Privacy: The interest that individuals have in sustaining 'personal space', free from interference by other people and organisations.
  • Information Privacy: The relationship between the collection and dissemination of data, technology, the public expectation of privacy, and the legal and political issues surrounding them.
  • Personal information: Information or an opinion (including information or an opinion forming part of a database), whether true or not, and whether recorded in a material form or not, about an individual whose identity is apparent, or can reasonably be ascertained, from the information or opinion.
  • Sensitive information: Sensitive information is defined in the Privacy Act to mean information or an opinion about an individual’s: racial or ethnic origin; political opinions; membership of a political association;religious beliefs or affiliations; philosophical beliefs; membership of a professional or trade association; membership of a trade union; sexual preferences or practices; or criminal record.
  • Cookies: Small text files used to store personal info or unique identifying fields.
  • Web bugs: Used to keep track of which users view web pages or read email messages.
  • Identity theft: A crime where one person uses another person’s key personal information to fraudulently impersonate them.

Privacy

Roger Clarke defines privacy as "the interest that individuals have in sustaining 'personal space', free from interference by other people and organisations".

However, the definition of privacy greatly depends on the context its presented in:

  • Privacy of the person:
    • Physical or bodily privacy: about the integrity of the body and consent to physical procedures
  • Privacy of personal behaviour:
    • Including political, religious and sexual practices and preferences
  • Privacy of personal communications:
    • Being able to communicate with other individuals without routine monitoring by others
  • Privacy of personal data:
    • Control over personal data and how it will be used, even when it is held by another organisation
  • privacy of personal experience:
    • Experience monitored and analysed: reading, viewing, interactions

Privacy Focuses

When it comes to information security we generally consider privacy of - Personal Communications: - Are your communications monitored by other people or organisations? - Personal Data: - Are your personal details available to others? - Personal Experience: - Are details of your personal experiences available to others?

Protecting Privacy

In Australia the specific privacy legislations are:
  • At the federal level:
    • Commonwealth Privacy Act 1988 & subsequent amendments
      • Deals with privacy of personal information
      • Regulates how your personal information can be collected, used, and disclosed, and how it should be maintained
    • Privacy Amendment (Private Sector) Act 2000
      • Extended coverage of the Privacy Act to parts of the private sector
      • Had to comply with 10 National Privacy Principles
      • Not all businesses had to comply, some had exemptions (i.e. small businesses worth a turnover of < $3000000 per annum, etc)
    • Privacy Amendment (Enhancing Privacy Protection) Act 2012
      • A single set of principles that applied to:
        • Australian federal government agencies
        • ACT and Norfolk Island government agencies
        • Private-sector businesses with annual turnover > $3000000
        • All private sector health service providers
      • 13 Australian Privacy Principles, grouped into five parts:
        1. Consideration of personal information privacy
          • APP1 - Open and transparent management of personal information
          • APP2 - Anonymity and pseudonymity
        2. Collection of personal information
          • APP3 - Collection of solicited personal information
          • APP4 - Dealing with unsolicited personal information
          • APP5 - Notification of collection of personal information
        3. Dealing with personal information
          • APP6 - Use or disclosure of personal information
          • APP7 - Direct marketing
          • APP8 - Cross-border disclosure of personal information
          • APP9 - Adoption, use or disclosure of government related identifiers
        4. Integrity of personal information
          • APP10 - Quality of personal information
          • APP11 - Security of personal information
        5. Access to, and correction of, personal information
          • APP12 - Access to personal information
          • APP13 - Correction of personal information
    • Privacy Amendment (Notifiable Data Breaches) Act 2017
      • Applied to all agencies and organisations with privacy obligations under APPs
      • If a breach is likely to result in serious harm, the organisation has an obligation to notify both: Individuals whose personal information is involved and Australian Information Commissioner
  • At a state level:
    • Information Privacy Act 2009 (Qld)
      • 11 Information Privacy Principles
      • Controls the way Qld government agencies handle information

Threats to Privacy

There are many things that may be a threat to the privacy of you, your data and or organisations data. The main one being people and their actions, whether accidental or deliberate.
  • Within organsiations (insiders)
    • Employees (Information users)
    • Employers (Management)
  • External to organisations
    • May have gained access (criminals, hackers, etc)
    • Family and friends (sharing your information)
    • Governments

Threat to Privacy | Management

There are many ways we can manage these threats to privacy:
  • Make decisions/policy on
    • Personal information to collect:
      • What should be collected & what business process uses it?
      • How is information collected?
    • How that information will be treated through its lifecycle
      • How could/should it be used?
    • Who will have access to it, and how will that be managed
      • Will it be shared with third parties?
    • What happens at the end of the life stage - disposal

Surveillance

Surveillance is "the careful watching of someone, especially by an organisation such as the police or army." (Collins Dictionary) or "The systematic investigation or monitoring of the actions or communications of one or more persons" (Roger Clarke).

So what are the benefits of monitoring and surveillance? Monitoring and surveillance helps the government understand what is happening, identify issues and resolve them efficiently.

  • Example: Smart City
    • Make use of CCTV, IoT, sensors to monitor temperature, air quality, water, traffic flow
    • Improved physical safety in public areas
    • Direct law enforcement/emergencies services to incidents
    • Efficient use of resources - manage traffic flows, divert from accidents and bottlenecks
    • Improve environmental conditions - use climate control
    • Connected neighbourhoods
  • Example: Network Monitoring
    • Know when components are functioning or failing
    • Identify traffic flow issues
    • Detect abnormal behaviour

Surveillance and Privacy

So who has access to these surveillance means and who decides whether the data is kept or not? The government may monitor personal data, location information and communications 'in the national interest' however there are still laws that need to be followed. For example, in Australia the general monitoring of calls is not permitted unless law enforcement have a warrant.

Technology and its Aid in Data Gathering

Using technology there are many ways to collect and process large amounts of information.
  • Phone Calls: number dialed, location data, time and duration of calls
  • Internet Access: URLs visited, time spent, site visited previously
  • Social Media: Contents of posts, facial recognition for image data, network of friends/contacts, frequency of messaging
  • Email: Sent, recipient, contents of email
  • Keystroke Logging: Hardware and software keystroke loggers

Identity Theft

identity theft is a crime where one person uses another person's key personal information to fraudulently impersonate them. There are many ways information can be stolen to steal someone's identity:
  • Dumpster Diving: Digging through rubbish bin contents to try find hardcopy items that reveal personal information (credit card receipts, pre-approved credit forms, paperwork from another organisation, etc)
  • Raiding Letterboxes: Mail may include unique identifiers such as Tax File Numbers
  • Social Engineering: Phone calls, email messages, phishing scams, romance scams, fake jobs, fake lottery wins, etc
  • Obtaining credit reports on victims

A persons information can also be stolen online through data leaks, using malware to compromise a user's PC or personal web pages and social networking sites.


Week 8: Symmetric cryptography

Definitions

  • Cryptography: The study of methods for ‘secret’ writing. Transforming messages into an unintelligible form, and recovering them
  • Cryptanalysis: Analysis of cryptographic systems, inputs and outputs. To derive confidential information, usually without using the secret knowledge
  • Plaintext: The original message or data, sometimes called cleartext
  • Ciphertext: Encrypted plaintext, transformed so message is now ‘hidden’
  • Encryption: Transforming plaintext into another form so the meaning is not obvious, using an algorithm and some secret knowledge
  • Decryption: Transforming ciphertext back to original plaintext, using the algorithm and key
  • Cryptographic key: A string of characters used within an encryption algorithm for altering data so that it appears random
  • Encoding: Transforming data from one form to another using an encoding algorithm
  • Steganography: Hiding information within a document or image, so that the presence of the message is not detected
  • Symmetric cipher: A cipher that uses the same key for encryption and decryption
  • Stream cipher: A cipher that uses an encryption algorithm that processes an individual bit, byte, or character of plaintext at a time
  • Block cipher: A cipher that uses an encryption algorithm that processes one block (64-bits or 128-bits) at a time

Cryptology

Cryptology is a field of study which focuses on the methods of 'secret' writing and the analysis of cryptographic systems. Cryptology generally covers 2 major fields of study: Cryptography and Cryptanalysis.

Cryptography is the study of methods for 'secret' writing; transforming messages into an unintelligible form and recovering them. Cryptanalysis on the other hand is the analysis of cryptographic systems, inputs and outputs to derive confidential information, usually without using the secret knowledge.


Cryptographic Terminology

  • Plaintext (P): The original message or data, sometimes called cleartext
  • Encryption (E): Transforming plaintext into another form so the meaning is not obvious, using an algorithm and some secret knowledge
  • Cryptographic Key (K): A string of characters used within an encryption algorithm for altering data so that it appears random
  • Ciphertext (C): Encrypted plaintext, transformed so the message is now 'hidden'
  • Decryption (D): Transforming ciphertext back to original plaintext, using the algorithm and key

Caesar Cipher

The most simple cipher that is highly insecure is the Caesar cipher. This cipher works by stepping each character forward a number of places, n, in the alphabet.

Example:

PlaintextCiphertext
how are you todaykrz duh brx wrgdb

Encoding vs Encryption

Encoding is the process of transforming data from one form to another using an encoding algorithm. Anyone who knows the corresponding decoding algorithm can decode the data. On the other hand encryption is transforming data from one form to another using an encryption algorithm and a secret key. You need to know both the corresponding decryption algorithm and the secret key to recover the data.

Steganography

It's important to know steganography is not encryption. Steganography is the process of hiding the existence of a message. This is typically hidden within a document or image so that the presence of it cannot be detected.

Steganographic techniques can include:

  • Using invisible ink
  • Microdots
  • Character arrangement and selection
  • Hiding information in pixels

Ciphers

Ciphers can be used to provide confidentiality services for information which is both in storage and being transmitted.
  • In Storage: If you can't prevent unauthorised access to data files, then encrypting the files can prevent unauthorised access to the information (that is, the attacker can't read the file contents)
  • Being Transmitted: Information sent over network communication links can be encrypted to prevent eavesdroppers gaining unauthorised access to information

Symmetric Ciphers

A symmetric cipher is a cipher that uses the same key for encryption and decryption.

Stream Ciphers

Symmetric ciphers are where the plaintext and ciphertext are viewed as streams of characters (character size may be one bit, or n-bit word). In this cipher plaintext is encrypted one character at a time, by combining with a keystream. Ciphertext is decrypted one character at a time, by combining with the same keystream used for encryption. The most common type of this cipher is a binary additive stream cipher where the plaintext, keystream and ciphertext are all streams of bits combined using an XOR operation.

One-time Pad

A one-time pad is the only cipher to provably provide 'perfect secrecy'. The binary additive version of the OTP is know as the Vernam OTP. In this cipher the plaintext and key is a stream of bits however the keystream must be; 1) Truly random; 2) Same length as message; and 3) Used only once. With an OTP the keys used can never be reused or repeated, each message you encrypt must require a new truly random key. The plaintext is first encoded into a form of bitstream then encrypted using the key. The unfortunate problem the OTP falls into is the fact that because we need a truly random key every time that cant be reused we somehow need a way of securely transferring this key to the receiver.

One-time Pad encryption example

Plaintext Message: "this message is highly secret" Current Character
Plaintext
01110100t
Key01010001
Ciphertext00100101%
Plaintext
01101000h
Key00001010
Ciphertext01100010b

Stream Ciphers 2

The most practical stream ciphers use binary addition and attempt to imitate the one-time pad without the need of a truly random binary sequence. They do this by using a keystream generator which inputs a short binary secret key (and usually some additional public information, called an initialisation vector) and generate an output which is a longer pseudorandom binary sequence, this is the keystream. A major issue most binary additive stream ciphers suffer from is the need of synchronization. The keystream used to decrypt must be synchronized with the keystream used to encrypt. If the ciphertext is modified then depending on the type of modification errors will proceed:
  • If there is a bitflip error (0 to 1 or vice versa) only that bit will be decrypted incorrectly
  • If a ciphertext bit is inserted or deleted this causes a loss of synchronization, and the message cant be recovered from the insertion/deletion point onward

Stream Cipher Applications

Stream ciphers are fast and therefor can be used in real-time applications where delays may be unacceptable. Examples of these could be communications, mobile telephony or video streaming.

Block Ciphers

Block ciphers, like the name describes, takes the plaintext and encrypts it one bock at a time. Block size is usually larger than a single character, common block sizes being 64-bits or 128-bits. In the basic block cipher mode of operation (called ECB mode {Electronic Code Book mode}) both plaintext block and the key are inputs to the encryption algorithm and the output of the encryption algorithm is one block of ciphertext. Block ciphers can be used in different modes to provide different security services:
  • Electronic Code Book (ECB)
  • Cipher Block Chaining (CBC)
  • Output Feedback (OFB)
  • Cipher Feedback (CFB)
  • Galois Counter Mode (GCM)
  • And more...

Block Ciphers - Data Encryption Standard (DES)

The data encryption standard is a standard published in 1977 by the US National Bureau of Standards as FIPS publication 46 and is a US standard but has become a global standard since. In the standard, plaintext and ciphertext are 64 bit blocks while the key size consists of 56 bits however this key size is small enough that DES is considered insecure (even though it's still widely used). Triple-DES (3DES) was created as a way to provide extended life to DES as it provides the DES cipher algorithm 3 times to each data block.

Block Ciphers - Advanced Encryption Standard (AES)

In 1977 the US National Institute of Standard and Technology (NIST) made a call for submissions in an attempt to establish a standard block cipher more secure than DES. Rijndael, a cipher developed by 2 Belgian cryptographers J. Daemen and V. Rijmen, was selected and published as FIPS publication 197, in 2002. In the Rijndael cipher plaintext and ciphertext are 128-bit blocks with a variable key size of 128, 192 or 256-bit keys allowed.

Electronic Code Book (ECB)

ECB is the simplest mode of operation and acts by dividing the plaintext data into blocks P1, P2, ..., Pn (last block is padded as required). Each block is processed separately where the plaintext block and key are used as inputs to the encryption algorithm. If the ciphertext is modified then depending on the type of modification errors will proceed:
  • If there is a bitflip error (0 to 1 or vice versa) only that bit will be decrypted incorrectly
  • Insertion or deletion of a single ciphertext bit (or even a character) will be detected because of the incorrect ciphertext length
  • Insertion or deletion of an entire block or multiple blocks - ECB can't detect
  • Re-ordering of ciphertext blocks results in corresponding re-ordering of plaintext blocks

Another problem ECB mode suffers from is that for a given key, the same plaintext block always encrypts to the same ciphertext block meaning it doesn't hide repetitive, some information leakage occurs and or attackers may construct a code book of known plaintext/ciphertext blocks and use to insert, delete, reorder or replay blocks within the message.


Cipher Block Chaining (CBC)

In CBC plaintext data is divided into blocks P1, P2, ..., Pn (last block is padded as required). The encryption algorithm then takes three inputs: the key, the plaintext block, and the previous ciphertext block. For the first plaintext block, an initialisation vector is used to ensure that two encryptions of the same plaintext will result in different ciphertext. If the ciphertext is modified then depending on the type of modification errors will proceed:
  • If there is a bitflip error (0 to 1 or vice versa) that block and one bit in the following block will decrypt incorrectly
  • If a ciphertext bit (or even a character) is inserted or deleted this will still be detected because of the incorrect ciphertext length
  • Inserting or deleting a block will cause an incorrect decryption

Block Cipher Applications

Block ciphers are often used for providing confidentiality services for applications involving processing large volumes of data where time delays aren't critical such as computer files, databases or email messages.

Hash Functions

Hash functions are a way we can check for message integrity when dealing with encryption. Hash functions have 4 basic properties:
  1. Fixed length output H(M) for arbitrary length input M
  2. H(M) is one-way: Given M, it is easy to compute H(M), but given H(M) it is infeasible to compute M
  3. H(M) is collision-resistant: Hard to find two messages M and M' so that H(M) = H(M')
  4. If you make a small change in M, it produces a major change in H(M)

Hash Function Application

Hash function can be used as a manipulation detection code (MDC) for message integrity assurance:
  1. Alice and Bob agree on a hash function H() to use
  2. Alice (message sender):
    1. Generates her message M
    2. Calculates H(M)
    3. Sends both M and H(M) to Bob
  3. Bob (message receiver)
    1. Receives M' and H(M)
    2. Uses M' as an input to H() and calculates H(M')
    3. Compares H(M) and H(M')
      • If H(M) != H(M') then Bob knows the message M' is not what Alice sent: it has been altered
      • If H(M) == H(M') then Bob assumes the message M' is the message Alice sent: assumes unaltered

Hash Function Problems

Hash functions are very good for detecting accidental modifications to the data sent however its not useful for checking the integrity of data against active attackers. Suppose in transmission from Alice to Bob a malicious MITM:
  1. Intercepts the message {M, H(M)} sent by Alice
  2. Changes M to M'
  3. Recalculates the has H(M')
  4. Then sends {M', H(M')} to Bob

Now when Bob receives the message and compares the hash he will be non the wiser that anyone has intercepted the message.


Keyed Hash Functions

Keyed hash functions, also called cryptographic checksums or message authentication codes (MAC), are a solution to the problem of integrity assurance in the case of attackers. A keyed hash function HK(M) takes in two inputs, 1) the message (M) and 2) a cryptographic key (K). The secret key protects against unauthorized modification of the hash value as calculating HK(M) requires knowledge of the secret key.

CBC for Integrity

A block cipher in CBC mode can be used to provide integrity assurance rather than confidentiality. For a given message or data file the file is encrypted using the block cipher in CBC mode. The last ciphertext block is then used as a Message Authentication Code (MAC) value. Finally both the message and the MAC are sent to the receiver. This is referred to as CBC-MAC and is described in ISO/IEC 9797-1:1999. This method is considered secure for messages of a pre-selected fixed length.

Symmetric Ciphers and Security

Symmetric ciphers can be used to provide confidentiality for messages and integrity assurance. Authenticated Encryption (AE) algorithms provide both confidentiality and integrity assurance simultaneously while Authenticated encryption with Associated Data (AEAD) provides confidentiality for some parts of the message and integrity assurance for the whole message. We would use AEAD if we didn't need confidentiality for the message headers but still wanted integrity assurance. Security services provided by ciphers depend ont he security of the key. The security of the symmetric key involves:
  • Confidentially: The key must only be available to those authorised to use it
  • Integrity: If a key is altered, the altered key will not decrypt ciphertext formed using the original key. If an attacker alters the key (replaces it with a key they know) potentially they have unathorised access to all the information that is encrypted with the new key
  • Availability: If an attacker destroys a stored key, all information currently encrypted with that key will be unavailable

If we use symmetric ciphers to provide security services for information, then we must also provide security services for the symmetric keys used with the ciphers (effectively replacing one security problem with another). Cryptographic techniques can be used to provide security for cryptographic keys such as storing keys in a file which we encrypt to provide confidentiality (this forms a hierarchy of keys: Master keys, Session keys, etc). Another technique we can do is store hash values or MACs of secret key files and use those to detect modifications to the key files.


Cryptography in the standards

Clause 10 of AS27002:2015 deals with cryptography. Objective of Clause 10.1 Cryptographic controls is "To ensure proper and effective use of cryptography to protect the confidentiality, authenticity or integrity of information"

Week 9: Asymmetric Cryptography

Definitions

  • Secure channel: "Secure channels guarantee both the authenticity and confidentiality of information" - Olvid
  • Insecure channel: "Unsecure channels do not guarantee anything: neither authenticity nor confidentiality" - Olvid
  • Symmetric cipher key establishment problem: How can people establish a shared secret key securely, if the communication channel they are using is not secure?
  • Pre-distribution: Distribute the shared secret key ‘out-of-band’ (i.e. Not over the insecure communication channel, but over a different and secure channel)
  • Trusted third party: Have one trusted party where everyone holds shared secret keys to communicate with that trusted party. If you want to communicate securely with someone else you ask the trusted third party (TTP) to send you a key
  • Modular exponentiation:
  • Asymmetric cryptography: "Asymmetric cryptography, otherwise known as public-key cryptography, is when two keys – private and public ones – are used to encrypt and decrypt data" - NordVPN
  • Key pair: A blanket term for both a public and private key
  • Public key: A public encryption key
  • Private key: A private encryption key
  • Digital signature: "A cryptographic value that is calculated from the data and a secret key known only by the signer. A digital signature is a technique that binds a person/entity to the digital data." - TutorialsPoint
  • Non-repudiation: "Non-repudiation is the assurance that someone cannot deny the validity of something. In other words, non-repudiation makes it very difficult to successfully deny who/where a message came from as well as the authenticity and integrity of that message." - Cryptomathic

Symmetric Ciphers for Confidentiality

For Alice to send a confidential message to Bob, Alice needs to:
  1. Have already set up a shared secret key k with Bob
  2. Encrypt the plaintext message P using k and the symmetric cipher
  3. Send the resulting ciphertext C = E(P, k) to Bob

For Bob to recover the message:

  1. He must use the same shared secret key k that Alice used to encrypt
  2. He must decrypt the ciphertext C using k and the corresponding decryption algorithm to recover the plaintext P = D(C, k)

The Key Establishment Problem

How can two individuals who wish to communicate through ciphers communicate the secret key securely over an insecure channel, this issue here is know as the key establishment problem. There are a few ways we can solve this problem:

Option 1 - Secure pre-distribution

Secure pre-distribution of the secret key is the first option for sharing a secret key. This method attempts to distribute the secret key through means that don't involve insecure communication channels (i.e. through physical distribution via a trusted courier). This may get tricky and impractical when we realise that keys exponentially increase as more users are needed:
  • 2 people, only 1 secret key is needed
  • 3 people, and each participant may possibly communicate securely with every other participant, 3 secrete keys are needed
  • 4 people, 6 secrete keys are needed
  • n people, n(n-1)/2 secrete keys are needed

Option 2 - Trusted Third Party

Another solution to the problem is to have a single trusted party. Everyone holds shared secret keys to communicate with that trusted party and if you want to communicate securely with someone else:
  • You ask the trusted third party (TTP) to send you a key (encrypted using the secret key you share with the third party)
  • Then you decrypt the TTP message to obtain that new key (the other person you want to communicate with needs it too)
  • Now you can use this key in communications with the other party

Option 3 - Diffie-Hellman Key Agreement Algorithm

In 1967 Whitfield Diffie & Martin Hellman published a radical method for forming symmetric crypto keys using certain mathematical methods like modular exponentiation, with careful parameter choices. This allows two parties without prior agreement and without a secure distribution channel to share a secret key only they know. To do this, each party:
  1. Chooses their own secret value
  2. Sends the other a mathematical function of their chosen value
  3. Combines their own value with the received information to form the shared secret value

Diffie-Hellman Example

  • Setup:
    • Alice and Bob agree on using p = 71 and g = 7
  • Protocol:
    • Alice selects a random integer, say a = 5, and sends 75 mod 71 = 51 to Bob
    • Bob selects a random integer, say b = 12, and sends 712 mod 71 = 4 to Alice
    • Alice computes 45 mod 71 = 30 as the secret key
    • Bob computes 5112 mod 71 = 30 as the secret key

Diffie-Hellman Key Agreement Algorithm

What stops an eavesdropper from calculating the secret key? For this small example (g = 7 and p = 71), an attacker who captures 51 and 4 can construct a small table of values to find the values for a and b. The problem is that to find a given ga mod p using large numbers is too computationally difficult, is known as the discrete log problem. Although this method of sharing is extremely secure it still can fail from 1 problem, no authentication is needed for the communication parties. This means whilst they communicate to establish the key, Alice and Bob have no assurance about who they are communicating with.

Asymmetric Ciphers

While symmetric ciphers use 1 key to encrypt and decrypt, asymmetric ciphers have 2 separate keys for encrypting and decrypting. While the keys are related it is computationally infeasible to derive one key from the other. Each participant needs a pair of keys, one key kept private and the other made public. The security of an asymmetric cryptosystem depends on 1) The strength of the algorithm, 2) The key size, and 3) The confidentiality of the user’s private key. It's important to remember that anyone is allowed to know the public key while only the owner may know the associated private key.

So how would we go about finding out someones public key? They could either directly give it to you or could put it up to access through some other means (like a website or through a public keyserver).


Asymmetric Ciphers for Confidentiality

For Alice to send a confidential message to Bob, Alice needs to
  1. Know Bob’s public key
  2. Encrypt the plaintext message P using the asymmetric encryption algorithm and Bob’s public key KB_pub
  3. Send the resulting ciphertext to Bob

For Bob to recover the message

  1. Bob uses his private key KB_priv and the asymmetric decryption algorithm to decrypt the ciphertext

Notation:

  • Encryption: C = E(P, KR_pub)
  • Decryption: P = D(C, KR_priv)
  • Public key of the recipient KR_pub used for encryption
  • Private key of the recipient KR_priv used for decryption

Hybrid Systems

Asymmetric ciphers can be slow and are not practical, time wise, to be used on larger applications. We can deal with this limitation by using hybrid systems which use a combination of symmetric and asymmetric encryption. The asymmetric cipher is used to provide confidentiality for a particular short message while the symmetric cipher is used with that shared secret key for encrypting the bulk data.

Asymmetric Ciphers for Authentication

Using asymmetric cryptography we gain access to certain functionality we simply don't get with symmetric cryptography. A private key can be used by the owner to form a digital signature for a particular message or file while the corresponding public key can be used by others to verify the digital signature on the message. This process provides authentication of the sender for a particular message since only the signer knows the private key, only the signer could have created the digital signature.

Digital Signatures

The most widely used digital signature schemes are:
  • RSA: Exploits symmetry in RSA encryption/decryption algorithms; Relies on the difficulty factoring large numbers
  • DSA (Digital Signature Algorithm): Also referred to as DSS (Digital Signature Standard); Relies on the difficulty of solving the discrete log problem
  • ECDSA (Elliptic Curve DSA)

It's important to note that RSA, DSA and ECDSA are currently the only FIPS-approved methods for digital signatures.


Digital Signatures and Hash Functions

Modular exponentiation (exponentiation performed over a modulus) takes time to compute so for efficiency, signature schemes typically use a hash function to reduce amount of material processed using asymmetric cryptography. To create a signature for message m we first compute the hash of m, and then proceed with the other steps of the signing method. However, with this method we sign the hash value, rather than the message. Any change in message m should result in a different hash value, so digital signatures provide some assurance of message integrity.

Valid digital signatures provide:

  • Authentication of message sender
  • Some assurance of message integrity
  • Non-repudiation

Week 10: No-Scheduled Classes


Week 11: Public keys, trust and PKI

Definitions

  • Asymmetric key pair: A key pair consisting of 1 public and 1 private per person
  • Public key fingerprint: "A short sequence of bytes used to identify a longer public key" - Wikipedia
  • Public key spoofing problem:
  • Public key trust model: "A trust Model is collection of rules that informs application on how to decide the legitimacy of a Digital Certificate" - Ezinearticles
  • User centric trust mode: Public keys are made available by users and each user collects public keys for other users
  • Public key ring:
  • Trusted Authority model: Have trusted authorities perform checks and issue certificates endorsing the public keys of entities
  • Digital certificate: A (verifiable) certificate of authority containing the user’s public key, the user’s ID and more
  • Certificate Authority: A Certificate Authority (CA) creates and digitally signs the certificate

Public Keys and their Issues

One of the issues that comes along with public keys are their integrity, how can you be sure that a public key has not been altered. The trustworthiness of public keys are also an issue as its difficult to be sure the key actually belongs to the entity that you think it does. It's hard to check bit by bit as some RSA keys contain up to 4096 bits.

The Trustworthiness of Public Keys

How do we know if the public key listed in the key register actually belongs to the entity claimed? How do we know an attacker hasn't changed the public key displayed to their own? This is known as the spoofing problem. So the question then becomes, how can public keys be made available in a trusted way? One method to this could be finding someone to vouch for the public key information provided such as people who know the entity or a trusted authority. There are also different trust models based on these two different approaches.

Public Key Trust Models - User-centric Model

In the user-centric model public keys are made available by users which can be distributed by key servers and values verified by fingerprints. Each user collects public keys for other users, keeping them on their 'key ring' (a set of keys, whether public or private) allowing them to sign public keys that they trust.

Advantages:

  • Simple and free
  • Works well for a small number of users
  • Does not require expensive infrastructure to operate
  • User-driven operation

Disadvantages

  • Relies on human judgment on trust decisions
  • Not appropriate for trust-sensitive areas (such as finance and government)

Public Key Trust Models - Trusted Authority Model

In the trusted authority model trusted authorities perform checks on the entity claiming ownership and issue certificates (digital signatures) endorsing the public keys of entities. A certificate authority (CA) creates and digitally signs the certificate, the digital certificate contains 1) The users public key 2) The users ID 3) and extra information such as the validity period.

Digital Certificates

A digital certificate is a digital signature providing confidence that the public key belongs to who it says it is. A Certification Authority (CA) provides checks on public keys and creates and issues digital certificates to other parties. The level of trust you can place in a certificate depends on the amount of checking a CA does to establish the credentials of requester before providing a certificate. Not all digital certificates are trustworthy as it's possible to create self-signed certificates and there are many known cases of spoofing digital certificates. It's advised that, before trusting a certificate, checks on certificate revocation lists (CRL) or online certificate status protocol (OCSP) are done.
  • Most widely used format: X.509 standard
  • Recommended by International Telecommunication Union (ITU-T)
  • Important fields in X.509 digital certificates:
    • Version number
    • Serial Number (set by the CA)
    • Signature Algorithm identifier (Algorithm used for dig sigs)
    • Issuer (Name of the CA)
    • Subject (Name of entity to which certificate has been issued)
    • Public Key Information
    • Validity period (certificate should not be used outside this time)
    • Digital signature (of the certificate, signed by the CA)

So how would Alice obtain a digital certificate for her public key?

  1. Alice generates a key pair
  2. Alice keeps the private key secret and sends to the CA:
    • her identity details, IDA
    • her public key, KA_pub
    • any other information required by the CA
  3. The CA then
    • performs any required checks to verify Alice’s identity
    • creates and signs a certificate containing IDA and KA_pub
    • sends the certificate, CertA, to Alice

Public Key Infrastructure (PKI)

Public key cryptography needs a PKI to provide security services. A PKI is a set of policies (to define the rules for managing certificates), products (to implement policies and generate, store and manage certificates) and procedures (related to key management) that enable users to implement public key cryptography distributed settings. Trust relationships between different Certificate Authorities and between Certificate Authorities and end users define PKI trust models. Common PKI trust models are Hierarchical (strict hierarchical or distributed trust architectures) or browser.

Public Key Infrastructure - Strict Hierarchical Model

  • Tree structure
    • Single root CA
    • Users are leaves of the tree
    • Each node is certified by its immediate parent CA
  • Highly regulated
    • Each CA must follow rules regarding to whom they may issue certificates
  • Root CA
    • Starting point for trust
    • All users trust the root CA, and must receive its public key through a secure out-of-band channel

Advantages:

  • Works well in highly-structured setting such as military and government
  • Unique certification path between two entities (so finding certification paths is simple)
  • Scales well to larger systems

Disadvantages

  • Need a trusted third party (root CA)
  • single point-of-failure’target
  • If any node is compromised, trust impact on all entities stemming from that node
  • Does not work well for global implementation (who is root TTP?)

Public Key Infrastructure - Distributes Trust Hierarchical Architectures

  • Interconnection of multiple hierarchies
  • No single root CA, multiple cross-certified root CAs
  • Trust is distributed among the root CAs

Public Key Trust Models - Browser Model

In the browser model some CA certificates are pre-installed in the browser by the browser vendors and these are used as trusted 'root' CA certificates to verify incoming certificates. In this model the browser user is trusting the browser vendor who pre-installed certificates rather than trusting a root CA. These may also include a list of 'untrusted' certificates (know fraudulent or compromised certificates). A big limitation with this model is that because incoming certificates can only be verified by tracing a path back to available 'trusted' certs, if no such certification path is found the browser will ask the user how they would wish to proceed. This prompts the user whether they would like to accept the unverified CA incoming to which most users accept without verifying. Other limitations of this model include:
  • Cross certification and revocation may not be supported leaving limited opportunity for expansion and limited trust options available
  • No formal legal agreement established between users and CAs meaning the liability rests with the users and not the CAs

Week 12: Network and Communications Security

Definitions

  • Communications Protocol:
  • Internet Protocol Suite:
  • Client-Server Communications Model:
  • HTTP:
  • HTTP Authentication (Basic and Digest):
  • SSH:
  • TLS:
  • IPSec:
  • Transport Mode:
  • Tunnel Mode:

Network

A network is a collection of devices connected by communications channels. This is done through hardware/software created to enable data exchange between devices. Most devices now days are created with Network Interface Cards (NIC) that allow this transmission of media however there are many other components that allow for this such as:
  • Hubs (multiple ports to plug in cables)
  • Switches (multiple ports, can direct transmission only out relevant port)
  • Routers (connect networks, can program to control how they route traffic)

Different applications operate on different ports. To enable communication between devices, addressing is needed:

  • IP address gives unique identifier for a device in a network
  • Format is hostname.subdomain.domain.topleveldomain

Network Communication Protocols

Network communication protocols are agreed methods for the communication of data over a network. These are sets of rules defining the format for messages exchanged between entities (specify data representation, authentication, error detection, etc). These are important because they permit the communications to be separated form the communication media (same format for communication, regardless of the transmission media).

Communication Protocol Stacks

Network communications are broken into multiple protocols that are arranged in a layer structure. Each layer performs a different type of activity to enable communications between devices. Two well known models are the:
  • ISO Open Systems Interconnection (OSI) Model
    • 7 layer model
  • IETF Internet Protocol Suite
    • 4 layer model
    • Commonly known as TCP/IP (Transmission Control Protocol / Internet Protocol)

ISO Open Systems Interconnection (OSI) Model

  • Application: User level data
  • Presentation: Data standardisation, blocking, compression
  • Session: Message sequencing
  • Transport: Flow control, error detection and correction
  • Network: Routing, blocking messages into uniformly sized packets
  • Data Link: Separating packets into frames, error recovery
  • Physical: Actual communication - bit transmission

IETF Internet Protocol Suite

  • Application: Prepares user messages; Each application protocol has unique message format
  • Transport: Converts messages to packets; Uses ports for different applications on same host
  • Internet: Converts packets to datagrams to send to destination; Hosts have unique IP addresses (IPv4: 32 bit, IPv6: 128 bit)
  • Link: Physical layer, associated with computer hardware; Transmission of communication as bits

Networks 2

In both Communication Protocol Stacks the transport layer prepares data to be sent as packets, these packets contain a header and body. The packet header has control information (source and destination network addresses, and sequencing information) while the packet body has the payload (binary data to be transmitted).

Client-server communications

With client-server communications the client requests resources or services while the server responds to the request, this happens at the application layer.
  • Clients identify
    • Program they want to use (by port number)
    • Machine they want to connect to (by IP address)
  • Application servers listen for messages on particular ports
  • Common ports:
    • Web servers: port 80 (HTTP), 443 (HTTPS)
    • Email servers: port 25 (SMTP), 110 (POP)
    • Remote login: port 22 (SSH), 23 (Telnet)
    • File transfer: port 20/21 (FTP), 22 (SFTP/SCP)

HTTP (Hypertext Transfer Protocol)

HTTP, or Hypertext Transfer Protocol, is an application layer protocol commonly used for data transfer between browsers and servers developed in 1990 by Tim Berners-Lee. HTTP us a request/response protocol where client (web browsers) request access to a resource (identified by a URL {Uniform Resource Locator}) while the server (computers hosting the requested web sites) respond to the request.

Requesting a Webpage

requesting a webpage diagram


Receiving a Webpage Request

receiving a webpage request diagram


HTTP Authentication

When a request for access to restricted resources is made, provision of credentials is required to enable user authentication. If an unauthorised request is made, the server responds with an error code such as "401 Unauthorised: Request requires user authentication". HTTP Authentication allows the browser to provide a username (ID) and password when making a request. However, this gives way to a serious information security problem. The client response includes a user ID and password which is base64 encoded in an authorisation header. This is essentially a plaintext transmission of the users password over the physical network. This is dangerous as it's easy for sniffers or eavesdroppers to capture this user ID and password using fake web servers that spoof real servers.

HTTP: Digest Authentication

It's because of this plaintext transmission error that the Digest Authentication scheme was created. This scheme does not transmit unprotected passwords instead using a simple challenge-response paradigm. The challenge is a nonce (randomly chosen number used only once) value sent by the server. A valid response contains an MD5 hash of values such as the username, password, the given nonce value, the HTTP method and the requested URI. This response is sent as the Request-Digest field. Although this method is much more secure than basic authentication as unprotected passwords are not sent it's still susceptible to eavesdropper attacks as an eavesdropper may be able to calculate the password using an online dictionary attacker.

HTTP server side Authentication

Both authentication schemes rely on user/client providing a password and the server 'checking' this password:
  • Basic: Server decodes (Base64) to recover password and compares to entry stored in its password database
  • Digest: Server computes a hash value and compares this to the received value. The ‘password’ file contains the hash of the username, realm and password

Transport Layer Security (TLS)

TLS is a cryptographic protocol that operates just above the transport layer using encryption & PKI. This can provide confidentiality and/or authentication for higher level network communication protocols. With TLS an encryption and authentication layer is added to the protocol stack between TCP and Application.

TLS Handshake Protocol

The TLS handshake protocol provides authentication (server-to-client) ensuring that the connection really is with the server with the given domain name (the servers digital certificate is used for this). The protocol also establishes a symmetric key to use in the record protocol for additional security services providing confidentiality and integrity. TLS uses public keys provided in digital certificates. Authentication is usually of server to client only, not mutual. This means authentication of users is not commonly performed in handshake.

TLS Record Protocol

The TLS record protocol provides message confidentiality by ensuring message contents are encrypted through transit so they cant be read. The symmetric key used to encrypt the TLS payloads is established within the handshake protocol. The record protocol also provides message integrity as MACs are used to ensure that the receiver can detect if a message is modified in transmission. The Handshake protocol establishes a shared secret key used to construct a Message Authentication Code.

HTTPS (Hypertext Transfer Protocol Secure)

In HTTPS, TLS is used to establish a secure channel. The HTTP protocol is then run over the TLS channel (port 80 is used for HTTP while port 443 is used for HTTPS). Authentication of the user to the server can now be performed by providing a username ID and a password as TLS provides encryption so the password is not sent over as plaintext.

FTP (File Transfer Protocol)

FTP is a client-server protocol used to transfer files between two networked computers. It was developed in 1971 and was an early internet standard (RFC114) but has since been updated several times. FTP works by setting up two channels: one for control commands and one for data transfer. A disadvantage to using FTp is that it, by itself. does not encrypt any data sent over the connection.

Telnet

Telnet is a simple client-server protocol used to exchange data between two networked computers using a command line interface for comms with a remote device. It was developed in 1969 and was one of the first internet standards (RFC854). A disadvantage to using Telnet is that it does not encrypt data sent over a connection. It also requires no authentication from the communicating entities.

SSH (Secure Shell)

SSH is a protocol designed for secure network communications and is generally used for remote logins and access to and file transfer to/from remote computers. Due to SSH using encryption it is far more secure than FTP (ports 20/21) and Telnet (port 23). SSH is a set of 3 protocols:
  1. SSH Transport Layer Protocol (RFC4253): Provides server authentication, data confidentiality, and data integrity assurance
  2. SSH User Authentication Protocol (RFC4252): Authenticates the user to the server
  3. SSH Connection Protocol (RFC4254): Multiplexes multiple logical communications channels over a single underlying SSH connection

Server authentication occurs during the key exchange step:

  • Server has asymmetric key pair (private key, public key)
  • Server uses server private key in certain ways to allow client to authenticate server, either
  • Explicitly
    • Key exchange messages include a signature formed with the server private key
    • Client can use server public key to verify
  • Or implicitly
    • Client uses server public key to encrypt symmetric key
    • Server proves it knows corresponding private key by recovering the shared secret key and sending a message and MAC formed using the key, that the client can verify

SSH Transport Layer Protocol - Purpose

The Transport Layer Protocol is used to:
  1. Establish the SSH version and identification information
  2. Negotiate the cryptographic algorithms to be used
    • Each entity provides list of algorithms for key exchange, encryption, MAC and data compression, in order of preference
  3. Perform key exchange (DH) for keys to use with algorithms
  4. Final message from client to server to request use of either SSH User Authentication Protocol or SSH Connection Protocol

SSH User Authentication Protocol

The SSH user authentication protocol runs over the SSH transport layer protocol. Messages exchanged are:
  1. The client sends a user authentication request message which includes username
  2. The server responds and if the username is valid the server sends list of authentication methods (either a public key or password)
  3. Client responds with authentication method selected and required information
  4. When required authentication is performed successfully the server sends a user authentication successful message

An advantage to using public keys with SSH is that each account can have multiple associated public keys meaning users could have different keys for each devices they own, if one is lost/compromised it's easy to revoke its access. Another advantage is that multiple users can login to a single account without using a shared password. Each user has their own key pair meaning we can revoke one users access independently of others. Lastly users an associate the same key with multiple accounts giving a form of single sign-on.


SSH Connection Protocol

The SSH connection protocol runs on top of the SSH transport layer protocol and assumes a secure authenticated connection (tunnel) is in use. The SSH connection protocol also multiplexes multiple logical communications channels over a single underlying SSH connection. The client and server exchange messages in three stages 1) Open a channel, 2) Perform data transfer, and then 3) Close the channel.

SSH Security Services

  • Peer Authentication
    • Ensures that network traffic is being sent from the expected party
      • Server to client authentication based on public keys
      • Client to server authentication based on passwords or public keys
  • Message Confidentiality
    • Uses encryption to protect against unauthorised disclosure
  • Message Integrity
    • Data integrity assured using message authentication code (MAC)
      • SSH can determine if data has been changed during transit
  • Message Replay Protection
    • The same data is not delivered multiple times

Internet Protocol Security (IPsec)

IPsec is a framework of open standards used for ensuring private, secure communications over Internet Protocol (IP) networks. IPsec operates at the network or internet layer and secures application and transport layer communications. IPsec uses encryption, authentication and key management algorithms to provide security architecture for both IPv4 and IPv6. A benefit of IPsec is that it operates at a network/internet layer meaning applications are not aware of its operation. If applied at a network gateway (firewall/router), strong security applies to all traffic crossing this boundary allowing internal workstations to not need to be reconfigured and allows transparency to end users . IPsec consists of three protocols:
  1. Internet Key Exchange (IKE): Negotiate, create, and manage security associations (agreeing on cryptographic algorithms, establishing cryptographic keys and sequence numbers)
  2. Encapsulating Security Payload (ESP): Encryption used to provide confidentiality, MAC for authentication, integrity and replay protection (but does not cover header fields)
  3. Authentication Header (AH): Authentication, integrity and replay protection for entire payload, and for header fields not changed by routers. However, there is no confidentiality provided

IPsec - Modes of Operation

Both ESP and AH protocols can operate in either transport or tunnel mode.
  • Transport mode
    • Operates primarily on the payload (data) of the original packet
      • Original packet header kept as header and new IPSec header (AH or ESP) inserted between original header and payload
      • Generally only used in host-to-host architectures
  • Tunnel mode
    • Original packet with header encapsulated as payload in anew packet, with new IPSec Header added
      • Typical use is gateway-to-gateway architecture

IPsec - Security Services

  • Message Confidentiality
    • Uses encryption to protect against unauthorised data disclosure
  • Message Integrity
    • Integrity of data can be assured by using a message authentication code (MAC)
      • IPsec can determine if data has been changed (intentionally or unintentionally) during transit
  • Traffic Analysis Protection
    • Provided by concealing IP datagram details (such as source and destination addresses)
    • A person monitoring network traffic cannot know which parties are communicating, how often, or how much data is being sent
  • Peer Authentication
    • IP addresses are used as host identifiers
    • Each IPsec endpoint confirms the identity of the other IPsec endpoint it wants to communicate with (ensuring that network traffic is being sent from the expected host

IPsec - Common Architectures

Endpoints for communications secured using IPsec can either be hosts or gateways to secured networks. Combinations of these form three common architectures: 1) Gateway-to-Gateway, 2) Host-to-Gateway, and 3) Host-to-Host.

IPsec - Gateway-to-Gateway

Secures network communications between two secure networks by routing network traffic through the IPsec connection and establishing a VPN connection between the two gateways. This is a much cheaper alternative to a private wide area network (WAN).

IPsec - Host-to-Gateway

Secures communications over an insecure connection between a single host and a secure network. A VPN connection is established between the host and the gateway to the secure network. However, this architecture only protects the data between the host and the gateway. Within the secure network the transmissions are not protected.

IPsec - Host-to-Host

Secures communications between two single computers. The only architecture that provides protection throughout its transit (end to end). All user systems and servers need to have VPN software installed and/or configured. In a host to host connection key establishment is often a manual process and is resource-intensive to implement and maintain in terms of user and host management.

Week 13: Review

Exam Details

  • Final Examination Weight: 40%
  • Exam Duration: 10 minute perusal | 3 hours of working time
  • Things to Bring:
    • Student ID
    • Writing Implements (blue/black pen, pencils, erasers, highlighters, etc)
    • Prepared Notes - One double sided A4 page [~! Handwritten Only !~]

Exam Structure - 2 Parts

  • Part A (Content related to L4-L10
    • Fifty multiple choice questions (50 x 1 mark = 50 marks)
    • Answer on mark sense sheet (by colouring circle in pen)
  • Part B (Content related to whole semester
    • Five questions, each 10 marks (5 x 10 marks = 50 marks)
    • Each question has multiple parts, these require short answer
      • For example, Q51 may have parts a), b), c), etc
      • Marks for each part of the question are indicated - use this as a guide to the level of detail required in your answer

Exam Prep Tips

  • Review the weekly materials: activities, lecture recordings
  • Attempt all tutorial questions
  • Reflect on weekly Kahoot results
  • Review your assessment task 1: quiz results
  • Questions on the standards (AS27001, 27002, 27005)
    • "We don't expect you to rote learn the contents of these standards. We do [however] expect you to know [the] purpose of each, relationship[s] between standards, and details discussed in class"

About