![]() |
|
[Java] [Tutorial][Source] Store an EXE as an image! [Free] - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [Java] [Tutorial][Source] Store an EXE as an image! [Free] (/showthread.php?tid=682439) |
[Tutorial][Source] Store an EXE as an image! [Free] - MrZander - Sep 16, 2010 Store an EXE as an image! Tutorial and Code by MrZander Hello HF, here is my second tutorial on this site. After seeing a vb.NET example of storing a string as an image, I decided to tackle this. This is CLI, I didn't bother making a GUI. First is our imports: Code import java.awt.image.BufferedImage;EXE To Image Now, get the location of the EXE and open read all of the bytes This process takes a while depending on size of file! Code public static void filetoimage(){Next, get the location to save the image and create it Code imagebytes=b;This is obviously customizable, change the name of the executable and so on. Code System.out.println("Saving image.");Image to EXE Here is where the fun starts! Retrieving the EXE from the image: First, get the location of the image using a scanner Code public static void imagetofile(){Next, We created a new BufferedImage and populate it with the image selected. Then we get the attributes of the image (Height and Width). Code tryNow for the meat of it, we read the [b]RED value of each pixel in the image.[/b] Code for(int y = 0;y<=ymax;y++){And Finally! We get the directory to export to and we write all the bytes in bytearray b[]. Code System.out.println("Enter the DIRECTORY to save the exe to: ");Here is an example of hjsplit(a file splitter) stored as an Image Spoiler (Click to View) And there we have it! Thanks for reading and hope it helps. FULL SOURCE: Spoiler (Click to View) * - The Real Kobe Bryant - Sep 16, 2010 There have been a lot of tutorials on this, but this is a really good one, nice job! * - MrZander - Sep 16, 2010 (Sep 16, 2010 06:01 PM)Snoop Dogg Wrote: There have been a lot of tutorials on this, but this is a really good one, nice job! Thanks! I searched for some, couldn't find any in Java however. * - Chrollo Lucifer - Sep 17, 2010 Nice tutorial ! I should try this. =D (Sep 16, 2010 06:05 PM)MrZander Wrote: I searched for some, couldn't find any in Java however.I don't think it's a repost. Anyway, good job ! PS: That hjsplit image is such a beautiful rainbow, hha. * - !!!! - Sep 19, 2010 So what is this actaully? is it like if I open the image file(.jpg,etc) will I open the hidden EXE? * - MrZander - Sep 19, 2010 (Sep 19, 2010 08:19 AM)Sanju Wrote: So what is this actaully? No, it stores the bytes of an exe file in the red value of each pixel in an image, so that you can transfer the exe as an image, and later, extract it for execution. * - Brutal Chaos - Sep 20, 2010 From what I understand, this is basically a secret way of sending a .exe in a jpg file, the receiver has to then extract and voila he has the .exe. * - [H]ell - Sep 21, 2010 Wow, great tutorial! Respect ! Im learning java in school atm. so going to be active allot in the java section ;p * - Sensible - Sep 21, 2010 Lucky [2012]! I'm stuck doing dreamweaver and learning how mice work in school. >> on topic: Yeah, It looks pretty helpful. Although I'm fairly sure it saves it as a .png instead of a .jpg due to the type of compression. * - Human Skulls - Sep 22, 2010 Dude this is dank. +rep on this tut * - MrZander - Sep 22, 2010 Thanks guys! I'm working on some more projects, I hope to post them soon. Let's hope this section starts getting active! * - xms - Sep 23, 2010 Looks interesting...but how its going on? i need another exe to decrypt and execute this hidden source? * - MrZander - Sep 23, 2010 (Sep 23, 2010 01:24 PM)xms Wrote: Looks interesting...but how its going on? i need another exe to decrypt and execute this hidden source? Yes, but it is much easier to bypass an AV with this. * - Ablaze - Sep 30, 2010 So brainstorming. . . Let's say we have an archive of two files. We could name the first file keygen.exe and the second logo.png,jpg w/e. We bind an extractor.exe to ... a keygen, so that when the keygen runs it first reads the "logo" image file, and executes the examined bytes. Then after it has loaded the keylogger,rat etc etc. . . it could load the keygen so it doesn't look suspicious? Because either way we need a .exe on the other computer that will decode the image, right? ---- So isn't this kind of pointless (as of right now), because we are going to need a .exe in the picture somewhere. And if someone had a FUD keylogger,server anyway then they could just bind THAT to the keygen instead of an extractor to read the secret code in the image? * - MrZander - Sep 30, 2010 (Sep 30, 2010 08:42 PM)Ablaze Wrote: So brainstorming. . . It's just a POC You can use it however you want to. |