0% found this document useful (0 votes)
79 views37 pages

Cyber Security Report

The document is a mini project report on Cyber Security, specifically focusing on steganography, which is the practice of hiding messages within other messages to prevent detection. It outlines key concepts in cybersecurity, including the CIA triad (Confidentiality, Integrity, Availability), the importance of protecting assets, and the motivations behind cyber-attacks. The report also discusses various layers of cybersecurity and the ethical considerations of using steganography for secure communication.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
79 views37 pages

Cyber Security Report

The document is a mini project report on Cyber Security, specifically focusing on steganography, which is the practice of hiding messages within other messages to prevent detection. It outlines key concepts in cybersecurity, including the CIA triad (Confidentiality, Integrity, Availability), the importance of protecting assets, and the motivations behind cyber-attacks. The report also discusses various layers of cybersecurity and the ethical considerations of using steganography for secure communication.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 37

lOMoARcPSD|53588669

Cyber security report

Cyber Security* (Dr. A.P.J. Abdul Kalam Technical University)

Scan to open on Studocu

Studocu is not sponsored or endorsed by any college or university


Downloaded by Srinivas Nuthlakanthi (nuthlakanthisrinivas@gmail.com)
lOMoARcPSD|53588669

A
Mini Project Report
On
“CYBER SECURITY”

BACHELOR OF TECHNOLOGY
in
“Computer Science & Engineering”
Submitted by
Kritika Anand
(Roll No.2001200130022)

Under Guidance of
Mr. Nitin Dixit
(Assistant Professor, CSE Dept.)

Submitted To
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
INSTITUTE OF TECHNOLOGY & MANAGEMENT, GIDA,
GORAKHPUR
SESSION: 2023-24

Downloaded by Srinivas Nuthlakanthi (nuthlakanthisrinivas@gmail.com)


lOMoARcPSD|53588669

CERTIFICATE

Downloaded by Srinivas Nuthlakanthi (nuthlakanthisrinivas@gmail.com)


lOMoARcPSD|53588669

DECLARATION

This is certified that the work which is being presented in the mini project entitled

“STEGANOGRAPHY” is submitted in the department of Computer Science and

Engineering of Institute of Technology and Management, Gida, Gorakhpur is an

authentic record of my own work carried out during the semester under the supervision of

“EDUNET FOUNDATION”

The matter presented in this mini project has not been submitted by me for the award of any

other degree of this or any other institute/university.

Kritika Anand

This is to certify that the above statement made by the candidate is correct to the best of my
knowledge.

Date:
Candidate Signature

Mr. Nitin Dixit Mr. Ashutosh Rao

Downloaded by Srinivas Nuthlakanthi (nuthlakanthisrinivas@gmail.com)


lOMoARcPSD|53588669

ABSTRACT

The goal of steganography is to hide messages inside other “harmless” messages in a way

that does not allow any “enemy” to even detect that there is a second secret message present.

The only missing information for the “enemy” is the short easily exchangeable random

number sequence, the secret key, without the secret key, the “enemy” should not have the

slightest chance of even becoming suspicious that on an observed communication channel,

hidden communication might take place.

Throughout the report, the advantages of image steganography, such as covert

communication, security through obscurity, and dual-layered protection, are highlighted. The

project also acknowledges the ethical considerations surrounding the use of steganography

and emphasizes responsible applications.

Downloaded by Srinivas Nuthlakanthi (nuthlakanthisrinivas@gmail.com)


lOMoARcPSD|53588669

ACKNOWLEDGEMENT

Whenever a module of work is completed, there is always a source of inspiration. I always

find my parents as my torch bearers. While completing this task, I realized from my inner

core that Rome was not built in day. I found a stack of mini project reports in the library of

ITM Gorakhpur library. Those reports are the landmarks for me on the way of this task. The

presented report is an effort of day and night works. Selection is always tough; undoubtedly I

am accepting this fact.

I am sincerely thankful to Mr. Ashutosh Rao (HOD) & Mr. Nitin Dixit (Mini Project

Coordinator) for his support. I express my gratitude and thanks to all the faculties and staff

members of Computer Science & Engineering department for their sincere cooperation in

furnishing relevant information to complete this mini project report well in time successfully.

Finally, my greatest debt is to my parents, my family for their enduring love, support and

forbearance during my project work.

Kritika Anand

Roll No.2001200130022

Downloaded by Srinivas Nuthlakanthi (nuthlakanthisrinivas@gmail.com)


lOMoARcPSD|53588669

TABLE OF CONTENTS Page No.


Declaration 3
Abstract 4
Acknowledgement 5
Table of Contents 6-7
List of Figures 8
CHAPTER 1: INTRODUCTION TO CYBER SECURITY 9-13
1.1 WHAT IS CYBER SECURITY
1.2 KEY ELEMENTS OF CYBER SECURITY
1.3 CIA TRAID
1.4 LAYERS OF CYBER SECURITY
1.5 WHAT IS AN ASSET
1.6 WHAT IS A THREAT
1.7 MOTIVE OF ATTACKERS
1.8 TYPES OF ACTIVE ATTACK
1.9 TYPES OF PASSIVE ATTACK

CHAPTER 2 : CYBERSPACE AND THE LAW & CYBER FORENSICS 14-17


2.1 WHAT IS CYBER SPACE
2.2 REGULATIONS
2.3 NATIONAL CYBER SECURITY POLICY
2.4 CYBER FORENSICS
2.5 DIGITAL FORENSICS
2.6 DIGITAL FORENSICS LIFECYCLE
CHAPTER 3: STEGANOGRAPHY 18-22
3.1 WHAT IS STEGANOGRAPHY
3.2 HOW IT WORKS
3.3 EXAMPLE OF STEGANOGRAPHY USED IN CYBER SECURITY
3.4 ADVANTAGES OF STEGANOGRAPHY
3.5 HOW IS IT DIFFERENT FROM CRYPTOGRAPHY
3.6 TYPES OF STEGANOGRAPHY
CHAPTER 4: IMAGE STEGANOGRAPHY 23-25
4.1 BASIC PROCESS
4.2 COMMON TECHNIQUES
4.3 APPLICATIONS
6

