Slashdot Mirror


Hydan: Steganography in Executables

An anonymous reader says "Ever wanted to hide a message into an executable? Now you can with Hydan. Presented recently by Rakan El-Khalil at Defcon and Blackhat, this tool lets you embed data into an application without changing its functionality or filesize! Check it out. Use includes steganography as well as embedding a program's signature into itself to verify it's not been tampered with."

235 comments

  1. Slashdotted without a single comment! by Anonymous Coward · · Score: 0

    You guys make me proud!

    1. Re:Slashdotted without a single comment! by StalinsNotDead · · Score: 1

      At least that means people are trying to RTFA

      --
      Thanks to the internet, we can now all die alone together! -SomeWoman
  2. What ... by Anonymous Coward · · Score: 4, Funny

    "What are you doing?"

    "Oh, hydan out."

    1. Re:What ... by Anonymous Coward · · Score: 1, Funny

      Oh, I've read this story before. It's OK, but the pacing is a little slow.

    2. Re:What ... by Anonymous Coward · · Score: 0
      "Oh, hydan out."

      Where I come from, people who make puns like that risk a really good hydan.

    3. Re:What ... by JVert · · Score: 1

      But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it? But who has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids a pain that produces no resultant pleasure?

    4. Re:What ... by fredrated · · Score: 1

      Is this what you're going to hide in your software?

  3. First Post and On Topic by Trolling4Dollars · · Score: 1, Interesting

    If steganography is now in the hands of joe user, how useful is it really? It's not exactly a secret anymore, is it? ;P

    1. Re:First Post and On Topic by Ioldanach · · Score: 4, Insightful
      If steganography is now in the hands of joe user, how useful is it really? It's not exactly a secret anymore, is it? ;P

      If I transmit files out to my friends that include encrypted data using steganography, then the extra data should be indistinguishable, effectively hiding within the noise of random crap on the web/usenet/email. Thus, without the key, an intercepted message is difficult to detect, and even if detected, I have sufficient plausible deniability to say "nothing there".

      In order to detect an message encrypted and included inside another file, you either need to know its there and be looking for it, compare it to an existing file which should be identical, or statistically detect some aspect of the file. If you know it should be there, you just need to grab any file that looks like the file you're seeking, grab the relevant bits, and attempt decryption. If you have a file that should be identical, (say, an image that looks the same that was posted to usenet a couple days earlier), you can take the bits that are different and try and make some sense of them. If you are just doing statistical analysis, you might be able to find files which have a set of bits whose randomness is just shy of where it should be, and maybe those bits mean something.

      In short, unencrypted steganography isn't particularly useful, but encrypted, you can really hide things.

    2. Re:First Post and On Topic by paz5 · · Score: 1

      The reason that it is still secret is not because people have not because people had not been able to or heard of steganography, but because of the shear volume of traffic going across the wire on the internet, that to check for a hidden message in each and every file would be rediculous. Not only would you need to think to look, but you would also need to have a good idea what to look for.

    3. Re:First Post and On Topic by xp · · Score: 1

      Here's my question: How can you hide a message in an executable containing a single NOOP, or in the Perl program "" (without the quotes). You can't hide much in there.
      ----
      The Procrastinating Monkey

    4. Re:First Post and On Topic by Dun+Malg · · Score: 3, Informative
      Here's my question: How can you hide a message in an executable containing a single NOOP, or in the Perl program "" (without the quotes). You can't hide much in there.

      The answer there is "you can't". You need a compiled executable large enough to have multiple instances of "alterable sequences". The way I understand it, they fiddle with reversable/interchangeable opcodes to create "bits". Say a program has 500 mixed instances of: (this is all made-up assembly)

      JNZ $(foo) ; jump if not zero to address (foo)
      JMP $(bar) ; otherwise jump to address (bar)

      and
      JZ $(bar) ; jump if zero to address (bar)
      JMP $(foo) ; otherwise jump to (foo)

      As you can see, a sequence of a JNZ followed by a JMP can easily be re-written as a JZ followed by a JMP. The program only needs to go through and change each instance to match bitwise value of the "message", treating JNZ-JMP as a bitwise 0 and JZ-JMP as a 1. There are probably more instances of "two ways to do it" one can exploit in a given executable to yield even bigger "message spaces".
      --
      If a job's not worth doing, it's not worth doing right.
    5. Re:First Post and On Topic by Phurd+Phlegm · · Score: 1
      As you can see, a sequence of a JNZ followed by a JMP can easily be re-written as a JZ followed by a JMP. The program only needs to go through and change each instance to match bitwise value of the "message", treating JNZ-JMP as a bitwise 0 and JZ-JMP as a 1.
      So long as none of the jumps is itself the target of a jump. I suspect detecting this in the general case of handwritten code is impossible. Presumably the assumption is that you never have a case like that. I'll have to read the paper.

      Of course, it's hard to come up with a reason for a jump to target another jump--unless it's to prevent a program being used to steganographically encode information....

    6. Re:First Post and On Topic by WhiteDragon · · Score: 2, Informative

      One of the most obvious examples of a jump -> jump is in the interrupt vector table, back in the DOS days. Also, some processors (such as intel 386, which I learned assembly programming on) have short and long jump instructions, so you might need something like a conditional short jump to a location that contains an unconditional long jump. IIRC, i386 didn't have conditional long jump instructions.

      --
      Did you mount a military-grade, variable-focus MASER on an unlicensed artificial intelligence?
  4. I smell... by Anonymous Coward · · Score: 0

    ...the next generation of ASCII art coming our way.

  5. I did this once .... by taniwha · · Score: 3, Interesting

    Discovered a copyright string that was also executeable 68k code .... and included it in my main initialization routines

    1. Re:I did this once .... by ackthpt · · Score: 1
      Discovered a copyright string that was also executeable 68k code .... and included it in my main initialization routines

      Doesn't seem that tricky. We used to place string tags in code then have an app find it and replace with whatever we wanted, i.e. a serial number.

      --

      A feeling of having made the same mistake before: Deja Foobar
    2. Re:I did this once .... by Anonymous Coward · · Score: 0

      Lots of $4E71?

  6. Now every virus program will say... by Barondude · · Score: 3, Funny

    I am 1337.

    --
    "That's the sort of blinkered, philistine pig ignorance I've come to expect from you non-creative garbage."-Monty Python
    1. Re:Now every virus program will say... by notyou2 · · Score: 1

      I am 1337.

      With this technique, couldn't it instead read:

      1 am l337.

  7. without changing its functionality or filesize! by gl4ss · · Score: 2, Insightful

    if you blurt something like that out in the blurb maybe it would be nice to mention how the hell it happens. especially when the site gets slashed so fast.

    executable packing or actually increasing the filesize? either one has to happen.

    --
    world was created 5 seconds before this post as it is.
    1. Re:without changing its functionality or filesize! by Carnildo · · Score: 5, Interesting

      Many executable formats include unused space for alignment purposes. For example, I've been working on a Mach-O equivalent of the super-tiny ELF executable mentioned a few days back. The executable produced by GCC includes 300 bytes of code and headers, and 8000 bytes of padding.

      --
      "They redundantly repeated themselves over and over again incessantly without end ad infinitum" -- ibid.
    2. Re:without changing its functionality or filesize! by jdray · · Score: 5, Informative
      From the article:

      Hydan steganographically conceals a message into an application. It exploits redundancy in the i386 instruction set by defining sets of functionally equivalent instructions. It then encodes information in machine code by using the appropriate instructions from each set.

      --
      The Spoon
      Updated 6/28/2011
    3. Re:without changing its functionality or filesize! by Anonymous Coward · · Score: 1, Informative

      Think! Many EXE programs are so filled with NUL (00) that it becomes trivial to drop code in the holes.

      Remember "cavity virii"? Vesselin Bontchev discussed them in one of his papers. They take this approach, infecting EXE files by removing some of the ASCII NUL characters and putting themselves in. As long as they don't remove or add too many characters, it all works the same.

      And, as we all know, there is no storage difference between ASCII NUL and any other character in an EXE file.

    4. Re:without changing its functionality or filesize! by Hi_2k · · Score: 4, Informative

      I was at a SANS conference a while back, and the instructor, Ed Skoudis, explained it as replacing certain operations with equivalents to represent bits. For example, "add 0002h" would be 0, "sub FFFEh", technically equivalent, would be 1. The more replaceable operations a program has, the more it can store. Hydan also encrypts the data with blowfish before storing it.

      --
      When life gives you crap, Make Crapade.
      Sluggy Freelance.
    5. Re:without changing its functionality or filesize! by BarryNorton · · Score: 1

      Ah, long live CISC!

    6. Re:without changing its functionality or filesize! by jhoffoss · · Score: 1

      I learned of hydan from Ed as well. Terrific teacher, though the coursework for SANS Track 4 left a bit to be desired, as I'm a somewhat-experienced pen-tester already. Still, very thorough.

      --
      Linux: The world's best text-adventure game.
    7. Re:without changing its functionality or filesize! by Anonymous Coward · · Score: 0

      I read once a while ago of a method to do this.

      Apparently there are two separate operations for addition and subtraction, both taking up the same amount of space, so the program would actually change additions to be subtracting negative values. Then all actual additions would be like a 1 and all subtractions of negative numbers would be a 0.

      Put this together and voila, you have bytes stored in an executable without changing file size, headers, or functionality.

    8. Re:without changing its functionality or filesize! by Anonymous Coward · · Score: 0

      I believe this works be re-arranging the instruction set (specifically addition/subtraction) into your message. Doesn't change the size, but analyzing the order will give you the message. For example: Encoding all addition operations as a 1, and encoding all subtraction operations as a 0 would give you a binary message if you looked at the instruction set.

    9. Re:without changing its functionality or filesize! by Anonymous Coward · · Score: 0

      err, ok, i was wrong. See above post.

    10. Re:without changing its functionality or filesize! by pclminion · · Score: 1
      The data in executable bytestreams has a large amount of redundancy. Therefore there are lots of "wasted" bits which can be fiddled with to store data. The site's slashdotted but I assume this works by replacing certain instructions in the binary with other, equivalent instructions.

      There is a definite limit on the amount of data you can embed without increasing the file size, because a finite file can only have a finite amount of redundancy.

      Perhaps the author thought this was too obvious to mention. I certainly didn't get the impression he was claiming the ability to embed arbitrary amounts of data in tiny executable files.

    11. Re:without changing its functionality or filesize! by shadow_slicer · · Score: 2, Insightful

      How could that be useful for stenography?
      Don't most compilers just use pick one of the redundant instructions and use that throughout? If so you just have to look for an executable that alternates betweent redundant instructions, and then you know that data is in there. At that point you're no better off than if you used plain encryption (and encryption uses less bandwidth...).

    12. Re:without changing its functionality or filesize! by Anonymous Coward · · Score: 0

      gawd damn, with visual studio 7 I can make working execs doing d3d gfx in under 1000 bytes

    13. Re:without changing its functionality or filesize! by Anonymous Coward · · Score: 3, Interesting

      Any sort of steg is vulnerable to "you just have to look for [insert technique that you already know about]". The purpose of steganography is not to make data unfindable, it's just to obfuscate the fact that it's there in the first place. If you know it's there, and you know how to look, finding the data is easy. That's how the extraction programs work, after all.

      Mass detection of the presence of steg with unknown techniques usually relies on on statistics over the "normal" types of files. When the LSB of those image files is suddenly nearly random, instead of correlated with nearby pixels, you know something's up, like a zipped, encrypted file jammed into those LSBs. Same with your example; when most program instructions are only 0.01% WIERDX and 2% OTHERA, and this one is oddly 1% WIERDX and 1% OTHERA, you start to wonder.

      Steganography is neither encryption nor invisibility.

    14. Re:without changing its functionality or filesize! by LnxAddct · · Score: 1

      Thats great... really it is... but I can write a much smaller python script using an openGL binding. By much smaller, I mean probably under 30 bytes. Anyone can do anything in a line or two of code when there are 50 megs of libraries behind it that it is calling. Your post was dumb.
      Regards,
      Steve

    15. Re:without changing its functionality or filesize! by gl4ss · · Score: 1

      *Perhaps the author thought this was too obvious to mention. I certainly didn't get the impression he was claiming the ability to embed arbitrary amounts of data in tiny executable files.*

      the author probabl never made it sound like that, but the guy that submitted this to slashdot did and the editors didn't provide explanation or better wording either.

      --
      world was created 5 seconds before this post as it is.
    16. Re:without changing its functionality or filesize! by octaene · · Score: 1

      Yeah, and how about what happends to the checksum of the file? Does that stay the same too (wow?)...?

    17. Re:without changing its functionality or filesize! by ThisNukes4u · · Score: 1

      If there is that much padding, it is probably filled with 0's, correct? Then it would be easy to tell if there was something in the program if those bytes weren't 0's. If those bytes are random to begin with, then it is more difficult to detect.

      --
      thisnukes4u.net
    18. Re:without changing its functionality or filesize! by wirelessbuzzers · · Score: 3, Interesting

      Any sort of steg is vulnerable to "you just have to look for [insert technique that you already know about]". The purpose of steganography is not to make data unfindable, it's just to obfuscate the fact that it's there in the first place. If you know it's there, and you know how to look, finding the data is easy. That's how the extraction programs work, after all.

      Mass detection of the presence of steg with unknown techniques usually relies on on statistics over the "normal" types of files. When the LSB of those image files is suddenly nearly random, instead of correlated with nearby pixels, you know something's up, like a zipped, encrypted file jammed into those LSBs. Same with your example; when most program instructions are only 0.01% WIERDX and 2% OTHERA, and this one is oddly 1% WIERDX and 1% OTHERA, you start to wonder.

      Steganography is neither encryption nor invisibility.


      In theory, this doesn't have to be true. Many types of files do contain real entropy. For instance, for any naturally occurring image, there exist a multitude of other images which could be generated by the same method (eg, taking a photograph of a given lake from a given angle, and then JPEG-compressing it) with some probability distribution. In theory, you could determine that set (or some subset of it, so long as taking any element of that subset gives the same answer) and that probability distribution, apply a reverse arithmetic code the set of possible (encrypted) messages to get the probabilities in line, and then send the corresponding image from the set.

      Even someone who suspected the method and was observing your communications for an arbitrary amount of time couldn't prove that those messages were there without breaking the encryption (where "break" in this case means "distinguish from noise").

      Thus, if the low order bits of an image were in fact uniformly and independently distributed, then setting them to your message would suffice for steg. (Un?)fortunately, this isn't the case unless you've just applied a noise filter. Now, if you could find all possible statistics on the correlations of these last bitowers, and had a clever algorithm or a lot of compute, then you could generate such a set, but nobody knows how to do something like this. This is the principle of steg programs such as Outguess (which was broken two years ago).

      --
      I hereby place the above post in the public domain.
    19. Re:without changing its functionality or filesize! by tarkie101 · · Score: 0

      No, the checksum changes. Just the filesize and function of the file stays the same. The post about swapping ADD and SUB function is correct as they have the same bit size.

    20. Re:without changing its functionality or filesize! by Anonymous Coward · · Score: 0

      ... As long as you forget the carry-bit, you are right.

      But computers do not forget that easily, and such a change will (probably) crash the program ...

    21. Re:without changing its functionality or filesize! by the+real+darkskye · · Score: 1

      So, not only does it hide my data, it also optimises my code? shweet.

      --
      Music is everybody's possession.
      It's only publishers who think that people own it.
      Fuck Beta
      ~John Lenno
    22. Re:without changing its functionality or filesize! by Anonymous Coward · · Score: 0

      Your post was dumb.

      As was yours.

  8. Right now by Tsiangkun · · Score: 4, Funny

    it looks like the information is being hidden by a slashdotted executable.

  9. Re:SCO connection by irongrip · · Score: 1, Funny

    NOOOOOOOOOOO!

  10. So, for when the first patent lawsuit? by johnny_sas · · Score: 1
    Surely some dufus company is going to claim it's god and invented this first, and the "examiners" at the PTO will have just rubber-stamped this without any research, as usual...

    So, for when the first lawsuit against this?

    1. Re:So, for when the first patent lawsuit? by HawkEye4077 · · Score: 1

      It started yesterday ;)

      --
      "Welcome to Hell - Here's your copy of Windows"
    2. Re:So, for when the first patent lawsuit? by Anonymous Coward · · Score: 0

      But if you used this well, how would they prove you had? It's not like they can show something to the police to use as reasonable cause for a search.

  11. Signed binaries... nice idea by advocate_one · · Score: 4, Insightful

    especially if the OS goes off and double checks the executable is legit before executing it...

    --
    Donald 'Duck' Dunn: We had a band powerful enough to turn goat piss into gasoline.
    1. Re:Signed binaries... nice idea by JohnnyGTO · · Score: 0

      Hey that was my yearbook saying. I knew I should have trademarked it :-)

      --
      Si vis pacem, para bellum! For evil to succeed good men need only do nothing!
    2. Re:Signed binaries... nice idea by Anonymous Coward · · Score: 0

      You must be new here ;)

    3. Re:Signed binaries... nice idea by Anonymous Coward · · Score: 0

      This would be a *little* different... as opposed to locking down unsigned apps in hardware, this would only tell you if the program has been modified in transit from the original copy.

      Yes it would tell you your crax0r3d game exes have been modified. But you already knew that.

    4. Re:Signed binaries... nice idea by Sicnarf · · Score: 1

      Hear that OpenBSD guys? :-)

    5. Re:Signed binaries... nice idea by Anonymous Coward · · Score: 0

      microsoft uses technology to take power away from people. Nobody here is averse to technology in general, just bad uses of it.

      Here is a logical analog to your comment:
      Private citizens with guns? Everyone gets mad when the Army has guns but when citizens have them it's an insightful idea?

  12. Security by Anonymous Coward · · Score: 0, Troll

    I can see how this would be interesting, well to all the terrorists out there, what are some honest or dishonest uses for stegnography?

    1. Re:Security by kfg · · Score: 1

      . . .what are some honest or dishonest uses for stegnography?

      Private communications.

      KFG

  13. embedding signiature?? by guanno · · Score: 4, Insightful

    If you embed a signiature of the file into the file, this by definition changes the file's signiature. At best you can append the signiature. However if the file can be modified, so can it's signiature.

    If these folks have figured out a way of circumventing this innate paradox, I'm impressed and am dying to hear more about the technology/mathematics behind it! Can you say Nobel Prize nomination?

    1. Re:embedding signiature?? by n0rr1s · · Score: 1

      Perhaps it can be proved that for any executable, there is exactly one string that can be embedded such that the new file's signature is the embedded string?

      I know nothing about this technology. Anyone care to tell us more?

    2. Re:embedding signiature?? by jhoffoss · · Score: 1

      IIRC, the same way you used Hydan to inject the signature, you can remove the signature. At worst, you can extract the signature (at this point, it becomes a password or keyword...) to verify the integrity of the file. Very interesting program!

      --
      Linux: The world's best text-adventure game.
    3. Re:embedding signiature?? by jrockway · · Score: 5, Interesting

      Unless you do it like this (an example is always easy to understand).

      Say you have an executable:

      1337PROGRAM

      Your signature checking routine then does this:

      1_3_3_7_P_R_O_G_R_A_M

      and computes the hash

      deadbabeca

      And then sends:

      1d3e3a7dPbRaObGeRcAaM

      To reverse, we extract the hash (deadbabeca) and the "original" executable.

      Then we compute the hash (of 1_3_3_7...) and check if it matches...

      In summary, we embedded a checksum, but we removed it before we checked it. Simple, really.

      --
      My other car is first.
    4. Re:embedding signiature?? by Anonymous Coward · · Score: 0

      It's not a paradox. It's just a cyclic problem like x = dx/dy

    5. Re:embedding signiature?? by Ioldanach · · Score: 4, Interesting
      If you embed a signiature of the file into the file, this by definition changes the file's signiature. At best you can append the signiature.
      1. Set the swappable instructions in the program to their bitwise equivalent of 0.
      2. Calculate a signature based on that number.
      3. Swap the instructions to encode that number.

      To decode.

      1. Find swappable instructions.
      2. Determine what bit setting they're at.
      3. Set their bit setting to 0.
      4. Recalc signature based on the new bit setting.
      5. Compare to the bit setting you just retrieved.

      I would still recommend publishing a separate public key, however, and include an encrypted signature in the program. As you say, it can always be changed and re-encoded.

      On the other hand, this might be useful on a server, by encoding a public key and checker on a CD-R and checking all your programs periodically against the CD-R key. You could encode signatures in each program and be able to upgrade programs from a central encoding server without having to write a new cd each time.

    6. Re:embedding signiature?? by pclminion · · Score: 2, Interesting
      If you embed a signiature of the file into the file, this by definition changes the file's signiature.

      It is typically assumed for these kinds of things that the signature itself is not part of the data being signed. However if the file can be modified, so can it's signiature.

      You could easily solve that by using X.509 certificates, issues by a trusted CA, similar to the Microsoft "signcode.exe" program for signing CAB files and EXEs. However, that would only prove the integrity of the binary. It's still impossible to write a program which refuses to run when modified, because you can always just remove the code that checks the validity of the signature. That's the real paradox.

    7. Re:embedding signiature?? by Anonymous Coward · · Score: 1, Informative

      actually, all you need to do is specify that the signature included is for the file without the signature. As far as changing the signature, your friendly PGP may make it rather difficult. Lets imagine the following scenario:

      1. Create a program
      2. Sign using your private key
      3. Embed the signature inside the program
      4. Send to the user
      5. User's OS goes to a predetermined place to get your public key (or has it embedded already)
      6. Checks the program against the key

    8. Re:embedding signiature?? by Anonymous Coward · · Score: 0

      Do you also maintain that it's impossible to write a quine? After all, how can a program print out it's own source code? If you modified the program to print itself out it would no longer be the same program and so therefore it wouldn't be printing itself out. Obviously quines must be a figment of everyone's imaginations...

    9. Re:embedding signiature?? by Anders · · Score: 4, Informative

      [...] am dying to hear more about the technology/mathematics behind it! Can you say Nobel Prize nomination?

      There is no Noble Prize for mathematics.

    10. Re:embedding signiature?? by mattjb0010 · · Score: 1

      That's fine, except the software authors' claim is that the file size remains unchanged.

    11. Re:embedding signiature?? by mattjb0010 · · Score: 1

      There is the Fields Medal.

    12. Re:embedding signiature?? by Unordained · · Score: 2, Insightful

      except the hash isn't part of the hash. if i wanted to modify it, knowing this method, all i have to do is modify the executable part, hash it again, and re-insert. at best, the checksum lets me know i got the copy intended by the sender, nothing more.

      even if the hash were part of the hash (come to think of it), having a method for generating such executables would still make tampering possible. at best, it'd make it a slow process (assuming it's not something you can generate in O(1) time.)

    13. Re:embedding signiature?? by Anonymous Coward · · Score: 0

      I guess you would need a an executable file PROG.EXE whose hash string HASH(PROG.EXE) actually occurs as part of the bytes making up PROG.EXE. That would be a weird coincidence.

      I wonder what such a program might do...?

      (Why, it calculates its own hash, obviously!)

    14. Re:embedding signiature?? by mothz · · Score: 1

      There is no Noble Prize for mathematics. Thanks, it was very "nobel" of you to point that out.

    15. Re:embedding signiature?? by Anonymous Coward · · Score: 0

      Nobel!=Noble

    16. Re:embedding signiature?? by jrockway · · Score: 1

      Well those _'s are empty space in the binary. x86 has a lot of this. Notice how there's no PPC version, for example.

      --
      My other car is first.
    17. Re:embedding signiature?? by Zardus · · Score: 1

      Some speculations as to the reason behind there not being a Nobel Prize for math are here.

      --
      You can mod your friends, you can mod your nose, but you can't mod your friend's nose.
  14. Information Theory by BarryNorton · · Score: 1

    "lets you embed data into an application without changing its functionality or filesize" Oh well, it was just a theory anyway ;)

    1. Re:Information Theory by Carnildo · · Score: 5, Informative

      inc ax
      add ax, 1
      add al, 1
      inc eax
      add eax, 1

      All of these i386 instructions do the same thing, but they've got different binary representations. If you encode your information by which instruction you use, you can hide the message without changing filesize or functionality.

      --
      "They redundantly repeated themselves over and over again incessantly without end ad infinitum" -- ibid.
    2. Re:Information Theory by BarryNorton · · Score: 1

      True. The 'beauty' of CISC, I guess, is that there's all that bloated redundancy there to be exploited :)

    3. Re:Information Theory by Anonymous Coward · · Score: 0

      Those instructions don't all do the same thing. If ax=255, then "inc ax" will lead to 256, but "inc al" will lead to 0 (and set the carry flag). There are also extra bytes added to use non-default register sizes, so you can't convert "inc ax" to "inc eax" without changing the size of the executable. The equivalent instructions are

      inc ax
      add ax,1
      sub ax,-1

      except that I think inc ax is actually a shorter instruction because it doesn't have an immediate value (but I haven't looked at i386 machine code for several years now). Even with just the add/sub thing, you get one bit for every addition/subtraction in the program.

    4. Re:Information Theory by pclminion · · Score: 4, Informative
      These don't all do the same thing.

      Suppose eax = 0xFFFFFFFF.

      Result of "inc ax": eax = 0xFFFF0000
      Result of "inc al": eax = 0xFFFFFF00
      Result of "inc eax": eax = 0x00000000

      They don't do anything near the same thing. The carry bits get lost.

      However, you can substitute "add ax, 1" for "inc ax", and "add al, 1" for "inc al", and "add eax, 1" for "inc eax".

    5. Re:Information Theory by BinBoy · · Score: 1

      It probably takes advantage of a redundant bit in some 8086 opcodes. See this comment

    6. Re:Information Theory by Timothy+Brownawell · · Score: 1
      Huh. So if ax overflows during addition, it increments the top half of eax even though it was told to do a 16-bit operation, rather than a 32-bit one?

      And I'd think i386 would have some mechanism to know if an overflow had occurred (never used i386 asm enough to find it, but it seems necessary for some things), something using this (assuming it really does exist) would definitely see a difference in some of those instructions.

      Tim

    7. Re:Information Theory by Carnildo · · Score: 1

      Well, yeah, they're not quite all equivalent in all situations.

      --
      "They redundantly repeated themselves over and over again incessantly without end ad infinitum" -- ibid.
    8. Re:Information Theory by JohnBaleshiski · · Score: 1

      It's been years since I coded in 80x86 assembler, but I do remember that it does have a carry flag. This flag is set by some interrupt calls to pass success or failure of the operation such as open file.

      If memory serves me, it can also be used when a register crosses from 0xFFFF into 0x0000 or vice versa.

    9. Re:Information Theory by Anonymous Coward · · Score: 0

      Parent is also wrong
      "inc ax,1" doesn't modify the carry flag
      "add ax,1" does set the carry flag according to the result

      instruction like "add ax,bx" can be encoded in two different ways.

    10. Re:Information Theory by Anonymous Coward · · Score: 0

      And for added karma, also make them rhyme.

    11. Re:Information Theory by tadmas · · Score: 1

      However, you can substitute "add ax, 1" for "inc ax", and "add al, 1" for "inc al", and "add eax, 1" for "inc eax".

      You can't even do that. The ADD instruction is generally going to be longer than the INC instruction because of the immediate value. For example, "inc ax" takes up one byte while "add ax, 1" takes up three. (That's in 16-bit mode. In 32-bit mode, both of them have an address size prefix, making 2 bytes and 4 bytes respectively, but that still doesn't change the fact that they don't match.)

      The only exception is al. "add al, 1" takes two bytes and "inc al" also takes two bytes. This is because "add al" has a special encoding.... normally "add (8-bit register), (immediate)" takes three, but in al's case only takes two.

      So, in effect, these instructions are not interchangeable since the original work could contain the shorter instruction - you can't put in the longer without further modifying the program.

  15. Information wants to be private... by CarrionBird · · Score: 2, Insightful
    It's more proof that you can't stop people from having secret conversations.

    At least not without a top down Orwellian soceity where all hardware and software is controlled.

    --
    Free Mac Mini Yeah, it's
    1. Re:Information wants to be private... by polecat_redux · · Score: 0

      Anything you hide in plain sight isn't necessarily private.... "Anything man can make, man can break."

    2. Re:Information wants to be private... by Pieroxy · · Score: 1

      I once wrote a small program that would work from the simple manner: Take the file, take the key, XOR them both.

      That is a very poor encryption algorithm, but I used keys that were ~150 kbytes. Unbreakable.

      We would carry a floppy with ~10 keys on it and every time we would send a file we'll choose a different key and just send the filename of the key along the mail.

      Of course, with that kind of poor kryptography you need a strong key, so my algorithm to generate a key was initiating two different random seeds, pick up a set of random files from the HDD with the first seed, and XOR them with the second random seed up until I reached the desired size for the key.

      Try and break that!

    3. Re:Information wants to be private... by segfault7375 · · Score: 2, Insightful


      At least not without a top down Orwellian soceity where all hardware and software is controlled.

      Isn't this basically what DRM aims to do?

    4. Re:Information wants to be private... by ThisNukes4u · · Score: 1

      I can just steal the floppy with the keys on it.

      --
      thisnukes4u.net
    5. Re:Information wants to be private... by void* · · Score: 1

      The 'take the file, take the key' algorithm is unbreakable when the key is as long or longer than the plaintext, and trivially breakable otherwise.

      when the key is longer than the text it's generally called a 'one time pad'.

      As in any symmetric encryption, it has problems related to key distribution.

      You probably actually weakened it by using a PRNG in the manner you did to pick the key material ... how many bits were the two seeds?

      --


      Code or be coded.
    6. Re:Information wants to be private... by void* · · Score: 1

      Eh, one thing I forgot ... a critical bit of a one time pad is that you only use the key for one message.

      --


      Code or be coded.
    7. Re:Information wants to be private... by Pieroxy · · Score: 1

      Seeds were random generators. You can think of it as Math.random() in Java for example, initialized using the current time (That's the seed actually).

      One seed was used to randomly choose files in the filesystem.

      The other seed was used to generate numbers between 0 and 255 to XOR them with the actual files chosen by the first algorithm.

      When the generated stream length was 150kbytes long, we got a key.

      Of course, both me and my friend needed to have a FDD with 10 keys on it to read the files sent...

      BTW, how did I weakened it by using this algorithm to generate keys? My goal was to make the key a "white noise" or other kind of noise. And why are these keys not supposed to be used more than once?

      IANAK (Kryptographer)

    8. Re:Information wants to be private... by void* · · Score: 1

      I don't need a lesson in calling rand() ;) I wrote code pretty much like yours ten years ago. :)

      The 'probably weakened' bit is this - If you're doing the same 'use two seeds' bit to generate the key for decrypting as well, the actual key is not the generated key, but the seeds, which have far fewer bits than the generated key.

      If you're generating the key and then getting that key to your friend somehow, and the seeds are not used for decryption at all (This sounds like what you're doing, reading the original post I interpreted it as your doing the above), you're probably ok as long as you do something to sufficiently change what the same seeds would pick as a key later (rearrange the data on your drive).

      If you read Applied Cryptography, there's a bit in there where Schnier talks about one time pads. If you use the key for more than one plaintext, it can be broken, basically it's a matter of getting the key to repeat - if you have two cryptexts encrypted with the same key, you butt the two plaintexts together so that the key repeats, then you can XOR the crypttext against the crypttext shifted over the length of the key, which removes the encryption - you end up with the plaintext XOR'd against itself shifted over the length of the key (eg, if your key is five chars, and your first message is 'hello' and your second is 'world', you end up with the string resulting from XORing char by char 'helloworld' against 'worldhello'. From there it's much easier to decode than the original encrypted files. IIRC Schneir talks about how we broke a russian one time pad because they used the same key for multiple plaintexts (however, because they didn't throw the key away, and only use it once, it was then not really a 'one time pad' ... the 'one time' bit in there means 'only using the pad (key) once').

      So, only use a key generated how you're generating it for one plaintext (one file, etc).

      Of course, it may be likely that no one with the knowledge to break it in that manner cares about what you've encrypted, in which case what you're doing may be just fine for your purposes. There's always the 'is this important enough to protect in a better manner' decision.

      --


      Code or be coded.
  16. The question, answered. by caluml · · Score: 4, Funny
    Ever wanted to hide a message into an executable?

    Not really :)
    But I'd like to make that dog downstairs stop barking.

    1. Re:The question, answered. by Anonymous Coward · · Score: 0

      get a spice jar of cayan pepper and mix it with raw hamburger, that dog will wolf it down before he realises his mouth is burning, i bet that shuts him up

    2. Re:The question, answered. by Anonymous Coward · · Score: 0

      No it wouldn't, it would lick it and then leave it alone...

    3. Re:The question, answered. by Anonymous Coward · · Score: 0
      But I'd like to make that dog downstairs stop barking.


      Then maybe you should spend a little more time with your wife and a little less on /.?
  17. bologna by Nuttles · · Score: 2, Funny

    without changing file sizes... let me stick my pirated version of War and Piece in my Hello world application.

    sometimes you don't even have to rtfa to rip on a topic...

    Nuttles
    Christian and proud of it

    1. Re:bologna by garcia · · Score: 2, Informative

      without changing file sizes... let me stick my pirated version of War and Piece in my Hello world application.

      According to the article that you didn't read it seems that the amount of text that you can imbed without affecting the filesize is determined by the original file's contents.

      You wouldn't be able to fit War and Peace into most files but you could fit about 1.44KB of text into a 500k file or so (according to their examples).

    2. Re:bologna by Nuttles · · Score: 1

      why, thank you, thank you very much. I would hope that you will remember that I qualified my statement as not reading the article so remember I am a step above most /.'s who post never haveing read the article AND not admitting it

      Nuttles
      Christian and proud of it

    3. Re:bologna by Anonymous Coward · · Score: 1, Informative

      Maybe you should have RTFA. They explicitly discuss the fact that their upper bound is less than 1% of the executable size.

    4. Re:bologna by Carnildo · · Score: 1

      without changing file sizes... let me stick my pirated version of War and Piece in my Hello world application.

      Have you seen the size of executable the latest Microsoft compilers produce for something as simple as "Hello World"? You almost could.

      --
      "They redundantly repeated themselves over and over again incessantly without end ad infinitum" -- ibid.
    5. Re:bologna by itwerx · · Score: 3, Funny

      "War and Piece" = 13 chars - no problem!
      Now the full text of "War and Peace" might be a different story... (Literally! Chuckle/snort :)

    6. Re:bologna by Nuttles · · Score: 1

      Of course there has to an upper bound. I would think slashdot wouldn't post an article that made such a claim as infinite storage space in a finite space. I was poking fun at what the article headline implied. he he ha ha

      Nuttles
      Christian and proud of it

    7. Re:bologna by Nuttles · · Score: 1

      do you think that links to that porno sites is more valuable use of screen real estate?

      in sigs people give a cool thought, or a snippet of what they believe, why do you attack me? Is it because what I believe doesn't coincide with you? hmmm seems to me like a small minded person....

      Nuttles

      Christian and proud of it

    8. Re:bologna by Anonymous Coward · · Score: 0


      let me stick my pirated version of War and Piece in my Hello world application.


      How did you manage to pirate a work that is in the public domain?

      In any case, it is only a bit more than 3M uncompressed ascii, so you probably could hide it in the bloated mess that many compilers would make of Hello World.

    9. Re:bologna by Trurl's+Machine · · Score: 1

      let me stick my pirated version of War and Piece in my Hello world application.

      Well, if your Hello world application was written in the style of Master Programmer from the old joke... you can easily fit the whole collected works by Fedor Dostoevsky.

    10. Re:bologna by Anonymous Coward · · Score: 0

      "Pride" is one of the seven deadly sins. Go figure.

  18. A new low... by ivan256 · · Score: 4, Funny

    Not only a dupe, but a link to the original story is listed on the referenced page.

    Wow.

    1. Re:A new low... by fugas · · Score: 1

      Hey... are you really surprised? Remember, this is Slashdot :)

    2. Re:A new low... by Anonymous Coward · · Score: 0

      Hey... are you really surprised? Remember, this is Slashdot :)

      Frankly, no, and that's why it sucks. I read the story and the first thing I was was the link to the original posting WAY back.

      Of course they basically ignore emails that subscribers send to them about the errors in their front page "articles".

      I have fucking given up on them.

    3. Re: A new low... by Black+Parrot · · Score: 1


      > Not only a dupe, but a link to the original story is listed on the referenced page.

      Think of it as steganography in action.

      --
      Sheesh, evil *and* a jerk. -- Jade
    4. Re:A new low... by callipygian-showsyst · · Score: 4, Funny
      You're just not playing the game! I'll let you in on it:

      A bunch of folks who got pissed off that their stories never got approved on /. got together on alt.syntax.tactical and devised a plan. What they're doing is finding OLD slashdot stories and resubmitting them.

      So far, it's been moderatly successful with 4-5 dupes getting through each week. This story was particularly amusing because the article has a link to their /. mention! Good work to the folks at a.s.t!

      I suggest you start playing along too! It's fun to show how worthless the /. editors are.

    5. Re:A new low... by Anonymous Coward · · Score: 0

      Maybe they didn't pay their, ahem, Slashdot protection fees?

    6. Re:A new low... by Anonymous Coward · · Score: 0

      Great, now you'll slashdot slashdot

    7. Re:A new low... by ivan256 · · Score: 1

      That's hilarious.

      Plus now we have solid proof that even the editors don't read the story before posting!

  19. Hydan... by Anonymous Coward · · Score: 5, Funny

    The message retrieval method should be called "Hydan Seek"

    1. Re:Hydan... by Anonymous Coward · · Score: 0

      Oh god.. that's the best laugh I've had in a while now. You just made my day.

    2. Re:Hydan... by Anonymous Coward · · Score: 0

      Dang, you beat me to it.

    3. Re:Hydan... by Anonymous Coward · · Score: 0

      parent post needs to be modded "bloody obvious"

  20. Soon to be published PDF text. by Anonymous Coward · · Score: 4, Informative

    Hydan: Hiding Information in Program Binaries
    Rakan El-Khalil and Angelos D. Keromytis
    Department of Computer Science, Columbia University in the City of New York
    {rfe3,angelos}@cs.columbia.edu
    Abstract. We present a scheme to steganographically embed information in x86
    program binaries. We define sets of functionally-equivalent instructions, and use
    a key-derived selection process to encode information in machine code by using
    the appropriate instructions from each set. Such a scheme can be used to watermark
    (or fingerprint) code, sign executables, or simply create a covert communication
    channel. We experimentally measure the capacity of the covert channel by
    determining the distribution of equivalent instructions in several popular operating
    system distributions. Our analysis shows that we can embed only a limited
    amount of information in each executable (approximately 1
    110 bit encoding rate),
    although this amount is sufficient for some of the potential applications mentioned.
    We conclude by discussing potential improvements to the capacity of the
    channel and other future work.
    1 Introduction
    Traditional information-hiding techniques encode ancillary information inside data such
    as still images, video, or audio. They typically do so in a way that an observer does not
    notice them, by using redundant bits in the medium. The definition of "redundancy"
    depends on the medium under consideration (cover medium). Because of their invasive
    nature, information-hiding systems are often easy to detect, although considerable work
    has gone into hiding any patterns [1]. In modern steganography, a secret key is used to
    both encrypt the information-to-be-encoded and select a subset of the redundant bits
    to be used for the encoding process. The goal is to make it difficult for an attacker to
    detect the presence of secret information. This is practical only if the cover medium has
    a large enough capacity that, even ignoring a significant number of redundant bits, we
    can still encode enough useful information.
    Aside from its use in secret communications, an information-hiding process [2] can
    be used for watermarking and fingerprinting, whereby information describing properties
    of the data (e.g., its source, the user that purchased it, access control information,
    etc.) is encoded in the data itself. The "secret" information is encoded in such a manner
    that removing it is intended to damage the data and render it unusable (e.g., introduce
    noise to an audio track), with various degrees of success.
    In this paper, we describe the application of information-hiding techniques to arbitrary
    program binaries. Using our system, named Hydan, we can embed information
    using functionally-equivalent instructions (i.e., i386 machine code instructions). To determine
    the available capacity, we analyze the binaries of several operating system distributions
    (OpenBSD 3.4, FreeBSD 4.4, NetBSD 1.6.1, Red Hat Linux 9, andWindows
    XP Professional). Our tests show that the available capacity, given the sets of equivalent
    instructions we currently use, is approximately 1
    110 bits (i.e., we can encode 1 bit
    of information for every 110 bits of program code). Note that we make a distinction
    between the overall program size and the code size. The overall program size includes
    various data, relocation, and BSS sections, in addition to the code sections. Experimentally,
    we have found that the code sections take up 75% of the total size of executables,
    on average. For example, a 210KB statically linked executable contains about 158KB
    of code, in which we can embed 1.44KB (11, 766 bits) of data.
    In comparison, other tools such as Outguess [1] are able to achieve a 1
    17 bit encoding
    rate in images, and are thus better suited for covert communications, where data-rate
    is an important consideration. The 1
    110 encoding rate achieved by the currently implemented
    version of Hydan is obtained when we only use instruction

    1. Re:Soon to be published PDF text. by Anonymous Coward · · Score: 0

      I don't see how this is usable as a watermarking/fingerprinting tool when it would be so easy to circumvent. Take for example something like the A86 copy protection scheme mentioned in other threads. Say I want to use an unlicensed copy but eliminate the watermark, then all I have to do is standardize all equivalent i386 machine code instructions to be the same.

      For example, replace all instances of sub -50 with add +50, and always xor a register with itself to clear it rather than subtracting itself. This is functionally the same as overwriting the embedded msg/watermark with 0's.

      I suppose it's still useful for messages as long as the statistical occurence of odd i386 instructions (like subtracting negative numbers to achieve an add) doesn't give it away as containing a message.

  21. slashdotted allready... by deedude · · Score: 4, Informative

    Intresting. Allthough I didn't get a chance to RTFA, hiding encrypted data in an executable doees not seem all that practical to me. It may not change the filesize or functionality, but would it not also change other signature methods (like md5sums?). From my understanding, the main strength of steganography is the file with the encrypted data being indistinguishable from regular files. Since the diffrence can be detected with CRC or MD5, wouldn't that defeat the main purpose?

    1. Re:slashdotted allready... by Silicon+Avatar · · Score: 1

      When was the last time you ran md5 against an image? One of the earlier uses of steganography was getting messages out of a contained environment where an image of 'something' innocuous was just that, innocuous.

      For that, the 'signature method' (visual inspection) was 'gee, this is a neat picture of a cloud'.

      For this method, the 'signature method' (execution/'strings'/'.?grep') is 'gee, it says "hello world"'.

      Either way, it limits arousal of suspicion.

      The point isn't to hide against continued analysis (earlier copies of executable?) but to make the contents seem 'uninteresting'.

    2. Re:slashdotted allready... by sonicattack · · Score: 2, Insightful

      Since the diffrence can be detected with CRC or MD5, wouldn't that defeat the main purpose?

      The main purpose is to send secret data, hidden in something that doesn't seem to contain such data.

      If there's no "original" file to compare with, it'd be hard to detect the presence of the extra data. One could write a small application which seems innocent, but which only real purpose is to be used as a container for covert messages.

    3. Re:slashdotted allready... by vidarlo · · Score: 1

      All *changed* files can be detected with md5, even only if it is a single bit that is flipped. The point is that as long as you don't have a uncluttered (without message embedded) jpeg, you can't distinguish it from one with a message embedded. If you embedd data, you change the file in some way, which can be detected by a cyclic redunancy check or md5summing. Just try with i.e steghide. md5sum won't show the same sum. But as long as your enemy don't have both original and the one with hidden message, they can't get to know if it got any message hidden.

    4. Re:slashdotted allready... by AK+Marc · · Score: 2, Insightful

      I think the main purpose is to be able to encrypt things in places people normally don't look. Breaking encryption on a wireless access point broadcasting over the air is one thing. Finding the only executable file on a laptop that includes an encrypted piece of information you need when you don't even know that it is encrypted in an executable file is another thing.

      Coupled with messages in images, this will make it quite easy to move data around without anyone else knowing. There are too many places it could be. To look in all of them is impractical. They will only look in the obvious places, unless they have cause to look elsewhere.

    5. Re:slashdotted allready... by HugeFatty · · Score: 1

      Not to mention that even knowing that a message is there may not help. Consider if different people used different bit pattern for different instructions: if I use the 0 for ADD and 1 for SUB, and Bob uses 1 for SUB and 0 for ADD, then a message embedded by me will look much different than a message embedded by Bob. Now considering the number of permutations that there are for each set of redundant instructions, there can be many more possible encodings for a given message. It only matters that the person who embedded the data and the intended recipient agree on which bit patterns to use for each instruction. Not that this can't be brute forced, but it makes it much more complicated to try to find and decrypt the message.

      --


      I am clearly fatter than you.
  22. What they should have done by theManInTheYellowHat · · Score: 2, Funny

    They should have put their message in the web servers executable so that when it gets slashdotted it could just shit itself and we could still get how it works.

  23. al queda? by snig64 · · Score: 0, Offtopic

    as soon as OBL gets a hold of this program he's going to start secretly x/f'ing his messages through this program. Yep, wont' be long and the NSA/CIA is going to can this program from all the rest of us. GET IT WHILE YOU CAN!

    --
    http://dont.spam.me.anymore.com
  24. Steganography? by Anonymous Coward · · Score: 0

    You mean they have an entire scientific discipline dedicated to studying stegosauruses now? Personally I'd rather specialize in Tyrannography instead...

    1. Re:Steganography? by StalinsNotDead · · Score: 1

      It's from the Greek root
      Stego/Stegano = covered
      Graphy = writing

      Probably has something to do with covering or hiding a written message.

      --
      Thanks to the internet, we can now all die alone together! -SomeWoman
  25. five words... by Anonymous Coward · · Score: 0

    MD5 Hash is my friend...

    1. Re:five words... by Anonymous Coward · · Score: 0

      MD5 is not a word, it's an acronym!

  26. Signal/Noise by c0dedude · · Score: 1

    Given that it embeds itself in the program without changing it, how would you recover the data while being sure to prevent false positives?

    --
    Since when has this country used intellectual elite as a pejorative term?
  27. How it's done.. by wfberg · · Score: 4, Informative

    The gist of it is that there are many instructions in x86 that have the same result. You can replace these, and based on which instructions you encounter you can find a hidden message.

    So much for theory. Here's an example; let's say we have a couple of synonyms, like so
    car, automobile; Robert, Bob; crashed, trashed; beer, whisky.
    Let's say we have a little story like so;
    "Bob got in his car. He crashed it, because he had been drinking too much beer. His car is now a total loss."

    Let's say we want to send a secret binary message "0110". Cunningly, we substitute the first of each pair of synonyms if we want to encode a zero, and the second for a one. So the story is now

    "Robert got in his automobile. He trashed it, because he had been drinking too much whisky. His car is now a total loss." (notice how not all key words changed).

    This is a bit harder with natural language, as many words aren't quite right to use in place of the other ("got in his automobile" just doesn't sound right), so it's actually easier to do for machine code.

    --
    SCO employee? Check out the bounty
    1. Re:How it's done.. by Anonymous Coward · · Score: 0

      If he thought beer was a synonym for whisky, no wonder Bob crashed the car.

  28. This isn't exactly new... by Anonymous Coward · · Score: 0

    Isn't this idea (in fact, this exact program) a few years old? I've definitely heard about it before...

    The idea is that, in executable code, there is more than one way to accomplish exactly the same end result. For example, asking whether an integer is >=1 or >0 is effectively the same question, but might be coded differently in an executable.

    Hydan probably searches for a certain subset of such "optional" commands, and encodes data in binary by using either one type or the other. Thus, the functionality and size are unchanged (assuming both commands take the same number of bits to encode), but you can store data which can be read by appropriate decoding.

    Note: I didn't RTFA so this is just what I recall, and the actual implementation might be quite different... but you should get the idea of how they can claim to leave filesize and functionality untouched.

    1. Re:This isn't exactly new... by Anonymous Coward · · Score: 0

      I studied this (as old news) in a computer security course a couple years ago. It is certainly old hat technology that virus writers have been employing for years. Anti-virus programs already check for this and anyone that knows anything about malware or obfruscation would consider this textbook and elementary information. There are other ways to do it than the one described in the article as well, but like I said anyone who would need to find such things already do so as a matter of procedure.

    2. Re:This isn't exactly new... by Diomidis+Spinellis · · Score: 3, Interesting
      Metamorphic viruses use the same approach to make themselves undetectable by typical signature-based virus scanners. This technique can make viruses a lot more difficult to detect, because:
      1. determining whether a program is a virus or not is an undecidable problem (there exists no algorithm that can solve it), and
      2. determining whether a program is a variation of a known bounded-length virus is NP-complete (algorithms that solve the problem would take impracticably long time).
      #include "/dev/tty"
  29. Hashing problem: by Tribbin · · Score: 2, Insightful

    OK, you place the hash in the executable; the file is changed. Now the hash should be different...

    Problem.

    --
    If you mod this up, your slashdot background will turn into a beautiful sunset!
    1. Re:Hashing problem: by pclminion · · Score: 1

      Don't be dense. The part of the file where the hash is written is not included in the hash. Duh.

    2. Re:Hashing problem: by Soul-Burn666 · · Score: 1

      omg! IP Headers have a checksum for the IP Header, including the checksum field aswell! Problem?
      Nope, when you calculate the checksum, you take the checksum field as 0.
      I believe the same or similar is done here.

      --
      ^_^
  30. Um by jalefkowit · · Score: 1

    Ever wanted to hide a message into an executable?

    No...

  31. For the slightly less knowledgable by kinrowan · · Score: 1

    steganography: the hiding of a secret message within an ordinary message and the extraction of it at its destination.

    1. Re: For the slightly less knowledgable by Black+Parrot · · Score: 5, Funny


      > steganography: the hiding of a secret message within an ordinary message and the extraction of it at its destination.

      I thought steganography meant pictures of stegasaurs making little stegasarus.

      --
      Sheesh, evil *and* a jerk. -- Jade
  32. Rather use images by Fuzzums · · Score: 1

    The nice part of steganography is that you don't know there is a hidden message.

    In order to make sure people can't determine any changes to a file, so preferably there is no reference material to compare the file with. Reference material like other unchanged executables.

    So this doesn't work unless you write a program for each message you want to hide.... Not? Ok. I'd think so too.

    So I'd rather take my digital camera, take a picture of a whatever and use that as an original.

    But I have to admit it's way cool to make something like this, that changes an executable without breaking it.

    --
    Privacy is terrorism.
    1. Re:Rather use images by zcat_NZ · · Score: 1

      Use something like the Linux kernel. The code ends up significantly different from anyone else's build almost every single time depending on what modules you compile in, what compiler version you use, what chipset you compile for, what optimisations you choose, or how much stolen SCO code got included in the build.. Umm.. ignore that last part :)

      --
      455fe10422ca29c4933f95052b792ab2
  33. Haven't RTFA but... by shadow_slicer · · Score: 1

    How do you know there's information in a given executable?
    If you know what compiler it was compiled under you could look for opcodes that aren't generated by that compiler. But what if you don't know what compiler generated the executable?
    And what if the information isn't hidden in the opcodes at all, but merely in the ordering of rearrangeable instructions?
    Take the following two instructions for example:
    mov ax, 5
    mov bx, 6
    What if your stenography program would set them in alphabetical order by register for 0 and reverse alphabetical order by register for 1? Or what if it was instead based on the numerical order of the immediate values? Or heck, we don't really have to use bx here, we could use cx instead.
    But then again, all of those outputs could be generated from the same source file by different compilers (and possibly even with the same compiler -- just slightly different source files).
    This means that it would be impossible to know if a given file contains stenographic information, and even then, you would have to look at the exact right combination of features in order to decode the message, and anything else would give you garbage.

    Though as I was writing that, I thought of a way to possibly detect stenographic executables: Compilers generally do the same thing the same way every time. If the executable appears to alternate or shift the way it does things, then it probably contains stenographic information. Images are definitely much better for information hiding (more randomness to hide in...). Yes the precious jpg's in my po^H^H art collection would be perfect...

    1. Re:Haven't RTFA but... by cagle_.25 · · Score: 1

      Neither have I, but it seems like it would be easy to scatter bits of a message throughout a data segment. After all, it would be difficult (or impossible?) to check that every bit of the data segment gets referenced in a non-trivial way by the code. Figuring out how to tip off the receiver as to the location(s) of the message is more tricky, but not impossible.

      --
      Human being (n.): A genetically human, genetically distinct, functioning organism.
    2. Re:Haven't RTFA but... by Trolling4Dollars · · Score: 1

      I'm pretty certain that Hyden has some kind of signature in it's method of hiding the message in the executable that will be easily identifiable in a short period of time. Even with encryption, all you would need to do is check any executable for the signature, then you only have the encryption standing in your way. This is concealment by obscurity at best.

  34. A shareware assembler used this trick. by acceleriter · · Score: 1

    A shareware x86 assembler some years back claimed that the author was able to tell if anyone used his assembler to distribute binaries in violation of his license. While it apparently didn't scare enough people into paying for his program (maybe they used MASM instead?), the program might be useful for busting any patents that come up around this technology.

    --

    CEE5210S The signal SIGHUP was received.

    1. Re:A shareware assembler used this trick. by The+FooMiester · · Score: 2, Informative

      I believe the program you speak of is a86. It was $50 to register it, which is why it was unpopular.

      It used the same method hydan uses. It used equivelant instructions that were "different" from the way the code was written. I'd used it a bit for myself, and noticed that was what it did when I opened the files later with debug.

      The documentation never really said how, it just said it "fingerprinted" the code.

      --
      The previous has been a secret message to my comrades.
    2. Re:A shareware assembler used this trick. by BinBoy · · Score: 1

      It was a86/a386 and it appears to still be around. http://eji.com/a86/

    3. Re:A shareware assembler used this trick. by acceleriter · · Score: 1

      That's the one--thanks!

      --

      CEE5210S The signal SIGHUP was received.

  35. Without changing its size??? by Iphtashu+Fitz · · Score: 1

    So I can embed an entire copy of the unabridged oxford english dictionary into something like vi? That's some serious data compression!

    1. Re:Without changing its size??? by darc · · Score: 3, Funny

      Ironically, on the other hand, emacs has been doing this for years, without much data compression.

      *ducks*

      --
      Tired of legitimate data sources? Try UNCYCLOPEDIA
    2. Re:Without changing its size??? by Soul-Burn666 · · Score: 1

      No. The article says you can only encode such and such amount of data into a given executable.
      It uses the redundancy in the x86 commands...
      Like:
      add eax, 1
      vs
      inc eax

      Both do the same. If you state the first is "0" and the second one is a "1", then u can encode data inside the executable.

      --
      ^_^
  36. DUPE by Anonymous Coward · · Score: 0

    Already done this one.

    1. Re:DUPE by wolenczak · · Score: 1

      Then let's get the +5 comments to see if we can get dupe mod points, hehe.

    2. Re:DUPE by Lshmael · · Score: 2, Insightful
      RTFA...
      Update: I've finally updated the hydan code, after a long time off. The encoding rate has been improved to 1/110 (thanks to a tip from sandeep!), and the code is now much cleaner too. In the mean time, hydan has been presented at:

      CansecWest 04
      BlackHat Vegas 04
      DefCon 04
      Not a dupe exactly, but an update on an old post.
  37. Nobel prize? by wurp · · Score: 1, Interesting

    Can you say college algebra?

    The only thing they have to solve is f(X+S) = S, where f is the algorithm for calculating the signature, X is the exe code, and S is the signature. Depending on f, it can either be completely trivial to calculate S or impossible.

  38. How it can be done by BinBoy · · Score: 2, Interesting

    The site is slashdotted so I don't know if this is how it works, but...

    Some 8086 opcodes contain a bit that reverses the operation. For examble, with the bit set in the instruction "mov bx,cx", bx would be copied to cx instead of cx to bx. By switching the registers AND setting the bit, you effectively reverse the operation twice, creating different machine code that does exactly the same thing.

    The A86 assembler used this bit to create a fingerprint that would make it easier to detect non-paying users.

  39. Executables in my mail by wayward · · Score: 1

    Now that messages can be hidden in executable files, I feel a lot better about opening .exe files that are mailed to me!

    1. Re:Executables in my mail by markan18 · · Score: 1

      Seems to be a good way to create encrypted communication channels. Encrypt a message in one of the viruses you receive and execute it. Your computer will spread viruses with your encrypted message. Get the desired recipent on your contact list and screw carnivore.

  40. Mod parent up by Anonymous Coward · · Score: 0

    Very informative.

    By the way, to decode, you would simply scan for keywords: Robert, automobile, trashed, whisky, car = the 1st, 2nd, 2nd, 1st, and 1st words in their respective 2-word sets. Thus, 01100.
    However, this adds extra data onto the end of the encoded message. But to get around that, just have it be well-known that the first n bits you encode indicate the length of the message, not counting those bits.

  41. Comment removed by account_deleted · · Score: 3, Interesting

    Comment removed based on user account deletion

  42. "Astroturfing" by fiannaFailMan · · Score: 1
    Nice of them to include this definition of 'Astroturfing' for the non USAian audience:
    In American politics, the term 'astroturfing' is used to describe formal public relations projects which deliberately give the impression that they are spontaneous and populist reactions. The term is a play on the description of truly spontaneous or 'grassroots' efforts and the distinction between real grass and AstroTurf - the fake grass used in some indoor American football stadiums.
    --
    Drill baby drill - on Mars
    1. Re:"Astroturfing" by pjt33 · · Score: 1

      Was this meant to be in reply to the SCO/Groklaw article? If so, you might want to file a bug report.

  43. What sort of idiot would have a program check itse by Derek+Pomery · · Score: 2, Insightful

    If the program has been tampered with, the most obvious thing to tamper with would be the validation mechanism.
    I'm going to stick with a separate md5sum, thanks.

    --
    -- perl -e'print pack"H*","6e656d6f406d38792e6f7267"' /. ate my old sig. Bastards.
  44. who validates by filesize.. create me an...... by Anonymous Coward · · Score: 0

    app that does not change the md5.. then i'll be impressed.

  45. How it works by EduardoFonseca · · Score: 3, Informative

    Since a lot of people is asking, here it goes:

    - How it works
    --------------

    Overview: Hydan finds sets of equivalent instructions in the binary,
    and uses that redundancy to embed data. The larger the set of
    equivalent instructions, the more bits can be embedded. For example,
    if instructions {a, b, c, d} are all equivalent, then we can embed two
    bits of information when any of those instructions are encountered.

    Embedding: Hydan goes through the application sequentially, and
    whenever it finds an instruction that it has equivalents to, it
    substitutes in the instruction that represents the bit(s) of data
    hydan is currently embedding. A simple example: "add %eax, 50" is
    equivalent to "sub %eax, -50". So this set is {"add %reg, $imm", "sub
    %reg, $imm"}. Whenever an instruction of the form "add %reg, $imm" is
    encountered, hydan can embed one bit of the message. If the bit is 0,
    it leaves it as an add instruction. Else it substitutes it to "sub
    %reg, -$imm". (and vice versa)

    Decoding: When it is time to extract the embedded message, every
    "add %reg, $imm" is taken to mean bit 0, and every sub instruction
    encodes the bit 1, and the embedded message is reconstructed that way.

    Encryption: Hydan first prompts the user for a passphrase before
    embedding or decoding the contents of the application. In the case of
    embedding, hydan prepends the length of the message to the message,
    encrypts that with blowfish in cbc mode, and embeds the result into
    the application. When decoding, hydan extracts all the possible bits
    from the application (since it does not know how long the message is
    a-priori; that information is encrypted). Hydan then decrypts the
    message properly since it is in CBC mode and need not know the total
    length first. The lenght is then used to truncate the message to
    size.

    Instructions: For a complete list of the sets of equivalent
    instructions, please refer to hdn_insns.c.

    - Attacks
    ---------

    There are three classes of attacks that are applicable to hydan:
    overwriting, detection, and extraction. The overwriting attack refers
    to the ability to overwrite the message embedded in the application,
    whether its presence was detected or not. An attacker should also not
    be able to detect the presence of a message in the application, nor
    decrypt it.

    The overwriting attack: hydan currently has no means to protect
    against this type of attack. Since hydan embeds the message
    sequentially, starting from the top of the application, an attacker
    could re-run hydan with a bogus text and embed that on top of the
    original message. The intended recipient of the application would
    thus be unable to retrieve the original message. One way this could
    be solved is to add an error correcting code to the encoding of the
    message, and distribute the message throughout the application in a
    passphrase specific manner. This way only parts of the original
    message would be overwritten, and the original may still be
    reconstructed. Of course, there is nothing that can be done if the
    attacker insists on overwriting with a message size that is the
    maximum embeddable in the given application. However, the computation
    required to overwrite each application on a large scale might be
    prohibitive enough to discourage this as a routine behaviour, at an
    ISP for example.

    Detection: Binaries produced by hydan should not exhibit obvious
    patterns. At the most superficial level, this is accomplished by not
    embedding any marker or other easily recognizable token. At best, the
    embedded data looks random (which is why it is bf encrypted). At the
    assembly level however, the current version of hydan makes no attempt
    at mimicing the original distribution of instructions in the
    application, and is thus vulnerable to statistical analysis. Indeed,
    although all the instructions are equivalent, some may appear more
    frequent

  46. Man, thats quite old news by floydman · · Score: 1

    Mentioned here about a couple of years ago. Looks like its about time i cut down on my /.

    --
    The lunatic is in my head
    1. Re:Man, thats quite old news by BarryNorton · · Score: 1

      Yeah, now that one can get onto the site it's easy to read that there - so why was this posted? (Ironically he was pleased with himself, first time round, for surviving the slashdotting... things change ;)

  47. Embed in Viruses? by Embedded+Geek · · Score: 3, Interesting
    My initial reaction was that it'd be a silly thing to try this because of the risk of virus infected executables. I mean, who that's tech savvy enough to need steganography would feel comfortable downloading intentionally tampered .EXE's, even if they're not intending to run the dang things?

    But then I started thinking about how effectively viruses are distributed by non-techies who do click on the attachments in their EMAILs. Perhaps viruses or spyware could be used to "broadcast" a message this way to different cells in a covert organization (terrorists, organized crime, chess club members, whatever). All you'd need is an unprotected PC to act as a tethered goat and catch all those infections for later reading.

    For that matter, a sender could "neuter" a virus by disabling its reproductive code and then embed a message in it and send it through some anonymizer (either a formal anonymizer or using a shell account). When the recipient stores it in a quarantine directory, it would look just like an infected EMAIL that had been cleaned up by your antivirus program, not a covert message. Some variation of this using spyware infection would be even more effective as they tend (in my limited experience) to have even more variants than viruses - the obfuscated message would be more readilly confused with normal variation. Instead of posting your tampered executables to some usenet forum, you would simply have the reciepient visit a site running the spyware. New messages would be sent and old ones sterilized when the spyware reinstalls itself.

    Just my 20 mills.

    --

    "Prepare for the worst - hope for the best."

    1. Re:Embed in Viruses? by pclminion · · Score: 2, Funny
      I mean, who that's tech savvy enough to need steganography would feel comfortable downloading intentionally tampered .EXE's, even if they're not intending to run the dang things?

      I feel no anxiety about EXE files. Maybe it's because I run Linux.

    2. Re:Embed in Viruses? by Embedded+Geek · · Score: 1

      Touche!

      --

      "Prepare for the worst - hope for the best."

    3. Re:Embed in Viruses? by MikeBabcock · · Score: 1

      I ran a couple viruses in wine before for fun.

      It was highly entertaining ... try it sometime.

      --
      - Michael T. Babcock (Yes, I blog)
  48. Been done for ages by A86 by iamacat · · Score: 4, Insightful

    This guy wrote his assembler to generate unusual form of MOV instructions at least 10 years ago. In this way, he can find out if a program is generated using an unregistered version of A86.

    Any CPU that has an instruction to exchange two registers will have some redundancy, but for X86 even basic mov (as well as add, sub, cmp and so on) specifies both two operands and a flag that specifies which one is source and which one is destination. The significance is that both operands can be registers, but only one can be a memory reference.

    A much more impressive use would be a program that reads its own code as data to save the last few bytes, especially if it has a real purpose, like fitting a game into a fixed-size ROM.

    1. Re:Been done for ages by A86 by Anonymous Coward · · Score: 0

      Yep...

      This is all around old hat. I personally worked on a contract to implement something quite similar almost a decade ago.

      I still find it amusing how any reference to steganography get the slashdot types all worked up. Yet somehow, the level of understanding never seems to really advance.

      For some really good information and background on this material, read the proceedings of the Information Hiding workshops (springer), and at the very least, read the Katzenbeisser and Petticolas book.

  49. The message is IN the message by eieken · · Score: 1

    This same idea of reorganizing the message without changing the message to conceal a more covert message could be applied to alot of things. I guess its only a matter of time before we had this in software. I wonder what other mediums this can be applied to..

    --
    Meet new people, and kill them.
  50. Stenography by EduardoFonseca · · Score: 2, Interesting

    Note that as far as I remember, stenography by definition is supposed to make it impossible to prove that there is data hidden there - one step further than normal encryption. It's not so much as about hiding the data as being able to deny its existance.
    One reason for this is if you have encrypted data on your disk, then courts can demand the password for it. Stenography allows you to insist there is no hidden data.

    1. Re:Stenography by __aagctu1952 · · Score: 1
      One reason for this is if you have encrypted data on your disk, then courts can demand the password for it. Stenography allows you to insist there is no hidden data.
      No, stenography allows the court to keep accurate protocols when they ask you for that hidden data ;-)

      Now steganography on the other hand...
    2. Re:Stenography by EduardoFonseca · · Score: 1

      Hey! This is slashdot! We can mkae all kndis of tipsos around heer!

  51. In related news... by jamonterrell · · Score: 2, Funny

    A new virus is quickly spreading across the internet. Experts say it started at Defcon with a demonstration of a program that allows users to add a secret text to an executable file without altering it's filesize. Apparently the program also attached a message of it's own... don't run programs demonstrated at defcon!

    --
    I can count to 1023 on my hands. Ask me about #132.
  52. Vice Versa by paithuk · · Score: 1

    If you owned a company and were concerned about this kind of practice, surely you could just run the same program over every executable that comes in... destroying the original, but preserving the behaviour

  53. MOD PARENT UP by Anonymous Coward · · Score: 0

    He's right.

  54. M$ Outlook prevents terrorism! by mswope · · Score: 2, Funny

    Now, that "block all executables" setting that I can't turn find or off in Outlook will prevent terrorists from exchanging secret messages embedded in trojan executables that are attached to emails purporting to be great pornography!

    It's not an annoyance; it's a *feature*!

  55. Performance effects? by BlueBiker · · Score: 3, Insightful

    This is a fascinating approach. One thing I didn't see mentioned at all in the documents is the possible change in performance characteristics by changing instructions which have the same effect but which have different pipeline, execution unit, or cache properties.

    Modern optimizing compilers spend an awful lot of effort generating efficient combinations of instructions which try to make the most out of CPUs having complicated rules. For example, add eax,eax and shl eax,1 might both produce the same desired effect but yield significantly different runtimes depending on the presence / absence of barrel shifters or the ability of particular instructions to pair in a given CPU.

    Naturally the above would only matter if the modified code is in an inner loop, but it could happen.

    1. Re:Performance effects? by drawfour · · Score: 1

      One other thing. While instructions like "add eax, 5" and "sub eax, -5" may be equivalent (and that may even have the same runtime), a compiler will not likely choose the second one over the first. If two are equivalent, it will always choose one over the other.

      So if both equivalent instructions are used, and knowing that only one of the two should have been compiler-generated, this indicates the presence of an embedded message. Which goes against the purpose of steganography (not only to hide a message, but to not be able to detect that a message is present).

  56. Decrypted from a Linux kernel binary... by Sponge+Bath · · Score: 1

    'Copyright SCO' and 'Darl Rules!'

  57. Oh really? by wolenczak · · Score: 1

    All stenographic methods that I've heard of leave some signs of tampering. For instance, the common method of hiding information in an image file by fiddling with the least signifigant bits in the RPG values is completely undetectable to the eye, however a statistical analysis of those low bits will reveal an unnatural amount of randomness. Really this is unavoidable since most any innocent looking data is going to have some natural order to it.

  58. I'm going to try this out by rock_climbing_guy · · Score: 1

    When you decode my message, it will say, "FIRST P0ST w00+"

    --
    Wh47 d1d j00 541, 31337 15n't t3h r0xor5 ne m0r3???
  59. quick question about including the signature by k2enemy · · Score: 0, Redundant
    sorry if this is horribly ignorant...

    inserting the signature into the exe will change the signature of the file, so don't you need to know the (exe + embedded sig)'s signature before embedding anything? how?

    thanks in advance for any explanations.

  60. Tattoo virus by wolenczak · · Score: 1

    How about a virus that does not harm to your exe files, but only signs them and counts how many times they have been signed.

  61. Steganography by SiliconEntity · · Score: 4, Informative

    In cryptography, steganography has a particular meaning. In the same way that the goal of encryption is to prevent the message from being read, the goal of steganography is to prevent the message from being detected. A successful steganographic embedding is one in which a third party would not be able to find out if it is there. If you gave him two files, one with an embedded message and the other unprocessed, he should not be able to tell them apart.

    For a method to truly be steganography, it's not enough just to embed some data into another. That's possible any time there's redundancy. The requirement is to make it so clever and/or subtle that there is no way to distinguish a processed file from an unprocessed one.

    I doubt that this new method passes the test. Generally, while there are many synonyms possible in code, both in single instructions and in short sequences of instructions, the statistics of how these are distributed in unprocessed files are probably not random. Chances are that one synonym is used more than another. If you embed random data in a straightforward way, you will then have equal usages of both alternatives. This is a highly unusual condition, and to someone in the know, files like these will be easily distinguished.

    Only if they have found a kind of synonym which already has purely random statistics, or where they are careful to precisely mimic the statistics of the original file as they add their data, can this truly be considered a form of steganography.

    1. Re:Steganography by RedWizzard · · Score: 1
      A successful steganographic embedding is one in which a third party would not be able to find out if it is there. If you gave him two files, one with an embedded message and the other unprocessed, he should not be able to tell them apart.
      Close, but not quite. He should not be able to tell which one contains the message. Important distinction, and what you meant I think.
      I doubt that this new method passes the test. Generally, while there are many synonyms possible in code, both in single instructions and in short sequences of instructions, the statistics of how these are distributed in unprocessed files are probably not random. Chances are that one synonym is used more than another. If you embed random data in a straightforward way, you will then have equal usages of both alternatives. This is a highly unusual condition, and to someone in the know, files like these will be easily distinguished.
      You're right about that. Those sorts of statistics have been useful in attempting to determine which compiler (and sometime even which version) was used for a particular executable so they'll certainly give away an executable with an encoded message. However there is a way around it. Run every executable on your machine through this system. Encode most of them with random data. That way the distirubtion of synonyms will be random for your machine, and this system does become a valid steganographic system.
    2. Re:Steganography by julesh · · Score: 1

      I'm not sure I agree. While it might not be very _good_ steganography, it is still steganography -- it is an attempt to hide a message somewhere where it won't be discovered.

  62. You're WRONG and you're a GROTESQUELY UGLY FREAK! by Anonymous Coward · · Score: 0

    Acronyms are abbreviations which are pronounced like normal words (e.g., SCUBA, RADAR, GNU). MD5 is pronounced as a series of letters and numbers ("Em Dee Five"); therefore, it is not an acronym.

  63. MOD PARENT DOWN! by Anonymous Coward · · Score: 0

    -1, Horrible Animal Cruelty

  64. nevermind, read it in the comments by k2enemy · · Score: 0, Redundant

    nt

  65. From a steganographer- unimpressive by Anonymous Coward · · Score: 1, Informative

    I do steganography research and this technique is entirely unimpressive.

    The whole point of steganography is to make the hidden message undetectable. Making a message unsuspicious is being clever, but its not steganography. This is like renaming your pirated divx movies to "shareware.exe". Sure it makes it less suspicious, but its easy to check.

    Like the article mentions. The technique is completely vulnerable to statistical attacks. But these might not even be necessary, simply overwrite the embedded information with the default compiler values (surely the compiler would pick the same equivalent expression every time). Its only a matter of effort to create a detector.

    Real steganography is undetectable (at least below a certain probability of detection).

  66. I found a message! by Anonymous Coward · · Score: 1, Funny

    Hey, I was disassembling all of my executables looking for hidden messages, and I found one. It reads "0xDEADBEEF"! Does anyone know what that means?!

  67. Not even the same size! by don.g · · Score: 1

    Not only, as some other posters have already pointed out, do several of these instructions do different things, they're also different sizes. inc ax (or eax, depending on what mode the processor is in) is only one byte, whereas the add instructions will need a extra byte or four for their operands.

    --
    Pretend that something especially witty is here. Thanks.
  68. CFLAGS="-Onegative1" by 4of12 · · Score: 1

    the statistics of how these are distributed in unprocessed files are probably not random.

    Sounds to me like my home computer system needs to be compiled with anti-optimization to throw in some more of these synonyms randomly into my executables.

    --
    "Provided by the management for your protection."
  69. A86 did this... by don.g · · Score: 3, Interesting

    The documentation for the shareware DOS assembler, A86, claimed that the set of opcodes it chose to emit for various instructions was unique (i.e. those exact choices weren't made by any other assembler). Therefore if you released software assembled with A86 without registering it, if the A86 author ever got hold of that software, he'd know you had used his assembler to produce it. So the steganography in this case encoded a one bit value: "I used A86".

    --
    Pretend that something especially witty is here. Thanks.
  70. Unnecessarily complicated by HermanAB · · Score: 1
    It would be much more efficient to encode data into the empty blocks of allignment space inside an exe. The new file is different from the original, no matter where you put the data. The only thing that will be the same is the file size, so you can just as well use a simple method...

    KISS

    --
    Oh well, what the hell...
  71. Ever wanted? by Pan+T.+Hose · · Score: 1

    Ever wanted to hide a message into an executable?

    I have lots of messages hidden in executables. Observe:

    pth@ph9:31:~/work/projects/.linuxx$ strings /usr/bin/*
    /lib/ld-linux.so.2
    libc.so.6
    textdomain
    printf
    stdout
    geteuid
    getopt_long
    __fpending
    __ctype_b
    getenv
    [...] (sorry, I have to remove 1099503 lines because of stupid lame filter)
    can't create a temporary filename
    %s exited with status %d
    open decompressed file: %s
    %s:%d: %s
    TMPDIR
    /tmp
    XXXXXX
    memory exhausted
    %s:
    : %s
    pth@ph9:31:~/work/projects/.linuxx$ _

    Some of them even seem to be encryptioned. Old news.

    --
    Sincerely,
    Pan Tarhei Hosé, PhD.
    "Homo sum et cogito ergo odi profanum vulgus et libido."
  72. Heh, about time someone automated it. by linkdead · · Score: 1

    I used to do this a long time ago, take some text, encrypt it, and pad the .exe with the data. The program ran fine, the filesize may or may not go up, depending on where in the program I hid it (some MS apps have a quarter meg or so of empty space right in the middle of the .exe...).

    I usually padded the .exe through a hex editior...it was slow and painful, but what better way to encrypt and hide data did you have at the time....steganography in a .gif? Please...in most cases you could tell it was tampered with...given in some you couldnt, but at the time the technology just wasnt all that good.

    Oh, well...back to talking about how when I was your guy's age, i used to have to climb mt.everest to get my CPUs, and how I had to wrestle alligtors to get money for floppy disks...

  73. Distributing the secret message by NachoDaddy · · Score: 1

    So now I can take a virus, embed a secret message, and unleash it. The virus may get through virus scanners since it's signature changed, and my secret message gets distributed worldwide in a few hours. The existance of the secret message would not be common knowledge, so the virus scanners would get updated quickly to stop it, but those expecting the message would allow it in, and then decode the secret message. Totally anonymous mass distributed communications.
    Now who would use something like that?

  74. al-Qaida using steganography in ebay photos? by macz · · Score: 1

    Salon had an article awhile back on embedding messages in photos.
    That appears to be the more common use of the technique of steganography, lots of synonyms in media files.
    Why wouldn't Microsoft or any other mega-corporation do this with their executables? They could embed your product key in the MSOffice.exe when you "activated" your product and if it ever got out they could send the goons in black helicopters?
    Get my tin foil hat.

    --
    ...But I digress. TREMBLE PUNY HUMANS!ONE DAY MY SPECIES WILL DESTROY YOU ALL!
  75. Poor coverage and no plausible deniability by luckyjonah · · Score: 1

    This is OK as an academic exercise or to demonstrate the basics of steganography, but as has already been partly covered by others, this fails to be a practical or useful example of steganography for several reasons:

    Firstly, as has already been addressed, the changes are detectable. This is very important for plausible deniability which legally speaking means the ability to deny there is anything stored within the "media" (in this case the executable). In the UK you are required to provide encryption keys or anything else required to "decode" data for a court of law. So if it's absolute security you want, you won't get it in the UK!

    Secondly, the coverage at 1/110 is extremely poor. A much more traditional form of steganography is to hide information in graphical images by playing around with the least significant bit and changing the palette. This can typically achieve a coverage of as much as 1 in 8 which whilst better is still painfully low for serious use. This is often mentioned in the urban myths about 9/11 and AQ supposedly hiding messages in images. Another common usage is in .wav files as the human ear is unable to detect changes to the lower frequencies.

    Coverage and plausible deniability are both very important for field operatives (or secret agents if you prefer). Firstly, 1/110 means they would need to start shipping megs if not gigs of executables across networks to pass on the simplest of messages, and trying to hide or transport secret documents becomes impossible. Secondly, the plausible deniability extends far beyond the realms of the UK justice system to the realities of field work - when they're strung up by bits they shouldn't be strung up by, they can hardly plead ignorance to avoid revealing their hidden secrets if their captors already know the data is there. The whole point of steganography is that it's indetectable! Agent X would not be a happy bunny!

    Now I'm not saying this example or image/.wav files aren't fun or interesting because they are. But there are far more serious uses for, and much better applications of this technology. One example would be:

    http://www.stegostik.com/

    ...which provides 99.9% coverage and absolute plausible deniability. Now that's how you keep your data safe and secure!

    -Mark.

  76. Could be used for dreaded product activation! by essreenim · · Score: 1

    embedding a program's signature into itself to verify it's not been tampered with
    If I wanted to use this for the above, I could simple encode a serial number for the stenagraphy part. I could have an online server with a database of accepted strings.
    User> Pays online. The users 'username' and 'password' is also registered on the server. His/her executable is encoded with the encrypted serial number of the 'username' and 'password'. Then the user can download the executable. Everytime the user wants to use the executable, they have to enter their 'username' and 'password' The 'username' and 'password' is encrypted to a serial number which must equal the serial encoded in the executable itself and voila, Microsoft can now begin charging for use of whatever they are not yet charging you for...

  77. steganography by Anonymous Coward · · Score: 0

    Interesting that this topic has emerged on /.. The plot of William Gibson's latest novel, "Pattern Recognition", uses the concept in an interesting context, in a fascinating departure from the mostly hypothetical technology in his previous works. I'm not finished the text yet, but will submit a review to /. when I do (if I can find a handle that isn't already taken).

  78. Is mass use of Rivest's cleartext 'chaffing' ok? by iamcf13 · · Score: 1

    In short, unencrypted steganography isn't particularly useful, but encrypted, you can really hide things.

    Would mass use of Ron Rivest's cleartext 'chaffing' technique offer suitable 'deniable encryption' to the masses?

    Chaffing and Winnowing: Confidentiality without Encryption


    This is the Ron Rivest of RSA fame...

  79. A86 did this 18 years ago by Krelnik · · Score: 1
    The assembler program A86, which was first released in 1986, used this exact same technique to encode a "footprint" into any executable it created. The author, Eric Isaacson, ostensibly used this to enforce the licensing agreement on the program. (Basically, it was free for all non-commercial use, but if you intended to distribute an application made with it you had to pay him some money).

    In particular, read section 6 in this part of the original documentation.

    Hydan merely takes this technique that was invented by Eric in 1986, and turns it into a general-purpose Steganography algorithm. It is not anything new.

  80. MD5SUM by mgcarley · · Score: 1

    How would something like this affect the MD5 Sum of a file?

    Correct me if I am wrong, but doesn't it [MD5] take in to account the NUL(0) bytes of the file? So like, if this method of stenography was used to embed something in to a program - be it message or virus, would it not change the MD5 Sum, meaning it was thus possible to detect an anomoly [eg the message]?

    --
    Founder & COO, Hayai India (hayai.in) / USA (hayaibroadband.com) // t: @mgcarley