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:

VBSpam tests to be executed under the AMTSO framework

VB is excited to announce that, starting from the Q3 test, all VBSpam tests of email security products will be executed under the AMTSO framework.

In memoriam: Prof. Ross Anderson

We were very sorry to learn of the passing of Professor Ross Anderson a few days ago.

In memoriam: Dr Alan Solomon

We were very sorry to learn of the passing of industry pioneer Dr Alan Solomon earlier this week.

New paper: Nexus Android banking botnet – compromising C&C panels and dissecting mobile AppInjects

In a new paper, researchers Aditya K Sood and Rohit Bansal provide details of a security vulnerability in the Nexus Android botnet C&C panel that was exploited in order to gather threat intelligence, and present a model of mobile AppInjects.

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.

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.