Forgot your password?
typodupeerror
Security Software IT Technology

Frankenstein Code Stitches Code Bodies Together To Hide Malware 111

Posted by timothy
from the vould-have-an-enormous-schwangstucker dept.
mikejuk writes "A recent research technique manages to hide malware by stitching together bits of program that are already installed in the system to create the functionality required. Although the Frankenstein system is only a proof of concept, and the code created just did some simple tasks, sorting and XORing, without having the ability to replicate, computer scientists from University of Texas, Dallas, have proved that the method is viable. What it does is to scan the machine's disk for fragments of code, gadgets, that do simple standard tasks. Each task can have multiple gadgets that can be used to implement it and each gadget does a lot of irrelevant things as well as the main task. The code that you get when you stitch a collection of gadgets together is never the same and this makes it difficult to detect the malware using a signature. Compared to the existing techniques of hiding malware the Frankenstein approach has lots of advantages — the question is, is it already in use?" Except for the malware part, this has a certain familiar ring.
This discussion has been archived. No new comments can be posted.

Frankenstein Code Stitches Code Bodies Together To Hide Malware

Comments Filter:
  • With normal malware your antivirus would search for code that performs, say, XORing.
    With Frankenstein Code malware, wouldn't your antivirus software simply search for the code that *searches* for XORing code?

    • by Namarrgon (105036) on Saturday September 01, 2012 @11:13PM (#41203461) Homepage

      The first thing it would find was its own scanning code, and before you know it your AV system has decided that it is itself an unacceptable risk, and has self-quarantined.

      • by dohzer (867770)

        It might find your code, if it used the same search algorithm.
        You wouldn't only search for the code that searches. You'd search for a program that:
        1. Searches for code sections.
        2. Records their locations.
        3. Executes it's code by jumping between those sections.

        Surely this code has to have some kind of 'signature' (a standard structure) which is easy to find with a scan, right?

    • by m6tt (263581)

      It seems like the "gadgets" would be just as vulnerable to network profiling and detection.

    • In this example, they're saying that detecting the "body parts" would be too difficult because they'd be legit apps. And they're correct.

      So the idea would be to look for the "Frankenstein" code which uses those "body parts". Because THAT is the malware code.

      So I'm not seeing where the problem is.

      • by Anonymous Coward

        There's no problem. The "Frankenstein" code is equivalent to code that uses dynamic libraries. The article is bullshit.

        • by aaron552 (1621603)
          My guess is that it's a way to try and beat antivirus heuristics: None of the "gadgets" appear to do anything bad and can if fact come from "trusted" programs, but the combination of actions can be anything but innocent.
    • by gweihir (88907)

      Indeed. You need to get the scanner/stitcher on the target system, and have it running as root. Kind of kills the whole idea, because this would be glaringly obvious even to a simple behavior-based detection system. And you cannot stitch the scanner/stitcher itself, as it has to be viable on the target. Kind of like a huge, glaring flaw in the whole idea.

      The only thing this may be able to do (and I doubt that the stitching really works and is resilient enough for any real program) is to put this on the targ

    • by gl4ss (559668)

      the code that searches for the xoring code would be mutated as well.
      technically this leads to 50% size increase in each new generation of the malware, due to the added cruft. the article was making rounds maybe two weeks ago or something already...

      I'm pretty sure the av guys can find some common denominator to look for though, like the api calls that go looking for the files.. - But I would presume the main use point for this would be on malware installing servers.

  • And now you know why The Blight's archive, from A Fire Upon The Deep, who can effortlessly simulate a hundred trillion galactic-sized civilizations a second, was so far beyond any other conceivable bad guy. Brings new meaning to the statement in Contact, "That's the way it's been done for billions of years"...hacking out all conceivable methods of fail.

    There's a theory that sufficiently clever people, or aliens, could construct a data stream to take over a receiving computer on any listening planet. Techn

    • Re:Interesting (Score:4, Interesting)

      by 1u3hr (530656) on Sunday September 02, 2012 @12:04AM (#41203653)

      aliens, could construct a data stream to take over a receiving computer on any listening planet.

      Basically the plot for "A for Andromeda", the 1961 TV series written by Fred Hoyle. A message is decoded to a computer program for a powerful AI that can answer just about any question. It seems the inventions it creates are designed to make us destroy ourselves; in the sequel it turns out that it was actually an exercise of "tough love" to force us to work together to defeat it rather than nuke each other to oblivion as most intelligent species do.

      • I haven't seen "A for Andromeda", so I'll take you at your word, and comment on the series, since I think the premise is utterly absurd.

        The idea that an extraterrestrial civilization would send out a "tough love" kind of virus, in order to teach us a lesson in cooperation, is incredibly naive. Firstly: if contact with an alien civilization is made, it's likely to be accidentally picking up a private signal on our part, and we'll probably NEVER understand the signal in itself. It's overwhelmingly probable

        • [Wandering WTF Off-topic ;-). ] A couple of assumptions in there: (1) Humans, as a species, are sane? By whose definition? (2) Humans as a species, or individually for that matter, are rational? I've only met a rare few and given that I'm considered non-sane, if rationality is considered sane at all, I don't know if they, or myself, matter. May be bloviating, but definitely interesting!
          • What I meant by sane is: in order to be considered mentally healthy, an individual is required to exhibit irrationally optimistic behavior, often to the point of their own detriment.

            Sanity is a relative term at best, and is often totally arbitrary.

            I did make the mistake of mixing vernacular and jargon in my earlier post

          • Also: irrationality is detrimental to the health of an organism. Acting irrationally is not optimal behavior, although I have the suspicion that some irrationality plays an important part in problem solving strategies. Guess and test problem solving tends not to be productive in a continuous problem space since, since they have essentially infinite permutations. Irrationality allows one to pick values at random and test them to look for patterns. From there you find the closest value to what you want and pe

          • by Taco Cowboy (5327)

            [Wandering WTF Off-topic ;-). ] A couple of assumptions in there: (1) Humans, as a species, are sane? By whose definition? (2) Humans as a species, or individually for that matter, are rational? I've only met a rare few and given that I'm considered non-sane, if rationality is considered sane at all, I don't know if they, or myself, matter. May be bloviating, but definitely interesting!

            First of all, apologies to all the Slashdotters who still consider themselves as "sane"

            The years that I've been on Slashdot tell me one thing, and that is,

            No sane person will ever be attracted to this site

            • by Teun (17872)

              No sane person will ever be attracted to this site

              Most successful cures started with diagnosis, this [wikipedia.org] should be a good start for recovery.

            • First of all, apologies to all the Slashdotters who still consider themselves as "sane"

              The years that I've been on Slashdot tell me one thing, and that is,

              No sane person will ever be attracted to this site

              I resemble that remark! Taking the duties of moderating these topics seriously will drive anyone over the edge if they ain't already there.

            • I haven't met one yet, but I postulate that a truely sane person is dull. I probably wouldn't like him/her.
              Why? Because the most fun actions are viewed as insane by most. I view them as insane, but that doesn't always stop me from doing them anyways. By doing them I prove myself to be insane. Not as a goal, the goal is fun, but I prove myself to be insane anyway.
        • by citizenr (871508)

          Secondly: Why the hell would another civilization, with superior technology to us want to help us at all?

          Why the hell would a bunch of smart people try to help stupid and evil corporation by wrecking havoc inside its infrastructure and exposing all of its secrets?

          The answer is For Teh LULZ!1

    • by gweihir (88907)

      You have really gorged yourself on the BS. There is nothing trivial here. Most of it may well be impossible in this universe.

  • What knockers!

    Oh... Thank you, doctor

  • by Anonymous Coward on Saturday September 01, 2012 @11:13PM (#41203463)

    The concept of malware using existing code, libraries even...let's see what's on every system in existance:
    1. zlib
    2. libpng
    3. c runtime (albeit different forms)
    4. BSD-compatible TCP/IP stack

    Yup all the right elements needed to create malware, better go remove all those stat!

    All joking aside, The Unix programming model is more or less the "right" way to program things except in two cases:
    - Threading, which the unix model does horrible horribly. Many applications still are designed like there is only one CPU in the system, and the worst offenders (eg google chrome) try to solve it by wasting more memory on a broken sandbox model. It doesn't help when the parent process is the one locking up.
    - Library dependency hell. Linux specifically has a "NOT INVENTED HERE" problem, where everyone violates the Rule of Diversity. Perl is the worst victim of this in action. Various C libraries also fall into this problem. What happens is that over time, shared libraries change their API, or start requiring yet-more dependancies. The end result is that binary programs on Linux are poorly cobbled-together, and highly dependant on upstream developers to get their ass in gear to fix bugs. As opposed to the FreeBSD/gentoo model where compiling everything solves the library hell and replaces it instead with versioning hell. What I mean is that if you don't constantly update everything every time a new point release is made, eventually the ports library will remove the port (eg php5,52,53,54) and break everything.

    In some cases some really stupid crap is a dependency and takes forever (why must all graphics-related ports want to compile the complete X11 system for example)

    The Windows model is somewhat better, albeit has it's own problems. Most windows applications, even when they have shared libraries, distribute the shared libraries they use and keep them in their own directories. If you remove these, the system library is then used. It's also possible to just replace a library. However some applications are really bad... and I mean broken-by-design if you use any shared libraries at all...

    The current way many MMO games prevent hacking, is by monitoring for injected processes or regular processes on a blacklist. However the more creative hacks actually patch the C runtime itself and patch-over the anti-hacking code. It was kinda fun watching this progress with one specific game, as months would go by and the hackers would have their way with the MMO, and then suddenly the anti-hacking software would come back to life and they'd all panic and stop playing for a few hours as they try to figure out what changed. But the way they do it is by using a benign shared library (zlib or jpeg for example) that is loaded before the anti-hacking library, having all imports passed-thru it to the real library renamed to something else. The payload of the dll file however is when it's loaded.

    So it's entirely possible for antivirus software to be neutered by the same process. Antivirus software should be staticly compiled and not relying on any shared files, not even the c-runtime.

    • by 0123456 (636235) on Sunday September 02, 2012 @12:42AM (#41203783)

      The Windows model is somewhat better, albeit has it's own problems. Most windows applications, even when they have shared libraries, distribute the shared libraries they use and keep them in their own directories.

      How is having seventy-five copies of zlib, all with different security holes, scattered around your system better than having one copy provided by the OS?

    • by Bert64 (520050)

      In some cases some really stupid crap is a dependency and takes forever (why must all graphics-related ports want to compile the complete X11 system for example)

      This is why Gentoo has USE flags, so you can turn off optional dependencies if you don't require their functionality.

      The Windows model is somewhat better, albeit has it's own problems. Most windows applications, even when they have shared libraries, distribute the shared libraries they use and keep them in their own directories. If you remove these, the system library is then used. It's also possible to just replace a library. However some applications are really bad... and I mean broken-by-design if you use any shared libraries at all...

      The windows model is more convenient for end users, at the expense of performance and efficiency... And incidentally, OSX works in a similar way with application bundles.

      The system provided shared libraries maintain binary level backwards compatibility by including multiple versions of the library, making it much easier to run old binaries but also causing significant code bloat and resulting

      • by equex (747231)
        With 16GB RAM being about $100, claiming memory usage is pointless. also, linux has different library versions all over the place. also, most windows apps comes with custom dlls placed in its program folder, and for the system libraries, MS redistributable packages are used at the end of the Installer program. windows has problems with efficiency and performance ? sure, some ligthweight configurations can sometimes match Window 7's snappiness, but come on...
        • With 16GB RAM being about $100, claiming memory usage is pointless.

          And that attitude is why Microsoft just shat its pants and frantically tries to reinvent Windows into a tablet friendly OS.

          Being efficient is always a good idea. Even if your system has 16GB of memory available, how do you know what else is running on the system? How can you tell what other long running processes the _user_ thinks are much more important than yours? Besides, RAM has been the new disk for years now. If your program does

    • Modification of libaries is/was a common cheat on FPSs too. One of the classics is a fake directx/opengl library that just passes all calls straight to the real library, after first modifying the alpha channel of textures. Thus all walls become translucent. This used to be one of the most popular ways to cheat on counterstrike before anti-cheating measures actually became effective - a player with the library hack could see through walls, giving a huge advantage in gameplay.
    • by Z34107 (925136)

      I stopped reading when you picked "Chrome" as an example of poorly-threaded software.

    • it's not about using the libraries. that is not the point. the point is to just take random code from a random file that happens to for example move data from register x to register y, and then use that code instead of simple register move command when recompiling the malwares code, that way the entire malware can be ran through the obfuscator, including the obfuscation code, so the entire malware is polymorphed(and bloated by ~50%). it's an obfuscation method. it's NOT about using system libraries since th

  • by mykepredko (40154) on Saturday September 01, 2012 @11:21PM (#41203495) Homepage

    Seriously, I would expect the pieces of the Frankenstein code to be fairly readily identifiable and

    Erectile Dysfunction? Need to please more than one woman. Have we got the pills for you - legal and over the counter just click here: getitup.com

    highly unlikely that a well protected system like mine would EVER have to worry about it.

    myke

  • by Immerman (2627577) on Saturday September 01, 2012 @11:24PM (#41203521)

    Perhaps someone was pulling my leg at the time, but I remember back in the mid-nineties hearing about a project where dozens (soon to be hundreds) of self-modifying/evolving viruses were turned loose on a host machine to compete, with one of the most successful being a tiny bit of "parasite" code that had offloaded virtually all of it's functionality to other viruses in the ecosystem.

  • by Anonymous Coward

    There is a similar thing called "return oriented computing". I don't know to what extent is this used in practice, but this idea isn't completely new.

    • by aaron552 (1621603)
      I thought "return oriented" hacks were essentially just overwriting the return pointer from a defined location to malicious code? This looks like an evolution of ROC.
      • by gweihir (88907)

        It is not. Return oriented programming has it right: It is a small part of the malware doing the privilege escalation. All other virus code gets propagated. This "revolutionary new thing" is not revolutionary and it is not new. Other have not pursued it because it does rather obviously not work for any kind of propagating code. The simple question of "how do you get the scanner/stitcher" on the target system and running as root?" seems to escape people.

  • by Trax3001BBS (2368736) on Saturday September 01, 2012 @11:54PM (#41203615) Homepage Journal
    Quoting a portion of http://news.slashdot.org/story/01/01/25/1343218/directvs-secret-war-on-hackers [slashdot.org]
    Posted by michael on Thursday January 25 2001

    "...It was apparent that DirecTV had lost this battle, relegating DirecTV to hunting down Web sites that discussed
    their product and using their legal team to sue and intimidate them into submission.

    "Four months ago, however, DirecTV began sending several updates at a time, breaking their pattern. While the
    hacking community was able to bypass these batches, they did not understand the reasoning behind them. Never before
    had DirecTV sent 4 and 5 updates at a time, yet alone send these batches every week. Many postulated they were
    simply trying to annoy the community into submission. The updates contained useless pieces of computer code that
    were then required to be present on the card in order to receive the transmission. The hacking community
    accommodated this in their software, applying these updates in their hacking software. Not until the final batch of
    updates were sent through the stream did the hacking community understand DirecTV. Like a final piece of a puzzle
    allowing the entire picture, the final updates made all the useless bits of computer code join into a dynamic
    program, existing on the card itself. This dynamic program changed the entire way the older technology worked. In a
    masterful, planned, and orchestrated manner, DirecTV had updated the old and ailing technology. The hacking
    community responded, but cautiously, understanding that this new ability for DirecTV to apply more advanced logic
    in the receiver was a dangerous new weapon. It was still possible to bypass the protections and receive the
    programming, but DirecTV had not pulled the trigger of this new weapon.

    "Last Sunday night, at 8:30 pm est, DirecTV fired their new gun. One week before the Super Bowl, DirecTV launched a
    series of attacks against the hackers of their product. DirecTV sent programmatic code in the stream, using their
    new dynamic code ally, that hunted down hacked smart cards and destroyed them. The IRC DirecTV channels overflowed
    with thousands of people who had lost the ability to watch their stolen TV. The hacking community by and large lost
    not only their ability to watch TV, but the cards themselves were likely permanently destroyed. Some estimate that
    in one evening, 100,000 smart cards were destroyed, removing 98% of the hacking communities' ability to steal their
    signal. To add a little pizzazz to the operation, DirecTV personally "signed" the anti-hacker attack. The first 8
    computer bytes of all hacked cards were rewritten to read "GAME OVER"..."

    end quote
    • Not exactly. In that case, most of the code was uploaded, then resequenced and executed. The completed program looked the same on each card. In this case, what they're saying is with all the DLLs on a system, if you can heuristically analyze them for relevant code segments to fulfill your objective, then you can use code that's already trusted and integrated into the system as a foundation for your attack.

      The problem with this method, is that it still requires a 'seed'. It needs a program with the logic ne

    • by theCoder (23772)

      So, what you're saying is that DirectTV used social engineering techniques to convince people to install malicious software on their receivers and then sent a signal to those receivers that destroyed them, potentially causing millions of dollars in damages? It seems to me that if I did that, I'd be prosecuted, no matter what the people I attacked did to me.

      OTOH, after reading some more [codinghorror.com] about the details, the smart cards may have actually been DirectTV's property that they had lent to the hackers because th

  • by Tracy Reed (3563) <treed AT ultraviolet DOT org> on Sunday September 02, 2012 @12:05AM (#41203661) Homepage

    This sounds like Return Oriented Programming, used in some exploits to thwart countermeasures. But it is a long way from stitching together code to do trivial things all the way to making code which replicates, has a payload, AND can stitch together code to do all Of this. The Halting Problem makes me wonder if it is even theoretically possible.

    • The halting program only says that there exist some programs for which it is impossible to determine if they halt. Not a problem here: All the hypothetical frankenmalware need do is know when to give up and go in hunt of some new code. The really difficult part is making a program that can determine the function of another section of code in a meaningful enough manner to create a new program from them - this would require some incredible level of AI, in some ways nearing human capacity for abstract thought
    • by gweihir (88907)

      I think it would be possible, if you do not stitch the stitcher/scanner. If you stitch that as well, I expect the code will get larger and larger. There is also a fundamental issue: You cannot propagate the virus, you need to propagate the scanner/stitcher and have it run as root on the target before you can create a virus there. Kind of defeats the point.

      • by gl4ss (559668)

        the point is that it gets to run because it didn't hit the scanner. and the point is exactly that the obfuscator gets obfuscated too. and it does increase with every generation in file size.

        • by gweihir (88907)

          Once you have the scanner/stitcher running on the target system, you have already full control. Doing the scanning/stitching is redundant.

  • I mean code is code so the same tactics could be used to make an artificial virus evade the immune system right?

    Would it work? Probably not.

    Would it be plausible enough to write a sci/fI book or movie? Maybe.

    • That basically is a virus. Their own genome doesn't supply all of the information needed to make a new virus, but rather adapts the existing processes coded for by the host's own genome. That's why viruses tend to be much more species-specific than bacteria.
    • by gl4ss (559668)

      I mean code is code so the same tactics could be used to make an artificial virus evade the immune system right?

      Would it work? Probably not.

      Would it be plausible enough to write a sci/fI book or movie? Maybe.

      I think there's been pretty many books written about the common flu(and the not so common man made flus) already.

  • As for the link to unix philosophy, I am sure that certain unities have malware, especially the ones I can't ever remember how to use, or what on earth the switches all mean, like find, or man.
  • Seriously... the ability to stitch together a thousand different versions of "the same" virus using pieces of code commonly available on every system would be overwhelming and devastating to a target.

    No, you don't send the generator in the payload (unless you have it generate itself first), as it would be easily detected and reverse engineered. You send a thousand viruses at a set of targets and there will be no virus scanner able to handle 100% of them without dynamic analysis. With a zero day exploit and root kit implementation this is potentially devastating. With some careful engineering you could sometimes defeat dynamic analysis as well.

    What makes current viruses largely ineffective is that you can only make a few effective ones in a limited time period. You need a large team of experienced developers to be able to build such a critter. Iterating new payloads takes lots of testing and QA. With this sort of tech you build one good virus blueprint and out comes thousands of different little beasties with a good probability of success. Each one is different!

    This stuff is dangerous - atomic bomb dangerous if it gets a proper engineering.

    • While I agree that there's a big threat, I don't see the sky falling yet. But I guess some AV companies that got complacent and retreated to creating automated pattern based signatures will have to invest in Analysis again (allow me to use this moment to greet a former employer of mine, guess you might soon regret axing the Analysis team in favor of that autosig tool, huh?).

      It will likely be impossible to use standard pattern signatures anymore. Ok. Behaviour analysis will most likely be very difficult as w

    • by cpghost (719344)

      This stuff is dangerous - atomic bomb dangerous if it gets a proper engineering.

      It may sound old-fashioned to reiterate, but this stuff is only dangerous for operating systems that don't properly separate privileges and don't properly isolate and contain processes/tasks.

    • by gweihir (88907)

      You miss one critical thing. Admittedly the story also glosses over this fundamental limitation: You cannot send any virus! You need the scanner/stitcher present on the target system and running as root in order to do its job. And it needs to be propagated along with any virus. Obviously that invalidates that whole thing.

  • is this an old story or have I seen it somewhere else?

    • by gl4ss (559668)

      is this an old story or have I seen it somewhere else?

      it was on regular newssites couple of weeks ago...

  • by dzfoo (772245)

    Isn't this just one of the features of "return oriented programming," wherein the stack is manipulated to point to a set of addresses containing a sequence of instructions already in the binary (whether in executable code, or in data structures), that combined forms malicious code?

    • by gweihir (88907)

      It is. But, just as this stuff, return oriented programming is not viable on its own. It is just used for the exploit code to get your real payload to execute.

      • by dzfoo (772245)

        I thought that return-oriented programming was precisely to build a payload out of innocuous numeric data values by manipulating them into looking like op-codes.

                  -dZ.

        • by gweihir (88907)

          Return-oriented programming is an exploit-technique to open the door for the actual payload. It has nothing to do with hiding that payload. It does help to hide the exploit, as the actual attack is far smaller than in a conventional buffer-overflow, where a piece of code goes on the stack. But in both cases, once the privilege-escalation has been achieved, some other piece of code takes over.

          So, hiding, yes, to a degree, but only of the exploit code, not of the actual malicious payload or the "running malwa

  • This is not ordinary code where doing these small things is a relatively good indicator you can do larger things. The scanner itself cannot be done this way, was it needs to know what it is scanning for. While an interesting idea, this approach has nowhere near the power claimed.

  • Computer "viruses" as we know them are really more like computer "bacteria", whereas this concept is a bit more like a real virus.
  • Instead of all the unnecessary complexity of making Frankenstein code, why not just borrow an idea from the biological world? Write your malware/virus/whatever as an RNA strand that is transcribed into runnable code. Each base pair is translated, at random, to a small set of synonymous functional code. Finally, the transcoder itself (also coded in RNA) is included. The interesting bit then is, when it comes time to do a duplication, the code does reverse transcription back into RNA (a non-trivial but no

"We learn from history that we learn nothing from history." -- George Bernard Shaw

Working...