Hack Forums
Hello, I was wondering if there is any way to hide an .exe file in a .txt or .jpg tod - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Hacks, Exploits, and Various Discussions (https://hackforums.net/forumdisplay.php?fid=45)
+--- Forum: Grayhat • Purple Team • Hybrid Security (https://hackforums.net/forumdisplay.php?fid=449)
+---- Forum: Beginner Hacking (https://hackforums.net/forumdisplay.php?fid=4)
+---- Thread: Hello, I was wondering if there is any way to hide an .exe file in a .txt or .jpg tod (/showthread.php?tid=6137501)



Hello, I was wondering if there is any way to hide an .exe file in a .txt or .jpg tod - CactusRainbow12 - Feb 1, 2021

Hello,
I was wondering if there is any way to hide an .exe file in a .txt or .jpg today, there is a way to do that? how?
Thank you in advance.


RE: Hello, I was wondering if there is any way to hide an .exe file in a .txt or .jpg tod - Shadow_Cloud - Feb 1, 2021

(Feb 1, 2021 06:42 AM)CactusRainbow12 Wrote:  Hello,
I was wondering if there is any way to hide an .exe file in a .txt or .jpg today, there is a way to do that? how?
Thank you in advance.

There are quite a few ways to do this, but it won't be executable when its stashed/hidden inside a different format. Can you explain the use case you are trying to get to work? I remember quite a wave of viruses using hidden shellcode inside celebrity images, if this is purely about distribution then yes, if you are talking about having a jpg execute dynamically then no.


RE: Hello, I was wondering if there is any way to hide an .exe file in a .txt or .jpg tod - CactusRainbow12 - Feb 1, 2021

(Feb 1, 2021 08:19 AM)Shadow_Cloud Wrote:  There are quite a few ways to do this, but it won't be executable when its stashed/hidden inside a different format.  Can you explain the use case you are trying to get to work?  I remember quite a wave of viruses using hidden shellcode inside celebrity images, if this is purely about distribution then yes, if you are talking about having a jpg execute dynamically then no.

Hello shadow_cloud and thank you for your respond, the use case is to send a .jpg/.txt file via mail with a payload inside it, so when the user download and opens theme, the program starts.
By the way this is only for learning, nothing else.
and sorry for my bad english🤣


RE: Hello, I was wondering if there is any way to hide an .exe file in a .txt or .jpg tod - Shadow_Cloud - Feb 1, 2021

(Feb 1, 2021 10:14 AM)CactusRainbow12 Wrote:  Hello shadow_cloud and thank you for your respond, the use case is to send a .jpg/.txt file via mail with a payload inside it, so when the user download and opens theme, the program starts.
By the way this is only for learning, nothing else.
and sorry for my bad english🤣

Yeah this isn't a thing, if you want to understand how this works, do some intro to programming course (there are plenty of free ones online). If you understand how they work from the perspective of making them, you'll understand why this doesn't fit into the operating paradigm of most operating systems. There might be some OS that has an exception for this, but none that I am aware of.

You could use some tricks to embed info inside files, but that's not the same as having executable files.


RE: Hello, I was wondering if there is any way to hide an .exe file in a .txt or .jpg tod - Pescado - Feb 1, 2021

(Feb 1, 2021 08:19 AM)Shadow_Cloud Wrote:  There are quite a few ways to do this, but it won't be executable when its stashed/hidden inside a different format.  Can you explain the use case you are trying to get to work?  I remember quite a wave of viruses using hidden shellcode inside celebrity images, if this is purely about distribution then yes, if you are talking about having a jpg execute dynamically then no.

would it be easier to do this with a pdf? I remember reading about being able to embed some javascript into a PDF somewhere.


RE: Hello, I was wondering if there is any way to hide an .exe file in a .txt or .jpg tod - CactusRainbow12 - Feb 1, 2021

(Feb 1, 2021 11:04 AM)Shadow_Cloud Wrote:  Yeah this isn't a thing, if you want to understand how this works, do some intro to programming course (there are plenty of free ones online).  If you understand how they work from the perspective of making them, you'll understand why this doesn't fit into the operating paradigm of most operating systems.  There might be some OS that has an exception for this, but none that I am aware of. 

You could use some tricks to embed info inside files, but that's not the same as having executable files.

but mydoom spread that way, no?


RE: Hello, I was wondering if there is any way to hide an .exe file in a .txt or .jpg tod - Shadow_Cloud - Feb 1, 2021

(Feb 1, 2021 11:15 AM)CactusRainbow12 Wrote:  but mydoom spread that way, no?

That was executable files as an email attachment

"MyDoom.a spread via attached files with the extensions .bat, .cmd, .exe, .pif, .scr or .zip"

Yes, you could do this via some js in PDF files before, but all the techniques I knew about doing this is no longer available in the latest version. There might still be exploits for that available somewhere.


RE: Hello, I was wondering if there is any way to hide an .exe file in a .txt or .jpg tod - grady - Feb 1, 2021

(Feb 1, 2021 10:14 AM)CactusRainbow12 Wrote:  the use case is to send a .jpg/.txt file via mail with a payload inside it, so when the user download and opens theme, the program starts.

The only realistic way for this to be done is to find some vulnerability within the software that is being used to open the file itself. You can't really attack with a file-type itself, because it has no "logic" and isn't really executed. Behind the scenes, the data for the image is being loaded and displayed by the program handling that file-type (i.e. whatever Windows' default is).