monoceres Posted December 25, 2008 Share Posted December 25, 2008 (edited) Hi!I found this interesting article on codeproject so I decided to use the idea in an autoit script since it didn't seem to hard It's basically a way to hide a string inside the bitmap data in a .bmp file. The basic idea is to use just 1 bit of each byte in the bitmap data to save the message, this means that each pixel that is modified inside the bitmap is just modified by one single little color shade (thus making it impossible for a human to notice the difference), so for example 0x000000 becomes 0x000001.To be able to extract the string you need to know what offset the string is saved into in the bitmap, thus making it smewhat secure for peeping eyes A big thanks to james3mg for his Number base conversion UDF.The syntax is easy:HideMessageInBitmap("file.bmp","My message",SECRET OFFSET HERE)GetMessageInBitmap("file.bmp",SECRET OFFSET HERE)Here's a bitmap I have encoded a message at offset 234 for example:test.bmpUDF ( With Number base conversion UDF):Bitmap_Message_Hider.zipPs. Since png doesn't destroy any image data, a encoded message will survive a png conversion Edited December 25, 2008 by monoceres Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
James Posted December 25, 2008 Share Posted December 25, 2008 I have seen this elsewhere on the forums too. Nice job though! Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Andreik Posted December 29, 2008 Share Posted December 29, 2008 This is awsome. When the words fail... music speaks. Link to comment Share on other sites More sharing options...
Skrip Posted December 29, 2008 Share Posted December 29, 2008 Very nice! [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left] Link to comment Share on other sites More sharing options...
Andreik Posted December 29, 2008 Share Posted December 29, 2008 I have a question. Is there any limit to the text to hide it in the picture? When the words fail... music speaks. Link to comment Share on other sites More sharing options...
monoceres Posted December 29, 2008 Author Share Posted December 29, 2008 I have a question. Is there any limit to the text to hide it in the picture? Yes and it depends of the size of the bitmap. But it's quite easy to calculate. If you for example have a bitmap that is 262144 bytes large (256 kB) you have 262090 bytes for text storage (since the bitmap header is 54 bytes). Then we have to subtract 32 bytes to save the information that contains how many chars there are in the bitmap. That leaves us with 262058 bytes. Now usually one char takes up 1 byte of storage, but since we're only using the last bit in every byte in the bitmap we need 8 bytes to store one char. Therefore we need to devide the available space with 8. Which leaves us with 262058/8=32757,25= 32757 chars available for storage Of course this assumes that the offset is 0. Here's a quick formula: MsgBox(0,"",CalculateLimit(256*1024)) Func CalculateLimit($BitmapSize,$Offset=0) Local $BitmapHeaderSize=54 Local $TextHeaderSize=32 Local $OneCharSize=8 Return Floor(($BitmapSize-$BitmapHeaderSize-$TextHeaderSize-$Offset)/$OneCharSize) EndFunc Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
slayerz Posted December 31, 2008 Share Posted December 31, 2008 This is awesome !! Btw, how can I put different message at a different offset? I'd try it, but the message is corrupted (sometimes return blank) AUTOIT[sup] I'm lovin' it![/sup] Link to comment Share on other sites More sharing options...
monoceres Posted December 31, 2008 Author Share Posted December 31, 2008 This is awesome !!Btw, how can I put different message at a different offset?I'd try it, but the message is corrupted (sometimes return blank)You just have to make sure there is enough room between the offsets. If you for example have the text "Hi!" at offset 100 the next offset can be earliest at offset 155 (32 bytes for length of string and 8*3 for the chars). Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
FireFox Posted December 31, 2008 Share Posted December 31, 2008 @monoceres Great job ! this is very funny Cheers, FireFox. Link to comment Share on other sites More sharing options...
Beege Posted July 1, 2009 Share Posted July 1, 2009 Very Cool! Just like in that movie "Along Came a Spider". Assembly Code: fasmg . fasm . BmpSearch . Au3 Syntax Highlighter . Bounce Multithreading Example . IDispatchASMUDFs: Explorer Frame . ITaskBarList . Scrolling Line Graph . Tray Icon Bar Graph . Explorer Listview . Wiimote . WinSnap . Flicker Free Labels . iTunesPrograms: Ftp Explorer . Snipster . Network Meter . Resistance Calculator Link to comment Share on other sites More sharing options...
Randeniya Posted July 14, 2009 Share Posted July 14, 2009 Nice ! But I have a question........... I had a Bmp with virus inside, when i scan it with Avast it shows AUTOIT VIRUS Will it b possible??? But Now I Don,t hav that Bmp, Bcoz when i Having it i havnt kno abt AuToIt! Link to comment Share on other sites More sharing options...
monoceres Posted July 14, 2009 Author Share Posted July 14, 2009 No, that's not possible. This code merely changes the color data inside the bitmap. Even if someone did encode a virus into a bitmap it would only show up as an image. The image viewer would have no reason to execute to last bit of every RGB value. Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
logmein Posted July 15, 2009 Share Posted July 15, 2009 great job! [font=arial, helvetica, sans-serif][s]Total USB Security 3.0 Beta[/s] | [s]Malware Kill[/s] | Malware Scanner | Screen Hider | Locker | Matrix Generator[s]AUTO-SYNC 1.0 | MD5 Hash Generator | URL Checker | Tube Take [/s]| Random Text[/font] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now