Downloaded by Srinivas Nuthlakanthi (nuthlakanthisrinivas@gmail.com)


lOMoARcPSD|53588669

4.4 HOW IS IT DONE


4.5 FEATURES
CHAPTER 5: PROJECT: IMAGE STEGANOGRAPHY USING PYTHON 26-34
5.1 OVERVIEW
5.2 INTRODUCTION TO PYTHON
5.3 KEY FEATURES OF PYTHON
5.4 CODE
5.5 SCREENSHOT
CONCLUSION 35
REFRENCES 36

Downloaded by Srinivas Nuthlakanthi (nuthlakanthisrinivas@gmail.com)


lOMoARcPSD|53588669

LIST OF FIGURES
1.1 CIA Traid 1
1.2 Layers of Cyber Security 12
1.3 Cyber Attacker actions 12
2.1 Digital forensics lifecycle 13
3.1 Image steganography 13
3.2 Working of steganography 14
3.3 Types of steganography 15
4.1 Working of Image Steganography 15
4.1 Hiding text in Image 17

Downloaded by Srinivas Nuthlakanthi (nuthlakanthisrinivas@gmail.com)


lOMoARcPSD|53588669

CHAPTER – 1
INTRODUCTION TO CYBER SECURITY

1.1 What is Cyber Security?


Cybersecurity, short for "cybersecurity," refers to the practice of protecting computer
systems, networks, and digital infrastructure from theft, damage, unauthorized access, and other
cyber threats. The primary goal of cybersecurity is to ensure the confidentiality, integrity, and
availability of information and data.

1.2 Key elements of cybersecurity


● Protecting Information: Safeguarding sensitive data from unauthorized access and ensuring
confidentiality.
● Securing Systems and Networks: Implementing measures to protect computer systems,
servers, and network infrastructure from cyber threats.
● Preventing Unauthorized Access: Employing authentication and access control mechanisms
to ensure that only authorized individuals can access certain information or systems.
● Detecting and Responding to Cyber Threats: Implementing monitoring tools and processes
to detect unusual activities or security breaches and responding promptly to mitigate potential
damage.
● Ensuring Data Integrity: Verifying that data is accurate, reliable, and has not been tampered
with.
● Protecting Against Malware: Implementing antivirus software and other security measures
to defend against malicious software, such as viruses, worms, and ransomware.
● Cybersecurity Policies and Education: Establishing and enforcing cybersecurity policies
within an organization and educating users about best practices to minimize risks.
● Incident Response and Recovery: Developing plans and procedures to respond to security
incidents and recover from any potential damage.
● Regular Updates and Patch Management: Keeping software, operating systems, and other
applications up to date with the latest security patches to address vulnerabilities.
● Cybersecurity Governance: Establishing a framework for managing and overseeing
cybersecurity activities within an organization, including risk management and compliance
with relevant regulations.

1.3 CIA Triad


The CIA Triad is a security model that has been developed to help people think about various
parts of IT security. CIA triad broken down:

Downloaded by Srinivas Nuthlakanthi (nuthlakanthisrinivas@gmail.com)


lOMoARcPSD|53588669

Fig.1.1 CIA Triad

Confidentiality:
It's crucial in today's world for people to protect their sensitive, private information from
unauthorized access. Protecting confidentiality is dependent on being able to define and
enforce certain access levels for information.
In some cases, doing this involves separating information into various collections that are
organized by who needs access to the information and how sensitive that information is - i.e.
the amount of damage suffered if the confidentiality was breached.
Some of the most common means used to manage confidentiality include access control lists,
volume and file encryption, and Unix file permissions.
Integrity:
Data integrity is what the "I" in CIA Triad stands for. This is an essential component of the
CIA Triad and designed to protect data from deletion or modification from any unauthorized
party, and it ensures that when an authorized person makes a change that should not have
been made the damage can be reversed.
Availability:
This is the final component of the CIA Triad and refers to the actual availability of your data.
Authentication mechanisms, access channels and systems all have to work properly for the
information they protect and ensure it's available when it is needed.

10

Downloaded by Srinivas Nuthlakanthi (nuthlakanthisrinivas@gmail.com)


lOMoARcPSD|53588669

The CIA Triad is all about information. While this is considered the core factor of most of the
IT security, it promotes a limited view of the security that ignores other important factors.
It's important to understand what the CIA Triad is, how it is used to plan and to implement a
quality security policy while understanding the various principles behind it. It's also
important to understand the limitations it presents. When you are informed, you can utilize
the CIA Triad for what it has to offer and avoid the consequences that may come along by
not understanding it.

1.4 Layers of Cyber Security


The 7 layers of cyber security should centre on the mission critical assets you are seeking to
protect.

Fig.1.2 Layers of Cyber Security

1. Mission Critical Assets – This is the data you need to protect


2. Data Security – Data security controls protect the storage and transfer of data.
3. Application Security – Applications security controls protect access to an application, an
application’s access to your mission critical assets, and the internal security of the application.
4. Endpoint Security – Endpoint security controls protect the connection between devices and
the network.
5. Network Security – Network security controls protect an organization’s network and prevent
unauthorized access of the network.
6. Perimeter Security – Perimeter security controls include both the physical and digital
security methodologies that protect the business overall.

11

Downloaded by Srinivas Nuthlakanthi (nuthlakanthisrinivas@gmail.com)


lOMoARcPSD|53588669

7. The Human Layer – Humans are the weakest link in any cyber security posture. Human
security controls include phishing simulations and access management controls that protect
mission critical assets from a wide variety of human threats, including cyber criminals,
malicious insiders, and negligent users.

