topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday October 31, 2024, 7:59 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: Interesting Approach by the Profiteering Malware Author  (Read 16972 times)

Ehtyar

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,237
    • View Profile
    • Donate to Member
It appears malware authors are getting more and more innovative in their approach to profiting from their activities. Kaspersky Labs have recently come across a new variant of the "Gpcode" virus. This little bastard first encrypts various file formats it finds on your computer, then drops a vbs file which deletes the primary executable, and subsequently recommends you email the author with a unique ID that will allow him to decrypt your files, a service for which you will be charged a sum at his/her whim.
For the previous 7 variants, the author has used RC4 to encrypt the files, and then encrypted the RC4 key with variable bit length RSA. The latest variant has moved up to using 1024 bit RSA, and now uses various emails to facilitate extortion of payment.
This virus seems to be proliferating at such an alarming rate that Kaspersky have taken the unprecedented step of asking the public for help in determining how best to combat this virus, and are even asking for suggestions on how to approach factorization of the keys. Providing that a fundamental weakness is not present in any aspect of implementation, the keys are, practically speaking, unbreakable.
I suppose it just goes to show that that mind of a good programmer is always seeking more efficient ways of achieving its goal.
More info here, here, and here.

Ehtyar.

[edit]
Added some extra info
[/edit]
« Last Edit: June 11, 2008, 08:59 AM by Ehtyar »

Renegade

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 13,291
  • Tell me something you don't know...
    • View Profile
    • Renegade Minds
    • Donate to Member
Re: Interesting Approach by the Profiteering Malware Author
« Reply #1 on: June 11, 2008, 09:31 AM »
I don't think this is a new attack style. I remember a number of years ago hearing about "ransomware", which is the same as described above. It would lock things up, then demand a ransom for it.

The first example of it (from the Wikipedia article above) was from 1989.

The issue now is probably the number of infections is just higher. <cynicism>Oh, and that it makes for a great news story to plug your antivirus product.</cynicism>

 
Slow Down Music - Where I commit thought crimes...

Freedom is the right to be wrong, not the right to do wrong. - John Diefenbaker

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Interesting Approach by the Profiteering Malware Author
« Reply #2 on: June 11, 2008, 09:34 AM »
It's definitely not new, Renegade, and Ethyar does mention that there's 7 previous variants - I think it's some years since I heard about this particular malware last. But using 1024-bit RSA, hmm... that's "pretty hard" to factor. The best bet would probably be catching the malware while it's doing it's nasty crap, and doing a process memory dump to extract the keys.

That, or find out how to link the "unique ID" with the key. But that probably involves tracking down the author, checking his source code, and putting a bullet or two in his stomach.
- carpe noctem

scancode

  • Honorary Member
  • Joined in 2007
  • **
  • Posts: 641
  • I will eat Cody someday.
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Interesting Approach by the Profiteering Malware Author
« Reply #3 on: June 11, 2008, 09:41 AM »
Rubber hose cryptanalisys!  :up:

40hz

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 11,858
    • View Profile
    • Donate to Member
Re: Interesting Approach by the Profiteering Malware Author
« Reply #4 on: June 11, 2008, 10:13 AM »
Why am I suddenly in support of waterboarding;)

Carol Haynes

  • Waffles for England (patent pending)
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 8,068
    • View Profile
    • Donate to Member
Re: Interesting Approach by the Profiteering Malware Author
« Reply #5 on: June 11, 2008, 10:31 AM »
Can't the money trail be traced if people are paying?

Solution - backup up regularly and tell him to go f*** himself.

Darwin

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 6,984
    • View Profile
    • Donate to Member
Re: Interesting Approach by the Profiteering Malware Author
« Reply #6 on: June 11, 2008, 10:41 AM »
Why am I suddenly in support of waterboarding;)




As Carol says, backup, backup, backup... To combat this sort of instanity, I suppose this means that disk imaging is the best way to go.

