So, I was browsing Amazon and just learned of their Prime Photos program.

Essentially if you have Prime, you get free unlimited cloud storage on Prime Photos. It’s main competitors would be Apple’s iCloud, Google Photos/Drive and Microsoft OneDrive.

https://www.amazon.com/gp/drive/landing/photos/buy/

My eyes were immediately fixated on the Free & Unlimited part!

It’s generous of Amazon to offer such a program, nonetheless limiting to “Photos only.” Unless you pay up. (Also, if you read the TOS — you can’t be a professional photographer and use the service!)

So, how can someone take advantage? Well, photo is data, and data is data. What’s the main differentiating factor between a photo and other data?

Let’s rephrase that:

How do computers (automated software) detect photos? There are two main ways (though not absolute, this does not take into account photo detection software to recognize patterns/facial recognition.)

Easiest: Have an automated routine scan for and reject files of a non-accepted format. This is detected in a files extension — e.g. .jpg, .bmp, .png, .gif, .raw and many more. A nicely formatted list is found here: https://en.wikipedia.org/wiki/Image_file_formats. When you have a detected file, you minus the storage used from your allotment.

Another method is to automate scanning uploaded files for SOF/EOF. SOF is Start of File, and EOF is End of File. Since every image file format is a standard, they must respectfully identify itself. Especially useful if the file extension is misidentified. We’re going to focus on embedding a file in a file, not just a simple extension replacement.

The trick — Steganography

Steganography is simply a method of hiding things in data. It can be a codeword in a letter, a microdot in a picture or a file in another file. It has tons of nifty uses! This issue isn’t unique to Amazon, I’m sure it can work on Owncloud instances and perhaps other cloud storage providers.

Keeping it simple — we can upload a non-photo file by changing the extension and seeing if it’s accepted as a “photo” or other file. This is done easily via the user interface as shown below:

Take note of the 157MB used.

For our example, let’s use the movie Charade — available freely w/ no enforceable copyright at https://archive.org/details/Charade19631280x696

(Conveniently no copyright protection!)

Let’s also use the above image, easily discoverable on your favorite image search engine. (Nifty tip: You can create pictures to be table of contents of files contained within, and embed an archive.)

So we have a jpeg and mp4 file, how would we combine them? On a Mac or Linux machine we’ll use the Cat command in terminal.

cat charade.jpeg Charade-1963.mp4.zip > charade1.jpg

Explanation of the above:

Cat = Concatenate command (Learn more about it by doing “man cat” in terminal.)

charade.jpeg = File we’re going to hide an archive in.

Charade-1963.mp4.zip = Compressed movie.

> = Relational Operator to combine files and dump it into the specified file.

Charade1.jpg = Final result, embedded movie in jpeg and what we upload.

With Charade1.jpg created, we just upload it as if it was a normal file.

Windows

C:\Users\You>Copy /B charade.jpeg + Charade-1963.mp4.zip Charade1.jpg

Copy /B = Copy Command, /B switch indicates binary files. Learn more by doing help copy

charade.jpeg = File we’re going to hide an archive in.

Charade-1963.mp4.zip = Compressed movie.

+ = Relational Operator to combine files and dump it into the specified file.

Charade1.jpg = Final result, embedded movie in jpeg and what we upload.

With Charade1.jpg created, we just upload it as if it was a normal file.

Success!

As the images presented below show, the embedded file does not count against you and uses the “Unlimited” photos quota!

With the du -h (OSX/Linux only!) command, I verify the file size is: 629 MB:

Whoo-hoo!

If there are any errors in my article, please don’t hold back! Unleash the corrections in the comments below!