Top Banner
 Design and Implementation of SteganographyTechniques  Project Submitted as Partial Fulfillment of the  Requirements for the Diploma Of Computer Science & Technology  By SUPARNA NATH Roll No: 15917 TIAS PATRA Roll No: 01807 TRIPTI MAITY Roll No: 01802 WOMEN’S POLYTECHNIC 1/ 1 /2 , GORIAHAT ROAD ,JODHPUR PARK,KOLKATA-700 068 Under WEST BENGAL STATE COUNCIL OF TECHNICAL EDUCATION 1
64

Stego Final

Apr 08, 2018

Download

Documents

Sukalyan Som
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 1/64

 Design and Implementation

of 

SteganographyTechniques

 Project Submitted as Partial Fulfillment of the

 Requirements for the Diploma Of 

Computer Science & Technology

 By

SUPARNA NATH Roll No: 15917

TIAS PATRA Roll No: 01807

TRIPTI MAITY Roll No: 01802

WOMEN’S POLYTECHNIC

1/ 1 /2 , GORIAHAT ROAD ,JODHPUR PARK,KOLKATA-700 068

Under

WEST BENGAL STATE COUNCIL OF TECHNICAL EDUCATION

1

Page 2: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 2/64

DECLARATION

SUPARNA NATH,TIAS PATRA,TRIPTI MAITY students of Diploma in 3rd year (6th

Semester) of WOMEN’S POLYTECHNIC hereby declare that the Project Report

entitled “Design an Implementation of Steganography  Techniques” done

by us under the guidance of Prof. Amit Kumar Mistry, H.O.D. of Computer Science

Department, WOMEN’S POLYTECHNIC, is submitted as partial fulfillment of 

the requirements for the award of diploma in COMPUTER SCIENCE &

TECHNOLOGY.

DATE: 16th May, 2011.

PLACE: Kolkata

……………………………… 

(SUPARNA NATH)

…………………………..

(TIAS PATRA)

………………………………

(TRIPTI MAITY)

2

Page 3: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 3/64

Project Outline

Project Title: Design and Implementation of Steganography Techniques

College/Institute: Women’s polytechnic, Kolkata.

Guide: Prof. Amit Kumar Mistry, Department of Computer

Science and Technology, Women’s Polytechnic

Duration: One year

Students’ Profile: Name: SUPARNA NATH

Roll No: D110054004-15917

Registration No: D091010835

Name: TIAS PATRA

Roll No: D110055005-01807

Registration No: D080901544

Name: TRIPTI MAITY  

Roll No: D110055005-01802

Registration No: D080901534

3rd Year, 6th Semester of Department of Diploma in COMPUTER 

SCIENCE & TECHNOLOGY, WOMEN’S POLYTECHNIC, KOLKATA.

3

Page 4: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 4/64

ACKNOWLEDGEMENT

 

Developing a project for research analysis is no doubt a scientific step

forward, which has helped us to gain a lot of experience that will put light to our

succeeding career.

In the preparation of this project and its formation it is represented that

there are many to whom we owe our gratitude. We are greatly indebted to Mr. Amit

Kumar Mistry, Mrs. Sharmila Roy, Mrs. Sujata Chakraborty & Mrs. Sanchita

Haldar, our respected Teachers of Institute Women’s Polytecnic, Kolkata for their

valuable suggestions regarding the development of this project.

We are also greatly indebted to Mr.Amit Kumar Mistry, HOD of 

Computer Science & Technology in Women’s Polytechnic College,Kolkata.

We are also indebted to all the staffs of our college for their help extended

to us time and again we are also grateful to our friends for their help, without which

this project work could not have taken its shape.

We are ever grateful to our parents and other family members for their

moral support and encouragement without which this project would have never

completed and above all we thank THE ALMIGHTY LORD for HIS help.

Thanking all of them and above all, to HIM.

  Suparna Nath

Tias Patra

Tripti Maity

4

Page 5: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 5/64

WOMEN’S POLYTECHNIC, JODHPUR PARK, KOLKATA

Certificate of approval

The report of the Project entitled ‘Design & Implementation of Steganography

Techniques’ carried out by Suparna Nath, Tias Patra and Tripti Maity has been

  prepared under the supervision of signed below for the partial fulfillment of the

requirements for Diploma of Computer Science & Technology awarded by West Bengal

State Council for Technical Education.

 _______________________ 

(Prof. Amit Kumar Mistry)

Dept. of Computer Science & Technology

(Internal Supervisor)

Countersigned by

………………………………………….

(Prof. Amit Kumar Mistry)

Head of the Department

Computer Science & Technology

Women’s Polytechnic, Kolkata – 700 068,

5

Page 6: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 6/64

INDEX Page No. 

1. Abstract ……………………………………………………………….

2. Introduction …………………………………………………………..

3. History of Steganography ……………………………………………

4. Secret Communication Methods ……………………………………

5. Implementation of Steganography …………………………………..

6. Different Types of Steganography……………………………………

7. Image Steganography

7.1. Least Significant Bit Insertion …………………………..

7.2.Masking & Filtering …………………………………….

7.3. Redundant Pattern Encoding……………………………..

7.4. Encrypt and Scatter ………………………………………

8. Image Compression……………………………………………………

9. Image & Transform Domain …………………………………………

10.Image Domain

10.1. LSB & Palette Based Images………………..…………….

11.Transform Domain

11.1. JPEG Compression………………………………………..

11.2. JPEG Steganography ……………………………………..

12.Evaluation of Different Techniques

12.1. Invisibility………………………………………………….

12.2. Payload Capacity…………………………………………...

12.3. Robustness Against Statistical Attacks...………………….

12.4. Robustness Against Image Manipulation…………………

12.5. Independent of File Format………………………………..

12.6. Unsuspicious Files………………………………………….

12.7. LSB in BMP…………………………………………………

12.8. LSB in GIF….……………………………………………….

12.9. JPEG Compression………………………………………….

12.10.Patchwork……..……………………………………………..

12.11.Spread Spectrum……..……………………………………..

13. Need of Steganography…….…………………………………………..

6

Page 7: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 7/64

14. Related Work ………………………………………………………….

15. Requirement Hardware………………………………………………

16. Problem Formulation

16.1. Steganography Modern Day ..……………………………

16.2. Design & Implementation

16.3. Flowchart……………………………………………………

16.4. General Algorithm to Hide Information an Image File….

16.5. Coding………………………………………………………..

17. Result…………………………………………………………………….

  17.1. Snap Shot……………………………………………………...

17.2. Result for image Steganography…………………………...

18.  Limitations…………………………………………………………….

19.  Advantages…………………………………………………………….

20.  Steganography vs. Cryptography……………………………………

21.  Steganography vs. Digital watermark………………………………

22.  Future Scope…..………………………………...................................

23.  Conclusion…………………………………………………………….

24. References……………………………………………………………..

 

7

Page 8: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 8/64

Abstract

“The Right to privacy…is the most comprehensive of rights and the right

most valued by civilized man”.

- Justice Louis Brandies, US Supreme Court, 1928.

Steganography refers to the science of ‘secret’ communication. In Steganography

technique data is hidden inside an object that looks like it contain something else.

Several objects are capable to hide information, such as images, sound clip, and

executable file & video etc. Steganography technique makes the job of the intruder

much difficult as the existence of the information is hidden. The basic idea behind our

work is to provide a good, efficient method for hiding the data from intruder or

hackers and sent information to the destination in a safer manner. There are many

different type of Steganography, like Image Steganography, Audio Steganography,

Video Steganography, Text Steganography, & Protocol Steganography, in our work 

we mainly discuss about LSB method of all the Steganography. We have also

implemented different Steganography method like image, audio and text with

encrypted information.

KEYWORDS:

 Cryptography, Watermark, Steganalysis, JPEG, BMP, Encryption, Covert channels,

Decryption, Least Significant Bit.

8

Page 9: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 9/64

Introduction

Johannes Trithemius (1462-1516) was a German Abbot. His writing, “Steganographia:

hoe est ars per occultam scripturam animi sui voluntatem absentibus aperiendi certa”

is ostensibly a work describing methods to communicate with spirits. A rough

translation of the Latin title is: “Steganography: the art through which writing is

hidden requiring recovery by the minds of men.” Although people have hidden secrets

in plain sight—now called steganography—throughout the ages, the recent growth in