1.5 What is an Asset:


An asset is any data, device or other component of an organization’s systems that is valuable
– often because it contains sensitive data or can be used to access such information. For
example: An employee’s desktop computer, laptop or company phone would be considered
an asset, as would applications on those devices. Likewise, critical infrastructure, such as
servers and support systems, are assets. An organization’s most common assets are
information assets. These are things such as databases and physical files – i.e. the sensitive
data that you store.
1.6 What is a threat:
A threat is any incident that could negatively affect an asset – for example, if it’s lost,
knocked offline or accessed by an unauthorized party. Threats can be categorized as
circumstances that compromise the confidentiality, integrity or availability of an asset, and
can either be intentional or accidental. Intentional threats include things such as criminal
hacking or a malicious insider stealing information, whereas accidental threats generally
involve employee error, a technical malfunction or an event that causes physical damage,
such as a fire or natural disaster.
1.7 Motive of Attackers
The categories of cyber-attackers enable us to better understand the attackers' motivations
and the actions they take. As shown in Figure, operational cyber security risks arise from
three types of actions:
i) inadvertent actions (generally by insiders) that are taken without malicious or harmful
intent;
ii) deliberate actions (by insiders or outsiders) that are taken intentionally and are meant to do
harm; and
iii) inaction (generally by insiders), such as a failure to act in each situation, either because of
a lack of appropriate skills, knowledge, guidance, or availability of the correct person to act
of primary concern here are deliberate actions, of which there are three categories of
motivation.
1. Political motivations: examples include destroying, disrupting, or taking control of
targets; espionage; and making political statements, protests, or retaliatory actions. 2.
Economic motivations: examples include theft of intellectual property or other
economically valuable assets (e.g., funds, credit card information); fraud; industrial
espionage and sabotage; and blackmail.
3. Socio-cultural motivations: examples include attacks with philosophical, theological,
political, and even humanitarian goals. Socio-cultural motivations also include fun, curiosity,
and a desire for publicity or ego gratification

12

Downloaded by Srinivas Nuthlakanthi (nuthlakanthisrinivas@gmail.com)


lOMoARcPSD|53588669

Fig: 1.3 Cyber Attacker Actions


Types of cyber-attacker actions and their motivations when deliberate
1.8 Active attacks: An active attack is a network exploit in which a hacker attempts to make changes
to data on the target or data en route to the target.
1.8.1Types of Active attacks:
Masquerade: in this attack, the intruder pretends to be a particular user of a system to gain access or
to gain greater privileges than they are authorized for. A masquerade may be attempted using stolen
login IDs and passwords, through finding security gaps in programs or through bypassing the
authentication mechanism.
Session replay: In this type of attack, a hacker steals an authorized user’s log in information by
stealing the session ID. The intruder gains access and the ability to do anything the authorized user
can do on the website.
Message modification: In this attack, an intruder alters packet header addresses to direct a message
to a different destination or modify the data on a target machine. In a denial of service (DoS) attack,
users are deprived of access to a network or web resource. This is generally accomplished by
overwhelming the target with more traffic than it can handle. In a distributed denial-of-service
(DDoS) exploit, large numbers of compromised systems (sometimes called a botnet or zombie army)
attack a single target.
1.9 Passive Attacks:
Passive attacks are relatively scarce from a classification perspective, but can be carried out with
relative ease, particularly if the traffic is not encrypted.
1.9.2 Types of Passive attacks:
Eavesdropping (tapping): the attacker simply listens to messages exchanged by two entities. For the
attack to be useful, the traffic must not be encrypted. Any unencrypted information, such as a
password sent in response to an HTTP request, may be retrieved by the attacker.
Traffic analysis: the attacker looks at the metadata transmitted in traffic in order to deduce
information relating to the exchange and the participating entities, e.g. the form of the exchanged
traffic (rate, duration, etc.). In the cases where encrypted data are used, traffic analysis can also lead
13

Downloaded by Srinivas Nuthlakanthi (nuthlakanthisrinivas@gmail.com)


lOMoARcPSD|53588669

to attacks by cryptanalysis, whereby the attacker may obtain information or succeed in unencrypting
the traffic.
Software Attacks: Malicious code (sometimes called malware) is a type of software designed to take
over or damage a computer user's operating system, without the user's knowledge or approval. It can
be very difficult to remove and very damaging. Common malware examples are listed in the
following table.

14

Downloaded by Srinivas Nuthlakanthi (nuthlakanthisrinivas@gmail.com)


lOMoARcPSD|53588669

CHAPTER - 2
CYBERSPACE AND THE LAW & CYBER FORENSICS
Cyberspace can be defined as an intricate environment that involves interactions
between people, software, and services. It is maintained by the worldwide distribution of
information and communication technology devices and networks. With the benefits carried
by the technological advancements, the cyberspace today has become a common pool used
by citizens, businesses, critical information infrastructure, military and governments in a
fashion that makes it hard to induce clear boundaries among these different groups. The
cyberspace is anticipated to become even more complex in the upcoming years, with the
increase in networks and devices connected to it.
2.2 REGULATIONS
There are five predominant laws to cover when it comes to cybersecurity:
Information Technology Act, 2000 The Indian cyber laws are governed by the Information
Technology Act, penned down back in 2000. The principal impetus of this Act is to offer
reliable legal inclusiveness to eCommerce, facilitating registration of real-time records with
the Government. But with the cyber attackers getting sneakier, topped by the human tendency
to misuse technology, a series of amendments followed.
The ITA, enacted by the Parliament of India, highlights the grievous punishments and
penalties safeguarding the e-governance, e-banking, and e-commerce sectors. Now, the scope
of ITA has been enhanced to encompass all the latest communication devices.
The IT Act is the salient one, guiding the entire Indian legislation to govern cybercrimes
rigorously:
Section 43 - Applicable to people who damage the computer systems without permission
from the owner. The owner can fully claim compensation for the entire damage in such cases.
Section 66 - Applicable in case a person is found to dishonestly or fraudulently committing
any act referred to in section 43. The imprisonment term in such instances can mount up to
three years or a fine of up to Rs. 5 lakh.
Section 66B - Incorporates the punishments for fraudulently receiving stolen communication
devices or computers, which confirms a probable three years imprisonment. This term can
also be topped by Rs. 1 lakh fine, depending upon the severity.
Section 66C - This section scrutinizes the identity thefts related to imposter digital
signatures, hacking passwords, or other distinctive identification features. If proven guilty,
imprisonment of three years might also be backed by Rs.1 lakh fine.
Section 66 D - This section was inserted on-demand, focusing on punishing cheaters doing
impersonation using computer resources.

