.rar archives and image files.

.rar archives and image files.

Re: .rar archives and image files. Posted by Natus on Thu Jun 15th 2006 at 7:09pm
Natus
570 posts
Posted 2006-06-15 7:09pm
Natus
member
570 posts 76 snarkmarks Registered: Jan 28th 2005 Location: Denmark
So, lately I came across a .jpg file, with the size of nearly 3mb.

I was told that you could open it with winrar, so I do, and to my surprise it opens a rar archive with some stuff.

So I went on to try and figure out how to do it, so far I've been told
that you should type (assuming this is at the root of a drive)
copy/b image.jpg+archive.rar image2.jpg
When I tried that, it created a new picture, but the file size didn't increase at all, and I couldn't open it in winrar.

So, any of you brainies (and you other guys, too) know how to get this to work?
Boo f**king Hoo
Re: .rar archives and image files. Posted by Pvt.Scythe on Thu Jun 15th 2006 at 8:10pm
Pvt.Scythe
730 posts
Posted 2006-06-15 8:10pm
730 posts 113 snarkmarks Registered: Sep 19th 2004 Occupation: student Location: Finland
Any change that the dude just changed the .rar into .jpg or just "copied" the file into different name?
''Everyone wades in s**t until they're competent enough to walk on it. Jesus style.''
Dystopia - Empires
Re: .rar archives and image files. Posted by Dark Tree on Fri Jun 16th 2006 at 4:37am
Dark Tree
646 posts
Posted 2006-06-16 4:37am
646 posts 264 snarkmarks Registered: Apr 30th 2004 Occupation: DigiPen student Location: USA
<span style="color: silver;">Just rename the extension from .rar to .jpg after raring. :razz: </span>
Re: .rar archives and image files. Posted by Natus on Fri Jun 16th 2006 at 7:41am
Natus
570 posts
Posted 2006-06-16 7:41am
Natus
member
570 posts 76 snarkmarks Registered: Jan 28th 2005 Location: Denmark
:|

If you rename the file extension to .jpg, the file will probably still work as an archive, but doesn't act as a picture (edit in programs, upload to browsers, blah blah etc.)
Re: .rar archives and image files. Posted by Natus on Fri Jun 16th 2006 at 11:30am
Natus
570 posts
Posted 2006-06-16 11:30am
Natus
member
570 posts 76 snarkmarks Registered: Jan 28th 2005 Location: Denmark
Ah nevermind i got it working now, thanks anyway guys.
Boo f**king Hoo
Re: .rar archives and image files. Posted by Rumple on Sat Jun 17th 2006 at 6:18am
Rumple
518 posts
Posted 2006-06-17 6:18am
Rumple
member
518 posts 72 snarkmarks Registered: Aug 22nd 2001 Occupation: Web Dev Location: NSW, Australia
Well... how did you manage to do it then?
SourDough2.0 - With Strawberry Jam
Re: .rar archives and image files. Posted by reaper47 on Sat Jun 17th 2006 at 3:42pm
reaper47
2827 posts
Posted 2006-06-17 3:42pm
reaper47
member
2827 posts 1921 snarkmarks Registered: Feb 16th 2005 Location: Austria
Why exctly do you want to store data in a JPG? Are you a working for the CIA or something?
Re: .rar archives and image files. Posted by Natus on Sat Jun 17th 2006 at 7:04pm
Natus
570 posts
Posted 2006-06-17 7:04pm
Natus
member
570 posts 76 snarkmarks Registered: Jan 28th 2005 Location: Denmark
Why exctly do you want to store data in a JPG? Are you a working for the CIA or something?
<span style="color: lightblue;">That is secret information which i can not grant you.

Nah i just wanted to see if i could get it to work, really.
</span>

<div class="quotetitle">? posted by Rumple</div>
Well... how did you manage to do it then?
I did it right from the start, there was just a problem with the .rar file.

<span style="color: lightblue;">

</span>
Boo f**king Hoo
Re: .rar archives and image files. Posted by wil5on on Sun Jun 18th 2006 at 3:50am
wil5on
1733 posts
Posted 2006-06-18 3:50am
wil5on
member
1733 posts 570 snarkmarks Registered: Dec 12th 2003 Occupation: Mapper Location: Adelaide
The way the CIA do it is to encode data in the last bit of every colour value, which causes tiny unnoticable colour changes in the image.

But now I've told you that... I'll have to kill you.
"If you talk at all during this lesson, you have detention. Do you understand?"
  • My yr11 Economics teacher
Re: .rar archives and image files. Posted by Crono on Sun Jun 18th 2006 at 5:40am
Crono
6628 posts
Posted 2006-06-18 5:40am
Crono
super admin
6628 posts 700 snarkmarks Registered: Dec 19th 2003 Location: Oregon, USA
Needless Computer Implementation Note, Ignore unless you're interested. You've been warned:
That would be noticeable in larger image sizes. Since it'd need to be unique, a lot of image formats kind of do a range sort of thing like color 0xXXXXXX in pixel , then have a (linked) list. Bitmaps (which Microsoft really ruined the name) work better, since there is no compression (otherwise known as rounding ranges. They do it to a certain degree of accuracy, like if it's within or - 0x00000A round it to the next nearest value in the entire picture.)

So, that's how that works. of course, PNG, GIF, JPG, BMP, TGA, TIFF, etc, all have different algorithms for rearranging the data and retrieving it.

I don't think that code trick would work very well in smaller image formats. You might need to know the message length before hand, for example. Which, is just as bad as giving the message its self because you narrowed down a very important parameter to decode it.
Otherwise, I suppose that's clever. I think personally I'd just use a quantum computer, since you'll know if the connection has been tampered with. That'd give me more comfort than hoping someone doesn't know what to look for.
Blame it on Microsoft, God does.
Re: .rar archives and image files. Posted by wil5on on Sun Jun 18th 2006 at 9:48am
wil5on
1733 posts
Posted 2006-06-18 9:48am
wil5on
member
1733 posts 570 snarkmarks Registered: Dec 12th 2003 Occupation: Mapper Location: Adelaide
So would I, and presumably whoever uses this image encryption thing, but they arent practical yet.

Yes, the idea only really works with lossless bitmapped image formats. You take the RGB values for every pixel, and replace the last bit of each number with bits from your message. This gives unnoticable colour changes in the image, and is fairly simple to extract the message from. The message length doesnt neccessarily need to be known beforehand, but an image has to be selected such that it is large enough to accomodate the message. A 640x480 image can store up to 921600 bits (112kb) of encrypted data in this way, so its suited for small data sizes.
"If you talk at all during this lesson, you have detention. Do you understand?"
  • My yr11 Economics teacher