nosh

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,441
    • View Profile
    • Donate to Member
Re: Interesting Approach by the Profiteering Malware Author
« Reply #7 on: June 11, 2008, 11:01 AM »
I'm sure the description of the malware that hit the DC server said it did something very similar. Apparently there weren't any casualties but if these clowns could generate effective code maybe they would have got a _real_ job?

Darwin

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 6,984
    • View Profile
    • Donate to Member
Re: Interesting Approach by the Profiteering Malware Author
« Reply #8 on: June 11, 2008, 11:28 AM »
if these clowns could generate effective code maybe they would have got a _real_ job

 ;D Very true. Still, it never hurts to OVERestimate your enemy.

CWuestefeld

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,009
    • View Profile
    • Donate to Member
Re: Interesting Approach by the Profiteering Malware Author
« Reply #9 on: June 11, 2008, 11:32 AM »
<cynicism>Oh, and that it makes for a great news story to plug your antivirus product.</cynicism>
I'm a Kaspersky fan, but I have to agree. It seems that cracking the key is impractical, and even if it weren't, it is trivial for the bad guy to release a new version using a new key, so this approach won't work. And why is it so difficult to catch the key with a debugger, as f0dder suggested?

Carol Haynes

  • Waffles for England (patent pending)
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 8,068
    • View Profile
    • Donate to Member
Re: Interesting Approach by the Profiteering Malware Author
« Reply #10 on: June 11, 2008, 12:07 PM »
It hardly plugs their AV product if they are appealing to the public for help to solve the problem  :-\

mwb1100

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,645
    • View Profile
    • Donate to Member
Re: Interesting Approach by the Profiteering Malware Author
« Reply #11 on: June 11, 2008, 02:17 PM »
The best bet would probably be catching the malware while it's doing it's nasty crap, and doing a process memory dump to extract the keys.

That, or find out how to link the "unique ID" with the key.

I'd guess that the "unique ID" is the RC4 encryption key that has itself been encrypted with the RSA public key.  I'd also guess that the RC4 key is a randomly generated value that gets created right before the encryption of your data files.  If you're able to "catch" the malware at this point, it's probably best to simply stop it rather than extract the keys.

One key to solving this problem (pardon the pun) for people who get hit with finding their data files encrypted is if there's a vulnerability in the RC4 key generation process - if that's the case it may be possible to recreate those keys without the help of the extortionist.  For example, if the malware author makes a mistake similar to the flaw found not too long ago for SSH key generation on Debian distributions, recovering the data would be pretty easy.  But that's a big "if".



Ehtyar

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,237
    • View Profile
    • Donate to Member
Re: Interesting Approach by the Profiteering Malware Author
« Reply #12 on: June 11, 2008, 03:52 PM »
In all fairness, I daresay cryptanalysis of RC4 as opposed to trying to factor 1024 bit RSA would yield far better results. RC4 is incredibly weak by comparison. Also, apologies for making the virus sound as though it were new, it was not my intention. As f0dder indicated, i did mention the seven previous variants at least.

Ehtyar.

[edit]
And why is it so difficult to catch the key with a debugger, as f0dder suggested?
I believe this indicates why this won't work, though it's far from an effective explanation. How the author can decrypt files protected by a randomly generated RSA private key I am unsure. Perhaps it is not his/her intention to ever provide the decrypter?

P.S. I do not use Kaspersky AV.
[/edit]
« Last Edit: June 11, 2008, 03:59 PM by Ehtyar »

mwb1100

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,645
    • View Profile
    • Donate to Member
Re: Interesting Approach by the Profiteering Malware Author
« Reply #13 on: June 11, 2008, 04:38 PM »
How the author can decrypt files protected by a randomly generated RSA private key I am unsure. Perhaps it is not his/her intention to ever provide the decrypter?

Note: In the following, I'm speaking about how the malware works based on what I believe to be the case from very sketchy information - I could be missing the boat entirely...

