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:

VB2019 paper: Domestic Kitten: an Iranian surveillance program

At VB2019 in London, Check Point researchers Aseel Kayal and Lotem Finkelstein presented a paper detailing an Iranian operation they named 'Domestic Kitten' that used Android apps for targeted surveillance. Today we publish their paper and the video…

VB2019 video: Discretion in APT: recent APT attack on crypto exchange employees

At VB2019 in London, LINE's HeungSoo Kang explained how cryptocurrency exchanges had been attacked using Firefox zero-days. Today, we publish the video of his presentation.

VB2019 paper: DNS on fire

In a paper presented at VB2019, Cisco Talos researchers Warren Mercer and Paul Rascagneres looked at two recent attacks against DNS infrastructure: DNSpionage and Sea Turtle. Today we publish their paper and the recording of their presentation.

German Dridex spam campaign is unfashionably large

VB has analysed a malicious spam campaign targeting German-speaking users with obfuscated Excel malware that would likely download Dridex but that mostly stood out through its size.

Paper: Dexofuzzy: Android malware similarity clustering method using opcode sequence

We publish a paper by researchers from ESTsecurity in South Korea, who describe a fuzzy hashing algorithm for clustering Android malware datasets.

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.