computational power and technology has propelled it to the forefront of today’s

security techniques.

What is Steganography: Steganography literally means

covered writing or hidden writing i.e., writing that is known

to casual observer, is derived from Greek words ‘steganos’ 

meaning covered or secret and ‘graphy’ meaning writing or

drawing. This technique includes all methods of secure and

secret communication that conceal the existence of secret

message. From the time of Herodotus in Greece till today, Steganography has been

used in various places. Today the field attains new dimensions with the advent of 

digital computer.

When a message is encrypted, it has no meaning, and it’s easy to understand that it

contains sensitive information, a secret – and someone might try to break it.

Steganography solves this problem by hiding the sensitive information in a harmless

file called carrier file. Steganographic software enables information to be hidden in

graphics, sound files. By this technique data can be hidden inside the normal picture

without changing its appearance or size. The hidden messages need not be encrypted

and it can be in plain everyday English. Recent advances in computing and recent

interest in privacy has led to the development of steagnography.

9

Page 10: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 10/64

History Of Steganography

Through out history Steganography has been used to secretly communicate

information between People. Some examples of use of Steganography in past timesare:

1. During World War 2 invisible ink was used to write information on pieces of paper

so that the paper appeared to the average person as just being blank pieces of paper.

Liquids such as urine, milk, vinegar and fruit juices were used, because when each one

of these substances are heated they darken and become visible to the human eye.

2. In Ancient Greece they used to select messengers and shave their head, they would

then write a message on their head. Once the message had been written the hair was

allowed to grow back. After the hair grew back the messenger was sent to deliver the

message, the recipient would shave off the messengers hair to see the secret message.

3. Another method used in Greece was where someone would peel wax off a tablet that

was covered in wax, write a message underneath the wax then re-apply the wax. The

recipient of the message would simply remove the wax from the tablet to view the

message

10

Page 11: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 11/64

SECRET COMUNICATION METHODS

The secret communications methods are invisible dots, microdots, character

arrangement (other than cryptographic methods of permutation and substitution),

digital signatures, covert channels and spread-spectrum signals.

 

It’s also notoriously known that there are different ways of hiding writing between the

lines of an ordinary letter. The text or picture that you drew would only appear if you

colored over the written area with a special marker. In this case a chemical reaction

would take place once the two substances touched thus revealing the hidden message.

The common form of invisible writing is through the use of invisible inks whose

sources are milk, vinegar, fruit juices and urine. These darken when heated and they

are easy to decode. With improvements in technology, many sophisticated inks were

developed which react with various chemicals. Some messages had to be ‘developed’

much as photographs are developed with a number of chemicals in processing labs.

The Germans developed microdot technology during World War II which was

referred to as ‘the enemy’s masterpiece of espionage’. Microdots are photographs, the

size of a printed period having the clarity of standard-sized type-written pages. In the

USSR all international mailings were screened in attempt to detect any hostile

activities.

11

Page 12: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 12/64

IMPLEMENTATION OF

STEGANOGRAPHY

There are ways to hide information in an image,

audio and even text files. Moreover, if that message

is in addition encoded then it has one more supplemental level of protection. Computer

steganography is based on two principles. The first one is that the files that contain

digitized images or sound can be altered to a certain extend without loosing their

functionality

unlike other

types of data

that have to

be exact in

order to function properly, an example of that would

be a computer program.

If one step is missed or overlooked you cannot continue the process. The other

principle deals with the human inability to distinguish negligible changes in image

color or sound quality, which is especially easy to make use of in objects that contain

redundant information, be it 16-bit sound, 8-bit or even better 24-bit image. This just

meaning that it is very hard to distinguish minor changes in images with the human

eye. Speaking of images, changing the value of the least significant bit of the pixel

color.

Won’t result in any perceivable change of that color. One of the best and most widely

spread steganographic products for Windows95/98/NT is S-Tools.

Background, Evaluation method and Software evaluation which include S-Tools and

Hide and Seek v4.1 are the software packages which were reviewed with respect to

Steganographic manipulation of images. A very useful feature is the status line that

displays the largest message size that can be stored in the carrier file. All the

softwares uses the LSB method to both images and audio files. Steganography allows

you to hide information in five innocent looking files types: JPEG, PNG, BMP, HTML

and WAV.

Allows the secure transfer

of passwords between two

computers using anencrypted internet line.

An Application

Locker to

password protects

any application

installed on your

computer.

Features five

innocent carriers

for hiding: JPEG,

PNG, BMP, HTML

and WAV.

12

Page 13: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 13/64

Null ciphers (unencrypted messages) were also used. The real message is

"camouflaged" in an innocent sounding message. Due to the "sound" of many open

coded messages, the suspect communications were detected by mail filters. However

"innocent" messages were allowed to flow through. An example of a message

containing such a null cipher is German Spy in World War II:

“Apparently neutral's protest is thoroughly discounted

And ignored. Isman hard hit. Blockade issue affects

Pretext for embargo on by products, ejecting suets and

Vegetable oils. ”

Taking the second letter in each word the following message emerges: Pershing sails

from NY June 1.

Different types of Steganography:

There are many different type of Steganography, like:

Image Steganography, Audio Steganography, Video Steganography, Text

Steganography, Protocol Steganography

13

Page 14: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 14/64

Image steganography

To hide information, straight message insertion may encode every bit of information

in the image or selectively embed the message in “noisy” areas that draw less attention

 —those areas where there is a great deal of natural color variation. The message may

also be scattered randomly throughout the image. A number of ways exist to hide

information in digital media. Common approaches include

• Least significant bit insertion

• Masking and filtering

• Redundant Pattern Encoding

• Encrypt and Scatter

Each of these techniques can be applied, with varying degrees of success.

Least significant bit insertion

Least significant bit (LSB) insertion is a common and simple approach to embed

information in an image file. In this method the LSB of a byte is replaced with an M’s

bit. This technique works good for image, audio and video Steganography. To thehuman eye, the resulting image will look identical to the cover object [1, 16]. For

example, if we consider image Steganography then the letter A can be hidden in three

pixels (assuming no compression). The original raster data for 3 pixels (9 bytes) may

be

(00100111 11101001 11001000)

(00100111 11001000 11101001)

(11001000 00100111 11101001)

The binary value for A is 10000001. Inserting the binary value for A in the three pixels

would result In

(00100111 11101000 11001000)

(00100110 11001000 11101000)

(11001000 00100111 11101001)

The underlined bits are the only three actually changed in the 8 bytes used. On

average, LSB requires that only half the bits in an image be changed. You can hide

data in the least and second least significant bits and still the human eye would not be

14

Page 15: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 15/64

Fig. 1: The cover image Fig. 2: The stego-image

(after A is inserted)

able to discern it. The resultant image for the above data insertion and the original

cover image are given below.

 

Masking and filtering

Masking and filtering techniques are mostly used on 24 bit

and grey scale images. They hide info in a way similar to

watermarks on actual paper and are sometimes used as digital

watermarks. Masking images entails changing the luminance

of the masked area. The smaller the luminance change, the

less of a chance that it can be detected. Observe that the

luminance in Figure 2 is at 15% in the mask region if it was

decreased then it would be nearly invisible. Masking is more

robust than LSB insertion with respect to compression,

cropping, and some image processing. Masking techniques

embed information in significant areas so that the hidden message is more integral to

the cover image than just hiding it in the “noise” level. This makes it more suitable

than LSB with, for instance, lossy JPEG images.

15

Page 16: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 16/64

Redundant Pattern Encoding

Patchwork and other similar tools do redundant pattern encoding, which is a sort of 

spread spectrum technique. It works by scattering the message throughout the picture.

This makes the image more resistant to cropping and rotation. Smaller secret images

work better to increase the redundancy embedded in the cover image, and thus make

it easier to recover if the stego-image is manipulated.

Encrypt and Scatter

The Encrypt and Scatter technique tries to emulate white noise. It is mostly used in

image steganography.White Noise Storm is one such program that employs spread

spectrum and frequency hopping. It does this by scattering the message throughout an

image on eight channels within a random number that is generated by the previous

window size and data channel. The channels then swap rotate, and interlace amongst

each other. Each channel represents one bit and as a result there are many unaffected

bits in each channel. This technique is a lot harder to extract a message out of than an

LSB scheme because to decode you must first detect that a hidden image exists and