The RSA key is not randomly generated - the RC4 key is.  Then that key is encrypted using the RSA public key.  At this point only a person who holds the corresponding RSA private key can recover the RC4 key.

The approach that Kaspersky seems to be advocating is trying to organize a distributed network of computers (similar to SETI@home) to brute force the RSA private key.

Carol Haynes

  • Waffles for England (patent pending)
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 8,068
    • View Profile
    • Donate to Member
Re: Interesting Approach by the Profiteering Malware Author
« Reply #14 on: June 11, 2008, 04:45 PM »
They will need a net as big as SETI if the virus proliferates! Guess what - that net would be the next target!

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: Interesting Approach by the Profiteering Malware Author
« Reply #15 on: June 11, 2008, 04:47 PM »
Yeah, if someone "evil" got control of such network, much more interesting rsa keys would be broken, that's for sure.

Ehtyar

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,237
    • View Profile
    • Donate to Member
Re: Interesting Approach by the Profiteering Malware Author
« Reply #16 on: June 11, 2008, 05:07 PM »
The RSA key is not randomly generated - the RC4 key is.  Then that key is encrypted using the RSA public key.  At this point only a person who holds the corresponding RSA private key can recover the RC4 key.
Oh I see, so the "ID" they email the author is the encrypted RC4 key...duh *headsmack*. Which again begs the question, why is Kaspersky going after the RSA key instead of the RC4 key? Seems very misguided.

Ehtyar.

mwb1100

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,645
    • View Profile
    • Donate to Member
Re: Interesting Approach by the Profiteering Malware Author
« Reply #17 on: June 11, 2008, 05:23 PM »
why is Kaspersky going after the RSA key instead of the RC4 key?

Because the RC4 key applies to only a single instance of the infection.  If the RSA key is broken (actually it appears that there are 2 RSA keys - which one is used depends on the OS version of the machine that is infected) it will allow the recovery of any infection.

Now, if there's a flaw in how the RC4 key is generated (or in how the RC4 algorithm is implemented) then there might be another approach to recovering from the damage inflicted.  But I have no idea how likely that scenario is.

Ehtyar

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,237
    • View Profile
    • Donate to Member
Re: Interesting Approach by the Profiteering Malware Author
« Reply #18 on: June 11, 2008, 05:39 PM »
why is Kaspersky going after the RSA key instead of the RC4 key?
Because the RC4 key applies to only a single instance of the infection.  If the RSA key is broken (actually it appears that there are 2 RSA keys - which one is used depends on the OS version of the machine that is infected) it will allow the recovery of any infection.
And yet what are the chances of factoring the RSA key as opposed to cracking the RC4 key? Seems like they're all talk...at least for the moment. I believe the two RSA keys are a product of the lack of an "enhanced" cryptography provider in earlier versions of windows.

Ehtyar.

[edit]
It would also be interesting to determine the length of the generated RC4 key, might even be practically brute-forceable, certainly more-so then the RSA key.
[/edit]
« Last Edit: June 11, 2008, 05:44 PM by Ehtyar »

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Interesting Approach by the Profiteering Malware Author
« Reply #19 on: June 11, 2008, 05:52 PM »
Problem is, Ehtyar, how would you go about attacking the RC4 key? Unless there's a serious flaw in the PRNG used for generating the random RC4 key (like, using srand(time(0))), what would you do? I know there's some cryptographic problems with RC4 itself, but haven't read up on just how it affects it. Even with reduced complexity attacks, you still need some way of detecting if you've found the right key - unless you have a md5sum of at least one original file, how are you going to do this detection without manually looking at each "attempted decrypt"? :)

I'd guess that the "unique ID" is the RC4 encryption key that has itself been encrypted with the RSA public key.  I'd also guess that the RC4 key is a randomly generated value that gets created right before the encryption of your data files.  If you're able to "catch" the malware at this point, it's probably best to simply stop it rather than extract the keys.
That's my guess as well. But just stopping the malware might not be enough - what if you realize it's active only after it's encrypted, say, 100 of your files?

