Final Exxam Readying
Final Exxam Readying
1. CIA Triad
2. Security Layers
4. Types of Attacks
• Security Testing: This is the process used to identify weaknesses in the security
of information systems, aiming to protect against threats and maintain the
confidentiality, integrity, and availability (CIA) of the information.
Methodologies
• Red Team: Acts as the offensive group, aiming to exploit vulnerabilities and
circumvent or defeat security features of a system.
• Blue Team: Defensive team, responsible for defending against the Red Team’s
attempts by detecting and responding to the attacks.
• Purple Team: Not always mentioned but involves the integration of both Red
and Blue team efforts to maximize both offensive and defensive tactics as a
unified security effort.
Pentest
Threats
Vulnerabilities
Attacks
• Attack: Any attempt to expose, alter, disable, destroy, steal, or gain unauthorized
access to or use of an asset. Attacks are the actual exploitation of vulnerabilities
by threats.
Types of Threats
• Natural threats: Events such as natural disasters that can physically damage
infrastructure.
• Intentional threats (Human): Deliberate attacks like hacking, phishing, or
insider threats.
• Unintentional threats (Human): Accidental actions by users or system operators
that compromise security.
• Hardware threats: Failures or malfunctions in hardware that lead to security
breaches or data loss.
Types of Attacks
• Viruses: Malicious software that attaches to another program and can replicate
itself to spread, requiring user interaction to spread.
• Spyware: Software that secretly gathers user information through the user's
internet connection without their knowledge, typically for advertising purposes.
• Malware and Trojans: Malware refers to various forms of harmful software,
including viruses and trojans, which are deceptive software that carry an
additional, hidden harmful function.
• Ransomware: Malicious software that encrypts the user's data and demands
payment in return for the decryption key.
• Worms: Similar to viruses, but are self-replicating and do not require user
interaction to spread.
Password Security
Lecture 4: Cryptography
Cryptography Basics
• Cryptology: The broader field that encompasses both the creation and breaking
of cryptographic techniques.
• Steganography: The art of hiding information within other non-secret text or
data to prevent detection.
• Cryptography: The science of creating techniques to secure communication in
the presence of adversaries. This includes techniques for ensuring the privacy and
integrity of information.
• Cryptanalysis: The science of breaking encrypted texts, recovering encrypted
data without the key, or finding weaknesses in cryptographic algorithms.
• Plaintext: Original readable message or data that is fed into the encryption
algorithm.
• Encryption: The process of converting plaintext into ciphertext using a key to
make it unreadable to unauthorized users.
• Ciphertext: The scrambled and unreadable output of encryption, which can only
be understood if decrypted.
• Decryption: The process of converting ciphertext back to plaintext using a key.
Types of Ciphers
Caesar Cipher
• An early form of substitution cipher where each letter in the plaintext is shifted a
certain number of places down or up the alphabet.
Cryptography Terms
• Encoding: The act of changing a message into another format, through methods
like ASCII, Unicode, or Base64.
• Encryption vs. Encoding: While both processes transform data, encryption is
designed for securing data which encoding is not. Encryption requires a key to
decrypt, whereas encoding is reversible by design.
Encryption Algorithms
• Symmetric Encryption Algorithms: Use a single key for both encryption and
decryption. Examples include AES and DES.
• Asymmetric Encryption Algorithms: Use a pair of keys (public and private)
where one key encrypts and the other decrypts. Examples include RSA and ECC.
Hashing
• Cyber Reconnaissance (Recon): The initial phase in any cyber attack where the
attacker gathers information about the target to identify weak points and
potential entryways into systems.
• Monitoring WHOIS and DNS: Keeping track of changes in DNS and WHOIS
entries can alert organizations to potential unauthorized changes or interest from
threat actors.
• Utilizing Reconnaissance Tools for Defense: Tools like NMAP and Shodan can
also be used defensively to audit external visibility and discover what an attacker
might see when they look at the network.
• Educating on Social Engineering: Training employees on the risks of social
engineering and active reconnaissance tactics can reduce the risk of information
leakage that could be used in an attack.
2. WHOIS Lookup
4. Shodan.io
• A search engine that lets users find specific types of connected devices
(servers, routers, etc.) accessible over the internet.
• Used for identifying devices and services that are publicly visible on a
network.
5. DNSDumpster
Active reconnaissance involves interacting with the target system directly to gather
information. This method is riskier as it might alert the target about the reconnaissance
activity.
1. NMAP
2. Netcraft
3. Wappalyzer
4. Social Engineering
Authentication
Authorization
Authentication Factors
Types of Authentication
AAA Concept
• AAA (Authentication, Authorization, and Accounting): A framework for
intelligently controlling access to computer resources, enforcing policies, auditing
usage, and providing the information necessary to bill for services.
• Discretionary Access Control (DAC): Allows the resource owner to decide who
can access specific resources. Example: A file owner decides who can access the
file.
• Mandatory Access Control (MAC): Controls are enforced by a central authority
based on multiple levels of security. Often used in government and military
environments.
• Role-Based Access Control (RBAC): Access decisions are based on the roles
that individual users have as part of an organization.
• Rule-Based Access Control (RBAC): Access is allowed or denied to resources
based on a set of rules defined by the system administrator.
Common Vulnerabilities
Security Mechanisms
Advanced Considerations
• Session Management: Ensuring that session IDs are secure and not easily
guessable. Proper handling of session expiration and user logouts to prevent
session hijacking.
• Authorization Bypass: Protecting against flaws like Broken Access Control,
where attackers manipulate the system to access unauthorized functionality or
data.
What is an Incident?
Handling an Incident
• IR Tasks:
• Develop IR policies and procedures.
• Conduct regular risk analysis and vulnerability assessments.
• Monitor for and report suspicious events.
• Provide IR training and security exercises.
• Run analysis/forensics and coordinate response efforts.
IR Lifecycle
• Incident Response Plan: A detailed plan that outlines the processes for
managing a cyber incident.
• Communication Plan: How the organization will communicate internally and
externally during an incident.
• Roles and Responsibilities: Clearly defined roles for the incident response team
and other stakeholders.
• Training and Awareness: Ongoing education and exercises to prepare staff for
potential incidents.
• Policy and Procedure Development: Establishing guidelines that dictate how
incidents should be handled.
• Forensic Tools: Used during the 'Analysis' phase to gather and preserve evidence
from incidents.
• Automated Security Systems: Employed to detect and respond to incidents in
real time.
• Simulation Exercises: Regularly conducted to test the effectiveness of the
incident response plan and team.
Lecture 8: Social Engineering and Countermeasures
• Vishing: Voice phishing where the attacker uses a phone call to deceive the
victim.
• Spear Phishing: Highly targeted phishing attacks via email.
• Tailgating: Gaining unauthorized access to restricted areas by following
someone.
• Smishing: SMS phishing.
• Watering Hole: Compromising a commonly used and trusted website.
• Quid Pro Quo: Offering something in exchange for information or access.
Countermeasures
Toolkit
Introduction to XSS
• Purpose of XSS Attacks: To perform actions on behalf of the user without their
knowledge, such as stealing cookies, session tokens, or other sensitive
information that can lead to further attacks like identity theft.
Types of XSS
• Stored XSS: The malicious script is permanently stored on target servers, such as
in a database, message forum, visitor log, comment field, etc. The victim retrieves
the malicious script from the server when requesting the stored information.
• Reflected XSS: The malicious script comes from the current HTTP request. The
user inputs a URL with malicious script, which gets reflected by the web server in
the response, and then executed by the browser.
• DOM-based XSS: The vulnerability is in the client-side code rather than the
server-side code. It occurs when the application writes data to the Document
Object Model (DOM) without proper sanitization.
Exploitation Techniques
Mitigation Strategies
• Input Sanitization: Ensuring all user input is sanitized before it is used within the
web application to prevent malicious scripts from being inserted into the output
HTML.
• Content Security Policy (CSP): Implementing CSP to reduce the severity of XSS
attacks by declaring what dynamic resources are allowed to load.
• Use of Anti-XSS Libraries: Utilizing libraries and frameworks that automatically
handle the escaping of input and encoding of output.
Practical Exercises
• Finding and Testing XSS: How to identify XSS vulnerabilities through both
manual inspection of the application and the use of automated tools. The lecture
likely includes examples where attendees are shown how to test for XSS in a
controlled environment.
• Union-based SQL Injection: Involves using the UNION SQL operator to combine
the results of two SELECT queries into a single result which is then returned as
part of the HTTP response.
• Error-based SQL Injection: Involves performing actions that will trigger SQL
errors from the database server which can help infer its structure.
• Blind SQL Injection: No data is transferred via the web application, and the
attacker would not be able to see the result of an attack. These are often more
complex and are inferred via behavior such as response time.
• Injection Points: SQL injections can occur wherever user input may be
incorrectly filtered or escaped. Common injection points include form fields,
cookies, and HTTP headers.
• Indications of SQL Injection: Include unusual application errors, unexpected
content, or direct database error messages displayed on a web application.
SQL Injection Exploitation Techniques
Mitigation Strategies
Mitigation
• Best Practices: Includes using frameworks and libraries that automatically handle
the use of safe SQL queries and avoid concatenating user inputs in SQL queries.
Lecture 11: Network Security
Security Mechanisms
• Firewalls and IPSec: Techniques for monitoring and controlling incoming and
outgoing network traffic.
• TLS and SSH: Protocols for secure communication over a computer network.
• VPN: Virtual Private Networks create a safe and encrypted connection over a less
secure network, such as the internet.
Lecture 12: Network Security - Advanced Topics
Sniffing
• What it is: Sniffing involves capturing data packets as they travel across the
network.
• Techniques:
• Passive Sniffing: Capturing traffic without altering it. Often done in
'promiscuous mode' where the network card captures all traffic that it can
see, regardless of destination.
• Active Sniffing: Involves injecting traffic or queries into the network to
elicit responses or changes in network behavior.
Traffic Analysis
• Usage: Analyzing network traffic to detect patterns, potential breaches, or
inefficiencies.
• Tools:
• Wireshark: A network protocol analyzer that lets you capture and
interactively browse the traffic running on a computer network.
• Tcpdump: A command-line packet analyzer used to capture or filter
TCP/IP packets that are received or transmitted over a network.
Using Wireshark
• Capabilities: Wireshark can capture every packet sent over the network, analyze
its content against hundreds of protocols, and display detailed information about
each packet.
• Features:
• Filtering: Allows users to filter the data based on protocols, source,
destination, and other specific characteristics.
• Follow TCP Stream: Enables viewing the full stream of a TCP session,
helping in understanding the sequence and flow of packets.
Security Implications
• Ethical Use: While tools like Wireshark and tcpdump are invaluable for network
management and security, they can be used maliciously to intercept data.
• Prevention and Mitigation: Proper network segmentation, strong encryption,
and continuous monitoring are critical for protecting against sniffing and other
passive attack techniques.
Lecture 13: Information Security Risk Management (ISRM)
Red Teaming
• Comparison with Pentesting: While often confused with penetration testing,
Red Teaming is broader and includes testing the organization's responses to an
attack, not just its defenses. It involves emulating a real attacker without prior
notice to the security teams, aiming to test both the detection and response
capabilities.
Reporting Results
• Objectives:
• Ensure the client can understand, reproduce, and remediate the identified
vulnerabilities.
• Reports should provide actionable insights and not just raw scan outputs.
• Contents of a Good Report:
1. Executive Summary: High-level overview, key findings, and impact
summary.
2. Detailed Findings: Each finding should include a risk rating, detailed
description, replication steps, and remediation recommendations.
3. Appendices: Additional details, raw data, and methodological
explanations.
• Avoid:
• Using unmodified tool outputs as reports.
• Overlooking the practical impact of vulnerabilities.
• Failing to provide clear steps for replication and remediation.
• Not customizing the risk ratings and remediation strategies based on the
client's environment.
• Sections:
1. Introduction/Overview
2. Scope and Objectives
3. Methodology
4. Significant Findings
5. Positive Observations
6. Detailed Findings
7. Risk and Impact Evaluation
8. Recommendations for Each Finding
9. Conclusion and Next Steps
Here all commands with outputs
Whois:
Nslookup:
Dig:
Nikto:
Nmap:
Curl: