Showing posts with label malicious JavaScript. Show all posts
Showing posts with label malicious JavaScript. Show all posts

Thursday, December 26, 2013

Infection found on ‘feedburner.com’

Recently, we have seen the websites of MySQL and PHP.net being compromised. We have also blogged about Google Code being used as a drop site for holding malicious code.  These instances clearly suggest that attackers are targeting popular websites and using them in their attacks as they are less likely to be blocked by URL filters. This time we found that Google acquired ‘FeedBurner’, which provides custom RSS feeds and management tools to users is hosting an infected page. We found that one of the pages on the sub-domain ‘feeds.feedburner.com’ is serving malicious JavaScript.  The JavaScript is obfuscated and contains an iFrame, which after execution, redirects the user to a malicious website. More information about this particular attack can be found in McAfee's description of threat JS/Exploit-Blacole.em.

Let’s look at the infection in detail.

URL: hxxp://feeds.feedburner.com/bileblog

The following shows the redirection trace when visiting the aforementioned URL.

Network Trace:  



The redirection chain above case is as follows:
hxxp://feeds.feedburner.com/bileblog (Drops JavaScript Trojan)
--> hxxp://rsnvlbgcba.ibiz.cc/d/404.php?go=1  (Intermediate Redirection)
--> hxxp://fukbb.com/

Let’s take a look at a beautified version of the obfuscated JavaScript Trojan code which is dropped:



JavaScript Trojan code generally contains two main sections. The first is the decoder routine (i.e JavaScript code which decodes the embedded payload) and the second is the payload itself. Generally attackers keep on tweaking the decoder routine and payload to evade security vendors.

The de-obfuscated version of the code above can be seen here:



The de-obfuscated code loads an iFrame into the victim’s browser, which is redirecting the user to ‘hxxp://rsnvlbgcba.ibiz.cc/d/404.php?go=1’, which in turn redirects it to ‘hxxp://fukbb.com/’.

The source code hosted at ‘hxxp://rsnvlbgcba.ibiz.cc/d/404.php?go=1’ is a simple redirect:

   

 Final re-directed page:



Currently, ‘hxxp://fukbb.com’ is not serving any malicious code but the reputation of this site is found to be suspicious (Refer the VT link below). The page could however be revived at some point in the future. ThreatLabZ informed FeedBurner about this infection on 12/26/2013.

VT Reports:
File scan for JavaScript Trojan code: 24/49
URL scan on ‘hxxp://rsnvlbgcba.ibiz.cc/d/404.php?go=1’ :  2/51
URL scan on ‘hxxp://fukbb.com/’ :  3/51

ZULU Report:
URL Scan on ‘hxxp://feeds.feedburner.com/bileblog’: 100/100

Similar instances of this infection have been found on ‘http://celebrityshowdown.net/?feed=rss2’, which is also an RSS feed management site. The following is the network trace seen when visiting this URL.



The redirection chain observed in this case is as follows:
hxxp://celebrityshowdown.net/?feed=rss2    
--> hxxp://rhtbjgw.ibiz.cc/?go=2
--> hxxp://fukbb.com/

For a detailed report about this infections check the urlQueryreport.

We continue to see similar infections using malicious JavaScript injected into legitimate sites to redirect users to malicious sites on a daily basis. Most of the time the infected sites haven’t specifically been targeted, but have become infected during larger attacks conducted using browser exploit kits designed to automate the infection of as many sites as possible. We advise our readers to use online URL scanning tools such as ZULU to perform scans on URLs when suspicious, regardless of a site’s perceived reputation.

- pradeep

Monday, August 26, 2013

Expack continues exploiting Java vulnerability

Exploit kits available in the wild tend to follow a trend by exploiting vulnerabilities reported in various browser components which are commonly deployed. Recently, we have seen an increase in exploitation of a year old vulnerability reported in the JRE component of JAVA (CVE-2012-1723). Exploitation of this vulnerability in JRE allows a attacker to download malware onto a victim's machine and execute it. Let's looks at an analysis of such an exploit kit recently found in the wild.

