Navigation X
ALERT
Click here to register with a few steps and explore all our cool stuff we have to offer!



 630

How to hide code in an image file

by czk908 - 19 December, 2023 - 02:22 AM
This post is by a banned member (czk908) - Unhide
czk908  
Registered
238
Posts
17
Threads
2 Years of service
#1
Does anyone know enough to give me a general overview of how this process works?

Are certain programming languages best to do for it? does the file have to be .exe? Will the code execute if the image file is opened?

I tried to do something like this earlier using python, but going into the properties of my script from the desktop, i could not find a way to give it an icon. if I could i suppose i could just rename the file to "picture.png" or something so it looks somewhat legit until clicked.

Doing a bit of a research project on how to do this. Any tips you can give me are appreciated. Any tools to format the python script and image as the same file, or anything else you have for me.

End goal idea:

End-user double clicks/opens "picture.png" which is actually an .exe/.py/.bat/or whatever else, and then the script executes and lets say for example, pings 8.8.8.8 once it is run.

Any ideas?
This post is by a banned member (LoroPiana) - Unhide
LoroPiana  
Retired Staff
946
Posts
187
Threads
6 Years of service
#2
You can learn about it here:

https://ctf101.org/forensics/what-is-stegonagraphy/

or you can search up stegonagraphy on google
Monkah
This post is by a banned member (czk908) - Unhide
czk908  
Registered
238
Posts
17
Threads
2 Years of service
#3
(19 December, 2023 - 02:22 AM)czk908 Wrote: Show More
Does anyone know enough to give me a general overview of how this process works?

Are certain programming languages best to do for it? does the file have to be .exe? Will the code execute if the image file is opened?

I tried to do something like this earlier using python, but going into the properties of my script from the desktop, i could not find a way to give it an icon. if I could i suppose i could just rename the file to "picture.png" or something so it looks somewhat legit until clicked.

Doing a bit of a research project on how to do this. Any tips you can give me are appreciated. Any tools to format the python script and image as the same file, or anything else you have for me.

End goal idea:

End-user double clicks/opens "picture.png" which is actually an .exe/.py/.bat/or whatever else, and then the script executes and lets say for example, pings 8.8.8.8 once it is run.

Any ideas?
 
(19 December, 2023 - 02:23 AM)LoroPiana Wrote: Show More
You can learn about it here:

https://ctf101.org/forensics/what-is-stegonagraphy/

or you can search up stegonagraphy on google

Yeah I am familiar with the concept of what it is, just having a hard time finding how it is implemented other than editing the binary values of the image itself.
Ideally, I'd want to be able to hide an entire script in batch/bat inside of the image.

Thanks for the answer.

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
or
Sign in
Already have an account? Sign in here.


Forum Jump:


Users browsing this thread: 1 Guest(s)