Hide file inside a JPEG image


Recommended Posts

This guide will teach you how to hide files inside JPEG images using a program called JPHS for Windows. The program can be downloaded here:

http://linux01.gwdg.de/~alatham/stego.html

I've tested and verified JPHS works on Windows XP SP3 and Windows 7 beta. I haven't tested it on Vista, but it probably works.

The program is over 9 years old, so it's interface is not the best. There are a few reasons why I chose to use this one though:

  • It allows you to hide files inside of JPEG images. Not all of us use BMP or PNG, and those are obvious targets for steganography anyways.
  • It modifies the color of the pixels in the image in a way that is very hard to detect. Most steganography tools will simply append to the JPEG file, or modify unused bits, methods which are very easy to detect.
  • Because JPEG files are lossy, it gives reasonable doubt whether noise is caused by the JPEG format or steganography.
  • The program uses Blowfish encryption. This program was written before AES was available, but Blowfish is still a secure encryption algorithm.

There are some precautions you should take:

  • Don't use images with solid colors, such as a large blue sky. This can make it easy to detect embedded files, as I'll demonstrate later in this guide.
  • Based upon my own tests, this program will not preserve JPEG meta data, created / modified times, or any data appended to the JPEG file.
  • Never modify a JPEG image that contains a hidden file. Doing so will most likely mean you'll lose the hidden file.
  • Never try to hide a file in a JPEG image that already contains a hidden file. Doing so will cause you to lose the hidden file already in the JPEG.
  • Delete the original picture after you hide a file in it. It may be possible to detect a hidden file if there are two versions of the same picture available to compare.
  • The program is portable, so if possible, store it on removable media. Having steganography software on your computer makes it pretty obvious you might be hiding data.

To get started, download the file from the URL above. There are three EXEs in the archive:

jphide.exe and jpseek.exe are command-line based.

Jphswin.exe is the one I'll be showing you how to use in this guide because it has a GUI.

The first thing you'll see is the user agreement. Read it if you want, and then click "Yes, I accept these terms".

post-57213-1231104155.png

First, you have to choose the JPEG image you want to use to hide a file, otherwise known as the "carrier". On the file menu, click "Open jpeg".

The larger the JPEG file is, the more data you can hide inside of it.

Try to choose a JPEG image with a lot of detail. Avoid images with a lot of solid color, such as a cloudless sky, as this may make it possible to detect a hidden file.

post-57213-1231104119.png

In the window, you should see two values:

Approximate max capacity is an estimate of the largest file this image can hold. This is only an estimate and the limit may be smaller than what this value says.

Recommended limit is a recommendation for the maximum file size you should store in this image. The smaller the file is, the harder it is to detect. Going above the recommended limit may mean it's possible to detect a hidden file.

On the file menu, click "Hide" to choose a file you want to hide in the JPEG image.

post-57213-1231104570.png

First, the program will ask for a password. This password will be required to extract the hidden file later on.

post-57213-1231104552.png

After you type your password, you can browse for the file you want to hide.

If the file is too large, the program will warn you. Convenient! :)

Now that you've chosen your JPEG image and the file you want hidden, you can save the modified JPEG image.

Save jpeg will overwrite the original JPEG image with the new one. Probably best not to use this, just to be safe.

Save jpeg as will allow you to save the new JPEG to a separate file.

post-57213-1231105154.png

After you're done, the program should look something like this.

The new JPEG file may come out bigger or smaller, this is not an issue.

post-57213-1231105324.png

How to Extract Files

Now that you know how to hide files, you need to know how to extract them.

Start off by clicking Open jpeg on the file menu.

Browse for the JPEG image with the hidden file in it.

Then click Seek on the file menu.

The program will ask for a password. Type in the same password you used when hiding the file.

Then you can choose where to extract the file to. Unfortunately, the program doesn't save the original file name. You'll have to manually type the file name and file extension.

post-57213-1231105912.png

At this point, if you typed in the wrong password, or if the JPEG image simply doesn't contain a hidden file, the program will say "Passphrase wrong". If this happens, simply click Seek to attempt to extract the file again.

When you successfully extract a file, the program should look something like this:

post-57213-1231106043.png

This was my own test. The file was extracted correctly.

post-57213-1231106224.png

To demonstrate my point earlier, you should not use images with large amounts of the same color. I decided to hide a file in a picture with a large blue sky. This is the picture I used (resized, the original is 1600x1200).