extract the bit pattern from the file. While that is true for any stego-image you will

also need the algorithm and stego key to decode the bit pattern, both of which are not

required to recover a message from LSB. Some people prefer this method due to the

considerable amount of extra effort that someone without the algorithm and stego-key

would have to go through to extract the message. Even though White Noise Storm

provides extra security against message extraction it is just as susceptible as straight

LSB to image degradation due to image processing .

16

Page 17: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 17/64

Image Compression

When working with larger images of greater bit depth, the images tend to become too

large to transmit over a standard Internet connection. In order to display an image in

a reasonable amount of time, techniques must be incorporated to reduce the image’s

file size. These techniques make use of mathematical formulas to analyse and condense

image data, resulting in smaller file sizes. This process is called compression. In images

there are two types of compression: lossy and lossless .Both methods save storage

space, but the procedures that they implement differ. Lossy compression creates

smaller files by discarding excess image data from the original image. It removes

details that are too small for the human eye to differentiate, resulting in closeapproximations of the original image, although not an exact duplicate. An example of 

an image format that uses this compression technique is JPEG (Joint Photographic

Experts Group).Lossless compression, on the other hand, never removes any

information from the original image, but instead represents data in mathematical

formulas. The original image’s integrity is maintained and the decompressed image

output is bit-by-bit identical to the original image input. The most popular image

formats that use lossless compression is GIF (Graphical Interchange Format) and 8-

bit BMP (a Microsoft Windows bitmap file) .Compression plays a very important role

in choosing which steganographic algorithm to use. Lossy compression techniques

result in smaller image file sizes, but it increases the possibility that the embedded

message may be partly lost due to the fact that excess image data will be removed .

Lossless compression though, keeps the original digital image intact without the

chance of lost, although is does not compress the image to such a small file size.

17

Page 18: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 18/64

Image and Transform Domain

Domain. Image – also known as spatial – domain techniques embed messages in the

intensity of the pixels directly, while for transform – also known as frequency – 

domain, images are first transformed and then the message is embedded in the image.

Image steganography techniques can be divided into two groups: those in the Image

Domain and those in the Transform Image domain techniques encompass bit-wise

methods that apply bit insertion and noise manipulation and are sometimes

characterised as “simple systems”. The image formats that are most suitable for image

domain steganography are lossless and the techniques are typically dependent on the

image format. 

Steganography in the transform domain involves the manipulation of algorithms and

image transforms. These methods hide messages in more significant areas of the cover

image, making it more robust. Many transform domain methods are independent of 

the image format and the embedded message may survive conversion between lossy

and lossless compression.

In the next sections steganographic algorithms will be explained in categories

according to image file formats and the domain in which they are performed.

 

Categories of image steganography

18

Page 19: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 19/64

Image Domain

LSB and Palette Based Images

Palette based images, for example GIF images, are another popular image file format

commonly used on the Internet. By definition a GIF image cannot have a bit depth

greater than 8, thus the maximum number of colours that a GIF can store is 256. GIF

images are indexed images where the colours used in the image are stored in a palette,

sometimes referred to as a colour lookup table. Each pixel is represented as a single

byte and the pixel data is an index to the colour palette. The colours of the palette are

typically ordered from the most used colour to the least used colours to reduce lookup

time.

GIF images can also be used for LSB steganography, although extra care should be

taken. The problem with the palette approach used with GIF images is that should one

change the least significant bit of a pixel, it can result in a completely different colour

since the index to the colour palette is changed. If adjacent palette entries are similar,

there might be little or no noticeable change, but should the adjacent palette entries be

very dissimilar, the change would be evident.One possible solution is to sort the palette

so that the colour differences between consecutive colours are minimized. Another

solution is to add new colours which are visually similar to the existing colours in the

palette. This requires the original image to have less unique colours than the

maximum number of colours (this value depends on the bit depth used). Using this

approach, one should thus carefully choose the right cover image. Unfortunately any

tampering with the palette of an indexed image leaves a very clear signature, making it

easier to detect.

A final solution to the problem is to use greyscale images. In an 8-bit greyscale GIF

image, there are 256 different shades of grey. The changes between the colours are

very gradual, making it harder to detect.

19

Page 20: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 20/64

Transform Domain

To understand the steganography algorithms that can be used when embedding data

in the transform domain, one must first explain the type of file format connected with

this domain. The JPEG file format is the most popular image file format on the

Internet, because of the small size of the images.

JPEG compression

To compress an image into JPEG format, the RGB colour representation is first

converted to a YUV representation. In this representation the Y component

corresponds to the luminance (or brightness) and the U and V components stand for

chrominance (or colour). According to research the human eye is more sensitive to

changes in the brightness (luminance) of a pixel than to changes in its colour . This fact

is exploited by the JPEG compression by downsampling the colour data to reduce the

size of the file. The colour components (U and V) are halved in horizontal and vertical

directions, thus decreasing the file size by a factor of 2.

The next step is the actual transformation of the image. For JPEG, the Discrete Cosine

Transform (DCT) is used, but similar transforms are for example the Discrete Fourier

Transform (DFT). These mathematical transforms convert the pixels in such a way as

to give the effect of “spreading” the location of the pixel values over part of the image.

The DCT transforms a signal from an image representation into a frequency

representation, by grouping the pixels into 8 × 8 pixel blocks and transforming the

pixel blocks into 64 DCT coefficients each . A modification of a single DCT coefficient

will affect all 64 image pixels in that block.

The next step is the quantization phase of the compression. Here another biological

property of the human eye is exploited: The human eye is fairly good at spotting small

differences in brightness over a relatively large area, but not so good as to distinguish

between different strengths in high frequency brightness . This means that the

strength of higher frequencies can be diminished, without changing the appearance of 

the image. JPEG does this by dividing all the values in a block by a quantization

coefficient. The results are rounded to integer values and the coefficients are encoded

using Huffman coding to further reduce the size.

20

Page 21: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 21/64

JPEG steganography

Originally it was thought that steganography would not be possible to use with JPEG

images, since they use lossy compression which results in parts of the image data beingaltered. One of the major characteristics of steganography is the fact that information

is hidden in the redundant bits of an object and since redundant bits are left out when

using JPEG it was feared that the hidden message would be destroyed. Even if one

could somehow keep the message intact it would be difficult to embed the message

without the changes being noticeable because of the harsh compression applied.

However, properties of the compression algorithm have been exploited in order to

develop a steganographic algorithm for JPEGs.

One of these properties of JPEG is exploited to make the changes to the image

invisible to the human eye. During the DCT transformation phase of the compression

algorithm, rounding errors occur in the coefficient data that are not noticeable [14].

Although this property is what classifies the algorithm as being lossy, this property can

also be used to hide messages. It is neither feasible nor possible to embed information

in an image that uses lossy compression, since the compression would destroy all

information in the process. Thus it is important to recognize that the JPEG

compression algorithm is actually divided into lossy and lossless stages. The DCT and

the quantization phase form part of the lossy stage, while the Huffman encoding used

to further compress the data is lossless. Steganography can take place between these

two stages. Using the same principles of LSB insertion the message can be embedded

into the least significant bits of the coefficients before applying the Huffman encoding.

By embedding the information at this stage, in the transform domain, it is extremely

difficult to detect, since it is not in the visual domain.

Evaluation of different techniques

All the above mentioned algorithms for image steganography have different strong

and weak points and it is important to ensure that one uses the most suitable

algorithm for an application. All steganographic algorithms have to comply with a few

basic requirements. The most important requirement is that a steganographic

algorithm has to be imperceptible. The authors propose a set of criteria to further

define the imperceptibility of an algorithm. These requirements are as follows:

21

Page 22: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 22/64

Invisibility  –   The invisibility of a steganographic algorithm is the first and

foremost requirement, since the strength of steganography lies in its ability to be

unnoticed by the human eye. The moment that one can see that an image has beentampered with, the algorithm is compromised

Payload capacity  –   Unlike watermarking, which needs to embed only a small

amount of copyright information, steganography aims at hidden communication and

therefore requires sufficient embedding capacity.

Robustness against statistical attacks   –  Statistical steganalysis is the

practice of detecting hidden information through applying statistical tests on image

data. Many steganographic algorithms leave a ‘signature’ when embedding

information that can be easily detected through statistical analysis. To be able to pass

by a warden without being detected, a steganographic algorithm must not leave such a

