Malicious PHP script hides bad stuff inside 'white-space'

Posted by   Virus Bulletin on   Jun 9, 2011

Spaces and tabs used to encode into binary.

Researchers at Kaspersky have discovered a malicious PHP script that uses an inventive way to obfuscate its malicious behaviour.

The script, found on a Polish online store, dynamically adds some remotely linked malicious code into the website's HTML. What is probably more interesting is the way the malware's authors went about obfuscating the script's behaviour.

Apart from an unusual way of using comments - which may initially suggest the code itself is commented out - the code contains what looks like a large amount of white-space. However, upon further inspection, the white-space consists of a mix of spaces and tabs. The script decodes this into a binary string of ones (tabs) and zeroes (spaces), which is then converted to decimal values and then finally into ASCII characters containing the actual bad code.

Malware authors regularly use this kind of obfuscation. At the recent VB Seminar, TrustDefender's Alex Shipp explained this is done to frustrate malware researchers: the extra time they have to spend de-obfuscating the malware to stop its malicious behaviour means the malware can stay undetected for a longer period of time, thus increasing the chances of it being used for its malicious intentions.

More at Kaspersky's SecureList blog here.

Posted on 09 June 2011 by Virus Bulletin

twitter.png
fb.png
linkedin.png
hackernews.png
reddit.png

 

Latest posts:

New paper: Collector-stealer: a Russian origin credential and information extractor

In a new paper, F5 researchers Aditya K Sood and Rohit Chaturvedi present a 360 analysis of Collector-stealer, a Russian-origin credential and information extractor.

VB2021 localhost videos available on YouTube

VB has made all VB2021 localhost presentations available on the VB YouTube channel, so you can now watch - and share - any part of the conference freely and without registration.

VB2021 localhost is over, but the content is still available to view!

VB2021 localhost - VB's second virtual conference - took place last week, but you can still watch all the presentations.

VB2021 localhost call for last-minute papers

The call for last-minute papers for VB2021 localhost is now open. Submit before 20 August to have your paper considered for one of the slots reserved for 'hot' research!

New article: Run your malicious VBA macros anywhere!

Kurt Natvig explains how he recompiled malicious VBA macro code to valid harmless Python 3.x code.

We have placed cookies on your device in order to improve the functionality of this site, as outlined in our cookies policy. However, you may delete and block all cookies from this site and your use of the site will be unaffected. By continuing to browse this site, you are agreeing to Virus Bulletin's use of data as outlined in our privacy policy.