15

Downloaded by Srinivas Nuthlakanthi (nuthlakanthisrinivas@gmail.com)


lOMoARcPSD|53588669

2.3 NATIONAL CYBER SECURITY POLICY


National Cyber Security Policy is a policy framework by Department of Electronics and
Information Technology. It aims at protecting the public and private infrastructure from
cyberattacks. The policy also intends to safeguard "information, such as personal information
(of web users), financial and banking information and sovereign data". This was particularly
relevant in the wake of US National Security Agency (NSA) leaks that suggested the US
government agencies are spying on Indian users, who have no legal or technical safeguards
against it. Ministry of Communications and Information Technology (India) defines
Cyberspace as a complex environment consisting of interactions between people, software
services supported by worldwide distribution of information and communication technology.
VISION
To build a secure and resilient cyberspace for citizens, business, and government and also to
protect anyone from intervening in user's privacy.
MISSION
To protect information and information infrastructure in cyberspace, build capabilities to
prevent and respond to cyber threat, reduce vulnerabilities and minimize damage from cyber
incidents through a combination of institutional structures, people, processes, technology, and
cooperation.
OBJECTIVE
Ministry of Communications and Information Technology (India) define objectives as
follows:
 To create a secure cyber ecosystem in the country, generate adequate trust and confidence
in IT system and transactions in cyberspace and thereby enhance adoption of IT in all sectors
of the economy.
 To create an assurance framework for the design of security policies and promotion and
enabling actions for compliance to global security standards and best practices by way of
conformity assessment (Product, process, technology & people).  To strengthen the
Regulatory Framework for ensuring a SECURE CYBERSPACE ECOSYSTEM.
 To enhance and create National and Sectoral level 24X7 mechanism for obtaining
strategic information regarding threats to ICT infrastructure, creating scenarios for response,
resolution and crisis management through effective predictive, preventive, protective
response and recovery actions.
2.4 CYBER FORENSICS:
Computer forensics is the application of investigation and analysis techniques to gather and
preserve evidence.
Forensic examiners typically analyse data from personal computers, laptops, personal digital
assistants, cell phones, servers, tapes, and any other type of media. This process can involve
anything from breaking encryption, to executing search warrants with a law enforcement
team, to recovering and analyzing files from hard drives that will be critical evidence in the
most serious civil and criminal cases.
16

Downloaded by Srinivas Nuthlakanthi (nuthlakanthisrinivas@gmail.com)


lOMoARcPSD|53588669

The forensic examination of computers, and data storage media, is a complicated and highly
specialized process. The results of forensic examinations are compiled and included in
reports.
In many cases, examiners testify to their findings, where their skills and abilities are put to
ultimate scrutiny.
2.5 DIGITAL FORENSICS:
Digital Forensics is defined as the process of preservation, identification, extraction, and
documentation of computer evidence which can be used by the court of law. It is a science of
finding evidence from digital media like a computer, mobile phone, server, or network. It
provides the forensic team with the best techniques and tools to solve complicated digital
related cases.
Digital Forensics helps the forensic team to analyzes, inspect, identifies, and preserve the
digital evidence residing on various types of electronic devices. Digital forensic science is a
branch of forensic science that focuses on the recovery and investigation of material found in
digital devices related to cybercrime.
THE NEED FOR COMPUTER FORENSICS
Computer forensics is also important because it can save your organization money. ... From a
technical standpoint, the main goal of computer forensics is to identify, collect, preserve, and
analyze data in a way that preserves the integrity of the evidence collected so it can be used
effectively in a legal case.

2.6 DIGITAL FORENSICS LIFECYCLE:

Fig.2.1 Digital Forensics life cycle


Collection:
The first step in the forensic process is to identify potential sources of data and acquire data
from them.

17

Downloaded by Srinivas Nuthlakanthi (nuthlakanthisrinivas@gmail.com)


lOMoARcPSD|53588669

Examination: After data has been collected, the next phase is to examine the data, which
involves assessing and extracting the relevant pieces of information from the collected data.
This phase may also involve bypassing or mitigating OS or application features that obscure
data and code, such as data compression, encryption, and access control mechanisms.
Analysis: Once the relevant information has been extracted, the analyst should study and
analyze the data to draw conclusions from it. The foundation of forensics is using a
methodical approach to reach appropriate conclusions based on the available data or
determine that no conclusion can yet be drawn.
Reporting: The process of preparing and presenting the information resulting from the
analysis phase. Many factors affect reporting, including the following:
a. Alternative Explanations: When the information regarding an event is incomplete, it may
not be possible to arrive at a definitive explanation of what happened. When an event has two
or more plausible explanations, each should be given due consideration in the reporting
process. Analysts should use a methodical approach to attempt to prove or disprove each
possible explanation that is proposed.
b. Audience Consideration. Knowing the audience to which the data or information will be
shown is important.
c. Actionable Information. Reporting also includes identifying actionable information
gained from data that may allow an analyst to collect new sources of information

18

Downloaded by Srinivas Nuthlakanthi (nuthlakanthisrinivas@gmail.com)