mark in the image as be statistically significant.

Robustness against image manipulation  –   In the communication of a

stego image by trusted systems, the image may undergo changes by an active warden

in an attempt to remove hidden information. Image manipulation, such as cropping or

rotating, can be performed on the image before it reaches its destination. Depending

on the manner in which the message is embedded, these manipulations may destroy

the hidden message. It is preferable for steganographic algorithms to be robust against

either malicious or unintentional changes to the image.

Independent of File Format – With many different image file formats used

on the Internet, it might seem suspicious that only one type of file format is

continuously communicated between two parties. The most powerful steganographic

algorithms thus possess the ability to embed information in any type of file. This also

solves the problem of not always being able to find a suitable image at the right

moment, in the right format to use as a cover image.

Unsuspicious files  – This requirement includes all characteristics of a

steganographic algorithm that may result in images that are not used normally and

22

Page 23: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 23/64

may cause suspicion. Abnormal file size, for example, is one property of an image that

can result in further investigation of the image by a warden.

The following table compares least significant bit (LSB) insertion in BMP and in GIF

files, JPEG compression steganography, the patchwork approach and spread

spectrum techniques as discussed in section 3, according to the above requirements:

LSB in

BMPLSB in GIF

JPEG

compressionPatchwork 

Spread

spectrum

Invisibility High* Medium* High High High

Payload

capacityHigh Medium Medium Low Medium

Robustness

against

statistical

attacks

Low Low Medium High High

Robustness

against

image

manipulation

Low Low Medium High Medium

Independentof file

format

Low Low Low High High

Unsuspicious

filesLow Low High High High

* - Depends on cover image used

Table 1: Comparison of image steganography algorithms

The levels at which the algorithms satisfy the requirements are defined as high,

medium and low. A high level means that the algorithm completely satisfies the

requirement, while a low level indicates that the algorithm has a weakness in this

requirement. A medium level indicates that the requirement depends on outside

influences, for example the cover image used. LSB in GIF images has the potential of 

hiding a large message, but only when the most suitable cover image has been chosen.

The ideal, in other words a perfect, steganographic algorithm would have a high level

in every requirement. Unfortunately in the algorithms that are evaluated here, there is

not one algorithm that satisfies all of the requirements. Thus a trade-off will exist in

23

Page 24: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 24/64

most cases, depending on which requirements are more important for the specific

application.

LSB in BMP  – When embedding a message in a “raw” image, that has not been

changed with compression, such as a BMP, there exists a trade-off between the

invisibility of the message and the amount of information that can be embedded. A

BMP is capable of hiding quite a large message, but the fact that more bits are altered

results in a larger possibility that the altered bits can be seen with the human eye. The

main disadvantage regarding LSB in BMP images is surely the suspicion that might

arise from a very large BMP image being transmitted between parties, since BMP is

not widely used anymore.

Suggested applications: LSB in BMP is most suitable for applications where

the focus is on the amount of information to be transmitted and not on the secrecy of 

that information.

LSB in GIF  –  The strong and weak points regarding embedding information in

GIF images using LSB are more or less the same as those of using LSB with BMP. The

main difference is that since GIF images only have a bit depth of 8, the amount of 

information that can be hidden is less than with BMP. GIF images are especially

vulnerable to statistical – or visual attacks – since the palette processing that has to be

done leaves a very definite signature on the image. This approach is dependent on the

file format as well as the image itself, since a wrong choice of image can result in the

message being visible.

Suggested applications: LSB in GIF is a very efficient algorithm to use when

embedding a reasonable amount of data in a greyscale image.

JPEG compression   –  The process of embedding information during JPEG

compression results in a stego image with a high level of invisibility, since the

embedding takes place in the transform domain.JPEG is the most popular image file

format on the Internet and the image sizes are small because of the compression, thus

24

Page 25: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 25/64

making it the least suspicious algorithm to use. However, the process of the

compression is a very mathematical process, making it more difficult to implement.

Suggested applications: The JPEG file format can be used for most

applications of steganography, but is especially suitable for images that have to be

communicated over an open systems environment like the Internet.

Patchwork   – The biggest disadvantage of the patchwork approach is the small

amount of information that can be hidden in one image. This property can be changed

to accommodate more information but one may have to sacrifice the secrecy of the

information. Patchwork’s main advantage, however, is its robustness against malicious

or unintentional image manipulation. Should a stego image using patchwork be

cropped or rotated, some of the message data may be lost but since the message is

repeatedly embedded in the image, most of the information will survive.

Suggested applications:  Patchwork is most suitable for transmitting a small

amount of very sensitive information.

Spread spectrum  – Spread spectrum techniques satisfies most requirements and

is especially robust against statistical attacks, since the hidden information is scattered

throughout the image, while not changing the statistical properties.

Suggested applications : Spread spectrum techniques can be used for moststeganography applications, although its highly mathematical and intricate approach

may prove too much for some.

Need of the Steganography

Steganography can be used anytime you want to hide data. There are many reasons to

hide data but they all boil down to the desire to prevent unauthorized persons from

25

Page 26: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 26/64

becoming aware of the existence of a message. In the business world Steganography

can be used to hide a secret chemical formula or plans for a new invention.

Steganography can also be used for corporate espionage by sending out trade secrets

without anyone at the company being any the wiser. Steganography can also be used

in the noncommercial sector to hide information that someone wants to keep private.

Spies have used it since the time of the Greeks to pass messages undetected. Terrorists

can also use Steganography to keep their communications secret and to coordinate

attacks. It is exactly this potential that we will investigate in the next section. Because

you can hide information without the cover source changing, Steganography can also

be used to implement watermarking. Although the concept of watermarking is not

necessarily Steganography, there are several Steganographic techniques that are being

used to store watermarks in data. The main difference is on intent, while the purpose

of Steganography is hiding information, watermarking is merely extending the cover

source with extra information. Since people will not accept noticeable changes in

images, audio or video files because of a watermark, Steganographic methods can be

used to hide this.

Related Works:

There are many Steganography tools which are capable of hiding data within an

image. These tools can be classified into five categories based on their algorithms:

(1) spatial domain based tools; (2) transform domain based tools; (3) document

based tools; (4) file structure based tools; and (5) other categories such as

video compress encoding and spread spectrum technique based tools. The

spatial domain based Steganography tools use either the LSB or Bit Plane

Complexity Segmentation (BPCS) algorithm. The LSB algorithm uses

either a sequential or scattered embedding schemes for hiding the messagebits in the image. In the sequential embedding scheme, the LSBs of the

image are replaced by the message bit sequentially (i.e. one by one in order,

as mentioned in the introduction). In the scattered embedding scheme, the

message bits are randomly.Scattered throughout the whole image using a

random sequence to control the embedding sequence. Two basic types of 

LSB modifications can be used for the embedding schemes . They are LSB

replacement and LSB matching. In LSB replacement, the LSB of the

carrier is replaced by the message bit directly. On the other hand, in LSB

matching if the LSB of the cover pixel is the same as the message bit, then it

remains unchanged; otherwise, it is randomly incremented or decremented

by one. This technique, however, requires both the sender and the receiverto have the same original image, which makes LSB matching very

26

Page 27: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 27/64

inconvenient .The current Steganography tools based on the LSB

algorithms include S-Tools, Hide and Seek, Hide4PGP and Secure Engine

Professional. These tools support BMP, GIF, PNG images and WAV audio

files as the carriers [36]. Each of these tools has unique features. S-Tools

reduce the number of colors in the image to only 32 colors. Hide and Seek 

makes all the palette entries divisible by four. In addition, it forces theimages sizes to be 320x200, 320x400, 320x480, 640x400 or 1024x3668

pixels.Hide4PGP embeds the message in every LSB of an 8-bit BMP images,

and in every fourth LSB of a 24- bit BMP image. These applications are

flawed because they do not analyze the image file after it has been

embedded with data to see how vulnerable it is to steganalysis. The

transform domain based Steganography tools embed the message in the

transform coefficients of the image. The main transform domain algorithm

is JSteg .These applications can only work with JPGs because most other

image formats do not perform transforms on their data. The document

based steganography tools embed the secret message in document files by

adding tabs or spaces to .txt or .doc files .These applications are limitedbecause they only work with document files. They also cannot hide much

data because there are a very limited number of tabs or spaces they can

reasonably be added to a document. In addition, they are vulnerable to

