20IT84-Cyber Security �& �Digital Forensics
B.Tech. (OPEN ELECTIVE)
By
M. Vijay Kumar
UNIT - II Syllabus
Proxy Servers and Anonymizers
Phishing, Password Cracking,
Keyloggers and Spyware,
Virus and Worms
Trojan Horses and Backdoors,
Steganography,
Sniffers, Spoofing, Session Hijacking,
DoS and DDoS Attacks
SQL Injection, Buffer Overflow,
Identity Theft (ID Theft), Port Scanning.
Proxy Server
A proxy server acts as an intermediary between a user's device and the internet. When a user sends a request, it goes through the proxy server, which then forwards the request to the internet and returns the response to the user.
Types of Proxies:
Benefits of Proxy Servers:�
Anonymizers:�
Anonymizers are tools or services that aim to conceal a user's identity and online activity by masking their IP address and encrypting internet traffic.
Benefits of Anonymizers:�
Choosing the Right Tool:�
Both proxy servers and anonymizers have their strengths and weaknesses. Selecting the right one depends on your individual needs:
What is Phishing?
Phishing refers to fraudulent attempts to steal sensitive information like login credentials, credit card details, or personal data. Attackers craft deceptive emails, text messages, or websites that mimic legitimate entities, such as banks, social media platforms, or even trusted friends. These messages often create a sense of urgency or exploit curiosity to lure victims into clicking malicious links or divulging sensitive information.
How Does Phishing Work?
How Does Phishing Work?
Types of Phishing Attacks:�
Phishing attacks come in various forms, each targeting different vulnerabilities:
Protecting Yourself from Phishing:
Password cracking
Password cracking is a method used by cyber attackers to gain unauthorized access to systems, accounts, or data by systematically attempting to guess or uncover passwords. It involves using various techniques and tools to discover or decrypt passwords stored in a system or transmitted over a network.
Password Hashes:
Methods of Password Cracking:�
Protecting Yourself from Password Cracking:�
The good news is, you can significantly reduce the risk of password cracking by adopting strong password practices:
Keyloggers
Keyloggers are a type of spyware that records every keystroke entered on a keyboard, including passwords, credit card numbers, and other sensitive information. They can be installed on a computer system without the user’s knowledge and can be used to steal confidential information.
Types of Keyloggers:
Spyware
Detection and Prevention:�
Types of Malware and Symptoms�Types of Malware
Initial Code Red Worm Infection
19
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Types of Malware and Symptoms�Types of Malware (Cont.)
Code Red Worm Infection 19 Hours Later
20
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Types of Malware and Symptoms�Symptoms of Malware
21
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Understanding Viruses and Worms
Viruses
Definition: A virus is a malicious program that attaches itself to another program and replicates itself, spreading through various means like infected files, emails, or network connections.
Characteristics:
How Viruses Work?�
Types of Viruses�
What are Worms?
Definition: A worm is a self-replicating malware program that spreads across networks, exploiting vulnerabilities in operating systems or applications.
Characteristics:
How Worms Work?
Propagation Methods:
Protecting Yourself from Viruses and Worms�
Antivirus Software: Install and regularly update antivirus software to detect and remove malware.
System Updates: Apply software and operating system updates promptly to patch security vulnerabilities.
Email Security: Be cautious about opening email attachments and clicking on suspicious links.
Firewall: Use a firewall to filter incoming and outgoing network traffic, blocking unauthorized access.
Backup Data: Regularly back up your important data to ensure you can recover it in case of an attack.
User Awareness: Train yourself and others to recognize suspicious behavior and avoid potential malware traps.
Difference Between Virus and Worm
Basis of Comparison | Virus | Worm |
Definition | A malicious executable code attached to another executable file that can be harmless or can modify or delete data. | A form of malware that replicates itself and can spread to different computers via network. |
Objective | Modify or delete data. | Consume system resources and slow down the system. |
Host | Requires a host to spread. | Does not need a host to spread. |
Harmful | More harmful. | Less harmful. |
Detection and Protection | Antivirus software is used for protection against viruses. | Worms can be detected and removed by the antivirus and firewall. |
Controlled by | Can’t be controlled by remote. | Can be controlled by remote. |
Execution | Executed via executable files. | Executed via weaknesses in the system. |
Comes from | Generally, comes from shared or downloaded files. | Generally, comes from downloaded files or through a network connection. |
Trojan Horses
Definition: A trojan horse is a seemingly harmless program or file that conceals malicious code, granting attackers access to your system once activated.
Characteristics:
Types of Trojan Horses
Backdoors
Definition: A backdoor is a secret entry point created by attackers to bypass security measures and gain unauthorized access to a system.
Characteristics:
How are Backdoors Installed?
Software Vulnerabilities: Exploiting weaknesses in software or operating systems.
Supply Chain Attacks: Compromising software development processes to infect legitimate software.
Physical Access: Tampering with hardware to install hidden backdoors.
Social Engineering: Tricking users into installing software containing backdoors.
Protecting Yourself from Trojans and Backdoors
Steganography
Steganography is a technique used to hide information within another message or object to avoid detection. It is a form of covert communication that can be used to conceal almost any type of digital content, including text, image, video, or audio content. Steganography can be used in cyber security to hide sensitive data, such as passwords or other confidential information, within seemingly harmless files or messages.
Types of Steganography
Image Steganography: Explain how data can be hidden within images.
Text Steganography: Discuss hiding information within text or documents.
Audio Steganography: Explain the method of hiding data within audio files.
How does Steganography Work?
Applications of Steganography
Cybersecurity: Protecting sensitive information during transmission.
Digital Watermarking: Embedding ownership information into digital assets.
Covert Communication: Secret communication in espionage or intelligence operations. Activists, journalists, can use steganography to securely send sensitive information across monitored networks.
Applications of Steganography
Data Exfiltration: Hackers can hide stolen data, like financial records or intellectual property, within image files, music tracks, or even video streams, making it difficult for traditional security measures to detect.
Malware Delivery: Malicious code can be hidden within seemingly harmless files, allowing attackers to bypass security software and infect systems.
Sniffers
Sniffers in the context of cybersecurity refer to tools used to capture and analyze network traffic. They can be used by network or system administrators to monitor and troubleshoot network traffic. However, attackers can also use sniffers to capture data packets containing sensitive information, such as passwords and account details, for malicious purposes.
Sniffers (Cont..)
Imagine a network as a highway of data packets, each carrying information between devices. Sniffers are like highway toll booths, capturing and examining these packets as they pass by. They come in both hardware and software forms, and can analyze the contents of packets, revealing details like:
Source and destination devices: Who's sending the data and who's receiving it?
Protocol: What type of communication is happening (e.g., email, web browsing)?
Data: Depending on encryption, the actual content of the packets might be visible.
The good side of sniffing:�
The dark side of sniffing:�
In the wrong hands, sniffers become tools for malicious actors:
Protecting yourself from sniffing:�
Spoofing
Spoofing in cybersecurity refers to a technique used by malicious actors to deceive systems, users, or networks by falsifying information. This manipulation involves creating a false identity or masquerading as a trusted entity to gain unauthorized access, bypass security measures, or launch attacks.
Here are some common types of spoofing:
Email spoofing:
Occurs when an attacker forges email headers to make it seem like the email originates from a legitimate source, tricking users into revealing sensitive information or performing malicious actions.
Website spoofing:
This involves creating a fake website that looks almost identical to a legitimate website, such as a bank or online store. When a victim enters their login credentials on the fake website, the attacker can steal them.
Phone number spoofing:
This involves modifying the caller ID information to make it appear as if the call is coming from a legitimate source, such as a friend, family member, or business. This can be used to trick victims into giving up personal information or money.
IP address spoofing:
This involves changing the source IP address of a packet of data to make it appear as if it came from a different computer. This can be used to launch denial-of-service attacks or to bypass security measures.�
GPS spoofing:
This involves manipulating the GPS signal of a device to make it appear as if it is located in a different place. This can be used to track someone's movements without their knowledge or to commit fraud.
DNS spoofing
DNS spoofing is a type of attack where the attacker alters the DNS server’s records to redirect traffic to a malicious website
What is session hijacking?
In the digital world, a session is a temporary connection between your device and a server, often identified by a unique token (like a cookie or session ID) that verifies you're the authorized user. Session hijacking is the act of stealing that token and using it to impersonate you, taking control of your active session and potentially gaining access to your data, accounts, or resources.
Types of session hijacking:
Cookie hijacking
Session sniffing
Man-in-the-middle attack
Session sidejacking
Cookie hijacking:
Attackers steal your session cookies through various means, like phishing emails, malware, or sniffing unprotected Wi-Fi networks. With the cookie, they can impersonate you on the websites that issued it.
Session sniffing:
Hackers use packet sniffing tools to capture network traffic and steal session IDs or other sensitive information transmitted between your device and the server.�
Man-in-the-middle attack:
Attackers intercept communication between your device and the server, eavesdropping and potentially modifying data, including stealing your session token.
Session sidejacking:
Hackers exploit vulnerabilities in browser extensions or website scripts to steal or manipulate session data stored on your device's local storage.
Impacts of session hijacking:
Preventing session hijacking:�
Here are some ways to protect yourself from session hijacking:
DoS (Denial of Service) Attack:
How it works:�
A DoS attack floods a targeted system (website, server, network) with excessive traffic, making it unavailable to legitimate users. This can be done in various ways, like:
DDoS- Distributed Denial of Service
DDoS attacks involve multiple sources, forming a botnet or a network of compromised devices (such as computers, IoT devices) under the control of the attacker.
These compromised devices, often called 'bots' or 'zombies,' are coordinated to simultaneously flood the target system with a massive volume of traffic, making it difficult to mitigate the attack by simply blocking a single source.
DDoS attacks are more sophisticated and challenging to mitigate due to the distributed nature of the attack traffic, making it harder to distinguish legitimate requests from malicious ones.
Impact of DoS Attacks:
Downtime: The target system becomes inaccessible, disrupting business operations and causing financial losses.
Reputational damage: Customers may lose trust in a company that experiences frequent DoS attacks.
Security breaches: DoS attacks can be used as distractions to mask other malicious activities.
Denial of Service�DDoS
64
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Impact of DDoS Attacks:�
Higher costs: Mitigating DDoS attacks can be expensive, requiring specialized security solutions.
Widespread disruption: DDoS attacks can target critical infrastructure, causing outages that affect entire communities.
Protecting against DoS and DDoS Attacks:�
Strong network security: Firewalls, intrusion detection systems, and other security tools can help to detect and block attacks.
Traffic filtering: Identifying and filtering out suspicious traffic can help to mitigate the impact of attacks.
DDoS mitigation services: Specialized services can help to absorb and deflect DDoS attacks before they reach your systems.
What is SQL Injection?
How it Works:
SQL Injection
Example:
SELECT * FROM users WHERE username = '$username' AND password = '$password'
username' OR '1'='1' –
This would transform the query into:
SELECT * FROM users WHERE username = '' OR '1'='1' --' AND password = '$password‘
The '--' comments out the remaining part of the query, making the password irrelevant. The attacker would now gain access without knowing the actual password.
Types of SQL Injection:
In-band SQLi: Results are displayed directly in the application's output.
Blind SQLi: Attacker infers information based on the application's behavior, without seeing direct results.
Out-of-band SQLi: Attacker sends data to a system they control, bypassing the application's output.
Prevention Measures:�
Input validation and sanitization: Thoroughly check and clean all user input before using it in SQL queries.
Parameterized queries: Use prepared statements to prevent attackers from altering query structure.
Database permissions: Enforce least privilege principles to limit database access.
Regular security testing: Scan for vulnerabilities and address them promptly.
Secure coding practices: Follow best practices to prevent common coding mistakes that lead to SQLi vulnerabilities.
Buffer Overflow
Buffer Overflow is a cybersecurity vulnerability that occurs when a program or process tries to store more data in a buffer (temporary storage area) than it was intended to hold. This extra data can overflow into adjacent memory locations, corrupting or overwriting data, altering the program's behavior, and potentially allowing attackers to execute malicious code.
Buffer Overflow attacks :
Crash the program: Overwriting code with garbage data can make the program malfunction and crash.
Crash
Execute arbitrary code: The attacker's code can hijack program execution, launching malware or stealing sensitive information.
Execute
Modify program behavior: By manipulating data, the attacker can alter how the program works, potentially gaining unauthorized access.
Modify
Types of Buffer Overflows:
There are two main types of buffer overflows:
Protecting Against Buffer Overflows:
Developers can implement various techniques to prevent buffer overflows:
Identity Theft
The Impact of Identity Theft:�
The consequences of ID theft can be far-reaching and long-lasting, causing:
Types of Identity Theft:
ID theft can take various forms, each targeting different types of personal information:
Protecting Yourself from Identity Theft:
What is Port Scanning?
Port scanning is a network reconnaissance technique used to identify open ports on a computer system or network device. A port is a virtual communication channel assigned to a specific service or application, like an apartment number in a building. For example, port 80 is typically used for HTTP traffic, while port 22 is used for SSH. By sending probe packets to different ports and analyzing the responses, scanners can determine whether a port is open, closed, or filtered.
Why is Port Scanning Important?
Types of Port Scanning:
Staying Safe from Port Scanning:
Tools used for Port Scanning:
Various scanning tools like Nmap, hping, and Wireshark are commonly used to perform port scans. These tools provide extensive options for customization and analysis, allowing users to perform different types of scans and analyze responses.