lOMoARcPSD|53588669

CHAPTER – 3

STEGANOGRAPHY

3.1 What is Steganography?

Steganography is the craft of concealing the way that correspondence is occurring, by


concealing data in other data. A wide range of bearer record organizations can be utilized, yet
computerized pictures are the most mainstream considering their recurrence on the web. For
concealing mystery data in pictures, there exists a huge assortment of steganography procedures
some are more mind boggling than others and every one of them have individual solid and feeble
focuses.

The point that is chosen is Steganography Using Python, one explanation that gatecrashes can be
productive is most of the information they get from a system is in a construction that they can
scrutinize and comprehend. Intruders may uncover the information to others, change it to misshape
an individual or affiliation, or use it to dispatch an attack. One response for this issue is, utilizing
steganography. Steganography is a technique for disguising information in modernized media.

Fig.3.1 Image Steganography

Rather than cryptography, it isn’t to safeguard others from knowing the covered information,
yet it is to protect others from envisioning that the information even exists. Steganography become
progressively significant as more individuals join the internet upheaval. Steganography is the craft of
hiding data in manners that forestalls the identification of shrouded messages. Steganography
incorporates a variety of mystery specialized strategies that conceal the message from being seen or
found
19

Downloaded by Srinivas Nuthlakanthi (nuthlakanthisrinivas@gmail.com)


lOMoARcPSD|53588669

3.2 How it works?

Steganography works by concealing information in a way that avoids suspicion. One of the
most prevalent techniques is called ‘least significant bit’ (LSB) steganography. This involves
embedding the secret information in the least significant bits of a media file.

Fig.3.2 Working of Steganography

For example:

● In an image file, each pixel is made up of three bytes of data corresponding to the colors red,
green, and blue. Some image formats allocate an additional fourth byte to transparency, or
‘alpha’.
● LSB steganography alters the last bit of each of those bytes to hide one bit of data. So, to hide
one megabyte of data using this method, you would need an eight-megabyte image file.
● Modifying the last bit of the pixel value doesn’t result in a visually perceptible change to the
picture, which means that anyone viewing the original and the steganographically-modified
images won’t be able to tell the difference.

The same method can be applied to other digital media, such as audio and video, where data
is hidden in parts of the file that result in the least change to the audible or visual output.

3.3 Examples of steganography used in cyber attacks

● E-commerce skimming
In 2020, Dutch e-commerce security platform Sansec published research which showed that
threat actors had embedded skimming malware inside Scalable Vector Graphics (SVG) on
e-commerce checkout pages. The attacks involved a concealed malicious payload inside
SVG images, and a decoder hidden separately on other parts of the webpages.

20

Downloaded by Srinivas Nuthlakanthi (nuthlakanthisrinivas@gmail.com)


lOMoARcPSD|53588669

Users who entered their details on the compromised checkout pages didn’t notice anything
suspicious because the images were simple logos from well-known companies. Because the
payload was contained within what appeared to be the correct use of SVG element syntax,
standard security scanners searching for invalid syntax did not detect the malicious activity.

● SolarWinds

Also in 2020, a group of hackers hid malware inside a legitimate software update from
SolarWinds, maker of a popular IT infrastructure management platform. The hackers
successfully breached Microsoft, Intel and Cisco, in addition to various US government
agencies. Then, they used steganography to disguise the information they were stealing as
seemingly benign XML files served in HTTP response bodies from control servers. The
command data within those files was disguised as different strings of text.

● Industrial enterprises

Again in 2020, businesses in the United Kingdom, Germany, Italy, and Japan were hit by a
campaign using steganographic documents. Hackers avoided detection by using a
steganographic image uploaded on reputable image platforms, like Imgur, to infect an Excel
document. Mimikatz, a malware that steals Windows passwords, was downloaded via a
secret script included in the picture.

3.4 Advantages of steganography


Up to now, cryptography has reliably had its complete occupation in guaranteeing the secret
between the sender and the arranged gatherer. The advantage of using steganography over
cryptography alone is that the arranged secret message doesn’t stand apart to itself as an object of
assessment. Clearly clear encoded messages, paying little mind to how tough they are, animate
interest and may in themselves be embroiling in countries in which encryption is unlawful.

● Covert Communication: Steganography enables covert communication by hiding the


existence of the embedded message. Unlike encryption, which may indicate that sensitive
information is being transmitted, steganographic techniques allow users to communicate
discreetly.

● Security Through Obscurity: The embedded information is concealed within the carrier
medium, making it less likely to attract attention. As a result, steganography can provide a
layer of security through obscurity, making it harder for unauthorized individuals to detect the
presence of hidden information.

21

Downloaded by Srinivas Nuthlakanthi (nuthlakanthisrinivas@gmail.com)


lOMoARcPSD|53588669

● Dual-Layered Protection: Steganography can be used in conjunction with encryption. By


combining both techniques, users can create a dual-layered protection system where the
message is not only encrypted but also concealed within another medium, adding an extra
layer of security.
● Resistance to Cryptanalysis: Well-implemented steganographic methods can be resistant to
cryptographic analysis. The challenge of distinguishing between random noise and hidden
information makes it difficult for attackers to detect the presence of a covert message.
● Inconspicuous Transmission: Steganography allows for the inconspicuous transmission of
information through common channels. Since the carrier medium appears normal, the hidden
message can be transmitted through communication channels without raising suspicion.
● Protection Against Traffic Analysis: In situations where traffic analysis is a concern,
steganography can help protect against pattern recognition. By hiding messages within
seemingly innocuous files or communication, the patterns of communication become less
predictable.
● Digital Watermarking: Steganography is employed in digital watermarking, where
information is embedded within multimedia files to establish ownership or verify the
authenticity of the content. This is often used in copyright protection and digital media
forensics.
● Maintaining Deniability: In some scenarios, it may be important to deny the existence of
hidden information. Steganography allows for plausible deniability, as the carrier medium
appears normal, and there is no overt evidence of a hidden message.
● Resistance to Brute Force Attacks: Detecting hidden information within a steganographic
medium often requires specialized tools and knowledge. This resistance to simple brute force
attacks enhances the security of the hidden message.