steganalysis because it is easy for an attacker to notice a document file that

has been embedded with additional tabs or spaces. The file structure based

steganography tools embed the secret message in the redundant bits of a

cover file such as the reserved bits in the file header or the marker segments

in the file format. These applications cannot hide very large data files

because there are a very limited number of header or marker segments

available for embedding hidden data. There are also steganography tools

based on video compression and spread spectrum techniques. The large size

of video files provides more usable space for hiding of the message. The

spread spectrum technique spreads the energy of embedded message to a

wide frequency band, making the hidden message difficult to detect .These

Steganography tools are inconvenient because they require the users to send

an entire video file every time they want to send hidden data.

Required Hardware & Software

Required Software to implement our work is Visual Basic, and minimum

hardware required is RAM 2 GB, hard disk 500 GB etc.

Problem Formulation

Problem Statement:

27

Page 28: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 28/64

♦ Alice and Bob are in male/female prisons and want to communicate to make an

escape plan. Willie warden would let them communicate but would monitor the

communication.

Same as in our case if we sent the data by a solution needs to be found out suchthat the communication would seem to be innocent to person who is not aware

that “something lies beneath it”. Embedding it into an image, audio or text file,

the interceptor would not able to guess about the embedded data in image.

Steganography – Modern Day

Design and Implementation

28

Page 29: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 29/64

We have done a method to hide information into an audio file, image file &text file.

We describe this algorithm & flow chart below:

Flowchart:

General Algorithm to Hide Information into an Image File:

Take the stego

object image

Take the secret

message

Choose a good

encryption algorithm

Encrypt the message

Merge the

encrypted text

with stego objectsend

Extract data

from stego

object

Sender site Receiver site

Take the data

Choose decryption

algorithm

Decrypt

message

Receive the

message

29

Page 30: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 30/64

We design a modified LSB coding method, which is described below:

The steps of modified LSB (Least significant bit encoding) algorithm are:

Step 1: Convert the image/audio/text file in bit pattern.

Step 2: Then encrypt the message which you want to send, using any encryption

algorithm .

Step 3: Then convert the message in bit pattern.

Step 4: Then replace the LSB bit from image/audio/text file with bit from

character of the message.

Step 5: The process is reversed for message extraction .

CODING

30

Page 31: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 31/64

Code for splash screen:

Code for Enter bottom:

Private Sub Command1_Click()

LOG.Show

Splash.Hide

End Sub

Code for Exit bottom:

Private Sub Command2_Click()

Unload Me

End Sub

Code for Login Form:

Code for Admin Login bottom:

Private Sub Command3_Click()

db.Open

Set rs = db.Execute("SELECT * FROM login where username='" & txt_username.Text &"'")

If (txt_password = "" And txt_username = "") Then

MsgBox "Login not possible"

Else

If Not rs.EOF() Then

If (rs(1) = txt_password.Text) Then

MsgBox "Login Successful"

Form5.Show

Unload Me

Else

MsgBox "Login not success"

31

Page 32: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 32/64

End If 

Else

MsgBox "EOF Reached"

End If 

End If 

db.Close

End Sub

Code for Cancel bottom:

Private Sub Command2_Click()

Unload Me

End Sub

Code for manage user , steganogrphy tool & Log out:

Code for manage user:

Private Sub Command1_Click()

USERREG.Show

Unload Me

End Sub

Code for user registration form:

Code for common code:

Private Sub CLEARCONTROLS()

USERIDCMB.Visible = False

REGFRAME.Visible = True

USERTYPEADD

USERIDTXT.Text = ""

PASSTXT.Text = ""

32

Page 33: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 33/64

REPASSTXT.Text = ""

USERNAMETXT.Text = ""

USERIDTXT.SetFocus

End Sub

Code for UserId Add:

Private Sub USERIDADD()

USERIDCMB.Clear 

Set RS1 = db.Execute("SELECT USERID FROM VALIDATION")

While RS1.EOF = False

USERIDCMB.AddItem RS1(0)

RS1.MoveNext

Wend

End Sub

Code for User Type:

Private Sub USERTYPEADD()

USERTYPECMB.Clear 

USERTYPECMB.AddItem "ADMINISTRATOR"

USERTYPECMB.AddItem "OPERATOR"

End Sub

Code for ADD OPTION:

Private Sub ADDOPT_Click()

CLEARCONTROLS

End Sub

Code for BACK bottom:

Private Sub Back_Click()

33

Page 34: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 34/64

Form5.Show

Unload Me

End Sub

Code for DELETE OPTION:

Private Sub DELOPT_Click()

REGFRAME.Visible = False

Label7.Visible = True

USERIDCMB.Visible = True

USERIDADD

End Sub

Code for Form Load:

Private Sub Form_Load()

db.Open

Me.Width = Screen.Width

PASSTXT.PasswordChar = "^"

REPASSTXT.PasswordChar = "^"

REGFRAME.Visible = False

USERIDCMB.Visible = False

Label7.Visible = False

End Sub

Code for MODIFY OPTION:

Private Sub MODOPT_Click()

CLEARCONTROLS

End Sub

Code for REGISTER bottom:

34

Page 35: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 35/64

Private Sub REGBTN_Click()

If DELOPT.Value = True Then

db.Execute ("DELETE FROM VALIDATION WHERE USERID='" & USERIDCMB.Text& "'")

MsgBox "Record Deleted."

Unload Me

ADDOPT_Click 

End If 

If ADDOPT.Value = True Then

Set RS1 = db.Execute("SELECT USERID,UserName FROM VALIDATION")

While RS1.EOF = False

If RS1!UserID = USERIDTXT.Text Or RS1!UserName = USERNAMETXT.Text Then

MsgBox "SELECT DIFFERENT USERID!"

ADDOPT_Click 

Exit Sub

End If 

RS1.MoveNext

Wend

db.Execute ("INSERT INTO VALIDATION VALUES('" & USERIDTXT.Text & "','" _ 

& USERNAMETXT.Text & "','" & PASSTXT.Text & "','" & USERTYPECMB.Text &"')")

MsgBox "RECORD SAVED"

ADDOPT_Click 

End If 

If MODOPT.Value = True Then

Dim FOUND As Boolean

FOUND = False

Set RS1 = db.Execute("SELECT USERID FROM VALIDATION")

While RS1.EOF = False

If RS1!UserID = USERIDTXT.Text Then

35

Page 36: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 36/64

FOUND = True

End If 

RS1.MoveNext

Wend

If FOUND = True Then

db.Execute ("DELETE FROM VALIDATION WHERE USERID='" & USERIDTXT.Text& "'")

db.Execute ("INSERT INTO VALIDATION VALUES('" & USERIDTXT.Text & "','" _ 

& USERNAMETXT.Text & "','" & PASSTXT.Text & "','" & USERTYPECMB.Text &"')")

Else

MsgBox "USERID NOT FOUND"

End If 

End If 

End Sub

Private Sub REPASSTXT_LostFocus()

If REPASSTXT.Text <> PASSTXT.Text ThenMsgBox "PASSWORD DOES NOT MATCH"

PASSTXT.Text = ""

REPASSTXT.Text = ""

PASSTXT.SetFocus

Exit Sub

End If 

End Sub

Code for stego tool:

Private Sub Command2_Click()

Form1.Show

Unload Me

End Sub

Code for Steganography Tool:

36

Page 37: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 37/64

Private Declare Function OSGetPrivateProfileInt Lib "kernel32" Alias"GetPrivateProfileIntA" (ByVal lpApplicationName As String, ByVal lpKeyName AsString, ByVal nDefault As Long, ByVal lpFileName As String) As Long

Private Declare Function OSGetPrivateProfileSection Lib "kernel32" Alias

"GetPrivateProfileSectionA" (ByVal lpAppName As String, ByVal lpReturnedString AsString, ByVal nSize As Long, ByVal lpFileName As String) As Long

Private Declare Function OSGetPrivateProfileString Lib "kernel32" Alias"GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName AsAny, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long,ByVal lpFileName As String) As Long

Private Declare Function OSWritePrivateProfileSection Lib "kernel32" Alias"WritePrivateProfileSectionA" (ByVal lpAppName As String, ByVal lpString As String,

ByVal lpFileName As String) As Long

Private Declare Function OSWritePrivateProfileString Lib "kernel32" Alias"WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName AsAny, ByVal lpString As Any, ByVal lpFileName As String) As Long