post-57213-1231106341.jpg

This is what happens, before hiding a file and after hiding a file.

You can easily see the noise in the right picture caused by the steganography.

So use large, detailed pictures!

post-57213-1231106402.png post-57213-1231106408.png

This is my first guide on Neowin. Hope some of you find it useful :)

Edited by Xinok
Link to comment
https://www.neowin.net/forum/topic/717378-hide-file-inside-a-jpeg-image/
Share on other sites

Alternatively, you can use a much simpler method of attaching a .rar file to a .jpg as follows:

windows: copy /b input.jpg + input.rar ouput.jpg

linux: cat pic.jpg file.rar > result.jpg

He already thought of that:

It modifies the color of the pixels in the image in a way that is very hard to detect. Most steganography tools will simply append to the JPEG file, or modify unused bits, methods which are very easy to detect.

Steganography is a security by obscurity approach to hiding data; whereas cryptography is a encrypted data source which does not masquerade as another data format. So rather you use steganography analysis to detect common methods of implanting hidden data into a image file, or simply append an encrypted .rar to a .jpg, your primary goal is obscurity of the information.

Steganography is a security by obscurity approach to hiding data; whereas cryptography is a encrypted data source which does not masquerade as another data format. So rather you use steganography analysis to detect common methods of implanting hidden data into a image file, or simply append an encrypted .rar to a .jpg, your primary goal is obscurity of the information.

So then the reason to do this would be to hide a file such as a virus in a JPEG image. Hmmm. No thanks, I don't need to know this.

So then the reason to do this would be to hide a file such as a virus in a JPEG image. Hmmm. No thanks, I don't need to know this.

Well the hidden information would not be executable. Any virus would have to be manually extracted and run by the user, so this scenario would be unlikely. Hiding content in image files is seen on Internet image boards and newsgroups; typical scenarios I have seen recently are embedding a .rar picture set into a single image from the set, or embedding an ebook into an image of the book cover.

Well the hidden information would not be executable. Any virus would have to be manually extracted and run by the user, so this scenario would be unlikely. Hiding content in image files is seen on Internet image boards and newsgroups; typical scenarios I have seen recently are embedding a .rar picture set into a single image from the set, or embedding an ebook into an image of the book cover.

Ok, but how do you view the files that are hidden inside then? :)

Steganography Revealed

Kristy Westphal 2003-04-09

Over the past couple of years, steganography has been the source of a lot of discussion, particularly as it was suspected that terrorists connected with the September 11 attacks might have used it for covert communications. While no such connection has been proven, the concern points out the effectiveness of steganography as a means of obscuring data. Indeed, along with encryption, steganography is one of the fundamental ways by which data can be kept confidential. This article will offer a brief introductory discussion of steganography: what it is, how it can be used, and the true implications it can have on information security.

What is Steganography?

While we are discussing it in terms of computer security, steganography is really nothing new, as it has been around since the times of ancient Rome. For example, in ancient Rome and Greece, text was traditionally written on wax that was poured on top of stone tablets. If the sender of the information wanted to obscure the message - for purposes of military intelligence, for instance - they would use steganography: the wax would be scraped off and the message would be inscribed or written directly on the tablet, wax would then be poured on top of the message, thereby obscuring not just its meaning but its very existence[1].

According to Dictionary.com, steganography (also known as "steg" or "stego") is "the art of writing in cipher, or in characters, which are not intelligible except to persons who have the key; cryptography" [2]. In computer terms, steganography has evolved into the practice of hiding a message within a larger one in such a way that others cannot discern the presence or contents of the hidden message[3]. In contemporary terms, steganography has evolved into a digital strategy of hiding a file in some form of multimedia, such as an image, an audio file (like a .wav or mp3) or even a video file.

What is Steganography Used for?

Like many security tools, steganography can be used for a variety of reasons, some good, some not so good. Legitimate purposes can include things like watermarking images for reasons such as copyright protection. Digital watermarks (also known as fingerprinting, significant especially in copyrighting material) are similar to steganography in that they are overlaid in files, which appear to be part of the original file and are thus not easily detectable by the average person. Steganography can also be used as a way to make a substitute for a one-way hash value (where you take a variable length input and create a static length output string to verify that no changes have been made to the original variable length input)[4]. Further, steganography can be used to tag notes to online images (like post-it notes attached to paper files). Finally, steganography can be used to maintain the confidentiality of valuable information, to protect the data from possible sabotage, theft, or unauthorized viewing[5].