3.5 How is it different from cryptography?


Cryptography and steganography are both methods used to hide or protect secret data.
However, they differ in the respect that cryptography makes the data unreadable, or hides the
meaning of the data, while steganography hides the existence of the data.
In layman’s terms, cryptography is like writing a letter in a secret language: people can read
it but won’t understand what it means. However, the existence of a (probably secret) message
would be obvious to anyone who sees the letter, and if someone either knows or figures out
your secret language, then your message can easily be read.
Similarly, if two users exchanged media files over the internet, it would be more difficult to
determine whether these files contain hidden messages than if they were communicating
using cryptography. Cryptography is often used to supplement the security offered by
steganography. Cryptography algorithms are used to encrypt secret data before embedding it
into cover files.

3.6 TYPES OF STEGANOGRAPHY


Steganography encompasses a variety of techniques for concealing information within
different types of media. The choice of steganographic method depends on the nature of the carrier
medium (e.g., images, audio, video, or text) and the specific requirements of the user.

Here are some common types of steganography:


22

Downloaded by Srinivas Nuthlakanthi (nuthlakanthisrinivas@gmail.com)


lOMoARcPSD|53588669

Fig 3.3. Types of Steganography

1. Image Steganography: Concealing information within digital images is one of the most
common forms of steganography. This involves manipulating the pixel values of an image to
embed the hidden data. Techniques include least significant bit (LSB) embedding, spread
spectrum, and transform domain methods.
2. Audio Steganography: Like image steganography, audio steganography involves hiding
information within audio files. This can be achieved by manipulating the least significant bits
of audio samples or using frequency domain techniques.
3. Video Steganography: Concealing data within video files involves techniques such as
embedding information in frames or modifying the video stream. Video steganography
methods can be more complex due to the larger volume of data in video files.
4. Text Steganography: Embedding information within text is another form of steganography.
This can involve subtle changes to the text, such as using invisible characters or altering the
spacing between words.
5. Network Steganography: Concealing information within network protocols or traffic is
known as network steganography. This can involve modifying the timing or pattern of
network packets to encode hidden data.

23

Downloaded by Srinivas Nuthlakanthi (nuthlakanthisrinivas@gmail.com)


lOMoARcPSD|53588669

CHAPTER – 4

IMAGE STEGANOGRAPHY

4.1 Introduction to Image Steganography


Image steganography is a technique that involves concealing information or data within
digital images without visibly altering the image's appearance to the human eye. The goal is to embed
a secret message or data within the pixels of an image in such a way that the changes are
imperceptible or difficult to detect. Image steganography is commonly used for secure
communication, watermarking, and digital forensics.
In this section we deal with data encoding in still digital images. In essence, image steganography is
about exploiting the limited powers of the human visual system (HVS). Within reason, any plain text,
ciphertext, other images, or anything that can be embedded in a bit stream can be hidden in an image.
Image steganography has come quite far in recent years with the development of fast, powerful
graphical computers, and steganographic software is now readily available over the Internet for
everyday users.

Fig.4.1
Working of Image steganography

4.2 Basic Process of Image Steganography:

1. Selection of Carrier Image: A carrier image is chosen as the medium to hide the
information. This image should ideally be a common image file (e.g., JPEG, PNG, BMP) and
should not attract suspicion.
2. Conversion to Binary: The carrier image is converted from its original format (e.g., RGB for
color images) into binary data. In digital systems, each pixel in an image is represented by a
set of binary values.
3. Selection of Message: The message or data that needs to be concealed is prepared. This can
be any form of digital data, such as text, files, or even another image.
4. Encoding the Message: The binary representation of the message is then embedded into the
carrier image's binary data. One common method is to modify the least significant bits (LSBs)

24

Downloaded by Srinivas Nuthlakanthi (nuthlakanthisrinivas@gmail.com)


lOMoARcPSD|53588669

of the pixel values. The LSBs are the rightmost bits in the binary representation of each
colour channel.
5. Altering Pixel Values: The LSBs of selected pixels are altered to represent the bits of the
hidden message. Since the changes are small, they are generally not noticeable to the human
eye, and the visual quality of the image remains largely unchanged.
6. Reconstruction: To retrieve the hidden message, the recipient uses a steganography tool or
algorithm to extract the altered LSBs from the carrier image. The extracted binary data is then
converted back into the original message format.

4.3 Common Techniques in Image Steganography:

1. Least Significant Bit (LSB) Embedding: This is the most straightforward method, where
the least significant bits of the pixel values are replaced with the bits of the hidden message.
This method is simple but may be vulnerable to statistical analysis.
2. Spread Spectrum Technique: This method distributes the hidden message across the entire
image, making it more resilient to detection. It involves modifying multiple pixels to
represent each bit of the hidden message.
3. Transform Domain Techniques: Techniques such as discrete cosine transform (DCT) or
discrete wavelet transform (DWT) are applied to the image before embedding the message.
This can provide better security and resistance to certain attacks.

4.4 Applications of Image Steganography:


1. Secure Communication: Concealing messages within images allows for covert
communication, adding an extra layer of security to sensitive information.
2. Digital Watermarking: Watermarking images with hidden information can be used for
copyright protection and content authentication.
3. Covert Data Transfer: Images can be used as carriers to transfer data unnoticed in scenarios
where other communication channels may be monitored.
4. Forensic Investigations: In digital forensics, steganography may be used to hide information
within images for covert communication or data concealment, requiring sophisticated analysis
tools for detection.

4.5 How is it done?