Private Declare Function OSGetProfileInt Lib "kernel32" Alias "GetProfileIntA" (ByVallpAppName As String, ByVal lpKeyName As String, ByVal nDefault As Long) As Long

Private Declare Function OSGetProfileSection Lib "kernel32" Alias "GetProfileSectionA"(ByVal lpAppName As String, ByVal lpReturnedString As String, ByVal nSize As Long)As Long

Private Declare Function OSGetProfileString Lib "kernel32" Alias "GetProfileStringA"(ByVal lpAppName As String, ByVal lpKeyName As String, ByVal lpDefault As String,ByVal lpReturnedString As String, ByVal nSize As Long) As Long

Private Declare Function OSWriteProfileSection Lib "kernel32" Alias"WriteProfileSectionA" (ByVal lpAppName As String, ByVal lpString As String) As Long

Private Declare Function OSWriteProfileString Lib "kernel32" Alias "WriteProfileStringA"(ByVal lpszSection As String, ByVal lpszKeyName As String, ByVal lpszString As String)As Long

'Private Const nBUFSIZEINI = 1024

'Private Const nBUFSIZEINIALL = 4096

Private Const nBUFSIZEINI = 10000

Private Const nBUFSIZEINIALL = 10000

Private Function SaveSettings(Optional IfEncypted As Boolean)

Dim fFile As Integer, str(11) As String, i, tt As Double

fFile = FreeFile

37

Page 38: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 38/64

If CheckIfAlready = True Then Exit Function

Open fl For Append As fFile

Print #fFile, vbCrLf 

Print #fFile, "[x]"

If IfEncypted = True Then

Print #fFile, "me=" & Mess

DoEvents

Else

Print #fFile, "to=" & Text1.Text

Print #fFile, "su=" & Text2.Text

Print #fFile, "bo=" & Text3.Text

DoEvents

End If 

Close fFile

MsgBox "The information has been successfully written in the file!", vbInformation,"Done"

End Function

Private Function SaveSettingsSection(ByVal NewSectionName As String, OptionalIfEncypted As Boolean)

Dim fFile As Integer, str(11) As String, i, tt As Double

fFile = FreeFile

Open fl For Append As fFile

Print #fFile, vbCrLf 

Print #fFile, "[" & NewSectionName & "]"

If IfEncypted = True Then

Print #fFile, "me=" & Mess

DoEvents

Else

Print #fFile, "to=" & Text1.Text

Print #fFile, "su=" & Text2.Text

38

Page 39: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 39/64

Print #fFile, "bo=" & Text3.Text

DoEvents

End If 

Close fFile

MsgBox "The information has been successfully written in the file!", vbInformation,"Done"

End Function

Private Function CheckIfAlready() As Boolean

On Error Resume Next

Dim st As String, i As Integer, n As Integer 

Open fl For Input As 1

OpenTheFile fl, st, 1

For i = 1 To Len(st)

n = InStr(1, st, "[x]")

 Next

If n <> 0 Then

If MsgBox("This file already contains hidden information. Do you want to view it now or reset it?", vbInformation + vbOKCancel, "Found") = vbOK Then

Command2_Click 

CheckIfAlready = True

Else

'delete data

For i = n To Len(st)

Regenerate "c:\x.bmp", n, ""

Next

CheckIfAlready = True

MsgBox "The file has been reset. It can now be used!"

'Exit Function

End If 

39

Page 40: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 40/64

Else

MsgBox "No Information Found! The file can be used!"

CheckIfAlready = False

End If 

Close fl

End Function

Public Sub OpenTheFile(ByVal TheFilename As String, Storage As String, Optional ModeAs Integer)

On Error Resume Next

If Mode = 2 Then

test = ""

If TheFilename = "" Then Exit Sub

Open TheFilename For Output As 1

'Write #1, ""

Print #1, " "

Close 1

Exit Sub

Else

If Mode = 1 Then

test = ""

If TheFilename = "" Then Exit Sub

Open TheFilename For Input As 1

While Not EOF(1)

Line Input #1, test

Storage = Storage & test 'Replace(RTrim(test), Chr(34), "")

Wend

Close 1

Exit Sub

End If 

40

Page 41: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 41/64

End If 

'TrapIt: ' MsgBox err.Description, vbCritical, " Error"

End Sub

Private Function Regenerate(ByVal FileName As String, ByVal byteLocation As Long,ByVal SaveData As String)

'On Error Resume Next

Dim txt$, Fls As New FileSystemObject

'Fls.CreateTextFile FileName, True

txt$ = SaveData

Open (FileName) For Binary As #1

Put #1, byteLocation, ""

Close #1

End Function

Private Sub Combo1_Click()

On Error Resume Next

c1.FileName = ""

If Combo1.ListIndex = 0 Then

c1.DialogTitle = "Select a text file or document..."

c1.Filter = "All Doc's |*.txt;*.doc;*.ppt"

c1.ShowOpen

image1.Picture = LoadPicture()

image1.Cls

image1.Print "TEXT FILE"

Else

If Combo1.ListIndex = 1 Then

c1.DialogTitle = "Select an image file..."

c1.Filter = "All Image Files |*.bmp;*.jpeg;*.jpg;*.gif;*.png;*.tiff"

c1.ShowOpen

image1.Cls

41

Page 42: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 42/64

image1.Picture = LoadPicture(c1.FileName)

Else

If Combo1.ListIndex = 2 Then

c1.DialogTitle = "Select a video file..."

c1.Filter = "All Video Files |*.avi;*.mpeg;*.mpg"

c1.ShowOpen

image1.Picture = LoadPicture()

image1.Cls

image1.Print "VIDEO FILE"

Else

If Combo1.ListIndex = 3 Then

c1.DialogTitle = "Select a File..."

c1.Filter = "All Files *.*|*.*"

c1.ShowOpen

image1.Picture = LoadPicture()

image1.Cls

image1.Print "ARBITRARY FILE"

End If 

End If 

End If 

End If 

fl = c1.FileName

Mess = ""

End Sub

Private Sub Command1_Click()

If Mess <> "" Then

If MsgBox("Are you sure you want to add the following encrypted information into theselected file ? " & vbCrLf & Mess, vbInformation + vbOKCancel, "Save Data") = vbOK Then

SaveSettings True

42

Page 43: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 43/64

Exit Sub

End If 

Else

Mess = ""

If MsgBox("Are you sure you want to add the Entered information into the selected file ? "& vbCrLf & Mess, vbInformation + vbOKCancel, "Save Data") = vbOK Then

SaveSettings False

Exit Sub

End If 

End If 

End Sub

Private Sub Command10_Click()

Dialog1.Show

End Sub

Private Sub Command2_Click()

Dim tt, s As String

Dim m As String

Dim n(3) As String

m = GetPrivateProfileString("x", "me", "", fl)

Mess = m

If m = "" Or m = " " Then

n(1) = GetPrivateProfileString("x", "to", "", fl)

n(2) = GetPrivateProfileString("x", "su", "", fl)

n(3) = GetPrivateProfileString("x", "bo", "", fl)

Dialog2.Text1.Text = "To \ from : " & n(1) & vbCrLf & "Subject : " & n(2) & vbCrLf &"Body : " & n(3)

Dialog2.Show

MsgBox "The information has been successfully retrieved!", vbInformation, "Information"

Exit Sub

43

Page 44: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 44/64

Else

If Left(m, 4) = "**0*" Then

MsgBox "This file is encrypted! You must enter a password to authorize...", vbInformation,"Encrypted File"

decryptit

Exit Sub

End If 

End If 

End Sub

Public Function decryptit()

Dim x As Integer 

Dim EncStr As String

Dim EncKey As String

Dim TempEncKey As String

Dim EncLen As Integer 

Dim EncPos As Integer 

Dim EncKeyPos As Integer 

Dim tempChar As String

Dim TA As Integer, TB As Integer, TC As Integer 

TempEncKey = InputBox("Enter the Password to access this file!", "Enter Password!","")

If TempEncKey = "" Then Exit Function

EncStr = ""

EncPos = 1

EncKeyPos = 1

For x = 1 To Len(TempEncKey)

EncKey = EncKey & Asc(Mid$(TempEncKey, x, 1))

Next

EncLen = Len(EncKey)

44

Page 45: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 45/64

