SlideShare a Scribd company logo
1 of 30
Click to edit Master title style
1
STEGANOGRAPHY IN
PYTHON
MIHIR SHAH
Click to edit Master title style
2
$whoami
MIHIR SHAH | SHAHENSHAH99 | SHAHENSAH
Click to edit Master title style
3
W h a t i f I t o l d y o u t h i s a d o r a b l e p u p p y w a s h i d i n g a s e c r e t m e s s a g e ?
I n t h i s t a l k , w e ’ l l f i n d o u t h o w t h i s d o g w a s c o n v i n c e d t o h i d e a
m e s s a g e f o r u s . . . a n d h o w t o l e a r n i t s s e c r e t s . A l o n g t h e w a y, w e ’ l l
l e a r n a l o t a b o u t h o w i m a g e s w o r k a n d j u s t e n o u g h m a t h t o m a k e
y o u r h i g h s c h o o l t e a c h e r s a y “ I t o l d y o u s o . ”
L e t ’s s t a r t w i t h t h e b a s i c s . Yo u m i g h t a l r e a d y k n o w s o m e o f t h i s ,
b u t s t i c k w i t h m e h e r e
Click to edit Master title style
4
What is Steganography?
Origin of the term: steganos: secret – graphy: writing
Basically Steganography is hiding data into
images, Audio/Video files or even a wireless
Capture!(.pcap)
Click to edit Master title style
5
What else?
Well, barding from the hiding part, the logic or the
algorithm used in steganography is also used for di gital
watermarking.
But Why to use digital watermark?
1. Primarily for identification
2. Embedding a unique piece of information within a
medium (typically an image) without noticeably altering the
medium
3. Almost impossible to remove without seriously degrading
an image
Click to edit Master title style
6
Steganography and Digital Watermarking
• Digital watermarking hides data in a file, and the act of hiding
data makes it a form or steganography
• The key difference is their goals...
• Steganography: hiding information
• Watermarking: extending the file with extra information
• Steganographic information must never be apparent to a viewer
unaware of its presence.
Click to edit Master title style
7
Computers are really just things that take bits:
01100010 01101100 01100001 01100011
01101011 01101000 01101001 01101100
01101100 01110011 01101001 01101110
01100110 01101111 01110011 01100101
01100011 00101110 01100011 01101111
01101101 00101111 01101100 01101100
And turn them into other bits:
01101010 01101111 01101000 01101110
00100000 01110010 01101111 01100011
01101011 01110011
Click to edit Master title style
8
Unfortunately, though, not very many people can read
binary, and so those bits have to be turned into
something that actual humans can understand (since,
for now at least, computers exist to serve humans).
This creates problems. Who says what patterns of bits
turn into what words and pictures on a screen?
Nobody, that’s who. Er, also kind of everybody. Or
maybe just some certain special people? Turns out,
it’s a huge mess.
Various people and groups, at various times, for
various reasons, have stuck a flag in the ground and
said “THIS is how you turn a bunch of bits into an
image of a cat!”
Click to edit Master title style
9
That means that this staggeringly lame 2x2 pixel image that I made just now:
Is actually this:
01000010 01001101 01000110 00000000 00000000 00000000 BMF...
00000000 00000000 00000000 00000000 00110110 00000000 ....6.
00000000 00000000 00101000 00000000 00000000 00000000 ..(...
00000010 00000000 00000000 00000000 00000010 00000000 ......
00000000 00000000 00000001 00000000 00011000 00000000 ......
00000000 00000000 00000000 00000000 00010000 00000000 ......
00000000 00000000 00000000 00000000 00000000 00000000 ......
00000000 00000000 00000000 00000000 00000000 00000000 ......
00000000 00000000 00000000 00000000 00000000 00000000 ......
11111111 00100110 00000000 00000000 00000000 00000000 .&....
00000000 00000000 00000000 00000000 11111111 00000000 ......
01111111 01011011 00000000 00000000 .[..
Click to edit Master title style
10
In images, the least significant bit in R, G, and B for each pixel does nearly
nothing, while the most significant bit can really ruin your day. For instance,
this is what happens when you take each of the 8 bits out of a black and white
bitmap one layer at a time and make an image out of each layer. Each image
represents one “significance level” of bits; the most significant bit is on the top
left, and the least significant on the bottom right.
Click to edit Master title style
1111
See how the most significant bit (top left) makes up most of the
image, while the least significant bit (bottom right) is basically just
random noise? I bet you could change all of those least significant
bits (or maybe even the last two) and nothing would look different
in the final image. . . perhaps you could change them in some sort
of pattern. . . like in a message, say.
Click to edit Master title style
1212
Just a thought.
Here’s what happens when we take that puppy and flip the least significant
bits
of every pixel (each of R, G, and B) to all be 1, then the last two bits to both
be one, then the last three, and so on:
Click to edit Master title style
1313
Click to edit Master title style
14
DEMO – MAKE BITS OF MESSAGE AND FEED IT TO THE IMAGE
14
Click to edit Master title style
1515
You’re probably wondering. . . why are we repeating the message so
much? Nine times per bit seems excessive.
It turns out that we aren’t the only people who have noticed that the
least significant bits in an image are basically random. Someone has
beaten us to our own hiding place, and they’re using it for boring stuff.
The objective of compression, according to Wikipedia, is “to reduce
irrelevance
and redundancy of the image data in order to be able to store or transmit
data
in an efficient form.”
Click to edit Master title style
1616
But that “irrelevant and redundant data” is where we wanted to put our sneaky
message stuff, and compression destroys those bits. Drat. Turns out if there are
useless bits, such as the least significant bit of each pixel value, they’re perfect
for hiding things in because nobody cares about them, but also the first to get
thrown out by compression... because nobody cares about them. 
So we fight back, by repeating ourselves a bunch so that even if some bits get
flipped by compression, our data still mostly makes it through. It’s not elegant,
but it works.
Click to edit Master title style
17
DEMO – RETRIEVE THE DATA FROM AN IMAGE
17
Click to edit Master title style
18
UH-OH ERRORS!!
We a r e c u r r e n t l y f a c i n g t wo m a j o r p r o b l e m s wi t h o u r c o d e r i g h t n o w:
1 . T h e p r o g r a m i s n o t v e r y e ff i c i e n t , l i k e 9 t i m e r u n n i n g a l o o p i s n o
p i e c e o f c a k e , m y c o n d o l e n c e s t o t h e p r o c e s s o r. T h i s wa s a n i m a g e
wi t h s m a l l d i m e n s i o n b u t t h e i m a g e s wh i c h a r e l a r g e r i n s i z e , wo u l d
b e t a k i n g h e l l l o t o f t i m e ( R I P i n t e l )
2 . We s t i l l c a n n o t e v a d e f e w o f t h e c o m p r e s s i o n t e c h n i q u e s , e v e n a f t e r
c h a n g i n g t h e l a s t 3 L S B s t h e i m a g e i s s t i l l r e s i l i e n t t o i n c l u d e o u r
m e s s a g e
S o t h e m i l l i o n d o l l a r q u e s t i o n i s h o w t o o v e r c o m e t h e a b o v e t wo
i s s u e s ?
Click to edit Master title style
19
LETS LEARN PARITY FIRST
E s s e n t i a l l y, a p a r i t y b i t a d d s a c h e c k t o a n y g i v e n b i n a r y s t r i n g t h a t t e l l s
u s w h e t h e r t h e n u m b e r o f 1 - b i t s i n t h e s t r i n g i s o d d . F o r i n s t a n c e : t h e
s t r i n g 0 0 0 h a s n o 1 - b i t s , s o i t s p a r i t y b i t w o u l d b e 0 ( l e a v i n g u s w i t h t h e
f i n a l s t r i n g 0 0 0 0 ) . I n c o n t r a s t , t h e s t r i n g 0 1 0 h a s a n o d d n u m b e r o f 1 - b i t s ,
s o i t s p a r i t y b i t i s 1 , l e a v i n g u s w i t h 0 1 0 1 . Yo u ’ l l n o t i c e t h a t t h i s m e a n s
e v e r y s t r i n g h a s a n e v e n n u m b e r o f o n e s i n i t o n c e t h e p a r i t y b i t i s a d d e d .
T h e p r o c e s s i s :
1 . C o m p u t e p a r i t y b i t s b a s e d o n y o u r m e s s a g e . I f i t h a s a n o d d n u m b e r o f 1
v a l u e s , t h e p a r i t y b i t i s 1 , o t h e r w i s e t h e p a r i t y b i t i s 0 .
2 . P u t t h o s e p a r i t y b i t s i n t o t h e m e s s a g e ; t h e y ’ r e f r e q u e n t l y o n t h e e n d ,
b u t i t d o e s n ’ t a c t u a l l y m a t t e r w h e r e t h e y a r e s o l o n g a s t h e r e c e i v e r k n o w s
w h e r e t o f i n d t h e m .
Click to edit Master title style
20
Why Should I know
what on earth Parity is?
if a bit gets flipped somewhere in the string,
we can tell something is wrong by checking
the parity bit (if the string 0101 from above
comes across as 1101 , we know that the
parity bit of 110 should be 0 - but it’s
1, so something must be wrong).
But how to know which bit was flipped?
Click to edit Master title style
21
Hamming Codes
Case 1:
Click to edit Master title style
22
One Level Up:
Case 2 -
22
Click to edit Master title style
23
I think this is going somewhere
Case 3 -
23
Click to edit Master title style
24
Hey, I know what to do!
Case 4 -
24
Click to edit Master title style
25
OK, Perhaps I don’t, NVM 
25
Click to edit Master title style
26
Now This Blows my head -
26
Click to edit Master title style
27
Lets put this all together in a python code and get done,
Checkout my GitHub repo for image-steganography
because the code involves a lot of math, which is like
awesome but then this talk should come to an end, mind
you I have included comments at almost each and every line
of code to explain what’s happening so anyone
understanding how python works, should be good to go to
read and understand the code
https://github.com/shahenshah99/Image-steganography.git
27
Click to edit Master title style
28
Lets Talk about the CodeFest-2018
CTF including steganography
28
Click to edit Master title style
29
QUESTIONS?
29
Click to edit Master title style
30
Thank you 
30

More Related Content

What's hot

Steganography - The art of hiding data
Steganography - The art of hiding dataSteganography - The art of hiding data
Steganography - The art of hiding dataSarin Thapa
 
Image Steganography Project Report
Image Steganography Project ReportImage Steganography Project Report
Image Steganography Project ReportVijayMaheshwari12
 
Steganography ProjectReport
Steganography ProjectReportSteganography ProjectReport
Steganography ProjectReportekta sharma
 
sharing the data using audio and image Steganography-
sharing the data using audio and image Steganography- sharing the data using audio and image Steganography-
sharing the data using audio and image Steganography- Nikhil Praharshi
 
Steganography
SteganographySteganography
SteganographyPREMKUMAR
 
Steganography chandni verma(cse 4th year)
Steganography chandni verma(cse 4th year)Steganography chandni verma(cse 4th year)
Steganography chandni verma(cse 4th year)Chandni Verma
 
Steganography - A smart way to hide data
Steganography - A smart way to hide data Steganography - A smart way to hide data
Steganography - A smart way to hide data Sanjay Bhoyar
 
Information and data security steganography and watermarking
Information and data security steganography and watermarkingInformation and data security steganography and watermarking
Information and data security steganography and watermarkingMazin Alwaaly
 
Steganography and its techniques
Steganography and its techniquesSteganography and its techniques
Steganography and its techniquesFatema Panvelwala
 
AUDIO STEGANOGRAPHY PRESENTATION
AUDIO STEGANOGRAPHY PRESENTATIONAUDIO STEGANOGRAPHY PRESENTATION
AUDIO STEGANOGRAPHY PRESENTATIONManush Desai
 
Presentation On Steganography
Presentation On SteganographyPresentation On Steganography
Presentation On SteganographyTeachMission
 
Steganography Project
Steganography Project Steganography Project
Steganography Project Uttam Jain
 

What's hot (20)

Steganography
SteganographySteganography
Steganography
 
Steganography
SteganographySteganography
Steganography
 
Steganography
SteganographySteganography
Steganography
 
Steganography - The art of hiding data
Steganography - The art of hiding dataSteganography - The art of hiding data
Steganography - The art of hiding data
 
Image Steganography Project Report
Image Steganography Project ReportImage Steganography Project Report
Image Steganography Project Report
 
Steganography
SteganographySteganography
Steganography
 
Steganography ProjectReport
Steganography ProjectReportSteganography ProjectReport
Steganography ProjectReport
 
sharing the data using audio and image Steganography-
sharing the data using audio and image Steganography- sharing the data using audio and image Steganography-
sharing the data using audio and image Steganography-
 
Art of Steganography
Art of SteganographyArt of Steganography
Art of Steganography
 
Steganography
SteganographySteganography
Steganography
 
Steganography
SteganographySteganography
Steganography
 
Steganography chandni verma(cse 4th year)
Steganography chandni verma(cse 4th year)Steganography chandni verma(cse 4th year)
Steganography chandni verma(cse 4th year)
 
Steganography - A smart way to hide data
Steganography - A smart way to hide data Steganography - A smart way to hide data
Steganography - A smart way to hide data
 
Information and data security steganography and watermarking
Information and data security steganography and watermarkingInformation and data security steganography and watermarking
Information and data security steganography and watermarking
 
Steganography and its techniques
Steganography and its techniquesSteganography and its techniques
Steganography and its techniques
 
About Steganography
About SteganographyAbout Steganography
About Steganography
 
AUDIO STEGANOGRAPHY PRESENTATION
AUDIO STEGANOGRAPHY PRESENTATIONAUDIO STEGANOGRAPHY PRESENTATION
AUDIO STEGANOGRAPHY PRESENTATION
 
Audio Steganography synopsis
Audio Steganography synopsisAudio Steganography synopsis
Audio Steganography synopsis
 
Presentation On Steganography
Presentation On SteganographyPresentation On Steganography
Presentation On Steganography
 
Steganography Project
Steganography Project Steganography Project
Steganography Project
 

Similar to Stego.ppt

Artificial Intelligence and Machine Learning
Artificial Intelligence and Machine LearningArtificial Intelligence and Machine Learning
Artificial Intelligence and Machine LearningAbhishek Sharma
 
Demonolithing The Monolith? Bullocks!
Demonolithing The Monolith?  Bullocks!Demonolithing The Monolith?  Bullocks!
Demonolithing The Monolith? Bullocks!Scott Sosna
 
Presentation For Minnor Project MCET
Presentation For Minnor Project MCETPresentation For Minnor Project MCET
Presentation For Minnor Project MCETShhuvradipChakrabort
 
All guidance live.pdf
All guidance live.pdf All guidance live.pdf
All guidance live.pdf Bossmancyfer
 
All guidance live.pdf. try it >>> https://bit.ly/3HEXGsi
All guidance live.pdf.    try it >>>  https://bit.ly/3HEXGsi All guidance live.pdf.    try it >>>  https://bit.ly/3HEXGsi
All guidance live.pdf. try it >>> https://bit.ly/3HEXGsi Bossmancyfer
 
EMPLOYEE BRAND AMBASSADORS ARE THE LOYAL LABRADORS FOR SUCCESSFUL COMPANIES—G...
EMPLOYEE BRAND AMBASSADORS ARE THE LOYAL LABRADORS FOR SUCCESSFUL COMPANIES—G...EMPLOYEE BRAND AMBASSADORS ARE THE LOYAL LABRADORS FOR SUCCESSFUL COMPANIES—G...
EMPLOYEE BRAND AMBASSADORS ARE THE LOYAL LABRADORS FOR SUCCESSFUL COMPANIES—G...BOMBDIGGITY, LLC
 
The Art of Creative webinar
The Art of Creative webinarThe Art of Creative webinar
The Art of Creative webinarFluid
 
Lucky 13 List for Leaders Who Want to Engage Employees and Create Brand Ambas...
Lucky 13 List for Leaders Who Want to Engage Employees and Create Brand Ambas...Lucky 13 List for Leaders Who Want to Engage Employees and Create Brand Ambas...
Lucky 13 List for Leaders Who Want to Engage Employees and Create Brand Ambas...BOMBDIGGITY, LLC
 
Renee stevens breakingyour computerhabit
Renee stevens breakingyour computerhabitRenee stevens breakingyour computerhabit
Renee stevens breakingyour computerhabitRenée Stevens
 
Virus and Anti-virus.pptx
Virus and Anti-virus.pptxVirus and Anti-virus.pptx
Virus and Anti-virus.pptxSujayGhosh17
 
Project ENGR-102.pptx
Project ENGR-102.pptxProject ENGR-102.pptx
Project ENGR-102.pptxGabrielAbuid1
 
4ps of Marketing Mix(Reebok).pptx
4ps of Marketing Mix(Reebok).pptx4ps of Marketing Mix(Reebok).pptx
4ps of Marketing Mix(Reebok).pptxAsmita Yadav
 
But today, theyre n o t e n o u g h . D o y o u f i n d .docx
But today, theyre n o t e n o u g h .  D o y o u f i n d .docxBut today, theyre n o t e n o u g h .  D o y o u f i n d .docx
But today, theyre n o t e n o u g h . D o y o u f i n d .docxhumphrieskalyn
 

Similar to Stego.ppt (20)

Artificial Intelligence and Machine Learning
Artificial Intelligence and Machine LearningArtificial Intelligence and Machine Learning
Artificial Intelligence and Machine Learning
 
War robot.pptx
War robot.pptxWar robot.pptx
War robot.pptx
 
Demonolithing The Monolith? Bullocks!
Demonolithing The Monolith?  Bullocks!Demonolithing The Monolith?  Bullocks!
Demonolithing The Monolith? Bullocks!
 
Its My Data Not Yours!
Its My Data Not Yours!Its My Data Not Yours!
Its My Data Not Yours!
 
Presentation For Minnor Project MCET
Presentation For Minnor Project MCETPresentation For Minnor Project MCET
Presentation For Minnor Project MCET
 
ILFS Case study
ILFS Case studyILFS Case study
ILFS Case study
 
ENG4000 Documents
ENG4000 DocumentsENG4000 Documents
ENG4000 Documents
 
All guidance live.pdf
All guidance live.pdf All guidance live.pdf
All guidance live.pdf
 
All guidance live.pdf. try it >>> https://bit.ly/3HEXGsi
All guidance live.pdf.    try it >>>  https://bit.ly/3HEXGsi All guidance live.pdf.    try it >>>  https://bit.ly/3HEXGsi
All guidance live.pdf. try it >>> https://bit.ly/3HEXGsi
 
Engineer Internship
Engineer InternshipEngineer Internship
Engineer Internship
 
Project ppt.pdf
Project ppt.pdfProject ppt.pdf
Project ppt.pdf
 
EMPLOYEE BRAND AMBASSADORS ARE THE LOYAL LABRADORS FOR SUCCESSFUL COMPANIES—G...
EMPLOYEE BRAND AMBASSADORS ARE THE LOYAL LABRADORS FOR SUCCESSFUL COMPANIES—G...EMPLOYEE BRAND AMBASSADORS ARE THE LOYAL LABRADORS FOR SUCCESSFUL COMPANIES—G...
EMPLOYEE BRAND AMBASSADORS ARE THE LOYAL LABRADORS FOR SUCCESSFUL COMPANIES—G...
 
The Art of Creative webinar
The Art of Creative webinarThe Art of Creative webinar
The Art of Creative webinar
 
Lucky 13 List for Leaders Who Want to Engage Employees and Create Brand Ambas...
Lucky 13 List for Leaders Who Want to Engage Employees and Create Brand Ambas...Lucky 13 List for Leaders Who Want to Engage Employees and Create Brand Ambas...
Lucky 13 List for Leaders Who Want to Engage Employees and Create Brand Ambas...
 
Evaluación final
Evaluación finalEvaluación final
Evaluación final
 
Renee stevens breakingyour computerhabit
Renee stevens breakingyour computerhabitRenee stevens breakingyour computerhabit
Renee stevens breakingyour computerhabit
 
Virus and Anti-virus.pptx
Virus and Anti-virus.pptxVirus and Anti-virus.pptx
Virus and Anti-virus.pptx
 
Project ENGR-102.pptx
Project ENGR-102.pptxProject ENGR-102.pptx
Project ENGR-102.pptx
 
4ps of Marketing Mix(Reebok).pptx
4ps of Marketing Mix(Reebok).pptx4ps of Marketing Mix(Reebok).pptx
4ps of Marketing Mix(Reebok).pptx
 
But today, theyre n o t e n o u g h . D o y o u f i n d .docx
But today, theyre n o t e n o u g h .  D o y o u f i n d .docxBut today, theyre n o t e n o u g h .  D o y o u f i n d .docx
But today, theyre n o t e n o u g h . D o y o u f i n d .docx
 

More from Mihir Shah

Windows custom shellcoding
Windows custom shellcodingWindows custom shellcoding
Windows custom shellcodingMihir Shah
 
Seh based attack
Seh based attackSeh based attack
Seh based attackMihir Shah
 
Post exploitation using powershell
Post exploitation using powershellPost exploitation using powershell
Post exploitation using powershellMihir Shah
 
Securing docker containers
Securing docker containersSecuring docker containers
Securing docker containersMihir Shah
 
Buffer overflow
Buffer overflowBuffer overflow
Buffer overflowMihir Shah
 
Cracking the crypto
Cracking the cryptoCracking the crypto
Cracking the cryptoMihir Shah
 
Wi fi pentesting
Wi fi pentestingWi fi pentesting
Wi fi pentestingMihir Shah
 
Reversing with gdb
Reversing with gdbReversing with gdb
Reversing with gdbMihir Shah
 
Return Oriented Programming - ROP
Return Oriented Programming - ROPReturn Oriented Programming - ROP
Return Oriented Programming - ROPMihir Shah
 
PMKID ATTACK!!
PMKID ATTACK!!PMKID ATTACK!!
PMKID ATTACK!!Mihir Shah
 

More from Mihir Shah (13)

Windows custom shellcoding
Windows custom shellcodingWindows custom shellcoding
Windows custom shellcoding
 
Seh based attack
Seh based attackSeh based attack
Seh based attack
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
Post exploitation using powershell
Post exploitation using powershellPost exploitation using powershell
Post exploitation using powershell
 
Securing docker containers
Securing docker containersSecuring docker containers
Securing docker containers
 
Buffer overflow
Buffer overflowBuffer overflow
Buffer overflow
 
Cracking the crypto
Cracking the cryptoCracking the crypto
Cracking the crypto
 
Wi fi pentesting
Wi fi pentestingWi fi pentesting
Wi fi pentesting
 
Reversing with gdb
Reversing with gdbReversing with gdb
Reversing with gdb
 
ROP
ROPROP
ROP
 
Return Oriented Programming - ROP
Return Oriented Programming - ROPReturn Oriented Programming - ROP
Return Oriented Programming - ROP
 
PMKID ATTACK!!
PMKID ATTACK!!PMKID ATTACK!!
PMKID ATTACK!!
 
OAuth 2.0
OAuth 2.0OAuth 2.0
OAuth 2.0
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 

Recently uploaded (20)

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 

Stego.ppt

  • 1. Click to edit Master title style 1 STEGANOGRAPHY IN PYTHON MIHIR SHAH
  • 2. Click to edit Master title style 2 $whoami MIHIR SHAH | SHAHENSHAH99 | SHAHENSAH
  • 3. Click to edit Master title style 3 W h a t i f I t o l d y o u t h i s a d o r a b l e p u p p y w a s h i d i n g a s e c r e t m e s s a g e ? I n t h i s t a l k , w e ’ l l f i n d o u t h o w t h i s d o g w a s c o n v i n c e d t o h i d e a m e s s a g e f o r u s . . . a n d h o w t o l e a r n i t s s e c r e t s . A l o n g t h e w a y, w e ’ l l l e a r n a l o t a b o u t h o w i m a g e s w o r k a n d j u s t e n o u g h m a t h t o m a k e y o u r h i g h s c h o o l t e a c h e r s a y “ I t o l d y o u s o . ” L e t ’s s t a r t w i t h t h e b a s i c s . Yo u m i g h t a l r e a d y k n o w s o m e o f t h i s , b u t s t i c k w i t h m e h e r e
  • 4. Click to edit Master title style 4 What is Steganography? Origin of the term: steganos: secret – graphy: writing Basically Steganography is hiding data into images, Audio/Video files or even a wireless Capture!(.pcap)
  • 5. Click to edit Master title style 5 What else? Well, barding from the hiding part, the logic or the algorithm used in steganography is also used for di gital watermarking. But Why to use digital watermark? 1. Primarily for identification 2. Embedding a unique piece of information within a medium (typically an image) without noticeably altering the medium 3. Almost impossible to remove without seriously degrading an image
  • 6. Click to edit Master title style 6 Steganography and Digital Watermarking • Digital watermarking hides data in a file, and the act of hiding data makes it a form or steganography • The key difference is their goals... • Steganography: hiding information • Watermarking: extending the file with extra information • Steganographic information must never be apparent to a viewer unaware of its presence.
  • 7. Click to edit Master title style 7 Computers are really just things that take bits: 01100010 01101100 01100001 01100011 01101011 01101000 01101001 01101100 01101100 01110011 01101001 01101110 01100110 01101111 01110011 01100101 01100011 00101110 01100011 01101111 01101101 00101111 01101100 01101100 And turn them into other bits: 01101010 01101111 01101000 01101110 00100000 01110010 01101111 01100011 01101011 01110011
  • 8. Click to edit Master title style 8 Unfortunately, though, not very many people can read binary, and so those bits have to be turned into something that actual humans can understand (since, for now at least, computers exist to serve humans). This creates problems. Who says what patterns of bits turn into what words and pictures on a screen? Nobody, that’s who. Er, also kind of everybody. Or maybe just some certain special people? Turns out, it’s a huge mess. Various people and groups, at various times, for various reasons, have stuck a flag in the ground and said “THIS is how you turn a bunch of bits into an image of a cat!”
  • 9. Click to edit Master title style 9 That means that this staggeringly lame 2x2 pixel image that I made just now: Is actually this: 01000010 01001101 01000110 00000000 00000000 00000000 BMF... 00000000 00000000 00000000 00000000 00110110 00000000 ....6. 00000000 00000000 00101000 00000000 00000000 00000000 ..(... 00000010 00000000 00000000 00000000 00000010 00000000 ...... 00000000 00000000 00000001 00000000 00011000 00000000 ...... 00000000 00000000 00000000 00000000 00010000 00000000 ...... 00000000 00000000 00000000 00000000 00000000 00000000 ...... 00000000 00000000 00000000 00000000 00000000 00000000 ...... 00000000 00000000 00000000 00000000 00000000 00000000 ...... 11111111 00100110 00000000 00000000 00000000 00000000 .&.... 00000000 00000000 00000000 00000000 11111111 00000000 ...... 01111111 01011011 00000000 00000000 .[..
  • 10. Click to edit Master title style 10 In images, the least significant bit in R, G, and B for each pixel does nearly nothing, while the most significant bit can really ruin your day. For instance, this is what happens when you take each of the 8 bits out of a black and white bitmap one layer at a time and make an image out of each layer. Each image represents one “significance level” of bits; the most significant bit is on the top left, and the least significant on the bottom right.
  • 11. Click to edit Master title style 1111 See how the most significant bit (top left) makes up most of the image, while the least significant bit (bottom right) is basically just random noise? I bet you could change all of those least significant bits (or maybe even the last two) and nothing would look different in the final image. . . perhaps you could change them in some sort of pattern. . . like in a message, say.
  • 12. Click to edit Master title style 1212 Just a thought. Here’s what happens when we take that puppy and flip the least significant bits of every pixel (each of R, G, and B) to all be 1, then the last two bits to both be one, then the last three, and so on:
  • 13. Click to edit Master title style 1313
  • 14. Click to edit Master title style 14 DEMO – MAKE BITS OF MESSAGE AND FEED IT TO THE IMAGE 14
  • 15. Click to edit Master title style 1515 You’re probably wondering. . . why are we repeating the message so much? Nine times per bit seems excessive. It turns out that we aren’t the only people who have noticed that the least significant bits in an image are basically random. Someone has beaten us to our own hiding place, and they’re using it for boring stuff. The objective of compression, according to Wikipedia, is “to reduce irrelevance and redundancy of the image data in order to be able to store or transmit data in an efficient form.”
  • 16. Click to edit Master title style 1616 But that “irrelevant and redundant data” is where we wanted to put our sneaky message stuff, and compression destroys those bits. Drat. Turns out if there are useless bits, such as the least significant bit of each pixel value, they’re perfect for hiding things in because nobody cares about them, but also the first to get thrown out by compression... because nobody cares about them.  So we fight back, by repeating ourselves a bunch so that even if some bits get flipped by compression, our data still mostly makes it through. It’s not elegant, but it works.
  • 17. Click to edit Master title style 17 DEMO – RETRIEVE THE DATA FROM AN IMAGE 17
  • 18. Click to edit Master title style 18 UH-OH ERRORS!! We a r e c u r r e n t l y f a c i n g t wo m a j o r p r o b l e m s wi t h o u r c o d e r i g h t n o w: 1 . T h e p r o g r a m i s n o t v e r y e ff i c i e n t , l i k e 9 t i m e r u n n i n g a l o o p i s n o p i e c e o f c a k e , m y c o n d o l e n c e s t o t h e p r o c e s s o r. T h i s wa s a n i m a g e wi t h s m a l l d i m e n s i o n b u t t h e i m a g e s wh i c h a r e l a r g e r i n s i z e , wo u l d b e t a k i n g h e l l l o t o f t i m e ( R I P i n t e l ) 2 . We s t i l l c a n n o t e v a d e f e w o f t h e c o m p r e s s i o n t e c h n i q u e s , e v e n a f t e r c h a n g i n g t h e l a s t 3 L S B s t h e i m a g e i s s t i l l r e s i l i e n t t o i n c l u d e o u r m e s s a g e S o t h e m i l l i o n d o l l a r q u e s t i o n i s h o w t o o v e r c o m e t h e a b o v e t wo i s s u e s ?
  • 19. Click to edit Master title style 19 LETS LEARN PARITY FIRST E s s e n t i a l l y, a p a r i t y b i t a d d s a c h e c k t o a n y g i v e n b i n a r y s t r i n g t h a t t e l l s u s w h e t h e r t h e n u m b e r o f 1 - b i t s i n t h e s t r i n g i s o d d . F o r i n s t a n c e : t h e s t r i n g 0 0 0 h a s n o 1 - b i t s , s o i t s p a r i t y b i t w o u l d b e 0 ( l e a v i n g u s w i t h t h e f i n a l s t r i n g 0 0 0 0 ) . I n c o n t r a s t , t h e s t r i n g 0 1 0 h a s a n o d d n u m b e r o f 1 - b i t s , s o i t s p a r i t y b i t i s 1 , l e a v i n g u s w i t h 0 1 0 1 . Yo u ’ l l n o t i c e t h a t t h i s m e a n s e v e r y s t r i n g h a s a n e v e n n u m b e r o f o n e s i n i t o n c e t h e p a r i t y b i t i s a d d e d . T h e p r o c e s s i s : 1 . C o m p u t e p a r i t y b i t s b a s e d o n y o u r m e s s a g e . I f i t h a s a n o d d n u m b e r o f 1 v a l u e s , t h e p a r i t y b i t i s 1 , o t h e r w i s e t h e p a r i t y b i t i s 0 . 2 . P u t t h o s e p a r i t y b i t s i n t o t h e m e s s a g e ; t h e y ’ r e f r e q u e n t l y o n t h e e n d , b u t i t d o e s n ’ t a c t u a l l y m a t t e r w h e r e t h e y a r e s o l o n g a s t h e r e c e i v e r k n o w s w h e r e t o f i n d t h e m .
  • 20. Click to edit Master title style 20 Why Should I know what on earth Parity is? if a bit gets flipped somewhere in the string, we can tell something is wrong by checking the parity bit (if the string 0101 from above comes across as 1101 , we know that the parity bit of 110 should be 0 - but it’s 1, so something must be wrong). But how to know which bit was flipped?
  • 21. Click to edit Master title style 21 Hamming Codes Case 1:
  • 22. Click to edit Master title style 22 One Level Up: Case 2 - 22
  • 23. Click to edit Master title style 23 I think this is going somewhere Case 3 - 23
  • 24. Click to edit Master title style 24 Hey, I know what to do! Case 4 - 24
  • 25. Click to edit Master title style 25 OK, Perhaps I don’t, NVM  25
  • 26. Click to edit Master title style 26 Now This Blows my head - 26
  • 27. Click to edit Master title style 27 Lets put this all together in a python code and get done, Checkout my GitHub repo for image-steganography because the code involves a lot of math, which is like awesome but then this talk should come to an end, mind you I have included comments at almost each and every line of code to explain what’s happening so anyone understanding how python works, should be good to go to read and understand the code https://github.com/shahenshah99/Image-steganography.git 27
  • 28. Click to edit Master title style 28 Lets Talk about the CodeFest-2018 CTF including steganography 28
  • 29. Click to edit Master title style 29 QUESTIONS? 29
  • 30. Click to edit Master title style 30 Thank you  30