Exploit Kit URL:
hxxp://174.142.240.91/577ac477f62d4873cf41dc834d107b7c/influences-portal.php

When accessed, the above exploit URL executes obfuscated JavaScript and loads an applet into the browser as shown below:


Obfuscated source code:


Let's analyze the above obfuscated JavaScript code by de-obfuscating it. While de-obfuscating the JavaScript code, we noticed that the code has multiple layers of obfuscation. For the scope of this article, lets skip ahead to the end of the de-obfuscation process. 

As usual, the exploit kit request loads content based on the version of the browser and versions of different plugins installed in a browser by running browser/plugin detection logic embedded in obfuscated JavaScript. The exploit kit targets vulnerabilities in JRE (Java) and Adobe components of the browsers.

Let's take a look at following de-obfuscated code which loads malicious applet into browser:


The following code calls the relevant functions above, depending upon the JRE version found on the victim's machine:


The applet is executed by the browser, which then downloads a malicious .jar file from following URL,

hxxp://174.142.240.91/577ac477f62d4873cf41dc834d107b7c/influences-portal.php?gKoRO=UfhqAFb&gCTEVgSTdQbZjI=wUkSXV 

The de-complied code of the downloaded .jar file is also heavily obfuscated. 


VT Result: 13 / 45
MD5:  361b0e1eab5e647315e6873ea16ca720

This .jar files exploits the vulnerability in the JRE, which allows the attacker to download additional malware and execute it the browser context.

 
 VT Result: 13 / 46 
MD5: a151fdce265ba4fcab1b36bd624d330f

A Trojan then connects to the CnC server by sending POST data and in response, the CnC server replies with 'STATUS-IMPORT-OK'.


After receiving command 'STATUS-IMPORT-OK' from the CnC server, The Trojan then downloads another malware file (6.exe) from the same domain which looks to be a variant of ZerooAccess rootkit. The detection rate for the '6.exe' is also fairly low on VT.
 
VT-Result: 6 / 46  
MD5: b152b3d170dc089b057fbbe3d6393764

Exploitation of browser components such as Java and Adobe plugins by exploit kits are now a very common reason for enterprise PCs to become compromised. My colleague Krishanan ise in Red Kit Exploit Kit Activity, which also addressed the same vulnerability in Java.It is vital that enterprises ensure that browser plugins are always patched and up to date, something enterprises regularly fail to do. In the case Java, given the now regular stream of 0days that it has inspired, you may want to seriously consider disabling Java altogether, at least at the browser level, something that you can read about in a previous blog post entitled: Are you vulnerable to yet another Java 0Day exploit?

Pradeep

Thursday, August 15, 2013

CookieBomb still dropping malicious content

Cookiebomb is malicious obfuscated javascript injected into legitmate sites.  We've talked on this blog about compromised sites before, but this one appears to still be fully functional and actively spreading malicious content to unsuspecting users.  The talent at MalwareMustDie is onto their shenanigans as well.  As they have mentioned, this is a multi-redirection exploitation that uses two stage obfuscation to hide it's malicious payload.  The curious thing about this situation is that few AV vendors have taken note of the good research.  The final dropped file is being detected by only 7/45 vendors.

Below is the analysis of a single sample taken from the final list of infected sites we have seen propagating this threat.

First, there is the obfuscation of a small JS inclusion into a potentially legitimate site.  This is where the CookieBomb sets a name, special variable, expiry date, and access path for the eventual infection.  If the cookie is not readily available, it will create one for you and redirect you to another obfuscated hidden iFrame.  Once the hidden site is visited, it will read the cookie's expiry date and provide redirection and infection at a later point to avoid security vendor detection.

