Re:Kaspersky: Duqu Trojan uses 'unknown programming language'
by jnbiche on Thursday March 08, 2012 @08:33PM
(#3682514)
Also interesting that the CodeSurfer product referenced above is "sponsored by several government agencies, including the US Air Force, the US Navy, the Office of the Secretary of Defense, and the Department of Homeland Security", according to its own website.
Looks like a cool product.
Re:Kaspersky: Duqu Trojan uses 'unknown programming language'
by stunr69 on Friday March 09, 2012 @07:17AM
(#3683788)
There are some similar products from sgvsarc called Crystal REVS from SGV Sarc (http://www.sgvsarc.com/products.htm). Does anyone know how they compare against Codesurfer and related products from GrammaTech ?
Re:Kaspersky: Duqu Trojan uses 'unknown programming language'
by muyuu on Thursday March 08, 2012 @07:53PM
(#3682424)
As a part-time Schemer this does not surprise me... Schemers have a tendency to craft their own languages. It's only natural.
Re:Kaspersky: Duqu Trojan uses 'unknown programming language'
by eddie_the_head on Thursday March 08, 2012 @11:47PM
(#3682964)
Relevant, semi-related story about methods an adware-author used to write and conceal his adware in Scheme:
http://philosecurity.org/2009/01/12/interview-with-an-adware...
Re:Kaspersky: Duqu Trojan uses 'unknown programming language'
by bhrgunatha on Thursday March 08, 2012 @08:43PM
(#3682544)
But surely the compiler (assuming a compiler is used) would convert the new high level language into regular Scheme primitives - I think it's unlikely that the result wouldn't be identifiable.
Re:Kaspersky: Duqu Trojan uses 'unknown programming language'
by scottdw2 on Thursday March 08, 2012 @08:50PM
(#3682565)
No... the product allows you to write scripts to manipulate its machine code IR database in scheme, and then spit out the machine code as nasm assembly, assembly them, and then run the appropriate linker in the same way that was used to produce the original exe. Scheme is used as a macro language. So you use scheme to say: change the code at EA 0xdeadbeef from a mov to a jmp. You can reorder functions, insert and remove code, etc. It works because it has very high quality disassembly based on observing compiler and linker invocations and introspecting the artifacts involved.
Re:Kaspersky: Duqu Trojan uses 'unknown programming language'
by bhrgunatha on Thursday March 08, 2012 @09:29PM
(#3682644)
Ahh, that makes more sense, I thought it meant simply creating a higher level language from Scheme rather than manipulating the last stage(s) of producing the binary.
Re:Kaspersky: Duqu Trojan uses 'unknown programming language'
by mkramlich on Thursday March 08, 2012 @09:35PM
(#3682653)
I've having this vision of a Jedi being required to construct their own light sabre.
Re:Kaspersky: Duqu Trojan uses 'unknown programming language'
by kds on Friday March 09, 2012 @06:52AM
(#3683734)
... more of a Lambda Knight writing his own lisp ;)
Re:Kaspersky: Duqu Trojan uses 'unknown programming language'
by JonnieCache on Friday March 09, 2012 @07:00AM
(#3683757)
Re:Kaspersky: Duqu Trojan uses 'unknown programming language'
by mahmud on Thursday March 08, 2012 @09:12PM
(#3682605)
GrammaTech is an Scheme shop and employs several Lispers :-)
Re:Kaspersky: Duqu Trojan uses 'unknown programming language'
by lukeschlather on Thursday March 08, 2012 @10:55PM
(#3682834)
What exactly is the benefit of obfuscating the source language? Your hypothesis that it's written in Scheme is reasonable, but a DSL by any other name is a basket of Lisp macros. It's not a new language, but at the same time, it's kind of a Domain-specific language.
At any rate, I don't think that if it was Scheme that the goal was to obfuscate that it was written in Scheme.
Re:Kaspersky: Duqu Trojan uses 'unknown programming language'
by scottdw2 on Thursday March 08, 2012 @11:11PM
(#3682873)
See my comment below. I don't think you quite understood what I meant. I'm not saying the code was written in scheme. I'm saying there is a product that allows you to write scheme macros to manipulate a database of machine code IR derived from disassembly and then turn the modified database back into an executable.
Hiding the source language makes identifying the origin of the malware difficult. There are obvious reasons to do that.
Re:Kaspersky: Duqu Trojan uses 'unknown programming language'
by narag on Friday March 09, 2012 @04:04AM
(#3683460)
Hiding the source language makes identifying the origin of the malware difficult.
How so? Knowing that it was written using VC would hardly help identifying the origin.
That's not to say that you're wrong about the tool used, but I don't believe the goal was to cover their tracks, but some kind of optimization. Viruses often face space constraints.
Re:Kaspersky: Duqu Trojan uses 'unknown programming language'
by DEinspanjer on Friday March 09, 2012 @09:00AM
(#3684039)
I am not knowledgeable enough to say much on this topic, but I was wondering if maybe such rewriting would also serve to make it easy to mutate code to change its signature?
Re:Kaspersky: Duqu Trojan uses 'unknown programming language'
by lukeschlather on Friday March 09, 2012 @10:23AM
(#3684371)
That was sort of what I was getting at. The obfuscation of the source language may be correlated, but it's not the goal.
http://www.grammatech.com/research/products/CodeSurferx86.ht...
If it has access to source code, it can instrument the build process, and obtain disassembly that is high quality enough to support rewriting. Using it's scheme API you can modify the CFG of each procedure directly, serialize the rewritten parts out as nasm, and even relink with the object files you don't have source for.
It works with any build system, and supports gcc / as / ld and cl / link.
So it may not have actually been written using a custom pl.