An image is represented as an N*M (in case of grayscale images) or N*M*3 (in case of color
images) matrix in memory, with each entry representing the intensity value of a pixel. In image
steganography, a message is embedded into an image by altering the values of some pixels, which are
chosen by an encryption algorithm. The recipient of the image must be aware of the same algorithm
in order to know which pixels he or she must select to extract the message.

25

Downloaded by Srinivas Nuthlakanthi (nuthlakanthisrinivas@gmail.com)


lOMoARcPSD|53588669

Fig.4.2 Hiding text in image

4.6 Features of image steganography in cryptography are:

Secrecy: The primary feature of image steganography is secrecy. The secret information
is hidden within the image in a way that is not easily detectable by an unauthorized
person.
Capacity: The capacity of an image to carry secret information depends on the size of the
image and the amount of information to be hidden. Generally, larger images have a higher
capacity to carry secret information.
Robustness: The image steganography technique should be robust, i.e., it should be able
to withstand image processing techniques like compression, cropping, and resizing
without affecting the hidden information.
Security: The security of the hidden information is of utmost importance. The image
steganography technique should be designed in such a way that it is resistant to attacks
like statistical analysis and brute force attacks.
Efficiency: The image steganography technique should be efficient, i.e., it should be able
to hide the secret information in the image quickly and effectively.
Concealment: The hidden information should be concealed in the image in a way that it
is not easily distinguishable from the original image.

26

Downloaded by Srinivas Nuthlakanthi (nuthlakanthisrinivas@gmail.com)


lOMoARcPSD|53588669

CHAPTER – 5
PROJECT : IMAGE STEGANOGRAPHY USING PYTHON
5.1 OVERVIEW
Creating an image steganography project using Python involves selecting a suitable
steganographic technique, implementing the encoding and decoding processes, and
integrating the necessary functionalities. Here's an overview of the key steps you might take
in a basic image steganography project using Python:

5.2 Introduction to Python


Python is a high-level, versatile, and easy-to-learn programming language that has gained
widespread popularity for its readability, simplicity, and comprehensive standard library. Developed
by Guido van Rossum and first released in 1991, Python is designed to emphasize code readability
and ease of use, making it an excellent choice for beginners and experienced developers alike.
5.3 Key features of Python
1. Readability and Simplicity:
Python's syntax is designed to be clear and readable, emphasizing code readability and
reducing the cost of program maintenance. The use of indentation (whitespace) rather than
curly braces for block delimiters is a distinctive feature.
2. General-Purpose Programming:
Python is a general-purpose programming language suitable for a wide range of applications,
from web development and data science to artificial intelligence and scientific computing.
3. High-Level Language:
Python is a high-level language, which means it abstracts many low-level details, making it
easier for programmers to focus on solving problems rather than dealing with system-specific
intricacies.
4. Interpreted and Interactive:
Python is an interpreted language, and it often uses an interpreter (such as CPython) to
execute code directly. Additionally, Python provides an interactive mode that allows users to
experiment with code snippets in a prompt.
5. Object-Oriented:
Python supports object-oriented programming (OOP) principles, including classes,
inheritance, and polymorphism. It allows developers to structure their code in a modular and
reusable way.
6. Extensive Standard Library:
Python comes with a comprehensive standard library that provides modules and packages for
a wide array of tasks, from file I/O to network programming and web development. This
reduces the need for external libraries in many cases.
27

Downloaded by Srinivas Nuthlakanthi (nuthlakanthisrinivas@gmail.com)


lOMoARcPSD|53588669

7. Dynamic Typing:
Python uses dynamic typing, meaning variable types are determined at runtime. This can lead
to more flexibility in code but also requires careful consideration to prevent unexpected
behavior.
8. Support for Integration:
Python easily integrates with other languages, and it supports numerous integration
mechanisms, including C/C++ libraries and APIs. This feature allows developers to leverage
existing codebases in other languages.
9. Community and Ecosystem:
Python has a vibrant and active community of developers. The Python Package Index (PyPI)
hosts a vast collection of third-party libraries and frameworks that enhance Python's
capabilities.
Python's popularity continues to grow, driven by its simplicity, readability, and suitability for
diverse applications. It remains a go-to language for both beginners and experienced
developers working on a broad spectrum of projects.

5.4 CODE:
from tkinter import *
from tkinter import messagebox as mb
from PIL import Image

# Creating the basic Python Image Steganography functions


def generate_data(pixels, data):
# This function will convert the incoming data to 8-bit binary format using its ASCII values and
return
data_in_binary = []

for i in data:
binary_data = format(ord(i), '08b')
data_in_binary.append(binary_data)

length_of_data = len(data_in_binary)
image_data = iter(pixels)

for a in range(length_of_data):
pixels = [val for val in image_data.__next__()[:3] + image_data.__next__()[:3] +
image_data.__next__()[:3]]

28

Downloaded by Srinivas Nuthlakanthi (nuthlakanthisrinivas@gmail.com)


lOMoARcPSD|53588669

for b in range(8):
if (data_in_binary[a][b] == '1') and (pixels[b] % 2 != 0):
pixels[b] -= 1
elif (data_in_binary[a][b] == '0') and (pixels[b] % 2 == 0):
if pixels[b] == 0:
pixels[b] += 1
pixels[b] -= 1

if (length_of_data-1) == a:
if pixels[-1] % 2 == 0:
if pixels[-1] == 0:
pixels[-1] += 1
else:
pixels[-1] -= 1

pixels = tuple(pixels)

yield pixels[:3]
yield pixels[3:6]
yield pixels[6:9]

def encryption(img, data):


# This method will encode data to the new image that will be created
size = img.size[0]
(x, y) = (0, 0)

for pixel in generate_data(img.getdata(), data):


img.putpixel((x, y), pixel)
if size-1 == x:
x = 0; y += 1
else:
x += 1

def main_encryption(img, text, new_image_name):


# This function will take the arguments, create a new image, encode it and save it to the same
directory
image = Image.open(img, 'r')

