
SCF Advanced Search



Members
Stats
  • Total Posts: 34725
  • Total Topics: 10337
  • Online Today: 1522
  • Online Ever: 51419
  • (01. January 2010., 10:27:49)











Author Topic: Malware Hides in Installer to Avoid Detection  (Read 1133 times)

0 Members and 1 Guest are viewing this topic.

Pez

  • SCF VIP Member
  • Posts: 776
  • KARMA: 117
  • Gender:
  • Pez
Malware Hides in Installer to Avoid Detection
« on: 23. September 2016., 15:40:26 »
Malware Hides in Installer to Avoid Detection

At McAfee Labs we recently observed various threat families using the Nullsoft Scriptable Install System (NSIS). This practice is not new, but our analysis shows that several malware families are employing the same technique to hide their packed executable code. Usually every malware family uses its own polymorphic packers to obfuscate its payload. In this case four families have the same executable format to hide the malicious code.

The malicious NSIS package contains a DLL (acting as a decryptor and injector) and an encrypted executable payload. Once onboard an infected machine, the NSIS package drops a DLL and two data files and loads the DLL. The DLL decrypts the two data files and executes the final payload using process hollowing, a technique used by malware in which the original code is replaced with malicious code. If we were to analyze the DLL alone, we would not conclude that it was malicious because it relies on encrypted data in the two data files.

We found four malware families using this technique:
• Cerber
• Gamarue
• Kovter
• ZCrypt

Evading security products

Because the malicious payload and APIs are in encrypted and do not fall under any specific file formats, antimalware scanners will usually omit scanning these files. They also act as efficient hash busters and easily bypass emulation techniques. When these files are copied into other directories, the malware keep the NSIS file format to strengthen their defense. We also noticed that the decryption logic varies slightly among the malware.

Propagation

The malware are distributed via spam campaigns:



A ZIP archive contains the executable:



NSIS file identification

The start of the overlay+8 offset contains the “NullsoftInst” string:



Malicious NSIS package

The sample we analyzed has the following components inside the NSIS package.
• e: Data file contains encrypted APIs used for process hollowing.
• fsv: Data file contains the final encrypted payload.
• dll: Malicious DLL decrypts data files and executes the process hollowing.

The encrypted data file geanticline.e:



The decrypted geanticline.e:



The encrypted payload (tache.fsv):



The decrypted payload:



Decryption code for process hollowing APIs

Code in OpenCandy.dll decrypts both data files. The following code accesses the files:



The decryption key that unlocks the data file lies in the data filename itself. The decryption logic appears in the following screen:



An XOR operation decrypts the data file.

Decryption code for payload

We found the decryption key resides inside the DLL and varies among the malware families.

Decryption key location:



Decryption code:



Decryption logic for process hollowing

We employed python to write the decryption logic used by the malware. The encrypted data file path should be passed as an argument.

For each malware family, the value of MAXKEYINDEX can be changed or be equal to KEYLEN.



Decryption logic for payload



MD5 hash: 5AF3BED65AEF6F0113F96FD3E8B67F7A

I would like to thank my colleagues Sivagnanam G N and Manjunatha Shankaranarayana for their help with this analysis.

Original article: By Satish Chimakurthi on Aug 25, 2016
Their is two easy way to configure a system!
Every thing open and every thing closed.
Every thing else is more or less complex.

Start Turfing ! http://scforum.info/index.php/topic,8405.msg21475.html#msg21475

Samker's Computer Forum - SCforum.info

Malware Hides in Installer to Avoid Detection
« on: 23. September 2016., 15:40:26 »
Sponsored Links:




 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Name: Email:
Verification:
Listen to the letters / Request another image
Type the letters shown in the picture:
Second Anti-Bot trap, type or simply copy-paste below (only the red letters):www.scforum.info:

Enter your email address to receive daily email with 'SCforum.info - Samker's Computer Forum' newest content:

Terms of Use | Privacy Policy | Advertising
{"cc_re__cc_re__cc_by_4_0": ["src=\"http://scforum.info/images/twitter.gif\" alt=\"Twitter\"></img></a>\r\n</div>\r\n<br />\r\n<div align=\"center\">\r\n<a href=\"http://montenegrin-194580791267.spampoison.com\" target=\"blank\" rel=\"nofollow\">\r\n<img src=\"http://scforum.info/images/spampoison.gif\" alt=\"Spam Poison\"></img></a>\r\n</div>\r\n<br />\r\n<div align=\"center\">\r\n<a href=\"https://www.mywot.com/\" target=\"blank\" rel=\"nofollow\">\r\n<img src=\"http://scforum.info/images/wot.png\" alt=\"Friend of WOT\"></img></a>\r\n</div>\r\n<br />\r\n<div align=\"center\">\r\n<a href=\"http://creativecommons.org/licenses/by/4.0/\" target=\"blank\" rel=\"nofollow\">\r\n<img src=\"http://scforum.info/images/creativecommons.png\" alt=\"Creative Commons\"></img></a>\r\n</div>\r\n<br />\r\n<script>\r\n  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\r\n  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\r\n  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\r\n  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');\r\n\r\n  ga('create', 'UA-2383713-1', 'scforum.info');\r\n  g"], "copyright__copyright__copyright": ["a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.\n\nName: Email:\nVerification:\nListen to the letters / Request another image\nType the letters shown in the picture:\nSecond Anti-Bot trap, type or simply copy-paste below (only the red letters):www.scforum.info:\n\nEnter your email address to receive daily email with 'SCforum.info - Samker's Computer Forum' newest content:\n\nTerms of Use | Privacy Policy | Advertising"]}