Now, factoring RSA-1024... I wonder just how feasible that is, even with a SETI or Folding@Home size grid. Probably more realistic to track down the bastard.
- carpe noctem

Ehtyar

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,237
    • View Profile
    • Donate to Member
Re: Interesting Approach by the Profiteering Malware Author
« Reply #20 on: June 11, 2008, 06:46 PM »
Now, factoring RSA-1024... I wonder just how feasible that is, even with a SETI or Folding@Home size grid. Probably more realistic to track down the bastard.
It seems to me that, provided the arsehole isn't using an open proxy, or TOR etc., the assistance of his email providers, or his credit card processors etc. in this case could quite easily lead to his eventual identification.

On another note, after further googling it appears that Gpcode is generating what KL are calling a "master" key when it begins its work, then modifying the key for each file it encrypts, using some unique aspect of the file itself (its creation time, file name etc) thereby making the approach toward cracking the RC4 that much more complicated. KL are keeping extraordinarily tight-lipped about this process for an organisation claiming to want to put an end to this outbreak. Hypothetically, if KL were to release this kind of information, both the Fluhrer, Mantin & Shamir, and the Klein attack could be quite successful in breaking the encryption, provided the author had not defended against one or the other and that the key length was sufficiently small.

Ehtyar.

[edit]
Is he using the Microsoft cryptography provider for the RC4, or just the RSA i wonder. The Microsoft cryptography documentation does not supply information regarding defense against known attacks, so one can most likely safely assume it is not protected against either of the attacks listed above. Though if the author were to be using 3rd party code for the RC4, then he would be free to introduce any modification to the algorithm he wanted.
[/edit]
« Last Edit: June 11, 2008, 06:56 PM by Ehtyar »

mwb1100

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,645
    • View Profile
    • Donate to Member
Re: Interesting Approach by the Profiteering Malware Author
« Reply #21 on: June 11, 2008, 06:51 PM »
Probably more realistic to track down the bastard.
Why am I suddenly in support of waterboarding;)
Rubber hose cryptanalisys!  :up:

Maybe if the FBI or some other 'three letter agency' were to get infected...  I think this scheme would be 'broken' in short order.

Ehtyar

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,237
    • View Profile
    • Donate to Member
Re: Interesting Approach by the Profiteering Malware Author
« Reply #22 on: June 11, 2008, 06:59 PM »
Maybe if the FBI or some other 'three letter agency' were to get infected...  I think this scheme would be 'broken' in short order.
The RC4 perhaps, but from a conspiracy theorist's point of view, were the government capable of breaking 1024 bit RSA in short order, it would be in their best interests, regardless of whatever information was encrypted, to keep that fact a secret. The entire cryptography community could collapse into total mayhem were this sort of information to get out.

Ehtyar.

[edit]
At the risk of starting a flame war, why don't we all just forget about breaking the crypto and simply follow Symantec's excellent "removal" instructions ;)
[/edit]
« Last Edit: June 11, 2008, 07:02 PM by Ehtyar »

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Interesting Approach by the Profiteering Malware Author
« Reply #23 on: June 11, 2008, 07:03 PM »
Ehtyar: not only the cryptography community... I don't even dare think about the consequences of anybody being able to factor 1024-bit RSA in realistic time.
- carpe noctem

mwb1100

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,645
    • View Profile
    • Donate to Member
Re: Interesting Approach by the Profiteering Malware Author
« Reply #24 on: June 11, 2008, 07:09 PM »
Maybe if the FBI or some other 'three letter agency' were to get infected...  I think this scheme would be 'broken' in short order.
The RC4 perhaps, but from a conspiracy theorist's point of view, were the government capable of breaking 1024 bit RSA in short order, it would be in their best interests, regardless of whatever information was encrypted, to keep that fact a secret.

I meant more from the point of view of being able to track down the blackmailer and using old fashioned methods of getting the key.