For x = 6 To Len(Mess) Step 8

TB = Asc(Mid$(EncKey, EncKeyPos, 1))

EncKeyPos = EncKeyPos + 1

If EncKeyPos > EncLen Then EncKeyPos = 1

tempChar = Mid$(Mess, x, 8)

TA = BintoDec(tempChar)

TC = TB Xor TA

EncStr = EncStr & Chr$(TC)

Next

Mess = EncStr 

Dialog2.Text1.Text = Mess

Dialog2.Show

End Function

Private Sub Command3_Click()

CheckIfAlready

End Sub

Private Sub Command4_Click()

SavePicture image1.Picture, App.Path & "\test.bmp"

Dialog.Show

End Sub

Private Sub Command5_Click()

Mess = ""

Mess = Mess & vbCrLf & _ 

"To \ From - " & Text1.Text & vbCrLf & _ 

"Subject - " & Text2.Text & vbCrLf & vbCrLf & _ 

"Body - " & Text3.Text & vbCrLf & _ 

"End of Message"

45

Page 46: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 46/64

If MsgBox("Are you sure you want to encrypt the following information ? " & vbCrLf &Mess, vbInformation + vbOKCancel, "Save Data") = vbOK Then

Dim x As Integer 

Dim tempTxt

'**0*

If Left(m, 4) = "**0*" Then

MsgBox "The file is already encrypted!", vbInformation, "File already encrypted!"

Exit Sub

End If 

Dim EncStr As String

Dim EncKey As String, TempEncKey As String

Dim EncLen As Integer 

Dim EncPos As Integer 

Dim EncKeyPos As Integer 

Dim tempChar As String

Dim TA As Integer, TB As Integer, TC As Integer 

TempEncKey = InputBox("Enter the Password", "Password!")

If TempEncKey = "" Then Exit Sub

EncStr = ""

EncPos = 1

EncKeyPos = 1

For x = 1 To Len(TempEncKey)

EncKey = EncKey & Asc(Mid$(TempEncKey, x, 1))

Next

EncLen = Len(EncKey)

For x = 1 To Len(Mess)

TB = Asc(Mid$(EncKey, EncKeyPos, 1))

EncKeyPos = EncKeyPos + 1

If EncKeyPos > EncLen Then

EncKeyPos = 1

46

Page 47: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 47/64

End If 

TA = Asc(Mid$(Mess, x, 1))

TC = TB Xor TA

tempChar = GetBinary(TC)

EncStr = EncStr & tempChar 

Next

Mess = ""

Mess = "**0* " & EncStr 

Else

Exit Sub

End If 

End Sub

Private Sub Command6_Click()

On Error Resume Next

Dim st As String, i As Integer, n As Integer 

Dim m As Integer, j As Integer, k As Integer 

Dim ia(50) As Integer, ib(50) As Integer, r As Integer 

Dim tempS(100) As String, tempSa As String

OpenTheFile fl, st, 1

'Number of sections and encypted 1's

For i = 1 To Len(st)

If Mid(st, i, 1) = "[" Then

n = n + 1

Else

End If 

 Next

For i = 1 To Len(st)

If Mid(st, i, 1) = "me= " Or Mid(st, i, 1) = "me=" Then

47

Page 48: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 48/64

m = m + 1

Else

End If 

 Next

'Name of various sections

r = 1

For i = 1 To Len(st)

If Mid(st, i, 1) = "[" Then

ia(r) = i

r = r + 1

Else

End If 

 Next

r = 1

For i = 1 To Len(st)

If Mid(st, i, 1) = "]" Then

ib(r) = i

r = r + 1

Else

End If 

 Next

For k = 1 To r 

tempS(k) = Mid(st, ia(k), (ib(k) - ia(k)) + 1)

tempSa = tempSa & vbCrLf & tempS(k)

 Next

MsgBox "The following information was retrieved :" & vbCrLf & _ 

"Number of sections : " & n & vbCrLf & _ 

"Number of Encrypted Sections: " & m & vbCrLf & _ 

"Number of Non Encrypted Sections: " & (n - m) & vbCrLf & _ 

48

Page 49: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 49/64

"Name of the various Sections: " & tempSa, vbInformation, "Data Hider"

End Sub

Private Sub Command7_Click()

Dialog3.Show

End Sub

Private Sub Command8_Click()

If Mess <> "" Then

If MsgBox("Are you sure you want to add the following encrypted information into theselected file ? " & vbCrLf & Mess, vbInformation + vbOKCancel, "Save Data") = vbOK Then

SaveSettingsSection InputBox("Enter a section name here.Make sure you donot enter sname that is already there in the file.. : ", "New Section", "New Section"), True

Exit Sub

End If 

Else

Mess = ""

If MsgBox("Are you sure you want to add the entered information into the selected file ? "& vbCrLf & Mess, vbInformation + vbOKCancel, "Save Data") = vbOK Then

SaveSettingsSection InputBox("Enter a section name here.Make sure you donot enter sname that is already there in the file.. : ", "New Section", "New Section"), False

Exit Sub

End If 

End If 

End Sub

Private Sub Form_Load()

'On Error Resume Next

End Sub

49

Page 50: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 50/64

Public Function GetPrivateProfileString(ByVal szSection As String, ByVal szEntry As

Variant, ByVal szDefault As String, ByVal szFileName As String) As String

' *** Get an entry in the inifile ***

Dim szTmp As String

Dim nRet As Long

If (IsNull(szEntry)) Then

' *** Get names of all entries in the named Section ***

szTmp = String$(nBUFSIZEINIALL, 0)

nRet = OSGetPrivateProfileString(szSection, 0&, szDefault, szTmp,nBUFSIZEINIALL, szFileName)

Else

' *** Get the value of the named Entry ***

szTmp = String$(nBUFSIZEINI, 0)

nRet = OSGetPrivateProfileString(szSection, CStr(szEntry), szDefault, szTmp,nBUFSIZEINI, szFileName)

End If 

GetPrivateProfileString = Left$(szTmp, nRet)

End Function

Private Function GetProfileString(ByVal szSection As String, ByVal szEntry As

Variant, ByVal szDefault As String) As String

' *** Get an entry in the WIN inifile ***

Dim szTmp As String

Dim nRet As Long

If (IsNull(szEntry)) Then

' *** Get names of all entries in the named Section ***

szTmp = String$(nBUFSIZEINIALL, 0)

nRet = OSGetProfileString(szSection, 0&, szDefault, szTmp, nBUFSIZEINIALL)

Else

' *** Get the value of the named Entry ***

szTmp = String$(nBUFSIZEINI, 0)

nRet = OSGetProfileString(szSection, CStr(szEntry), szDefault, szTmp, nBUFSIZEINI)

50

Page 51: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 51/64

End If 

GetProfileString = Left$(szTmp, nRet)

End Function

Private Sub Image1_Click()

'c1.Filter = "All Files *.*|*.*"

End Sub

Code for LOG OUT:

Private Sub Command3_Click()

LOG.Show

Unload Me

End Sub

SNAP SHOT

51

Page 52: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 52/64

SPLASH SCREEN (WELCOME SCREEN TO THE PROJECT)

LOGIN SCREEN (USER AUTHENTICATION)

52

Page 53: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 53/64

Page 54: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 54/64

NEW USER REGISTRATION FORM

54

Page 55: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 55/64

STEGANOGRAPHY TOOL FORM

ENCRYPTING THE MESSAGE FOR IMAGE STEGANOGRAPHY

55

Page 56: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 56/64

ENCRYPTING THE MESSAGE FOR IMAGE STEGANOGRAPHY

THE GENERATED BIT STREAM FOR THE PLAIN TEXT

56

Page 57: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 57/64

Page 58: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 58/64

MESSAGE RETRIEVAL FROM IAMGE WITH PALIN TEXT

MESSAGE RETRIEVAL FROM IAMGE WITH PALIN TEXT

58

Page 59: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 59/64

M e s s a g e s iz e v s E n c r  

2 9 . 8 7

3 5 . 0 9

4 0 . 6 6

4 5 . 0 6

0

1 0

2 0

3 0

4 0

5 0

6 9 1 2 1 8