Figure 1: Obfuscated Code
Please note that the comment at the top of the image ("/*0f24908*/") is changed and is not therefore useful for detection.
Figure 2: De-obfuscated code from Fig.1

In the deobfuscated code above, we see another URL delivered in a 1px iFrame.  Going to this site leads to yet another obfuscated page, where the real magic happens.  The very first thing that it does is attempt to confirm the version of browser plug-ins the attackers are up against.


Depending on the version installed, it will send the next portion of the attack.


The final step sends the malicious payload that the attackers went to so much trouble to obfuscate.  
 


Attack URLs


Obfuscated content from the obfuscated content

The final drop for this content is a malicious executable that is delivering a small Trojan.  At the time of research, only 7/45 vendors were detecting this content as malicious.



Fiddler session with malicious content being dropped.  (Readme.exe in this case.  Calc.exe in others.)


For the last several weeks, this attack has impacted the below sites:
    •  hxxp://www.citytavern.com/
    • hxxp://www.usadu.cz/park-en/
    • hxxp://bluen.de/jobborse/
    • hxxp://bluen.de/
    • hxxp://www.niblackfuneralhome.com/
    • hxxp://www.kinwindsor.com/
    • hxxp://www.mtldesign.net/
    • hxxp://javiervazquez.me/ernesto/fdjw3hv7.php
    • hxxp://www.cmfurniturerental.com/
    • hxxp://sdrs.splashtop.com/strs01/macupdatenotes/en-us/strs01.html
    • hxxp://www.nauticodiver.de/tauchbas.htm
    • hxxp://www.tmv-alsace-vtt.com/f/parcours.htm
    • hxxp://www.cmstaging.com/
    • hxxp://educationdegreeonlines.com/benefit-from-studying-with-the-laptop/
    • hxxp://www.gute-reise-berlin.de/aussteller.html
    • hxxp://lexespana.com/comunes                                                                                                          
    • hxxp://livehappylife.com/
    • hxxp://corpdeli.com/
    • hxxp://www.sudan-sudan.com/sudan/architecture-sudan-sudan.html
    • hxxp://www.cmfurniturerental.com/index.php?main_page=index&cPath=114&zenid=8557f58ea51118a7bd633015e3b954ec
    • hxxp://www.cherokeecountysc.com/id26.html
    • hxxp://www.gute-reise-berlin.de/startseite.html
    • hxxp://www.selbstversuch-spanien.de/
    • hxxp://educationdegreeonlines.com/
    • hxxp://www.nauticodiver.de/schule.htm
    • hxxp://bluen.de/uber-uns/
    • hxxp://www.nauticodiver.de/impresssum.htm
    • hxxp://www.imschuh.de/
    • hxxp://www.nauticodiver.de/preisliste.htm
    • hxxp://familyreunion.blackamericaweb.com/
    • hxxp://bluen.de/jobborse/spezialist-in-akustikversuch/
    • hxxp://www.uppertraining.com/blog/cisco-mobile-apps-cover-a-surprising-range-of-functionality/
    • hxxp://www.opheij.nl/contact.html
    • hxxp://www.hotelmirallac.com/castellano/tarifas.htm
    • hxxp://www.sugargrovechamber.org/member_listing/34/curt+john+karas,+cpa,+mba,+pc/
    • hxxp://www.kinwindsor.com/favicon.ico
    • hxxp://glassdoctor-denver.calls.net/?gclid=CPLt2r3F-LgCFUFyQgodZxwAjQ
    • hxxp://bluen.de/jobborse/spezialist-in-logistikplanung/
    • hxxp://dreamliftgifts.com/faq.html
    • hxxp://www.gute-reise-berlin.de/kontakt.html
    • hxxp://www.plomberiumpierrefonds.ca/robinets-de-cuisine/
    • hxxp://www.cerexagri.nl/
    • hxxp://www.mrbouncehouse.com/
    • hxxp://guia.lexespana.com/familia/servicio-domestico/extincion-del-contrato/
    • hxxp://www.nauticodiver.de/start.htm
    • hxxp://corpdeli.com/lunch-menu
    • hxxp://www.hotelmirallac.com/castellano/habitaciones.htm
    • hxxp://www.nauticodiver.de/
    • hxxp://www.heapoil.org
    • hxxp://www.mtldesign.net/aboutus.htm
    • hxxp://www.le-vieux-four.com/
    • hxxp://www.cleargridsolutions.com/developer.html
    • hxxp://www.horseridingfun.com/
    • hxxp://educationdegreeonlines.com/2013/07/

    The most notable site here is splashtop.com, however, the malicious content has since been removed.  Since AV seems to be uninterested in protecting against this threat, it is advisable to make sure your browsing is safe through other means.

    Technical Research: Krishnan Subramanian

    Tuesday, May 21, 2013

    Darkleech attack continues to grow

    The Apache Darkleech attack has been in the news for quite some time now. The first compromise that we identified in our transactions dates back to mid-March. This Darkleech exploit (aka Linux.Cdorked)  injects malicious redirections into a website that leads to a Blackhole exploit kit (BEK) landing page. Sucuri published up a great write up about the Darkleech infection mechanism on the server side.

    We are currently observing a considerable rise in websites being compromised due to this attack. The infected websites redirect to a version of the Blackhole Exploit Kit v2. We identified the following sites being compromised in the past week within observed Zscaler traffic:

    202.218.253.214
    bazzillbasics.com
    bigfishermanseafood.com
    clasificados.zocalo.com.mx
    colima.vendidoalas3.com.mx
    embarque.com
    kimindschool.com
    mapas.guiaroji.com.mx
    mediagazer.com
    middleschoolbook.com
    mpsrail.co.uk
    new.schoolnotes.com
    newsofthepast.com
    norwalkmedicalgroup.com
    reports.valeopartners.com
    studioartsdallas.com
    unit2.euro2day.gr
    v2.wallpaperzip.com
    www.264thegrill.com
    www.acadianabusiness.com
    www.alancristea.com
    www.aqua-medic.com
    www.aquapurawater.ca
    www.backroads.org
    www.beachcamsusa.com
    www.bsgco.com
    www.chicagohomeestates.com
    www.compactpowercenter.com
    www.companyrescue.co.uk
    www.eastpak.com
    www.euro2day.gr
    www.flowersandservices.com
    www.fortworthzoocoupons.net
    www.freedieting.com
    www.gite-mer.com
    www.grandlifehotels.com
    www.jackshainman.com
    www.momentumtraining.biz
    www.nevadasecuritylicense.com
    www.qualityenvironmental.co.uk
    www.ranabroadband.net
    www.rentalsource.com
    www.servo2go.com
    www.superiorvalves.com
    www.theacme.com
    www.trulia.com
    www.vbbound.com
    www.visit-montenegro.com
    www.volpifoods.com

    The following list shows the list of IPs and websites observed serving the Blackhole Exploit kit landing page.

    129.121.101.227
    129.121.104.90
    129.121.108.220
    129.121.113.217
    129.121.120.211
    129.121.168.226
    129.121.194.244
    129.121.199.90
    129.121.201.230
    129.121.45.181
    129.121.55.185
    129.121.61.189
    129.121.65.124
    129.121.85.166
    143.95.13.5
    143.95.1.6
    143.95.17.5
    143.95.1.8
    143.95.2.6
    143.95.7.6
    149.47.113.128
    149.47.149.225
    149.47.154.201
    149.47.205.179
    149.47.21.162
    149.47.218.128
    149.47.22.176
    149.47.225.171
    149.47.245.128
    173.233.133.30
    173.233.133.43
    173.233.134.138
    173.244.221.89
    174.37.210.122
    174.37.210.127
    208.166.50.27
    208.43.236.169
    208.69.183.138
    208.69.183.205
    209.126.248.63
    216.154.208.125
    64.247.176.220
    64.247.180.106
    65.75.145.203
    65.75.168.252
    65.75.174.197
    65.75.176.120
    65.75.184.70
    65.75.185.243
    65.75.188.211
    65.75.190.59
    67.213.213.23
    69.89.4.92
    69.89.5.224
    69.89.9.47
    adanakenthaber.com
    aftabcurrency.eu
    akmusik.org
    alzagh.com
    aminexchange.net
    austriawanderer.com
    basquet-atletico.lendanearlongisland.com
    boomchoon.co.uk
    budgettyremaintenance.co.uk
    cariparker.co.uk
    cinselmarket.org
    countryandleisureclothing.co.uk
    egyptwanderer.com
    elkadytrans.com
    firstbytemicro.com
    foryouroccasions.co.uk
    georgemediahouse.co.uk
    gheep.co.uk
    gshcontracts.co.uk
    hcxmy.com
    hungarywanderer.com
    lcwceramics.co.uk
    leventerkekkuaforu.com
    lovehost.co.uk
    moneystopltd.co.uk
    mpsrail.co.uk
    mtlssc.org.uk
    ondervreemdevlag.nl
    partitioningsoutheast.co.uk
    platjadarovirtual.com
    rika.100pixels.co.uk
    sms.nozom.com.eg
    teddyrepair.co.uk
    upminstercontainers.com
    wallpapers.animalz.gr
    wcwr.co.uk

    The following pattern in the URL was observed:

    \/[a-z0-9]{16,32}\/q.php

    We also identified the following user-agent strings when the redirection was made:

    Java/1.6.0_26
    JNLP/1.7.0 javaws/10.21.2.11 () Java/1.7.0_21
    JNLP/6.0 javaws/1.6.0_03 (b05) Java/1.6.0_03
    JNLP/6.0 javaws/1.6.0_26 (b03) Java/1.6.0_26

    The user agents found while visiting these infected sites were mainly: MSIE_7_X, MSIE_8_X and MSIE_9_X.

    Upon visiting an infected website, it redirects to a standard BEK v2 landing page as shown below.


    The exploit code targets vulnerabilities in multiple plugins including Adobe PDF and Java when run on IE, causing the attacker to load malicious code in the context of the application. When deobfuscating the PDF exploit, we can see the final URL used for redirection, as shown in the image below. However, this URL was not accessible (404 error response), at the time of writing, hence it was not possible to retrieve the malicious binary file.


    Upon revisiting some of these compromised websites, it was found that the page was no longer serving the injected code. This provides a clue. The attackers probably choose random sites running the Apache Webservers that are vulnerable to the dark leech exploit and infect them only for a brief period of time and then clean them up. Hence tracking Darkleech infections is can be a challenging task. For further details on the vulnerability and how the server can be patched, please refer to CVE-2012-1557.

    Wednesday, April 18, 2012

    French Budget Minister website hijacked

    We've seen an increase in hijacked websites in recent months, redirecting users to Fake AV pages, Blackhole exploit kits and other malware. While most websites hacked are personal sites, or University websites, some are more high profile.

    http://www.performance-publique.budget.gouv.fr/ hijacked

    The website of the French Minister of Budget (www.performance-publique.budget.gouv.fr) is an example of a high profile site that was recently hijacked. Obfuscated JavaScript was added at the top of the page. It is very similar to what we have seen on other websites. The obfuscation contains some tricks to break JavaScript scanning tools, such as making reference to browser objects, exceptions, etc.
    Malicious JavaScript inserted on the hijacked site

    The code creates an IFRAME to hxxp://nysbrtyjdjntytdrj7yn.rr.nu/?go=2. This address is not blocked by Google Safe Browsing at this time. I was not able to retrieve the content.
    Deobfuscated JavaScript


    The domain rr.nu has been widely abused. It has been linked to the Mac Flashback Trojan, previous Fake AV campaigns, etc.

    budget.gouv.fr is not the only governmental website that has been hijacked recently. In the last three months, we have seen many hijacked government sites including:
    • Australia: library.cgg.wa.gov.au, ofv.sa.gov.au
    • US: cityofhampton-ga.gov, sandy.utah.gov, governor.virginia.gov, letsread.cobbcountyga.gov, mississippi.gov, etc.
    • Philippines: car.dost.gov.ph
    • Colombia: acuavalle.gov.co, risaralda.gov.co
    • Malaysia: ipharm.gov.my
    Unfortunately, no website can be fully trusted anymore.

    Monday, January 16, 2012

    Popularity of Exploit kits leading to an increase in compromised websites

    The dominance of exploit kits like Blackhole, Incognito and others, continues to be seen in the wild. Attackers continue to use these exploit kits to generate malicious webpages and host them on various domains. These exploit kits usually targets browser and browser plugin vulnerabilities.

    To increase the likelihood of a successful attack, exploit kits are commonly used to infect legitimate sites that already have significant traffic. Attackers achieve this by crafting scripts designed to identify sites with injection vulnerabilities, which allow for hidden iFrames to be written, which then point to the exploit kit URL. When users visit the infected sites and are redirected to the browser exploit kits, a known browser or plugin vulnerability is typically used to download and execute malicious content without user knowledge. You can visit this related blog for more information about iFrame injection in detail.

    Recently, I’ve seen a spike in such compromised sites, which lead to exploit kit URLs. In most cases, the JavaScript code containing the hidden iFrame is heavily obfuscated. Different exploit kits have their own techniques to obfuscate malicious code. Let’s take look at a couple of examples and their respective de-obfuscated code.

    iFrame leading to Incognito exploit kit
    URL:
    hxxp://www.snapstudios.net/kitchen-set-hidden-behind-the-cupboard.html

    Obfuscated code:

    The aforementioned obfuscated code was injected at the start of the webpage. Let’s deobfuscate the code to make sense of it.

    De-obfuscated code:

    You can see that the deobfuscated code generates a hidden iFrame with the ‘src’ attribute being assigned the exploit kit URL. Generally, the visibility of the iFrame is kept hidden and dimensions are kept to a minimum, which ensures that the iFrames don’t alter the look and feel of the page.

    Exploit kit URL: hxxp://racingengines.osa.pl/showthread.php?t=63942072

    After observing patterns in the exploit URL, one can determine that this URL belongs to the Incognito Exploit kit.

    Suspicious URL Pattern: “/showthread.php?t=”

    Search results for the above pattern at www.malwaresomainlist.com confirms that URL belongs to the well known Incognito exploit kit. The exploit kit URL is still active but currently not delivering the malicious code. Visit this blog on Incognito exploit kit for more details.

    iFrame leading to Blackhole exploit kit
    URL:
    hxxp://steelrode.com/

    Obfuscated code:

    De-obfuscated code:

    Exploit kit URL: hxxp://brighttz.com/main.php?page=dac9bd89165e2708

    Suspicious URL pattern : /main.php?page=”

    Search results for the suspicious pattern at www.malwaredomainlist.com can be found here. The exploit kit URL is not currently active. We have been writing about the Blackhole exploit kit for some time. At present, this seems to be the favored exploit kit amongst attackers. You can find more information about the Blackhole exploit kit here.

    Fortunately, the aforementioned exploit kit URLs have been blocked by Google Safe Browsing. A sample Google diagnostic report of the Incognito exploit kit URL can be found here. While conducting research I came across a number of such compromised websites on a daily basis. Attackers continually alter obfuscated code to ensure that it is not yet detected by popular AV/IPS/IDS vendors. This keeps them one step ahead in this ongoing game of cat and mouse.

    To conclude, I would like to say,

    The growth in compromised websites is directly proportional to the growth in popularity of different exploit kits”.

    Pradeep