CRYPTOGRAPHY AND NETWORK SECURITY
CRYPTOGRAPHY AND NETWORK SECURITY
UNIT-3
1. Discuss the following about ElGamal algorithm
i) Encryption ii) Efficiency.
The ElGamal algorithm is an asymmetric key encryption algorithm used for secure communication. It is
based on the principles of the Diffie-Hellman key exchange and operates over modular arithmetic in a
cyclic group. It comprises three main components: key generation, encryption, and decryption.
The ElGamal cryptographic algorithm is an asymmetric key encryption scheme based on the Diffie-
Hellman key exchange. It was invented by Taher ElGamal in 1985. The algorithm is widely used for secure
data transmission and has digital signatures and encryption applications. Here’s an overview of its
components and how it works:
1. Key Generation:
• Public Parameters: Select a large prime number p and a generator g of the multiplicative
group Z*p.
• Public Key: Compute h=gx mod p. The public key is (p,g,h) and the private key is x.
2. Encryption:
• To encrypt a message M:
o Compute C1 = gk mod p.
Strengths
1. Asymmetric Security: Provides strong security against eavesdropping due to the DLP.
2. Randomization: The use of a random ephemeral key kkk ensures that the same plaintext
encrypts differently every time, enhancing security.
3. Flexibility: ElGamal can be adapted for encryption, digital signatures, and key exchange.
Drawbacks
1. Computation Overhead:
o Multiple Outputs: The ciphertext size is twice that of the plaintext since it comprises
(c1,c2)(c_1, c_2)(c1,c2), increasing bandwidth requirements.
2. Inefficiency in Small Messages: Encrypting small messages leads to significant overhead because
of the additional ciphertext components and padding requirements.
3. Key Management: The need to securely generate and manage large primes and random
ephemeral keys adds complexity.
4. Not Deterministic: The same plaintext encrypted multiple times produces different ciphertexts
due to randomization, which can be a computational overhead for certain applications.
2. What is digital signature? Explain the approaches for digital signature based on public key encryption.
A digital signature is information that is attached to data to assure the recipients of the data that it has
not been altered and has originated from the signer of the message. Digital signatures perform an
equivalent function to a handwritten signature on a paper document.
1.Direct Signature:
Process:
The sender encrypts the entire message using their private key.
The recipient uses the sender's public key to decrypt the message.
If decryption is successful, it verifies that the message originated from the sender.
Limitations:
2.Hash-and-Sign Approach:
Process:
The sender calculates a hash of the message using a cryptographic hash function (e.g., SHA-256).
The sender encrypts the hash using their private key. This encrypted hash is the digital signature.
The sender transmits the original message and the digital signature to the recipient.
The recipient uses the sender's public key to decrypt the digital signature.
The recipient compares the decrypted signature (the original hash) with the hash they calculated. If they
match, the message is verified as authentic and unaltered.
Advantages:
More efficient than direct signature, as only the hash (a small fixed-size value) is signed.
Provides both authentication (verification of sender) and integrity (ensures message hasn't been
tampered with).
Signing Process:
1. Key Generation: The sender generates a pair of keys: a private key (x) and a public key (y). The public
key is shared with the receiver.
2. Hash Function: The sender applies a hash function (H) to the message (m) to produce a message
digest (h).
3. Random Number Generation: The sender generates a random number (k) for each signature.
4. Signature Generation: The sender uses the private key (x), the message digest (h), and the random
number (k) to generate a signature (r, s).
5. Signature Transmission: The sender transmits the signature (r, s) and the message (m) to the receiver.
Verification Process:
6. Hash Function: The receiver applies the same hash function (H) to the received message (m) to
produce a message digest (h').
7. Signature Verification: The receiver uses the public key (y), the message digest (h'), and the signature
(r, s) to verify the signature.
- w = s^-1 mod q
- u1 = (h' * w) mod q
- u2 = (r * w) mod q
8. Verification Result: If v = r, the signature is valid, and the receiver can trust the message. Otherwise,
the signature is invalid.
Security:
The DSA algorithm relies on the difficulty of the discrete logarithm problem (DLP) in a finite field. The
security of the algorithm depends on the size of the keys and the difficulty of the DLP.
Advantages:
1. High Security: DSA provides high security due to the difficulty of the DLP.
2. Efficient Signature Generation: DSA signature generation is relatively fast compared to other digital
signature algorithms.
3. Small Signature Size: DSA signatures are relatively small, making them suitable for applications with
limited bandwidth.
Disadvantages:
4. Complexity: DSA is a complex algorithm, requiring a good understanding of number theory and
cryptography.
5. Key Size: DSA requires large key sizes to ensure security, which can be a limitation in some
applications.
6. Patent Issues: DSA was patented by the National Institute of Standards and Technology (NIST), which
may limit its use in some applications.
DSA Approach
Primary Termologies
• User Private Key (PR): This key is publicly known and can be shared with anyone. It's used to
verify digital signatures created with a corresponding private key.
• User Public Key (PU): A top-secret cryptographic key only possessed by the user is used in DSA
algorithm’s digital signature generation. As it is, the private key must be kept secret and secure
because it proves that a given user is genuine.
• Signing (Sig): Signing involves creating a digital signature with the help of a user's private key. In
case of DSA, this process requires mathematical operations to be performed on the message
that should be signed using a given private key in order to generate a unique signature for that
message.
• Verifying (Ver): Verifying is the process of verifying whether or not a digital signature has been
forged using its corresponding public key. In DSA, this involves comparing the messages hash
against the verification value through mathematical operations between two binary strings – one
representing an encrypted data and another one representing plain-text original message.
5. Write down the steps involved in Elgamal Digital Signature Scheme used for authenticating a
person.
ElGamal Signature Scheme is a Digital Signature Algorithm based on the premise that it is
challenging to perform calculations of discrete logarithmic order.
In this article, we are going to discuss the ElGamal Signature Scheme. However, this signature
scheme is not famous for implementation practically. The NSA (National Security Agency of USA)
developed an algorithm called the Digital Signature Algorithm using ElGamal Signature Scheme.
The ElGamal Signature Scheme has been the base for developing various Digital Signature
Schemes. Still, the Digital Signature Algorithm developed by the NSA is one of the most popular.
The ElGamal Signature Scheme can share a signature over an insecure channel. This would help
determine the message's originality at the receiver end.
Parameters of the ElGamal Signature Scheme
• H is a Collision Resistant Hash Function.
• g is a randomly chosen generator for a multiplicative group of integers that are modulo p.
Here the pair (r,s) is a digital signature for message m. These steps are repeated by the signer for
every signature.
Signature Verification
The signature for the message m is (r,s) and is verified as follows:
• 0<r<p
• 0 < s < p-1
• g^(H(m)) ≅ (y^r)(r^s) mod p
The receiver accepts a signature if all the conditions mentioned above are satisfied and rejects it
otherwise.
Correctness of Algorithms
The verifier always accepts the signature generated by the signing algorithm.
The generated signature implies:
H(m) = (xr + sk)mod(p-1)
From Fermat’s Little Theorem, we know that:
g ^(H(m)) ≅ (g^xr)(g^ks)
≅ ((g^x)^r)((g^k)^s)
≅ ((y^r)(r^s)) mod p
UNIT-4
1.Classify cybercrimes. Describe various cybercrimes against Society?
Classification Of Cyber Crimes Cyber crimes can be classified in to 4 major categories as the
following: (1) Cyber crime against Individual
(2) Cyber crime Against Property
(3) Cyber crime Against Organization
(4) Cyber crime Against Society
1) Against Individuals (i) Email spoofing : A spoofed email is one in which the e-mail header is forged so
that the mail appears to originate from one source but actually has been sent from another source.
(ii) Spamming : Spamming means sending multiple copies of unsolicited mails or mass e-mails such as
chain letters.
(iii) Cyber Defamation : This occurs when defamation takes place with the help of computers and/or the
Internet. E.g. someone publishes defamatory matter about someone on a website or sends e-mails
containing defamatory information.
(iv) Harassment & Cyber stalking : Cyber Stalking Means following an individual's activity over internet. It
can be done with the help of many protocols available such as e- mail, chat rooms, user net groups.
(2) Against Property (i) Credit Card Fraud : As the name suggests, this is a fraud that happens by the use
of a credit card. This generally happens if someone gets to know the card number or the card gets
stolen.
(ii) Intellectual Property crimes : These include Software piracy: Illegal copying of programs, distribution
of copies of software. Copyright infringement: Using copyrighted material without proper permission.
Trademarks violations: Using trademarks and associated rights without permission of the actual holder.
Theft of computer source code: Stealing, destroying or misusing the source code of a computer.
(iii) Internet time theft : This happens by the usage of the Internet hours by an unauthorized person
which is actually paid by another person. (3) Against Organisations (i) Unauthorized Accessing of
Computer: Accessing the computer/network without permission from the owner. It can be of 2 forms: a)
Changing/deleting data: Unauthorized changing of data. b) Computer voyeur: The criminal reads or
copies confidential or proprietary information, but the data is neither deleted nor changed. (ii) Denial Of
Service : When Internet server is flooded with continuous bogus requests so as to denying legitimate
users to use the server or to crash the server. (iii) Computer contamination / Virus attack : A computer
virus is a computer program that can infect other computer programs by modifying them in such a way
as to include a (possibly evolved) copy of it. Viruses can be file infecting or affecting boot sector of the
computer. Worms, unlike viruses do not need the host to attach themselves to. (iv) Email Bombing :
Sending large numbers of mails to the individual or company or mail servers thereby ultimately resulting
into crashing. (v) Salami Attack : When negligible amounts are removed & accumulated in to something
larger. These attacks are used for the commission of financial crimes. (vi) Logic Bomb : It is an event
dependent program. As soon as the designated event occurs, it crashes the computer, release a virus or
any other harmful possibilities. (vii) Trojan Horse : This is an unauthorized program which functions from
inside what seems to be an authorized program, thereby concealing what it is actually doing. (viii) Data
diddling : This kind of an attack involves altering raw data just before it is processed by a computer and
then changing it back after the processing is completed. (4) Against Society (i) Forgery : Currency notes,
revenue stamps, mark sheets etc. can be forged using computers and high quality scanners and printers.
(ii) Cyber Terrorism : Use of computer resources to intimidate or coerce people and carry out the
activities of terrorism. (iii) Web Jacking : Hackers gain access and control over the website of another,
even they change the content of website for fulfilling political objective or for money.
Cybercafes, or internet cafes, have played a significant role in cybercrime, both historically and in some
ongoing contexts. While they provide essential internet access to individuals who might not have it
otherwise, their public and often anonymous nature can be exploited by malicious actors. Here's how
cybercafes contribute to cybercrime:
• Fraud and Scams: Cybercafes can be used to send phishing emails, set up fake websites,
or commit online fraud without risking identification.
• Identity Theft: Some users in cybercafes have been known to install keyloggers or
malicious software on public machines to capture personal information from
unsuspecting users.
• Insecure Connections: Many cybercafes lack secure networks, making it easier for
cybercriminals to intercept data via techniques like packet sniffing.
• Coordination and Communication: Cybercafes often serve as hubs for criminal groups to
communicate and coordinate their activities using encrypted emails or chat rooms.
• Illegal Content Sharing: They are sometimes used to distribute or access illegal content
such as pirated software, movies, or explicit materials.
• Jurisdiction Issues: Cybercafes in regions with weak cybersecurity laws may act as safe
havens for criminals.
Preventive Measures
• Mandatory User Identification: Requiring valid ID for accessing cybercafe services can
deter criminal activities.
• Surveillance Systems: Installing CCTV cameras can help track and identify users if a
crime occurs.
• Regular System Monitoring: Cybercafes should update antivirus software, monitor for
suspicious activities, and prevent unauthorized software installation.
• Public Awareness: Educating users about safe online practices can reduce the risk of
them becoming victims or unintentional accomplices.
3.Write a short note on Attack Vector. How it alters the system state?
An attack vector refers to the method or pathway used by cybercriminals to gain unauthorized access to
a system, network, or application. It represents the point of entry that an attacker exploits to execute
malicious activities, such as stealing data, installing malware, or disrupting operations.
1. Phishing: Fraudulent emails or messages trick users into revealing sensitive information.
1. System Compromise:
Attackers gain control of the system by exploiting vulnerabilities, altering permissions, or
installing backdoors.
2. Data Breach:
Sensitive information is accessed, modified, or stolen, leading to compromised confidentiality
and integrity.
3. Service Disruption:
Attackers use vectors like DDoS attacks to overwhelm and crash systems, disrupting availability.
4. Unauthorized Modifications:
Critical system settings, files, or configurations are altered, compromising functionality or
security.
5. Propagation of Malicious Software:
Malware spreads through networks or attached devices, further escalating the scope of the
attack.
Mitigation Measures
By understanding attack vectors and their impact, organizations can better protect their systems and
maintain a secure state.
3.Write a short note on Attack Vector. How it alters the system state? 10 marks
Attack Vector
An attack vector is the method or pathway used by cybercriminals to gain unauthorized access to a
system, network, or application. It represents the entry point that attackers exploit to compromise
security and perform malicious activities, such as data theft, malware installation, or system disruption.
Common attack vectors include phishing, malware, weak passwords, unpatched vulnerabilities, and
social engineering.
1. Unauthorized Access: Attackers exploit vulnerabilities to bypass authentication and gain control
over the system.
3. Service Disruption: Attackers can disrupt system availability, such as through Denial-of-Service
(DoS) attacks.
4. Malware Deployment: Malicious software can alter files, damage system functionality, or spread
across networks.
i) Spamming
ii) Salami technique
iii) Hacking
i) Spamming
Spamming involves sending unsolicited and often irrelevant bulk messages, typically via email, to a large
number of recipients. These messages often include advertisements, phishing links, or malware.
Spamming disrupts communication, consumes network resources, and can be a precursor to more
severe cybercrimes like phishing or ransomware attacks.
iii) Hacking
Hacking is the act of gaining unauthorized access to computer systems, networks, or data. Hackers
exploit vulnerabilities to compromise security for various purposes, such as data theft, espionage, or
system disruption. While "black hat" hackers engage in illegal activities, "white hat" hackers use their
skills to improve security.
5. What is Cyber Stalking? Explain various types of Stalkers with a case study.
Cyberstalking is the use of the internet or digital tools to repeatedly harass, threaten, or stalk someone.
It includes sending unwanted messages, hacking accounts, or spreading lies online. The goal is often to
scare or distress the victim. Cyberstalkers often use social media, email, or other online platforms.
Cyberstalking involves using digital platforms to intimidate or control someone by continuously
monitoring or harassing them online, they can track the victim’s online activity.
• Webcam Hijacking: Internet stalkers would attempt to trick you into downloading and putting in
a malware-infected file that may grant them access to your webcam. the method is therefore
sneaky in that it’s probably you wouldn’t suspect anything strange.
• Observing location check-ins on social media: In case you’re adding location check-ins to your
Facebook posts, you’re making it overly simple for an internet stalker to follow you by just
looking through your social media profiles.
• Catfishing: Catfishing happens via social media sites, for example, Facebook, when internet
stalkers make counterfeit user-profiles and approach their victims as a companion of a
companions.
• Visiting virtually via Google Maps Street View: If a stalker discovers the victim’s address, then it
is not hard to find the area, neighbourhood, and surroundings by using Street View. Tech-savvy
stalkers don’t need that too.
• Installing Stalkerware: One more method which is increasing its popularity is the use of
Stalkerware. It is a kind of software or spyware which keeps track of the location, enable access
to text and browsing history, make an audio recording, etc. And an important thing is that it runs
in the background without any knowledge to the victim.
• Looking at geotags to track location: Mostly digital pictures contain geotags which is having
information like the time and location of the picture when shot in the form of metadata. Geotags
comes in the EXIF format embedded into an image and is readable with the help of special
apps. In this way, the stalker keeps an eye on the victim and gets the information about their
whereabouts.
Vishing, or voice phishing, is another variation of phishing where attackers use phone calls instead of
emails or text messages to deceive their victims. Vishing attacks often involve impersonating trusted
entities such as banks, tech support, or government agencies to extract sensitive information. The
attacker may claim that there is an urgent issue with the victim's bank account or that they need to
verify their identity, creating a sense of urgency that pressures the victim to provide confidential
information over the phone.
Vishing can be particularly convincing because it leverages the power of human interaction. Unlike
phishing or smishing, which rely on digital communication, vishing exploits the trust that people often
place in voice communication. Attackers may use spoofed phone numbers to make the call appear
legitimate, adding another layer of deception.
Smishing is a variation of phishing that targets victims through SMS or other messaging platforms. The
term smishing is a combination of "SMS" and "phishing," and it shares many similarities with email
phishing. However, instead of email, smishing uses text messages to deliver a phishing campaign. These
messages often include scam links that lead to phishing pages designed to steal information or install
malware.
Smishing can be particularly dangerous because people are generally more trusting of text messages
than emails. The messages might appear to be from banks, delivery services, or even friends, making it
harder to detect the scam. The consequences of smishing can be as severe as traditional phishing,
leading to financial loss or identity theft
i) Cyber defamation
i. Cyber defamation refers to the act of harming a person's or organization's reputation through false,
malicious, or derogatory statements made online. These statements can be posted on social media
platforms, blogs, websites, forums, or through other digital communication methods. Cyber defamation
is a form of libel (written defamation) when done online and is punishable under various legal
frameworks worldwide.
ii. Data diddling involves changing data prior or during input into a computer. In other words, information
is changed from the way it should be entered by a person typing in the data, a virus that changes data,
the programmer of the database or application, or anyone else involved in the process of having
information stored in a computer file. The culprit can be anyone involved in the process of creating;
recording, encoding, examining, checking, converting, or transmitting data.
iii. Software piracy is the unauthorized copying, distribution, or use of software without proper licensing
or permission from the copyright owner. It violates intellectual property rights and is a form of digital
theft. Software piracy undermines the software industry by causing financial losses, discouraging
innovation, and exposing users to security risks.
iv. Identity theft is a cybercrime in which an individual’s personal information, such as name, social
security number, credit card details, or other sensitive data, is stolen and misused without their consent.
The stolen identity is often used to commit fraud, such as financial theft, opening fraudulent accounts, or
gaining unauthorized access to resources.
v. In internet usage, an e-mail bomb is a form of net abuse consisting of sending huge volumes of e-mail
to an address in an attempt to overflow the mailbox or overwhelms the server. Mail bombing is the act
of sending an email bomb, a term shared with the act of sending actual exploding devices. Mail bombing
is sometimes accomplished by giving the victim’s e-mail address to multiple spammers.
Among the malware (malicious software) botnet is the most widespread and severe threat. Several
large institutions, government organizations, and almost every social networking website Facebook,
Twitter, Instagram, etc, e-commerce website Amazon, and Flipkart, etc, in short, every firm associated
with the internet became the victim of this malware. This kind of malicious software is freely available in
the market for lease. It can be used in DDoS attacks (Smurf Attacks), Phishing, Extortion, etc.
Botnets
Botnet Communication
At first, those who want to be botmaster finds the target system (here target system means finding the
vulnerable system), then use popular social engineering techniques like phishing, click fraud, etc to
install a small (Kbs) executable file into it. A small patch has been included in the code, making it not
visible even with the running background process. A naive user won’t even come to know that his/her
system became part of a bot army. After infection, the bot looks for the channel through which it can
communicate with its master. Mostly Channel (command and Control channel) uses the existing protocol
to request the command and receive updates from the master, so if anyone tries to look at the traffic
behavior then it will be quite difficult to figure it out. Botmaster is used to write scripts to run an
executable file on different OS.
The following are the major things that can be performed on bots:
• Web-Injection: Botmaster can inject snippets of code to any secured website that which bot
used to visit.
• Web filters: Here on use a special symbol like:”!” for bypassing a specific domain, and “@” for
the screenshot used.
• DnsMAP: Assign any IP to any domain which the master wants to route to the bot family.
Types of Botnet
Here are the types of botnets mentioned below based on the Channel.
Internet Relay Chat (IRC) acts as the C&C Channel. Bots receive commands from a centralized IRC server.
A command is in the form of a normal chat message. The limitation of the Internet Relay Chat(IRC)
Botnet is that the Entire botnet can be collapsed by simply shutting down the IRC Server.
It is formed using the P2P protocols and a decentralized network of nodes. Very difficult to shut down
due to its decentralized structure. Each P2P bot can act both as the client and the server. The bots
frequently communicate with each other and send “keep alive” messages. The limitation of Peer-to-Peer
Botnets is that it has a higher latency for data transmission.
Centralized structure, using HTTP protocol to hide their activities. Bots use specific URLs or IP addresses
to connect to the C&C Server, at regular intervals. Unlike IRC bots, HTTP bots periodically visit the C&C
server to get updates or new commands.
Wireless and mobile devices have become ubiquitous in today’s society, and with this increased usage
comes the potential for security threats. Wireless and mobile device attacks are a growing concern for
individuals, businesses, and governments.
Below are some of the most common types of Wireless and Mobile Device Attacks:
SMiShing: Smishing become common now as smartphones are widely used. SMiShing uses Short
Message Service (SMS) to send fraud text messages or links. The criminals cheat the user by calling.
Victims may provide sensitive information such as credit card information, account information, etc.
Accessing a website might result in the user unknowingly downloading malware that infects the device.
War driving : War driving is a way used by attackers to find access points wherever they can be. With the
availability of free Wi-Fi connection, they can drive around and obtain a very huge amount of
information over a very short period of time.
WEP attack: Wired Equivalent Privacy (WEP) is a security protocol that attempted to provide a wireless
local area network with the same level of security as a wired LAN. Since physical security steps help to
protect a wired LAN, WEP attempts to provide similar protection for data transmitted over WLAN with
encryption. WEP uses a key for encryption. There is no provision for key management with Wired
Equivalent Privacy, so the number of people sharing the key will continually grow. Since everyone is using
the same key, the criminal has access to a large amount of traffic for analytic attacks.
WPA attack: Wi-Fi Protected Access (WPA) and then WPA2 came out as improved protocols to replace
WEP. WPA2 does not have the same encryption problems because an attacker cannot recover the key by
noticing traffic. WPA2 is susceptible to attack because cyber criminals can analyze the packets going
between the access point and an authorized user.
Bluejacking: Bluejacking is used for sending unauthorized messages to another Bluetooth device.
Bluetooth is a high-speed but very short-range wireless technology for exchanging data between desktop
and mobile computers and other devices.
Replay attacks: In a Replay attack an attacker spies on information being sent between a sender and a
receiver. Once the attacker has spied on the information, he or she can intercept it and retransmit it
again thus leading to some delay in data transmission. It is also known as playback attack.
Bluesnarfing : It occurs when the attacker copies the victim’s information from his device. An attacker
can access information such as the user’s calendar, contact list, e-mail and text messages without leaving
any evidence of the attack.
There are several types of attacks that target these devices, each with its own advantages and
disadvantages:
Wi-Fi Spoofing: Wi-Fi spoofing involves setting up a fake wireless access point to trick users into
connecting to it instead of the legitimate network. This attack can be used to steal sensitive information
such as usernames, passwords, and credit card numbers. One advantage of this attack is that it is
relatively easy to carry out, and the attacker does not need sophisticated tools or skills. However, it can
be easily detected if users are aware of the legitimate network’s name and other details.
Packet Sniffing: Packet sniffing involves intercepting and analyzing the data packets that are transmitted
over a wireless network. This attack can be used to capture sensitive information such as email
messages, instant messages, and web traffic. One advantage of this attack is that it can be carried out
without the user’s knowledge. However, the attacker needs to be in close proximity to the victim and
must have the technical skills and tools to intercept and analyze the data.
Bluejacking: Bluejacking involves sending unsolicited messages to Bluetooth-enabled devices. This attack
can be used to send spam, phishing messages, or malware to the victim’s device. One advantage of this
attack is that it does not require a network connection, and the attacker can be located anywhere within
range of the victim’s Bluetooth signal. However, it requires the attacker to have the victim’s Bluetooth
device’s address and is limited to devices that have Bluetooth capabilities.
Hackers
The term hacker may refer to anyone with technical skills, however, it typically refers to an individual
who uses his or her skills to achieve unauthorized access to systems or networks to commit crimes. The
intent of the burglary determines the classification of those attackers as white, grey, or black hats. White
hat attackers burgled networks or PC systems to get weaknesses to boost the protection of those
systems. The owners of the system offer permission to perform the burglary, and they receive the results
of the take a look at. On the opposite hand, black hat attackers make the most of any vulnerability for
embezzled personal, monetary, or political gain. Grey hat attackers are somewhere between white and
black hat attackers. Grey hat attackers could notice a vulnerability and report it to the owners of the
system if that action coincides with their agenda.
• Gray Hat Hackers- These hackers carry out violations and do seemingly deceptive things
however not for individual addition or to cause harm. These hackers may disclose
a vulnerability to the affected organization after having compromised their network and they
may exploit it.
• Black Hat Hackers- These hackers are unethical criminals who violate network security for
personal gain. They misuse vulnerabilities to bargain PC frameworks. These hackers always
exploit the information or any data they get from the unethical pen-testing of the network.
Organized Hackers
These criminals embody organizations of cyber criminals, hacktivists, terrorists, and state-sponsored
hackers. Cybercriminals are typically teams of skilled criminals targeted on control, power, and wealth.
These criminals are extremely subtle and organized, and should even give crime as a service. These
attackers are usually profoundly prepared and well-funded.
Internet Stalkers
Internet stalkers are people who maliciously monitor the web activity of their victims to acquire personal
data. This type of cybercrime is conducted through the use of social networking platforms and malware,
that can track an individual’s PC activity with little or no detection.
Rogue/Disgruntled employees become hackers with a particular motive and also commit cyber crimes. It
is hard to believe that dissatisfied employees can become such malicious hackers. In the previous time,
they had the only option of going on strike against employers. But with the advancement of technology,
there is an increase in work on computers and the automation of processes, it is simple for disgruntled
employees to do more damage to their employers and organizations by committing cyber crimes. The
attacks by such employees bring the entire system down. Please refer to: Cyber Law (IT Law) in India.
UNIT-5
1.What are the types of Buffer Overflow? How to minimize it?
Attackers exploit buffer overflow issues by overwriting the memory of an application. This
changes the execution path of the program, triggering a response that damages files or exposes
private information. For example, an attacker may introduce extra code, sending new
instructions to the application to gain access to IT systems.
A Trojan Horse is a type of malware that disguises itself as legitimate software or files to trick users into
downloading or executing it. Unlike viruses, Trojans do not replicate themselves; instead, they rely on
user interaction to spread. Once inside the system, Trojans can perform various malicious activities,
including data theft, surveillance, or creating backdoors.
2. Dependence on User Action: Requires the user to install or open the infected file.
3. Payload: Executes malicious activities such as stealing data, deleting files, or installing other
malware.
• Zeus Trojan: Aimed at stealing banking information by logging keystrokes and capturing user
credentials.
• Emotet: Initially a banking Trojan, later evolved into a malware distribution tool.
Backdoors
A Backdoor is a hidden method or vulnerability that allows attackers to bypass normal authentication
processes and gain unauthorized access to a system or application. Backdoors can be intentionally
installed by developers for troubleshooting or maliciously inserted by attackers.
Characteristics of Backdoors
Examples of Backdoors
• RATs (Remote Access Trojans): Tools like DarkComet or njRAT allow attackers to control systems
remotely.
• SUNBURST: A backdoor linked to the SolarWinds cyberattack, used to infiltrate government and
private systems.
• Impact: Infected over 200,000 systems in 150 countries, causing billions in damages.
Preventive Measures
3. Define Social Engineering? Describe the classification of Social Engineering with examples.
Social engineering is a manipulative technique used by cybercriminals to exploit human psychology
and trick individuals into divulging sensitive information, such as passwords, financial details, or personal
data. Instead of directly attacking systems, attackers focus on the weakest link in security: the human
element.
Classification of Social Engineering
Social engineering attacks can be broadly classified into two categories based on the method of
execution:
1. Human-Based Social Engineering
This involves direct interaction between the attacker and the victim, relying on psychological
manipulation.
Examples:
• Impersonation: An attacker pretends to be someone trustworthy, like a bank employee
or IT support, to extract sensitive details.
Example: Calling a user and claiming to be from their bank to collect account details.
• Tailgating (Piggybacking): Gaining physical access to a secure area by following an
authorized person.
Example: An attacker follows an employee into a restricted area, pretending they forgot
their ID badge.
• Dumpster Diving: Searching through discarded documents or materials to find
confidential information.
Example: Recovering sensitive data from shredded documents or disposed hard drives.
2. Technology-Based Social Engineering
This involves using digital methods to manipulate victims.
Examples:
• Phishing: Sending deceptive emails or messages to trick users into revealing credentials
or downloading malware.
Example: Receiving an email claiming to be from PayPal, asking to "verify your account"
by entering your login details.
• Spear Phishing: A targeted phishing attack aimed at a specific individual or organization.
Example: A CEO receives a customized email appearing to be from a business partner,
asking for sensitive financial data.
• Vishing (Voice Phishing): Using phone calls to deceive victims into sharing information.
Example: A scammer calls pretending to be tech support, asking for remote access to fix
a “virus.”
• Smishing (SMS Phishing): Sending fraudulent text messages to trick victims into clicking
malicious links.
Example: A message claims you’ve won a lottery and requests clicking a link to claim the
prize.
• Baiting: Leaving physical or digital bait, such as infected USB drives, to lure victims into
compromising their systems.
Example: An attacker leaves a USB labeled “Confidential” in a public place, tempting a
victim to plug it in.
Hybrid Social Engineering Techniques
Many attacks combine human and technology-based methods for greater effectiveness.
• Example: A phishing email might contain a phone number that leads to a vishing attack
when called.
Case Study: The Target Data Breach (2013)
Attackers used social engineering to compromise Target’s third-party HVAC vendor. By sending a
phishing email, they obtained credentials that allowed access to Target’s network, leading to the
theft of 40 million credit card details.
Preventive Measures
1. Educate users about identifying and avoiding social engineering attacks.
2. Implement strong security policies and multi-factor authentication.
3. Use spam filters, firewalls, and intrusion detection systems.
4. Regularly update and patch systems to minimize vulnerabilities.
i.Identity theft refers to the criminal act of obtaining and misusing someone else's personal
information—such as name, social security number, credit card details, or other sensitive data—
without their consent. The stolen identity is often used for fraudulent purposes, such as
opening bank accounts, committing financial fraud, or applying for credit cards or loans. The
impact of identity theft can be significant, both for the victim and the perpetrator.
Types of Identity Theft
1. Financial Identity Theft:
The most common form, where the attacker uses stolen identity details to gain access to
financial resources, such as opening new credit accounts, making unauthorized
purchases, or withdrawing funds from bank accounts.
o Example: Using a stolen credit card number to make purchases online or apply
for a loan in the victim's name.
2. Medical Identity Theft:
Using someone’s personal information to obtain medical services or prescription drugs.
o Example: A thief uses a stolen insurance number to get medical treatment,
leaving the victim with fraudulent medical bills.
3. Criminal Identity Theft:
A criminal uses another person’s identity when arrested or involved in illegal activities to
avoid detection.
o Example: A thief gets arrested but gives someone else's identity to law
enforcement, leaving the victim with a criminal record.
4. Child Identity Theft:
Children’s identities are often targeted since their credit files are not active, making the
theft harder to detect.
o Example: Using a child’s social security number to open credit accounts that
remain undetected until the child reaches adulthood.
Methods of Identity Theft
1. Phishing:
Fraudulent attempts to obtain sensitive information through email, phone calls, or text
messages. Attackers often impersonate trusted institutions, such as banks or
government agencies.
2. Skimming:
Using devices (skimmers) to collect information from the magnetic stripes on debit or
credit cards during legitimate transactions.
3. Data Breaches:
Cyberattacks that expose sensitive personal data through hacking into databases of
businesses, social media platforms, or government agencies.
4. Social Engineering:
Manipulating individuals into revealing confidential information by posing as legitimate
representatives or service providers.
5. Dumpster Diving:
Going through discarded documents or hard drives to retrieve personal information such
as bank statements, tax records, or other identifying information.
Preventive Measures Against Identity Theft
1. Monitor Financial Statements:
Regularly checking bank accounts and credit card statements for any unauthorized
transactions.
2. Use Strong Passwords and Authentication:
Using complex passwords and enabling two-factor authentication to protect online
accounts.
3. Shred Sensitive Documents:
Shredding financial records, old tax forms, and documents containing personal data
before disposal.
4. Freeze Credit Reports:
Requesting a credit freeze from credit bureaus to prevent unauthorized access to credit
reports.
5. Be Cautious Online:
Avoiding sharing personal information via untrusted websites, public Wi-Fi, or
unsolicited communications.
ii.Footprinting
Footprinting is the process of gathering as much information as possible about a target
organization or individual, usually as a precursor to a cyberattack. It is a form of reconnaissance
where attackers identify vulnerabilities and weaknesses by collecting data from publicly
available resources.
Types of Footprinting
1. Active Footprinting:
Involves directly interacting with the target network or systems to gather information.
The attacker may send queries or probe servers to extract data.
o Example: Performing DNS lookups, ping sweeps, or port scans on the target
system.
2. Passive Footprinting:
The attacker gathers information without directly interacting with the target’s network,
making it less detectable. Information is collected from publicly available sources such as
websites, social media, and domain registrations.
o Example: Reviewing the target’s website to find employee names, email
addresses, and organizational structure.
Techniques Used in Footprinting
1. Domain Name System (DNS) Queries:
The attacker may query DNS servers to gather information about the target domain,
such as IP addresses, mail servers, and subdomains.
2. WHOIS Lookups:
Attacker uses WHOIS databases to retrieve publicly available information about domain
registration, including the owner’s name, contact details, and address.
3. Network Scanning:
Tools like Nmap or Netcat are used to scan the target network for open ports, active
services, and potential vulnerabilities.
4. Social Media Mining:
Examining the target’s social media profiles to gather personal details, organizational
roles, and possible entry points for social engineering.
5. Public Information and Databases:
Searching public databases such as government records, business registrations, or news
articles that provide valuable details about the target
Steganography is the practice of concealing a message, image, or file within another file, such that the
existence of the hidden information is not apparent. Unlike encryption, which transforms the content of
a message to hide its meaning, steganography hides the message itself, making it invisible to
unauthorized parties. The word "steganography" comes from the Greek words steganos (meaning
"covered" or "hidden") and graphia (meaning "writing").
Working of Steganography
Steganography works by embedding secret information (called the payload) into a cover
medium (like an image, audio, or video file). The process is designed to ensure that the changes
made to the cover file are minimal, so that the hidden message is imperceptible to the human
senses. Here's a detailed explanation of how steganography works:
1. Selection of Cover Medium
The first step in steganography is selecting a cover medium in which to hide the secret
information. Commonly used cover mediums include:
• Images (JPEG, PNG, BMP)
• Audio files (MP3, WAV)
• Video files (MP4, AVI)
• Text files (using specific encoding techniques)
Images are the most commonly used medium due to their large size and inherent redundancy.
2. Encoding the Secret Message
The secret message is encoded or embedded into the cover medium using various algorithms.
These algorithms work by altering the least significant bits (LSB) of the pixels or audio samples
to encode the hidden data. The alteration of the LSB does not significantly change the overall
appearance of an image or the quality of audio, making the presence of the hidden message
undetectable.
• For Image Steganography:
Each pixel in an image is typically represented by 24 bits (8 bits for red, 8 bits for green,
and 8 bits for blue). The secret message can be encoded by modifying the least
significant bit of each pixel's RGB value.
For example, an image pixel with RGB values (110, 150, 200) might have the binary
representation:
o Red: 110 (in binary: 01101110)
o Green: 150 (in binary: 10010110)
o Blue: 200 (in binary: 11001000)
By altering the least significant bit, the encoded message might slightly change the values, but
the change is too small to be visible to the human eye. This process is called Least Significant Bit
(LSB) insertion.
• For Audio Steganography:
In audio files, similar to images, the least significant bits of each sample are modified to
embed the hidden message. Audio steganography might also involve slightly changing
the amplitude of the sound waves.
3. Transmission of Stego Medium
Once the message has been encoded, the resulting file, which now contains the secret
information, is referred to as a stego medium. This stego file can be transmitted over networks
or stored, just like the original cover file, without raising suspicion.
4. Extraction of the Hidden Message
When the intended recipient receives the stego file, they use the corresponding decryption or
extraction tool to retrieve the hidden message. The extraction process involves reversing the
encoding procedure:
• In the case of an image, the extraction tool reads the least significant bits of the pixels
and reconstructs the hidden message.
• In the case of audio, it retrieves the hidden message by analyzing the altered bits or
samples.
The hidden information is recovered and can be decoded into its original form.
Types of Steganography
1. Image Steganography
Hiding data within the pixels of an image file, as discussed above. Popular tools for
image steganography include Steghide and OpenStego.
2. Audio Steganography
Embedding secret messages within audio files, often by altering the least significant bits
of the audio samples. Examples include the use of tools like DeepSound or AudioStego.
3. Video Steganography
Embedding information into video files by modifying the pixels of individual frames or
the audio track of the video. This technique is often used for larger payloads due to the
size of video files.
4. Text Steganography
Embedding data in text files through encoding methods like whitespace manipulation,
capitalizing letters, or using invisible characters like spaces and tabs.
5. Network Steganography
Hiding data within network traffic or protocols, such as manipulating the headers or
unused bits in the packets of network data.
Applications of Steganography
1. Confidential Communication:
Steganography is often used in scenarios where encrypted communication is too
conspicuous. By embedding a message within a seemingly harmless file, the
communication remains hidden from third parties.
2. Digital Watermarking:
It is used for watermarking copyrighted digital content, like images or videos, to track
and prevent unauthorized distribution while protecting the creator’s intellectual
property.
3. Covert Data Transmission:
In sensitive contexts such as intelligence or military operations, steganography allows for
covert communication without triggering suspicion from authorities or adversaries.
4. Malware Delivery:
Cybercriminals sometimes use steganography to deliver malware or malicious payloads
in a way that avoids detection by antivirus programs or network monitoring tools.
Example of Steganography in Practice
Imagine a scenario where two individuals wish to send a confidential message to each other
without anyone else knowing. They could take an innocent-looking image of a landscape (the
cover file) and embed the secret message into the image using steganography tools. The result
is a "stego-image" that looks identical to the original image. The recipient, knowing the secret
method to extract the hidden message, can retrieve the original text message without anyone
else being able to detect it.
Advantages of Steganography
1. Covert Communication:
Messages are hidden in plain sight, making them difficult to detect compared to
traditional encryption methods.
2. Data Integrity:
Since the message is embedded in a cover file, its integrity remains intact during
transmission or storage.
3. Unobtrusive:
Steganography can be used with many different types of media, such as images, audio,
and video, without attracting attention.
Password cracking refers to the process of attempting to gain unauthorized access to an account or
system by guessing or deriving the password. This process is typically performed by attackers to break
weak passwords or to exploit vulnerabilities in a system’s security. Password cracking can be done
through various techniques, depending on the method used to store and protect the passwords, as well
as the attacker's resources and knowledge.
Spyware is a type of malicious software (malware) designed to secretly monitor and collect
information from a device or network without the user’s consent or knowledge. The information
gathered by spyware can include personal data, browsing habits, passwords, financial information, and
even tracking the user’s location. Spyware can also affect the device’s performance by consuming
resources and causing system instability.
Spyware often works in the background, making it difficult for users to detect. It can be installed
through infected websites, email attachments, malicious apps, or third-party software
downloads.
How Spyware Affects Mobile Devices
Mobile devices, such as smartphones and tablets, are prime targets for spyware due to their
widespread use for communication, online transactions, and storing sensitive information.
Here’s how spyware affects mobile devices:
1. Privacy Invasion
Spyware on mobile devices can compromise the privacy of the user by accessing and
transmitting personal data without consent. This may include:
• Contacts: Spyware can collect contact lists, leading to identity theft or fraud.
• Messages: Text messages, emails, and even WhatsApp or Messenger conversations can
be accessed.
• Location: GPS data may be used to track the user’s movements, which could be used for
stalking or other malicious purposes.
• Call Logs: Detailed records of incoming and outgoing calls, including phone numbers and
call duration, could be harvested.
2. Financial Loss
Spyware can facilitate financial fraud by capturing sensitive information, such as bank account
details, credit card numbers, or login credentials for online banking or payment apps. This can
result in unauthorized transactions, draining the victim's accounts or making fraudulent
purchases.
• Example: A user installs a malicious app that contains spyware, and the spyware records
their banking login credentials, allowing attackers to steal funds from their accounts.
3. Unauthorized Surveillance
Spyware, especially Remote Access Trojans (RATs), can give an attacker full control over the
mobile device. This allows the attacker to:
• Turn on the microphone to listen in on conversations.
• Activate the camera to secretly capture photos or videos.
• Monitor real-time activities without the user’s knowledge.
• Control device functions, such as installing apps or changing settings.
4. Performance Degradation
Spyware consumes system resources, such as CPU and memory, which can slow down the
device and affect its performance. The device may exhibit:
• Increased battery drain due to the background processes.
• Lagging or freezing as the spyware uses up processing power.
• High data usage as the spyware continuously sends collected information to the
attacker’s server.
5. Unauthorized Access to Sensitive Data
Spyware can infiltrate mobile devices through malicious apps, websites, or phishing attacks.
Once installed, it may extract sensitive data such as:
• Photos and Videos: Personal media stored on the device may be taken and sold or
distributed without the user’s knowledge.
• App Data: Spyware may access app data stored locally, like passwords saved in a
password manager or cached login details for social media accounts.
6. Compromise of Security
Spyware can weaken the overall security of a mobile device, allowing further attacks to occur.
For example:
• Spyware might disable or bypass the device’s security mechanisms (e.g., firewalls,
antivirus software, or password protection).
• It may grant attackers elevated privileges on the device, allowing them to perform
additional malicious actions like installing ransomware, stealing encryption keys, or
modifying system files.
7. Data Breaches and Legal Implications
For businesses and individuals handling sensitive or regulated data, spyware can lead to severe
legal and regulatory consequences:
• Data breaches: The collection of sensitive personal or organizational data could result in
breaches of confidentiality agreements, exposing the data to malicious actors.
• Violations of data protection laws: If spyware collects data without the user’s consent,
the company or individual behind it could face penalties under laws like GDPR (General
Data Protection Regulation) or CCPA (California Consumer Privacy Act).
Basis of
Comparison Worms Viruses
Detection
Worms can be detected and removed Antivirus software is used for
and
by the Antivirus and firewall. protection against viruses.
Protection
Worms are executed via weaknesses Viruses are executed via executable
Execution in the system. files.
ii. Enumeration is a more advanced phase of network reconnaissance that occurs after an initial scan.
During enumeration, attackers attempt to gather detailed information about a target system or network,
including the list of users, shares, services, and other resources, as well as vulnerabilities that can be
exploited. Unlike passive scanning techniques (like port scanning), enumeration involves active queries
to the target system to retrieve specific data.
How Enumeration Works
Enumeration involves sending queries to a network or device to extract information such as:
• Usernames: The list of user accounts on a system or domain.
• Groups and Roles: Information on user groups, roles, and privileges.
• Shared Resources: Information on shared folders, printers, or other networked
resources.
• Service Information: Details on running services, service versions, and associated
vulnerabilities.
• Operating System Information: Details about the target machine’s operating system,
version, and patch level.
In this phase, an attacker may use protocols like SMB (Server Message Block), SNMP (Simple
Network Management Protocol), or NetBIOS to extract this data.
Common Enumeration Techniques
1. DNS Enumeration:
Querying DNS servers to gather information about a target domain, including
subdomains, mail servers, and name servers. Tools like nslookup and DNSenum can be
used for this purpose.
2. SNMP Enumeration:
Using SNMP to gather network information such as device configurations, usernames,
and system statistics. Tools like snmpwalk can be used for this type of enumeration.
3. NetBIOS Enumeration:
Querying systems that use the NetBIOS protocol (often on Windows networks) to gather
information about the machine, including its name, shared resources, and users. Tools
like nbtstat and NetView can be used for NetBIOS enumeration.
4. SMB Enumeration:
SMB enumeration targets Windows networks to identify shares, users, groups, and other
resources. Tools like enum4linux are often used to query Windows systems over SMB.
5. LDAP Enumeration:
Using the LDAP protocol to retrieve information from directory services like Active
Directory. This can include user accounts, groups, and other directory data.
6. SMTP Enumeration:
Attackers can query mail servers via the SMTP protocol to enumerate valid email
addresses. Tools like Telnet and Nmap can be used to test for valid user emails on a mail
server.
7. Banner Grabbing:
Attackers collect version information of services or operating systems by interacting with
ports on a system (often HTTP, FTP, or SMTP). Banner grabbing helps identify
vulnerabilities in specific versions of services. Tools like Netcat and Nmap can help grab
banners.