Unfortunately, steganography can also be used for illegitimate reasons. For instance, if someone was trying to steal data, they could conceal it in another file or files and send it out in an innocent looking email or file transfer. Furthermore, a person with a hobby of saving pornography, or worse, to their hard drive, may choose to hide the evidence through the use of steganography. And, as was pointed out in the concern for terroristic purposes, it can be used as a means of covert communication. Of course, this can be both a legitimate and an illegitimate application.

http://www.securityfocus.com/infocus/1684

This is quite clever. But it is no different than many other programs that can be used for both legal and illegal activities. Take bittorent as a perfect example. Ultimately, it requires the users discretion to use the program for the ethically accepted purposes and also take the necessary precautions to protect them from harmful files when on the receiving end.

How do we get this hidden information out of it? ME WANTS TO KNOW!!!!!!!!!!!
My guide has instructions on how to extract hidden files using the same program. You might have overlooked it the first time, so I added a large caption "How to Extract Files".

As for all steganography programs in general, every program has it's own methods and algorithms for hiding data, so you'll have to use the same program to extract the data that was used to hide it. You may also need a password if the hidden data is encrypted.

If a RAR archive was appended to another file, I think WinRAR is capable of finding the header and extracting the files directly without the need to separate it from the image file first.

so... it got me thinking

are there any image editing programs which can save to jpeg or other lossy formats, which have some kind of undisclosed feature that inserts some kind of 'tag' in every image it saves? for example a non-free program might tag its pictures with the license key of the user, or something.... so unless the image was manipulated before it got posted on the internet, it can be traced to one person...

so... it got me thinking

are there any image editing programs which can save to jpeg or other lossy formats, which have some kind of undisclosed feature that inserts some kind of 'tag' in every image it saves? for example a non-free program might tag its pictures with the license key of the user, or something.... so unless the image was manipulated before it got posted on the internet, it can be traced to one person...

