Search this Blog

Loading...

Friday, February 13, 2015

Yet another ransomware variant


The blog post of today is a bit different than usual, as you can read the full post on the Panda Security blog. Read it here: Yet another ransomware variant

In this post I'm simply adding some additional information and repeating the most important points.

So, there's yet another ransomware variant on the loose. You may call this one Chuingam (chewing gum?) ransomware or Xwin ransomware - pointing to respectively the file with this string 'Chuingam' dropped, or in the latter case the folder on C:\ it creates. Or just another (skiddie) Generic Ransomware.

In the blog post above, I discuss the methodology to encrypt files it uses and how it creates your own personal key, as well as the ransom message and how to recover files (if you're lucky & fast enough).

pgp.exe (PGP) is used to generate the public RSA key. Since pgp.exe requires the RAR password, this is temporarily stored in the file "filepas.tmp" - which is overwritten and deleted, so no chance to recover this file.
 

process flow graph of pgp.exe (made using procDOT)





















As a note; it will (try to) encrypt any and all files with the following extensions:
jpg, jpeg, doc, txt, pdf, tif, dbf, eps, psd, cdr, tst,  MBD, xml,  xls, dwg, mdf, mdb, zip, rar, cdx, docx, wps, rtf, 1CD, 4db, 4dd, adp, ADP, xld, wdb, str, pdm, itdb, pst, ptx, dxg, ppt, pptx

If you've been infected with this ransomware, best thing to do is to either restore from a backup or try to restore previous files (also known as shadow copies).

For additional information in regards to this specific ransomware, refer to:
Yet another ransomware variant

For any further background information on ransomware or further prevention & disinfection advice, I refer to my Q&A on ransomware.





IOCs
Hashes (SHA1)
88039ecb68749ea7d713e4cf9950ffb2947f7683
7e1dd704684f01530307f81bbdc15fe266ffd8db

Domains/IPs
corplawersp.com
5.63.154.90

Sunday, November 16, 2014

Malware spreading via Steam chat

If you're only interested in how to remove this malware from your machine or other tips and prevention advise, click here. In case you have questions, issues or doubts, feel free to leave a comment and I'll be happy to help or answer any questions you may have. (you may have to click 'Load more...' to view all comments)


Today I was brought to the attention of a Tumblr post - apparently there's malware doing the rounds making use of Steam chat, (adding Steam friends and) spamming Steam users.

Example message:
"karpathos" sending a bit.ly link (Image source)




















Onyx is right, the link's indeed phishy and uses bit.ly (a URL shortener) to trick users into clicking it. Remember the worm that spread via Skype and Messenger last year? (reference here and here) This is a similar campaign.



Setup

Someone adds you on Steam, you accept and immediately a chat pops up as similar to above.

Alternatively someone from your friends list already got infected and is now sending the same message to all his/her friends.

The bit.ly link actually refers to a page on Google Drive, which immediately downloads a file called IMG_211102014_17274511.scr, which is in fact a Screensaver file - an executable.
The file is shared by someone named "qwrth gqhe". Looks legit.

Note that normally, the Google Drive Viewer application will be shown and this will allow you to download the .scr file. In this case, the string "&confirm=no_antivirus" is added to the link, which means the file will pop-up immediately asking what to do: Run or Save.
(and in some cases download automatically)

At time of writing, the file is actually still being hosted by Google Drive. I have reported it however.

Afterwards, you're presented with the screensaver file which has the following icon:
Image of IMG_211102014_17274511.scr file














Opening the file will result in installing malware on your system, which will steal your Steam credentials.



Technical details

IMG_211102014_17274511.scr

Meta-data
=======================================================================
File:    IMG_211102014_17274511.scr
Size:    1031168 bytes
Type:    PE32 executable for MS Windows (GUI) Intel 80386 32-bit Mono/.Net assembly
MD5:     138ec432db0dd6b1f52f66cc534303db
VirusTotal: link

Version info
=======================================================================
Translation: 0x0000 0x04b0
LegalCopyright: \xa9 Microsoft Corporation. All rights reserved.
Assembly Version: 6.0.6000.16384
InternalName: wrrrrrrrrrrrr.exe
FileVersion: 6.0.6000.16384
CompanyName: Windows (R) Codename Longhorn DDK provider
Comments: Office Licensing Admin Access Provider
ProductName: Windows (R) Codename Longhorn DDK driver
ProductVersion: 6.0.6000.16384
FileDescription: LICLUA.exe
OriginalFilename: wrrrrrrrrrrrr.exe


Connects to:
185.36.100.181


Server in Czech Republic. VirusTotal reference










Downloads and executes:
temp.exe

Meta-data
=======================================================================
File:    temp.exe
Size:    4525568 bytes
Type:    PE32 executable for MS Windows (GUI) Intel 80386 32-bit Mono/.Net assembly
MD5:     d0f8b90c85e5bedb691fca5c571a6794
SHA1:    cd9b3bf5c8d70e833b5c580c9b2fc1f3e5e4341e
VirusTotal: link


Version info
=======================================================================
Translation: 0x0000 0x04b0
LegalCopyright:
Assembly Version: 1.0.0.0
InternalName: vv.exe
FileVersion: 1.0.0.0
ProductVersion: 1.0.0.0
FileDescription:
OriginalFilename: vv.exe


Interesting information in the debug path, note the "steamstealer" string. Screenshot via PeStudio












Remediation

What if you clicked the link and executed the file? Follow these steps:


  • Exit Steam immediately
  • Open up Task Manager and find a process called temp.exewrrrrrrrrrrrr.exevv.exe or a process with a random name, for example 340943.exe or a process similar to the file you executed
  • Launch a scan with your installed antivirus
  • Launch a scan with another, online antivirus or install & scan with Malwarebytes
  • When the malware has been disinfected or deleted, change your Steam password - if you use the same password for other sites, change those as well
  • De-authorize any unknown machines, read how to do that here:
    Family Library Sharing User Guide
  • Verify none of your Steam items are missing - if so, it is advised to reinstall Steam as well.
    Note: move the Steamapps folder (default on C:\Program Files\Steam\Steamapps) outside of the Steam directory to prevent your games from being deleted
  • Contact Steam/Valve in order to get your items back:
    Send a ticket to Steam support




Prevention

  • Be wary when someone new adds you on Steam and immediately starts sending links
  • In fact, don't click on links someone unknown sends to you
  • If you did, don't open or execute anything else - just close the webpage (if any) or cancel the download
  • By default, file extensions are not shown. Enable 'Show file extensions' to see the real file type. Read how to do that here
  • Install WOT - WOT is a community-based tool and is therefore very useful for those fake screenshot websites, whereas other users can warn you about the validity.
  • Follow the tips by Steam itself to further protect your account:
    Account Security Recommendations




    Conclusion 


    Never click on unknown links, especially when a URL shortener service like bit.ly is used. (others are for example t.co, goog.gl, tinyurl, etc.)
    Don't be fooled by known icons or "legit" file descriptions, this can easily be altered.

    Even if you clicked the link and you're not suspicious, you should be when a file is downloaded and it's (in this case) a screensaver file.

    For checking what is really behind a short URL, you can use:

    For checking whether a file is malicious or not:

    Follow the prevention tips above to stay safe.


    Monday, November 10, 2014

    Thoughts on Absolute Computrace


    Introduction

    Not too long ago my friend and colleague from Sweden, Jimmy, contacted me in regards to a strange issue. In the firewall, he saw tons of outgoing connections to a certain server:

    Each second outgoing connection to search.namequery.com





















    A quick Google search revealed this was actually part of Absolute's Computrace tool - aka Absolute Persistence. Doesn't ring a bell? Try Lojack. From their website:

    List of BIOS & firmware compatibility: http://www.absolute.com/en/partners/bios-compatibility








    Why would this be an issue? First of all, there has been some excellent research by Anibal Sacco and Alfredo Ortega here: Deactivate the Rootkit, in which they describe attacks on BIOS anti-theft technologies, which Absolute also offers. An excerpt from their paper:

    In order to be an effective system, the anti-theft agent must be stealthy, must have complete control of the system, and most importantly, must be highly persistent because wiping of the whole system most often occurs in the case of theft.
    This activity is also consistent with rootkit behavior, the only difference being that rootkits are generally malicious, while anti-theft technologies act as a form of protection against thieves.

    Secondly, there has been research from Kaspersky as well on the subject, read their blog post here: Absolute Computrace Revisited

    I advise you to read their post, as it provides excellent information as well. I'm not going to repeat their research here, as it's pretty extended. What you should remember however:

    While Absolute Software is a legitimate company and information about Computrace product is available on the company's official website, the owner of the system claimed he had never installed Absolute Computrace and didn't even know the software was present on his computer. It could be assumed that the software was pre-installed by an OEM manufacturer or reseller company, but according to an Absolute Software whitepaper this should be done by users or their IT service. Unless you have a private IT service or your PC vendor took care of you, someone else has full access and control over your computer.

    Back to our post. After booting the machine and pressing F1 to access the BIOS settings, we are presented with the following screen:


    Lenovo ThinkPad (BIOS version: J9ET58WW)



















    This was the initial state of Computrace in the BIOS. The setting was Enabled and the state indicated Not Activated. This suggests Computrace is not active on the machine... Wrong!

    The Item Specific Help reads:

    Enables or disables the UEFI interface to activate Computrace module. Computrace is an optional monitoring service from Absolute Software.
    [Enabled] Enables the Computrace activation.
    [Disabled] Disables the Computrace activation.
    [Permanently Disabled] Permanently disables the Computrace activation.


    The machine was freshly bought and the user never ordered, installed or even heard of Computrace software. In this case, the reseller didn't install it either. This leaves the option the manufacterer or a possible previous owner [or someone else] installed Computrace.


    ... When we want to permanently disable Computrace:


    Computrace module activation warning



















    Here comes the fun part: even after permanently disabling the Computrace module, the software was still active and running; contacting the server (search.namequery.com) like crazy.

    I decided to contact Absolute Software in order to get an answer as to why this behaviour was occurring. Since neither of us are customers, I used the form here to contact them.

    After two days I got a reply from their customer service. In reply as to why permanently disabling didn't seem to work:

    It is also worth noting that many used or refurbished devices may have motherboards with a Computrace BIOS module that was activated by the previous owner.  In these cases, my recommendation would be the following:

    1.       Obtain and install any missing or outdated HECI\Intel Management\IMEI drivers from the manufacturer.  Once these drivers are in place, any potential Absolute software installed on the computer will correctly communicate with the BIOS and it should automatically deactivate itself over the course of a few days.

    2.       Contact the manufacturer and request a motherboard replacement.  Activated motherboards should not be re-sold by manufacturers or retailers if the necessary de-activation steps are not taken first.

    Reason for seeing numerous outgoing connections to their server is probably due to their module wanting to receive instructions from the server that the original license should no longer be active, or to download new binaries.



    Binaries & BIOS information & characteristics

    There's already a good list available by Kaspersky which I'm not going to repeat here. You can find that list on this link.

    However, the following points are worth noting:


    • Two new binaries (different hashes) have been identified:
      ad73c636bb2ead416dfa541a74aea016 (wceprv.dll)
      4011590af6f13a42a869ae57d6174f4f (rpcnetp.exe)
    • Several files are packed with UPX
    • The wceprv.dll module has a Digital Signature which is issued to
      Absolute Software Corp. 
      Serial Number: 35:ba:ec:87:59:d7:84:62:c3:d2:b7:ff:d4:c4:6e:51
    • Machines will have an altered Master Boot Record (MBR); this is because Computrace parses the MBR and partition table - it writes some data into the sectors before the primary partition. According to the patent (US 20060272020 A1):
      In another embodiment, the CLM is stored in a substitute Master Boot Record (MBR), or a combination of the foregoing.


    CLM or Computrace Loader Module is one of Computrace's main modules. (besides the Adaptive Installer Module (AIM) and the Communications Driver Agent (CDA) - see the patent for reference)




    How to determine if you have Absolute Computrace installed

    First things first: check in the BIOS if there's a mention of Absolute Computrace somewhere:
    (re)boot your machine and access the BIOS with one of the Function keys on your keyboard. 

    Typically, this is F2, but may differ. See here for a complete list:
    BIOS Setup Utility Access Keys for Popular Computer Systems


    Secondly, see if any of the files mentioned in Kasperky's blog post are running or exist on the file system. For the full list see here, but keep in mind the two new additional hashes added above.
    Note that new hashes may pop-up as well.


    Thirdly, network activity as mentioned in above blog post.
    (but mainly to search.namequery.com or 209.53.113.223)




    How to remove or uninstall Absolute Computrace

    I won't provide any specific information on how to remove or uninstall Computrace, as its main purpose is still - and I quote:

    [...] to perform preemptive and reactive security measures to safeguard a missing, lost, or stolen device and the data it contains. With Computrace Mobile you can determine the location of the device and whether or not it’s on the move. You can also freeze it to prevent unauthorized access and send a message to the user to validate the status of the device. If the device contains important information, you can remotely retrieve files or delete them immediately. And you can generate an audit log of the data that’s been removed so you can prove compliance with corporate and government regulations.


    However, should you have bought (what you believe is) a new machine and it is apparent Computrace is active, download the latest drivers fit for your system:
    Download BIOS drivers  Also find information on How to Update Your Computer's BIOS.

    When correctly executed and the option for Computrace in the BIOS is set to Permanently Disabled, it should correctly disable itself - taken into account the original license has expired or the original owner deactivated it, if existent.

    Another option would be to request a motherboard replacement for your machine, as suggested above. Additionally you may reinstall the Operating System afterwards.




    Absolute Computrace FAQ


    Is Computrace malicious?
    No.



    Which devices does Computrace support and may be installed on?

    (Source)
















    So yes, it's possible Computrace is installed on any other of your (mobile) devices. If you're looking for pointers, once again look for outbound connections to *.namequery.com or *.absolute.com.



    Which firmware or BIOS brands does Computrace support and may be installed on?

    • Acer
    • Apple
    • ASUS
    • Daten
    • DELL
    • Fujitsu
    • GammaTech
    • General Dynamics Itronix
    • Getac
    • HP
    • Lenovo
    • Microsoft
    • Motion
    • NEC
    • Panasonic
    • Samsung
    • Sony
    • Toshiba
    • Winmate
    • Xplore Technologies





    How recent was the Computrace agent variant you found?
    I added this question as to compare it with Kaspersky's binary- which was compiled in June 2012


    This variant of the Computrace agent was compiled in May 2012 (assuming it's not altered)














    Another version of Computrace was found. Note that this is possibly due to small updates of the loader or agent module.



    Will flashing the BIOS remove Computrace?
    No, as it resides in a non-flashable portion of the BIOS.



    Will downloading the latest BIOS drivers for my machine remove Computrace?
    See "How to remove or uninstall Absolute Computrace".



    I'd like to see more information about my BIOS/EFI/coreboot/firmware/optionROM.
    You can use the excellent tool flashrom. If you are using anything but Windows, Anibal and Alfredo have also written a Python program to to dump the BIOS firmware and search for a CompuTrace Option ROM: dumpComputrace.py (Note: you'll need to apt-get flashRom/dmiDecode/UPX)



    What if I'm a customer of Computrace and have doubts or want more information? 
    Best thing to do is call them directly: +00 1 877 337 0337 (US number), choose option #1. The general number in Europe is: +44 118 902 2005 and for Asia: +65 6595 4594

    More information on how to contact them as existing customer can be found here:
    Absolute Software Support



    What if I'm not a customer of Computrace and have doubts or want more information?
    You can still use the numbers above if you like, or you can use the Absolute Software Contact Form.



    What if I suspect I bought a stolen machine which has Computrace installed?
    Contact Absolute Software (see above)! They will set up a case together with you and law enforcement.



    Is there similar software out there like Computrace?
    Yes, but it is not exactly the same as Computrace. An example is Prey. Another example is Intel's Anti-Theft Technology - which apparently will cease to exist in January 2015. Source:
    Intel Anti-Theft Service FAQ

    Nowadays, most Antivirus vendors also offer some form of anti-theft. For more information, refer to the corresponding websites of the vendors.



    Why did you decide to write this blog post?
    To provide even more additional & useful information, as well as out of sheer interest.



    Do you have any additional information to share? 
    Yes, see right below in the Resources section.




    Resources

    Absolute Software - Perspective on Kaspersky Report & FAQ
    Absolute Software - Persistent servicing agent  (Patent US20060272020 A1)
    Corelabs - Deactivate the rootkit (PDF)
    Kaspersky - Absolute Computrace Revisited
    Kaspersky - Absolute Computrace: Frequently Asked Questions





    Acknowledgements

    I'd like to thank, in no particular order:


    • Anibal Sacco and Alfredo Ortega for their initial research.
    • Alfredo Ortega for a refreshing chat and answering some additional doubts I had.
    • Vitaliy Kamlyuk and Sergey Belov for their additional/follow-up research.
    • Absolute Software's service desk/support specialists for their service & answering any questions I had.

    Thank you for reading.


    Sunday, September 21, 2014

    A word on CosmicDuke


    On Thursday F-Secure released a blog post on CosmicDuke. But what is CosmicDuke exactly?

    CosmicDuke - the first malware seen to include code from both the notorious MiniDuke APT Trojan and another longstanding threat, the information-stealing Cosmu family. When active on an infected machine, CosmicDuke will search for and harvest login details from a range of programs and forward the data to remote servers.
    Source: COSMICDUKE: Cosmu with a twist of MiniDuke (PDF)

    In other words, it will (attempt to) steal your login credentials from browsers and any other programs you may or may not use. I was interested to take a look, queue how Twitter comes in handy:



    In this post we'll be focusing on sample 82448eb23ea9eb3939b6f24df46789bf7f2d43e3 - which supposedly handles about the EU sanctions against Russia.


    When opening the document:

    (Source)


















    When you open the document with macros disabled:














    Seems they got prepared in case anyone disabled macros. Think this is a legit Word document?
    Nope.

    When you open the document, there's actually a child process spawned (tmp4D.tmp) which also loads a file called input.dll:


    Don't be fooled by the company name or description,
    this isn't IIS Express Worker Process nor has it anything to do with Microsoft.









    We'll soon see what all this does. First, I'd like to provide some background information. The file's a .docx file, which means it is a combination of XML architecture and ZIP compression for size reduction and was implemented when Office 2007 was introduced. Why is that relevant?

    Because you can unzip (with 7-zip for example) any Office file with the new extension:
    (.docx, .xlsx, .pptx, ...)


    Unzipped content of a .docx file











    Thus, you can have a peek inside the document without actually opening it. If we look inside the "word" folder from our document, we can see the following (note the highlighted entries):
    Unzipped content of  our .docx file


    As you can see, there are 3 extra files there, 2 DLL files and a BIN file. Those files are embedded into the Word document. The BIN file loads an OLE , which then loads either the input.dll or input64.dll file, depending on your Operating System architecture. (in other words, the Office macro loads a malicious binary file.)

    If you're interested in what the OLE artifact contained, here's a Pastebin link:

    Afterwards, the malware tries to kill the following processes:
    cmd.exe
    savadminservice.exe
    scfservice.exe
    savservice.exe
    ekrn.exe
    msseces.exe
    MsMpEng.exe
    dwengine.exe
    ekern.exe
    nod32.exe
    nod32krn.exe
    AvastUi.exe
    AvastSvc.exe
    kav.exe
    navapsvc.exe
    mcods.exe
    mcvsescn.exe
    outpost.exe
    acs.exe
    avp.exe

    It will then try to gather as much data as possible, from cookies to files containing *psw*;*pass*;*login*;*admin*;*sifr*;*sifer* or *vpn. Soon after your data will be uploaded to an FTP server... Which wasn't too hard to find.

    Anyways, here's some additional information on the Word file by automated tools:
    MalwareTracker Result
    VirusTotal Result



    Prevention



    Conclusion

    It seems obvious that malware authors are keeping up-to-date with the latest news and as such adapting their campaigns as well. Better be safe than sorry and don't trust anything sent via email. ;-)

    If you're in an organisation, you might want to consider blocking the execution of all macros (or only the ones that are digitally signed) by using GPO. You can find those templates here:



    Resources

    Friday, September 5, 2014

    Analysing Android files



    In this post I'll simply be listing several tools to analyse (malicious) Android files. All tools or scanners listed are free to use.

    Someone commented how to be able to analyze files from the Google Play store without actually installing/downloading them directly to your phone (or, for example, you don't use Android). Therefore, you can use APK Downloader. It will fetch the APK for you - you'll then be able to analyze or scan it without the need to install.

    If you have knowledge of more free tools or scanners for Android files (.apk), then feel free to comment and I'll add them.



    Online tools


    AndroTotal









    http://andrototal.org/




    Anubis




    http://anubis.iseclab.org/





    Apk Analyzer





    http://www.apk-analyzer.net/




    ApkScan











    http://apkscan.nviso.be/




    Android APK Decompiler







    http://www.decompileandroid.com/




    AVC UnDroid










    http://www.av-comparatives.org/avc-analyzer/




    VirusTotal









    https://www.virustotal.com/en/





    Offline tools


    AndroGuard




    https://code.google.com/p/androguard/




    Android-apktool





     http://code.google.com/p/android-apktool/




    Android SDK





     http://developer.android.com/sdk/index.html




    Apkinspector






    https://github.com/honeynet/apkinspector/






    Dex2jar





    http://code.google.com/p/dex2jar/