if (len(text) == 0) or (len(img) == 0) or (len(new_image_name) == 0):


mb.showerror("Error", 'You have not put a value! Please put all values before pressing the
button')

new_image = image.copy()
encryption(new_image, text)

29

Downloaded by Srinivas Nuthlakanthi (nuthlakanthisrinivas@gmail.com)


lOMoARcPSD|53588669

new_image_name += '.png'

new_image.save(new_image_name, 'png')

def main_decryption(img, strvar):


# This function will decode the image given to it and extract the hidden message from it
image = Image.open(img, 'r')

data = ''
image_data = iter(image.getdata())

decoding = True

while decoding:
pixels = [value for value in image_data.__next__()[:3] + image_data.__next__()[:3] +
image_data.__next__()[:3]]

# string of binary data


binary_string = ''

for i in pixels[:8]:
if i % 2 == 0:
binary_string += '0'
else:
binary_string += '1'

data += chr(int(binary_string, 2))


if pixels[-1] % 2 != 0:
strvar.set(data)

# Creating the button functions


def encode_image():
encode_wn = Toplevel(root)
encode_wn.title("Encode an Image")
encode_wn.geometry('600x220')
encode_wn.resizable(0, 0)
encode_wn.config(bg='AntiqueWhite')
Label(encode_wn, text='Encode an Image', font=("Comic Sans MS", 15),
bg='AntiqueWhite').place(x=220, rely=0)

Label(encode_wn, text='Enter the path to the image(with extension):', font=("Times New Roman",
13),
bg='AntiqueWhite').place(x=10, y=50)
Label(encode_wn, text='Enter the data to be encoded:', font=("Times New Roman", 13),
bg='AntiqueWhite').place(
30

Downloaded by Srinivas Nuthlakanthi (nuthlakanthisrinivas@gmail.com)


lOMoARcPSD|53588669

x=10, y=90)
Label(encode_wn, text='Enter the output file name (without extension):', font=("Times New
Roman", 13),
bg='AntiqueWhite').place(x=10, y=130)

img_path = Entry(encode_wn, width=35)


img_path.place(x=350, y=50)

text_to_be_encoded = Entry(encode_wn, width=35)


text_to_be_encoded.place(x=350, y=90)

after_save_path = Entry(encode_wn, width=35)


after_save_path.place(x=350, y=130)

Button(encode_wn, text='Encode the Image', font=('Helvetica', 12), bg='PaleTurquoise',


command=lambda:
main_encryption(img_path.get(), text_to_be_encoded.get(), after_save_path.get())).place(x=220,
y=175)

def decode_image():
decode_wn = Toplevel(root)
decode_wn.title("Decode an Image")
decode_wn.geometry('600x300')
decode_wn.resizable(0, 0)
decode_wn.config(bg='Bisque')

Label(decode_wn, text='Decode an Image', font=("Comic Sans MS", 15),


bg='Bisque').place(x=220, rely=0)

Label(decode_wn, text='Enter the path to the image (with extension):', font=("Times New Roman",
12),
bg='Bisque').place(x=10, y=50)

img_entry = Entry(decode_wn, width=35)


img_entry.place(x=350, y=50)

text_strvar = StringVar()

Button(decode_wn, text='Decode the Image', font=('Helvetica', 12), bg='PaleTurquoise',


command=lambda:
main_decryption(img_entry.get(), text_strvar)).place(x=220, y=90)

Label(decode_wn, text='Text that has been encoded in the image:', font=("Times New Roman",
12), bg='Bisque').place(
x=180, y=130)

31

Downloaded by Srinivas Nuthlakanthi (nuthlakanthisrinivas@gmail.com)


lOMoARcPSD|53588669

text_entry = Entry(decode_wn, width=94, text=text_strvar, state='disabled')


text_entry.place(x=15, y=160, height=100)

# Initializing the window


root = Tk()
root.title('Image Steganography')
root.geometry('300x200')
root.resizable(0, 0)
root.config(bg='NavajoWhite')

Label(root, text='Image Steganography', font=('Comic Sans MS', 15), bg='NavajoWhite',


wraplength=300).place(x=40, y=0)

Button(root, text='Encode', width=25, font=('Times New Roman', 13), bg='SteelBlue',


command=encode_image).place(
x=30, y=80)

Button(root, text='Decode', width=25, font=('Times New Roman', 13), bg='SteelBlue',


command=decode_image).place(
x=30, y=130)

# Finalizing the window


root.update()
root.mainloop()

32

Downloaded by Srinivas Nuthlakanthi (nuthlakanthisrinivas@gmail.com)


lOMoARcPSD|53588669

SCREENSHOT:

33

Downloaded by Srinivas Nuthlakanthi (nuthlakanthisrinivas@gmail.com)


lOMoARcPSD|53588669

34

Downloaded by Srinivas Nuthlakanthi (nuthlakanthisrinivas@gmail.com)


lOMoARcPSD|53588669

35

Downloaded by Srinivas Nuthlakanthi (nuthlakanthisrinivas@gmail.com)


lOMoARcPSD|53588669

CONCLUSION
In conclusion, this cyber security mini project, centered around image steganography
implemented in Python, has successfully explored the intricacies of concealing messages
within digital images as a means of enhancing data security and confidentiality.
The application of steganographic techniques, particularly leveraging Python’s capabilities,
has provided valuable insights into the practical aspects of securing information through
covert channels.
The project underscored the significance of image steganography in cyber security,
showcasing its potential advantages such as convert communication, security through
obscurity, and dual- layered protection when combined with encryption. By employing the
least significant bit(LSB) embedding technique, we demonstrated the discrete integration of
messages within the pixels of images while maintaining the visual integrity of the carrier
images.

36

Downloaded by Srinivas Nuthlakanthi (nuthlakanthisrinivas@gmail.com)

You might also like