m e s sa g e si z e ( c h a r  

   E   n   c   r   y   p   t   t   i   m   e    (   s    )

M e s s a g e le n g t h V s . D e c

1 9 . 8 72 3 . 0 9

3 7 . 6 63 5 . 0 6

0

5

1 0

1 5

2 0

2 5

3 0

3 5

4 0

1 2 3 4

M e ss a g e l e n g t h

   D   e   c   r   y   p   t   t   i   m   e    (   s    )

MESSAGE RETRIEVED FROM IAMGE WITH PALIN TEXT

Result

Result for image Steganography

For a picture with different Message length, to encrypt and decrypt a message the time

needed to execute will be different. And its corresponding graph is as follows:-

59

Page 60: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 60/64

Limitations

There are limitations on the use of steganography due to the size of the medium being

used to hide the data. In order for steganography to be useful the message should be

hidden without any major changes to the object it is being embedded in. This leaves

limited room to embed a message without noticeably changing the original object. This

is most obvious in compressed files where many of the obvious candidates for

embedding data are lost. Detecting hidden data remains an active area of research.

How do you protect against malicious Steganography?

Unfortunately, all of the methods mentioned above can also be used to hide illicit,

unauthorized or unwanted activity. What can be done to prevent or detect issues with

steganography? Other uses for steganography range from the trivial to the abhorrent,

including Criminal communications, Fraud, Hacking, Electronic payments, Gambling,

pornography, Harassment, Intellectual property offenses Viruses,Pedophilia.

Advantages

Attempting to detect the use of steganography is called Steganalysis (the task of 

detecting and possibly disabling steganographic information) and can be either

passive, where the presence of the hidden data is detected, or active, where an attempt

is made to retrieve the hidden data it is not infallible. But it considerably increases the

work of any experienced code-breaker, who must identify first the right carrier,

extract the sensitive data from it, and only after that (if he gets this far) – the hard

work of breaking the code. Today, less painful but more cryptic methods could be used

to hide information in publicly  available web site images. The image is visibly

indiscernible even to a trained eye. The only hope is to enlist science to see past the

pixels, but is this possible?

60

Page 61: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 61/64

STEGANOGRAPHY vs CRYPTOGRAPHY

Cryptography

(i) Message is not hidden.

(ii) Enemy can intercept the message.

(iii) Enemy can decrypt the message.

Steganography

(i) Message is hidden.

(ii) Enemy must discover the medium.

File encryption is based on encryption algorithms - a process capable of translating

data into a secret code. In Cryptography, encrypted message is sent. If it is

intercepted, the interceptor knows that the text is an encrypted message. In

Steganography, the fact that the message is being sent is unknown. So, the interceptor

may not know the object contains a message. Steganography is not intended to replace

Cryptography but supplement it, Cryptography + Steganography = Secured

Steganography.

 

STEGANOGRAPHY vs DIGITAL WATERMARK 

Digital watermark 

Digital watermarks are employed in an attempt to provide proof of ownership and

identify illicit copying and distribution of multimedia information. The role of digital

watermarking as a means of aiding in copyright and ownership issues. Alternatives to

digital watermarking techniques are explored as countermeasures to distortion attacks

against carrier. Despite, Steganography may have nothing to do with the cover which

is the object of communication.

Future Scope:

Hides your

sensitive data

into innocent

files, so nobody

can find them.

Several strong encryption

algorithms (AES - Rijndael,

Blowfish, Twofish, GOST,

Cast128, RC4, etc.).

61

Page 62: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 62/64

In future we can use other stronger encoding and decoding & stronger encryption &

decryption algorithm to provide more security to send the message.

This project has been developed for embedding image files into “jpg” files &audio files

into “wav” files & text into “txt” file. In the near future, this may be extended to hide

any type of file into any other type of file. Enhancements should be made to

contemplate video and other files.

The methods used in the science of steganography have advanced a lot over the past

centuries, especially with the rise of the computer era. Although the techniques are

still not used very often, the possibilities are endless. Many different techniques exist

and continue to be developed, while the ways of detecting hidden messages also

advance quickly.

Conclusion

Although only some of the main image steganographic techniques were discussed in

this paper, one can see thatthere exists a large selection of approaches to hiding

information in images. All the major image file formats have different methods of 

hiding messages, with different strong and weak points respectively. Where one

technique lacks in payload capacity, the other lacks in robustness. For example, the

patchwork approach has a very high level of robustness against most type of attacks,

but can hide only a very small amount of information. Least significant bit (LSB) in

both BMP and GIF makes up for this, but both approaches result in suspicious files

that increase the probability of detection when in the presence of a warden.

Thus for an agent to decide on which steganographic algorithm to use, he would have

to decide on the type of application he want to use the algorithm for and if he is willing

to compromise on some features to ensure the security of others.

List of references

62

Page 63: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 63/64

[1] Moerland, T., “Steganography and Steganalysis”, Leiden Institute of Advanced 

Computing Science, www.liacs.nl/home/ tmoerl/privtech.pdf 

[2] Silman, J., “Steganography and Steganalysis: An Overview”, SANS Institute, 2001

[3] Jamil, T., “Steganography: The art of hiding information is plain sight”, IEEE 

 Potentials, 18:01, 1999

[4] Wang, H & Wang, S, “Cyber warfare: Steganography vs. Steganalysis”,

Communications of the ACM , 47:10, October 2004

[5] Anderson, R.J. & Petitcolas, F.A.P., “On the limits of steganography”, IEEE 

 Journal of selected Areas in Communications, May 1998

[6] Marvel, L.M., Boncelet Jr., C.G. & Retter, C., “Spread Spectrum Steganography”,

 IEEE Transactions on image processing , 8:08, 1999

[7] Dunbar, B., “Steganographic techniques and their use in an Open-Systemsenvironment”, SANS Institute, January 2002

[8] Artz, D., “Digital Steganography: Hiding Data within Data”, IEEE Internet 

Computing Journal , June 2001

[9] Simmons, G., “The prisoners problem and the subliminal channel”, CRYPTO, 1983

[10] Chandramouli, R., Kharrazi, M. & Memon, N., “Image steganography and

steganalysis: Concepts and Practice”, Proceedings of the 2nd International Workshop

on Digital Watermarking , October 2003

[11] Currie, D.L. & Irvine, C.E., “Surmounting the effects of lossy compression onSteganography”, 19th National Information Systems Security Conference, 1996

[12] Handel, T. & Sandford, M., “Hiding data in the OSI network model”,

 Proceedings of the 1 st  International Workshop on Information Hiding , June 1996

[13] Ahsan, K. & Kundur, D., “Practical Data hiding in TCP/IP”, Proceedings of the

Workshop on Multimedia Security at ACM Multimedia, 2002

[14] Johnson, N.F. & Jajodia, S., “Exploring Steganography: Seeing the Unseen”,

Computer Journal , February 1998

[15] “Reference guide: Graphics Technical Options and Decisions”,http://www.devx.com/projectcool/Article/19997

[16] Owens, M., “A discussion of covert channels and steganography”, SANS Institute,

2002

[17] Johnson, N.F. & Jajodia, S., “Steganalysis of Images Created Using Current

Steganography Software”, Proceedings of the 2nd Information Hiding Workshop, April

1998

[18] Venkatraman, S., Abraham, A. & Paprzycki, M., “Significance of Steganography

on Data Security”, Proceedings of the International Conference on Information

Technology: Coding and Computing , 2004

63

Page 64: Stego Final

8/6/2019 Stego Final

http://slidepdf.com/reader/full/stego-final 64/64

[19] Krenn, R., “Steganography and Steganalysis”,

http://www.krenn.nl/univ/cry/steg/article.pdf 

[20] Lee, Y.K. & Chen, L.H., “High capacity image steganographic model”, Visual 

 Image Signal Processing , 147:03, June 2000

[21] Provos, N. & Honeyman, P., “Hide and Seek: An introduction to steganography”,

 IEEE Security and Privacy Journal , 2003

[22] Bender, W., Gruhl, D., Morimoto, N. & Lu, A., “Techniques for data hiding”,

 IBM Systems Journal , Vol 35, 1996

[23] Petitcolas, F.A.P., Anderson, R.J. & Kuhn, M.G., “Information Hiding – A

survey”, Proceedings of the IEEE , 87:07, July 1999

[24] T Morkel, JHP Eloff and MS Olivier, "An Overview of Image Steganography," in

 Proceedings of the Fifth Annual Information Security South Africa Conference

(ISSA2005), Sandton, South Africa, June/July 2005 (Published electronically)