Yes, they're usually called invisible watermarks. There are tools which can remove invisible watermarks, but some algorithms are very persistent and don't go away very easily. It all depends on how trustworthy you are of the software you're using.
  • 2 weeks later...
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • A group made up of dozens of cybersecurity experts, including several well-known veterans of the industry, published an open letter to the U.S. government asking it to lift the export control order on Anthropic’s Fable and Mythos models. According to the open letter, “this action has taken the best models away from [cybersecurity] defenders” who now can’t use the models to find vulnerabilities and make their software and products more secure. “To pull the best capabilities away from defenders without a good reason when our adversaries are rapidly advancing is dangerous,” read the letter. On Friday, the U.S. government ordered Anthropic to limit the export of Fable and Mythos, citing national security concerns, without explaining the specific reasons behind the order, according to Anthropic. In response, the company suspended access to the models to all users worldwide.     https://techcrunch.com/2026/06/15/cybersecurity-vets-protest-dangerous-us-government-ban-on-anthropics-most-powerful-models/
    • Vivaldi 8.0.4033.48 by Razvan Serea Vivaldi is a cross-platform web browser built for – and with – the web. A browser based on the Blink engine (same in Chrome and Chromium) that is fast, but also a browser that is rich in functionality, highly flexible and puts the user first. A browser that is made for you. Vivaldi is produced with love by a founding team of browser pioneers, including former CEO Jon Stephenson von Tetzchner, who co-founded and led Opera Software. Vivaldi’s interface is very customizable. Vivaldi combines simplicity and fashion to create a basic, highly customizable interface that provides everything a internet user could need. The browser allows users to customize the appearance of UI elements such as background color, overall theme, address bar and tab positioning, and start pages. Vivaldi features the ability to "stack" and "tile" tabs, annotate web pages, add notes to bookmarks and much more. Vivaldi 8.0.4033.48 changes: [Chromium] Update to 148.0.7778.267 ESR (includes security fixes from 149.0.7827.114/115) [Crash] When closing devtools with input caret in a CSS property field (VB-128998) [Linux][Media] Fetch an updated proprietary media support file (VB-129132) [Permissions] Global Permissions counter shows all permissions (64) as overridden (VB-127713) Download: Vivaldi 64-bit | 139.0 MB (Freeware) Download: Vivaldi 32-bit | ARM64 View: Vivaldi Home Page | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • Two variants of the KAMRUI H2 mini PC receive deeper discounts on Amazon by Steven Parker KAMRUI (sister company of AceMagic) reached out to us, letting us know that they are applying further discounts to two of their H2 mini PC variants, and in times like these, every little helps. First off, it's the Core i5 14450HX 32GB+1TB variant, which already received a discount from $699 to $567.99 on Amazon, so you may be asking what you get for that. Its most important features are listed below. 32GB Memory Configuration, Exceptional Value. Driven by rising AI demand, the DDR memory supply is tightening, making high-capacity memory more valuable. KAMRUI maintains high-quality standards while offering strong value with a 32GB RAM + 1TB SSD configuration, which delivers excellent performance and storage. Intel i5-14450HX, HX-Class Performance Powered by the Intel Core i5-14450HX (10 cores/16 threads, up to 4.8GHz, 54W TDP)-HX series delivers desktop-class performance. Enjoy up to 120% higher multi-core performance vs. i7-1185G7 and stronger sustained performance than Ryzen 9 6900HX under heavy workloads. With 14450HX performance, it handles coding, compiling, Docker with ease, runs 10+ apps simultaneously—Excel, Chrome, Zoom, video editing—with smooth multitasking and fast load times. 32GB RAM & 1TB NVMe SSD - expandable up to 4TB Mini pc W-11 Pro equipped with 32GB (16GB×2) DDR4 dual-channel memory and a 1TB NVMe PCIe 4.0×4 SSD, mini pc delivers fast system response and efficient data access for demanding workloads. Dual M.2 slots support storage expansion up to 4TB. Large memory support running multiple virtual machines simultaneously, enabling fast deployment and isolated sandbox testing, significantly improving development efficiency and multitasking performance. HX-Class Heat Dissipation, Higher Productivity 14450HX Mini computers W-11 pro equipped with upgraded silent centrifugal fans, dual copper heat pipes, dual fin-stack cooling modules, and an optimized dual-airflow design, the processor can maintain ≥95% of multi-core performance even under long-duration heavy workloads. The HX platform is specifically designed for multitasking, rendering, and content creation, and multitasking, delivering desktop-class stability and powerful performance. Triple 4K Productivity Power Supports triple 4K displays and handles complex workflows like coding, data processing, and multitasking with ease. WiFi 6 delivers fast, reliable connectivity for video, conferencing, and transfers. Bluetooth 5.2 ensures stable, low-latency wireless connections. Versatile Connectivity This mini computer comes with 1x Type-C(10Gbps data transfer), 1x RJ45 Ethernet, 2x USB3.2 Gen2 (10Gbps), 4x USB3.2 Gen1 Type-A (5Gbps), PD output, 1x HDMI 2.0, 1x DP 1.4, and 1x 3.5mm audio jack. It offers versatile connectivity to connect multiple devices effortlessly, reducing the need for frequent plugging and unplugging. Small Size, Big Performance Mini PC measures just 5.04 × 5.04 × 1.63 inches, over 80% smaller than a traditional desktop, yet equipped with the high-performance 14450HX processor for near-desktop-level power. With VESA mounting support, it transforms cluttered desks into clean, organized setups. Normally costing $699, but now down to $ 535.79, which includes an additional 6% off the Amazon listed price. That equals a total of 24% off the MSRP. KAMRUI Hyper H2 (Core i5 14450HX 32GB+1TB) for $ 535.79 (was $699) Use code 2UD2IW7D for the above price during checkout (expires on June 30) Editors note: This appears to be listed as a "frequently returned item" on Amazon, but you should take into account the reviews on the page that discuss a completely different PC, it would seem that this is yet another recycled sales page that is now listing this newer item, possibly to retain the positive 4.5 star rating on the page. Next up, we have the Core i9 14900HX/32GB+1TB variant, which normally costs $799.99 but is already discounted to $759.99 on Amazon. Again, the most important highlights for this variant are listed below. Upgrade 14th Intel Core i9-14900HX Processor KAMRUI Mini Computers features the 14th Gen Intel Core i9-14900HX processor (up to 5.8GHz, TDP 55W, 36MB cache, 24C/32T), delivering 25%–40% higher performance than the i5-14450HX (24C/32T) and i7-1280P in multitasking, creative work, and high-load applications. Manufactured using Intel 7 (10 nm) process technology, Mini Computer efficiently allocates workloads to deliver faster response times, smoother operation, and heightened productivity. 32GB DDR4 & 1TB SSD - Expandable to 4TB KAMRUI Intel Core i9-14900HX mini PC features dual-channel 32GB DDR memory (expandable to 64GB) and 1TB NVMe PCIe 4.0×4 SSD, delivering speeds 40% faster than PCIe Gen3. The KAMRUI Micro PC features two M.2 2280 SSD slots, each expandable up to 2TB, effortlessly accommodating a high-capacity system drive and an ultra-fast cache drive. This achieves a perfect balance of speed, capacity, and flexibility, effortlessly handling large projects and high-speed workflows. 4K UHD Triple Display KAMRUI 14900HX Mini PC features a 4K@60Hz UHD graphics card (Intel UHD Graphics), supporting 4K@60Hz high-definition video playback for a premium visual experience. Mini Gaming PC incorporates an HDMI 2.0 port + DP 1.4 port + USB3.2 Gen2 Type-C port, supporting 4K triple display output. Mini PC can connect to three monitors to fulfil your multi-screen collaboration requirements. Ultra-high-definition visuals and ultra-fast connectivity significantly enhance your productivity. RJ45 LAN Port+WiFi6E+BT5.2 KAMRUI Mini PC features a 1.0Gbps LAN port, suitable for high-speed broadband environments in homes, offices, and large enterprises. Bluetooth 5.2 enables connection to peripherals such as headphones, mice, and keyboards. Dual-band WiFi 6E and BT 5.2 deliver enhanced interference resistance and more stable wireless signals. Regardless of your network environment's complexity, the KAMRUI H2 mini computer delivers a relatively stable and smooth network experience. Professional-Grade Cooling System KAMRUI Mini gaming PC features an upgraded silent centrifugal fan, dual copper heat pipes, and a dual-fin module. Its all-copper structure enhances thermal conductivity, boosting airflow efficiency by 35% and overall heat dissipation by 40%, ensuring the CPU can stably deliver up to 55W performance under full load. Upgraded aluminum heatsink keeps the SSD cool to maintain read/write speeds, ensuring desktop-level stability and power for demanding workloads. Compact Size, Infinite Possibilities KAMRUI H2 mini computers measure just 5.04 x 5.04 x 1.63 inches, a fraction of the size of a traditional desktop, yet deliver powerful performance for demanding workloads. With the included VESA mount, you can easily attach a small pc behind a monitor or place it in your TV cabinet, turning your display into a sleek mini PC while saving valuable desk space. Versatile Connectivity This KAMRUI mini gaming computer comes with 1*USB3.2 Gen2 Type-C(up to 10Gbps data transfer), 1*RJ45 Ethernet, 2*USB3.2 Gen2 (10Gbps), 4*USB3.2 Gen1 Type-A (5Gbps), 1*HDMI 2.0, 1*DC, 1*DP 1.4, and 1*3.5mm audio jack. It offers versatile connectivity to connect multiple devices effortlessly, reducing the need for frequent plugging and unplugging. Normally costing $799, but now down to $721.99, which includes an additional 5% off the Amazon listed price. That equals a total of 10% off the MSRP. KAMRUI Hyper H2 (Core i9 14900HX/32GB+1TB) for $ 721.99 (was $799) Use code AQ5Z6A47 for the above price during checkout (expires on June 30) KAMRUI claims that they offer lifetime technical support along with a 12-month warranty. For either of these mini PCs, should you encounter any issues during use, KAMRUI claims it will do its utmost to assist customers. As an Amazon Associate, we earn from qualifying purchases.
    • Good. I hope more people sue them for focusing on this worthless junk.
  • Recent Achievements

    • One Year In
      Console General earned a badge
      One Year In
    • One Year In
      Twozo Technologies earned a badge
      One Year In
    • One Month Later
      Twozo Technologies earned a badge
      One Month Later
    • Week One Done
      Twozo Technologies earned a badge
      Week One Done
    • Veteran
      branfont went up a rank
      Veteran
  • Popular Contributors

    1. 1
      +primortal
      512
    2. 2
      +Edouard
      201
    3. 3
      PsYcHoKiLLa
      108
    4. 4
      Steven P.
      89
    5. 5
      Nick H.
      71
  • Tell a friend

    Love Neowin? Tell a friend!