Poweliks is a fileless malware that infects computers and displays advertisements to generate revenue for its operators. It has evolved since 2013, starting as the file-based Wowliks and transforming into a registry-based threat known as Poweliks that exists solely in the registry. Poweliks uses novel techniques like registry protection, CLSID hijacking, and a zero-day privilege escalation to compromise computers. It has increased its capabilities over time, adding error reporting and using PowerShell to maintain persistence without requiring files. Poweliks infects computers to silently view ads in hidden browser windows, earning money for each ad shown while also potentially distributing other threats through malicious ads.
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
The Evolution of the Fileless Click-Fraud Malware Poweliks
1. SECURITY RESPONSE
The fileless nature of Poweliks makes it unique, but
the threat also uses several other novel techniques to
compromise infected computers.
The evolution of the fileless
click-fraud malware Poweliks
Liam O’Murchu,
Fred P. Gutierrez
Version 1.0 – June 9, 2015
2. CONTENTS
OVERVIEW...................................................................... 3
The evolution of Poweliks.............................................. 5
Wowliks.................................................................... 5
Poweliks 1.0............................................................. 6
Poweliks 1.7............................................................ 10
Tricks and innovations................................................. 17
Registry protection................................................. 17
CLSID hijacking...................................................... 17
Fileless persistence................................................ 18
Zero-day privilege escalation................................. 18
Advertisements...................................................... 20
Potential ties - Poweliks and other malware �������������� 23
Conclusion.................................................................... 25
Resources..................................................................... 25
Appendix...................................................................... 28
Vulnerabilities discovered...................................... 28
Wowliks sample metadata..................................... 28
Poweliks 1.0 sample metadata.............................. 28
Poweliks 1.7 sample metadata.............................. 28
C&C domain name system (DNS) information 29
Poweliks 1.0 Powershell script .............................. 33
Poweliks JavaScript from summer, 2014 ������������� 33
Poweliks 1.7 Powershell script .............................. 33
3. Trojan.Poweliks is a fileless threat that first caught the attention of researchers when it
moved from being a file-based threat, known at that time as Wowliks, to a registry-based
threat in 2014. As a fileless threat, Poweliks does not exist as a file on a disk, but instead it
resides solely in the registry. This means that it cannot be deleted from the compromised
computer in the traditional sense. Although we have seen in-memory-only threats before,
many do not have a persistence mechanism, so they can be removed once the computer has
been restarted. However, Poweliks only uses the registry as a persistence mechanism, and
it was this unique trait that brought it to the attention of researchers.
The fileless nature of Poweliks makes it unique, but the threat also uses several other novel
techniques to compromise infected computers. Poweliks uses a special naming scheme to
hide in the registry and has consistently used CLSID hijacking as runtime load points in the
registry. We also observed Poweliks using a zero-day privilege escalation exploit in order
to take control of the compromised computer. We reported this vulnerability to Microsoft
and it was subsequently patched in January’s Patch Tuesday updates as Microsoft Windows
CVE-2015-0016 Remote Privilege Escalation Vulnerability (CVE-2015-0016).
The exact same zero-day exploit was being used by Trojan.Bedep at the exact same time as
it was being used by Poweliks. This unusual link between Poweliks and Bedep may be tied to
the fact that Bedep is an in memory-only downloader and has a similar coding style. In fact,
Bedep has been observed downloading and installing Poweliks (along with other threats) on
compromised computers. However, there is no conclusive evidence linking the authors of
Poweliks and Bedep together.
Once Poweliks is in place on a compromised computer, it acts as a click-fraud botnet.
It silently visits web pages in a hidden browser window and displays advertisements
in that window. The Poweliks controllers get paid for every advertisement shown and
although the amount earned per ad is small, the compromised computers are capable of
showing thousands of ads per day. An added complication for victims of Poweliks is that
the advertisements shown can contain malicious content themselves. This means that
a computer compromised with Poweliks will often end up with numerous other threats,
including ransomware, running on the computer. In many cases we have seen ransomware
downloaded on to computers through these malicious advertisements that Poweliks visits
in the background. Over the past six months, we have seen Poweliks attempt to infect over
198,500 computers. More than 99.5 percent of these infections have been in the United
States.
This paper will further discuss the technical aspects of Poweliks, its use of the zero-day
exploit, and its economic model.
OVERVIEW
5. Page 5
The evolution of the fileless click-fraud malware Poweliks
The evolution of Poweliks
Poweliks has undergone significant changes since the fall of 2013. Table1 highlights some of the major changes
that occurred during Poweliks’ evolution.
Wowliks
Poweliks is derived from a threat named Wowliks, which was first seen in 2013. Code used in Wowliks still
survives in the current iteration of Poweliks. For example, Wowliks and Poweliks use similar code to connect to
command-and-control (C&C) servers, delete their own malicious files, and hijack CLSIDs.
Connecting to command-and-control servers
Wowliks and Poweliks use similar code with similar formatting to contact their respective C&C servers. The
function used to determine whether or not the threat is running on a 32-bit or 64-bit computer is the same. Both
pieces of malware sent identical status messages back to the C&C server. Finally, they used the same code to
determine the version of the operating system on the compromised computer. The images in Figures 1 and 2
illustrate the similarities in how Wowliks and Poweliks contacted their servers.
Figure 1. Wowliks in fall 2013
Table 1. Poweliks’ evolution over one year
Functionality Wowliks (fall 2013) Poweliks (summer 2014) Poweliks (fall 2014)
Infection method File-based In memory In memory
Configuration data On disk In memory In memory
Watchdog injection Explorer.exe Dllhost.exe Dllhost.exe
Injection data DLL file on disk Registry Registry
Reported ID Computer GUID UuidCreateSequential UuidCreateSequential
Install Windows updates Yes Yes
Persistence method DLL file on disk Registry Registry
Error reporting Low Medium High
Zero-day exploit Yes
6. Page 6
The evolution of the fileless click-fraud malware Poweliks
Alternate data streams
Wowliks has the ability to execute from within an alternate data stream. Once inside the alternate data stream,
Wowliks proceeds to delete the original malicious file. It also drops a DLL file with 32-bit and 64-bit versions
and uses a specific method to test the current user’s permission level. Wowliks can also modify the registry’s
permissions in order to hijack CLSIDs. These techniques were found in version 1.5 of Wowliks in 2013 and
currently live on in Poweliks.
CLSID hijacking
Wowliks uses a registry key that is not typically used as a load point by malware. It uses CLSID {FBEB8A05-BEEE-
4442-804E-409D6C4515E9}, more commonly known as “ShellFolder for CD Burning.” When the compromised
computer is restarted, the setting in this CLSID is executed. In Wowliks’ case, the dropped DLL is injected into
explorer.exe as a “watchdog” thread to maintain persistence on the compromised computer. If the registry is
cleaned, the watchdog thread will simply compromise the computer again. Once Wowliks has compromised the
computer, it will contact malicious C&C servers and wait for commands. The current version of Poweliks makes
use of these ideas and techniques while using them to achieve its own ends.
Poweliks 1.0
Poweliks 1.0
emerged in
early 2014. The
major evolution
from Wowliks to
Poweliks 1.0 saw the new version of the
threat install itself into the registry as a
fileless and obfuscated threat.
Table 2 describes the structure of the
POST requests that Poweliks uses to
communicate with its C&C server.
This version of Poweliks gained another
interesting trait; it could now partially
secure the compromised computer. It
accomplishes this by downloading the
following Windows updates and tools
from the official Microsoft website:
Figure 3. Poweliks registry entry
Figure 2. Poweliks in summer 2014
Table 2. The structure of the POST requests used by Poweliks to
communicate with its C&C server
Parameter Value
URL http://[C&C]/q
[C&C] 178.89.159.34, 178.89.159.35
Data string type=[A]aid=[B]id=[D]&os=[E]_[F]
[A] Start–The compromise of the computer has begun
Exist–Status of the alternate data stream portion of installation
Low–Low privilege level
Install–Installation complete, the computer is compromised
error_%u_%x_%x–Debug values of where installation failed
[B] Hardcoded value
[C] Build date hardcoded into the threat, in MMDDYY format
[D] Calculated value, possibly as a bot or install ID
[E] OS version including major/minor/build version
[F] 32-bit or 64-bit
7. Page 7
The evolution of the fileless click-fraud malware Poweliks
• Windows PowerShell 2.0 and WinRM 2.0 for Windows Vista for x64-based Systems
• Windows PowerShell 2.0 and WinRM 2.0 for Windows Vista
• Update for Windows Server 2003 x64 Edition
• Microsoft .NET Framework 2.0 Service Pack 1 (x64)
• Update for Windows XP (x86)
• Microsoft .NET Framework 2.0 Service Pack 1 (x86)
While the tools and
updates seem like they
could be beneficial,
Poweliks downloads and
installs these files for its
own nefarious purposes.
The files are downloaded
and installed with the “/
quiet” and “/norestart”
flags to keep them hidden
from the user. Poweliks
installs PowerShell so it can
remain persistent on the
compromised computer.
It uses the PowerShell
program along with an
embedded PowerShell
script to load a DLL into
memory which serves as a
“Watchdog” to ensure that
Poweliks remains installed
on the compromised
computer. It does this by
constantly checking the
Poweliks registry subkey
to make sure it is still in
place. The full script can be
found in the Appendix as
“Poweliks 1.0 Powershell
Script.”
Poweliks will continue
and replace the “{ps_
shellcode}” string with a
Base64-encoded Watchdog
DLL file. The Watchdog
DLL file will be discussed
in more detail in this
report. This is the same file
that is used to maintain
persistence on the
compromised computer. It
takes this new PowerShell
script and runs it through
another round of Base64
encoding, creating Script
1. Script 1 is then placed
into JavaScript to create
Script 2.
Figure 5. How Poweliks is encoded
Figure 4. Partial Powershell script
8. Page 8
The evolution of the fileless click-fraud malware Poweliks
Script 2 is then run through an encoder using COM programming.
The new value from the COM-encoded Script 2 will be added to the registry as the following registry entry:
• HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionRun”a” = “#@~^ZXgAAA==W!x^DkK...”
This is then used
as part of Poweliks’
fileless autostart
mechanism. At this
point, Poweliks will
use an alternate
data stream to
delete the original
file and load the
Watchdog DLL into
memory. From this
point on, Poweliks is
truly fileless. Figure
7 illustrates how
Poweliks operates
from inside the
registry.
Poweliks also found
a way to creatively
protect itself in
memory. In certain
variants of Poweliks
where a different
registry entry is used
as an automatic
load point, Poweliks
creates an extra
registry subkey, seen
in the Figure 8.
Figure 6. Script 2 encoded using COM programing
Figure 7. Poweliks maintains its registry entries to ensure persistence
9. Page 9
The evolution of the fileless click-fraud malware Poweliks
The protection mechanism used here prevents the subkey from being opened. This in turn prevents the subkey
from being deleted. This is achieved when Poweliks creates a registry subkey in Unicode with an ObjectName of
0608 that prevents users, even those with administrator privileges, from reading or deleting it. With tricks like
these, it is obvious that the creators of Poweliks have an intimate knowledge of the Windows registry.
Watchdog
The Watchdog DLL launched from the registry entry is loaded every time Windows starts. The Watchdog process
starts Windows’ dllhost.exe and injects itself into it. With the process loaded in memory, another thread is used
to make sure that the relevant registry load points are continuously primed to load Poweliks. This module is
Figure 9. Registry subkey created in Unicode to protect Poweliks
Figure 8. Extra registry subkey to protect Poweliks in memory
10. Page 10
The evolution of the fileless click-fraud malware Poweliks
packed differently than the main installer component and uses the MPRESS packer.
The Watchdog process is also responsible for contacting the malicious C&C server. This module will send a
similar string to the C&C server, but in this case, the “type” parameter will be “cmd” (command). This means that
it will expect the C&C server to return a command.
As seen in Table 3, Poweliks only supports a
few commands with different options. It can
reinstall registry load points, download and
execute files, and call other commands. One
of the files it downloads and executes can
install an ad-clicker module into memory.
Poweliks 1.7
In the fall of 2014, we discovered more Poweliks samples. Even though the data string being sent to the C&C
server indicated that it was Poweliks 1.0, there were a few minor differences to the installer component. For one,
the Poweliks 1.7 sample has the capability to execute from within an alternate data stream in order to delete the
original malware, regardless of permission levels. This differs from Poweliks 1.0 which used an alternate data
stream to delete the original malware, but was dependent on permission levels.
The newer version of Poweliks checks for certain environmental variables such as ddata and udata. It was also
sending the following new “type” messages to the C&C server:
• type=debug_um3_lse5_%u_%x
• type=debug_um3_lr_%u_%x_%s
• type=exist_%s_%s_%s
These messages serve a similar purpose to the “type” messages previously described in Table 2. Poweliks
1.7 reports back the current status of the malware including errors and the contents of the ddata and udata
variables.
The PowerShell and JavaScript scripts, used by Poweliks to allow the threat to remain fileless with its Watchdog
process, were updated as well. The Powershell script now replaces the “{loader}” string instead of the previously
replaced “{ps_shellcode}” string. As far as the JavaScript is concerned, the Microsoft downloads have also been
copied into the script, most likely for redundancy purposes.
The biggest difference between Poweliks 1.7 and Poweliks 1.0, however, is the use of a zero-day exploit, which
will be discussed in this report.
Command-and-control servers
Despite the fact that the malware version still claims to be 1.0, a new “type” message has been introduced
in Poweliks’ communications with its C&C server. The “type” parameter can now be “debug_um3_
Egpname_%x_%x” and “debug_um3_%s” where “%s” can be “lowok” or “reinstok” depending on a permissions
check using process tokens and the security identifier of the user. It will compare the user’s SID with the
“SECURITY_MANDATORY_MEDIUM_RID” value in order to see what permission levels have been granted to the
user.
Watchdog
In Poweliks’ quest to remain fileless, the threat removed the functionality to write downloaded files to the disk.
This is likely done to ensure that its files cannot be mistakenly written to disk.
Ad-clicking component
This is the component responsible for covertly loading hidden advertisements and allowing Poweliks to click on
the loaded ads. The following is the HTTP request format, used by the ad component:
[http://][SERVER]/query?version=1.7&sid=[AID]&builddate=[BUILDDATE]&q=[KEYWORD]
&ua=[UA]&lang=[LANG]&wt=[THREADS]&lr=[LASTRESULT]&ls=[LASTSTAGE]
Table 3. Poweliks commands
Command Result
config Reinstall registry load points, including an unreadable subkey
load Call the “config” command
Download and create a temporary file
Execute a temporary file every five minutes
11. Page 11
The evolution of the fileless click-fraud malware Poweliks
The notable parameter here is “q”, which takes in a keyword to select an ad type.
The ad types run the gamut from anti-aging to car insurance to male supplements, and even to rheumatism.
When Poweliks requests an ad, the C&C server will send down the appropriate configuration file that contains
the associated advertisement.
With this component, Poweliks targets even more processes, instead of only dllhost.exe, so that it can inject
itself into many others too. Poweliks 1.7 may inject itself into any of the following processes in the %System32%
directory:
• cmmon32.exe
• ctfmon.exe
• dllhost.exe
• dllhost3g.exe
• dplaysvr.exe
• dpnsvr.exe
• dvdupgrd.exe
• fixmapi.exe
• logagent.exe
• msfeedssync.exe
• napstat.exe
Figure 10. Advertisement types
12. Page 12
The evolution of the fileless click-fraud malware Poweliks
• regsvr32.exe
• rundll32.exe
• shrpubw.exe
• svchost.exe
• systray.exe
• upnpcont.exe
• wextract.exe
• wiaacmgr.exe
In order to perform its ad-clicking behavior in the context of the browser, Poweliks 1.7 needs to lower, and in
some cases, disable browser security settings. It accomplishes this by modifying a large number of key registry
entries.
Table 4. Modifications to HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerMain
Registry entry Value Result
noprotectedmodebanner 1 Disables protected mode warning
ie9runonceperinstallcompleted 1 Disables Internet Explorer 9 “welcome” page
ie9tourshown 1 Disables Internet Explorer 9 tour
Table 5. Modifications to HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionInternet Settings
Registry entry Value Result
certificaterevocation 0 Disables the server certificate revocation check
Iehardennowarn 0 Disables the Internet Explorer Enhanced Security Configuration
warnonbadcertrecving 0 Disables warnings about invalid site certificates
warnonzonecrossing 0 Disables the warning about switching between secure and insecure mode
warnonpostredirect 0 Disables warnings about redirecting submitted forms
Table 6. Modifications to HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerLowRegistry
DontShowMeThisDialogAgain
Registry entry Value Result
Displaytrustalertdlg 0 Disables Internet Explorer 8 Enhanced Security Configuration and the “display content was blocked”
dialog box
Table 7. Modifications to HKEY_CURRENT_USERSoftwareMicrosoftWindowscurrentVersion
Internet SettingsZonemap
Registry entry Value Result
ieharden 0 Disables Internet Explorer Enhanced Security
Table 8. Modifications to HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersion
Internet SettingsURL History
Registry entry Value Result
daystokeep 0 Sets the number of days to keep pages in history
13. Page 13
The evolution of the fileless click-fraud malware Poweliks
Table 9. Modifications to HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerMain
Registry entry Value Result
smoothscroll 0 Disables smooth scrolling
show image placeholders 0 Stops showing image download placeholders
noupdatecheck 0 Disables automatic Internet Explorer updates
usethemes 0 Disables visual styles buttons and controls in web pages
force offscreen composition 0 Forces off-screen compositing, even under the Terminal Server
Table 10. Modifications to HKEY_CURRENT_USERSoftwareMicrosoftInternet Explorer
Registry entry Value Result
smartdithering 0 Disable smart image dithering
autosearch 0 Disables search
Table 11. Modifications to HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersion
Internet SettingsZones3
Registry entry Value Result
1001 3 Prohibits the download of signed ActiveX controls
1004 3 Prohibits the download of unsigned ActiveX controls
1200 0 Auto runs ActiveX controls and plug-ins
1201 3 Prohibits initializing and scripting of ActiveX controls not marked as safe for scripting
1206 0 Allows for scripting of Internet Explorer web browser control
1208 0 Allows previously unused ActiveX controls to run without prompt
1209 0 Allows scriptlets
1400 0 Permits Active scripting
1401 0 Permits ActiveScriptingInternet
1402 0 Permits scripting of Java applets
1405 0 Runs ActiveX controls marked as safe for scripting
1406 0 Allows data access across domains
1407 0 Allows programmatic clipboard access
1409 3 Prohibits the cross-site scripting (XSS) filter from being enabled
1601 0 Submits non-encrypted form data
1604 0 Auto download fonts
1606 0 Allows userdata persistence
1607 0 Navigate sub-frames across different domains
1608 0 Accepts auto-refresh
1609 0 Displays mixed content
1800 3 Prohibits the installation of desktop items
1802 3 Prohibits files from being dragged, dropped, copied, or pasted
1803 3 Prohibits file downloads
1804 3 Prohibits programs and files from being launched in an iframe
1809 3 Prohibits the use of pop-up blocker
1A02 0 Auto accepts to allow persistent cookies to be stored
1A03 0 Auto accepts per-session cookies (not stored)
1A04 0 Disables prompts for client certificate selection when no certificates or only one certificate exists
1A06 0 Auto accepts third-party session cookies
1A10 0 Auto permits privacy settings
1C00 0 Auto allows Java permissions
14. Page 14
The evolution of the fileless click-fraud malware Poweliks
After the registry changes are made to the internet zone, the compromised computer’s browser security is
seriously weakened. The compromised computer may now be vulnerable to cross-site scripting (XSS) attacks and
the arbitrary execution of malicious ActiveX code and Java applets. Poweliks 1.7 will even disable downloads
with changes to the “1803” entry.
After Poweliks has been properly installed, the compromised computer will no longer show the dialog box in
Figure 11 to the user.
Poweliks 1.7 can also hook various
functions. Once Powelik’s own custom
functionality is finished, it passes
control flow back to the real API.
Poweliks makes sure everything
is properly hooked by calling the
FlushInstructionCache API. This API
ensures that Poweliks is executing the
current update of its instructions.
1E05 0 Auto permits software channel permissions
2000 0 Permits binary and script behaviors
2001 0 Runs components signed with authenticode for .NET Framework-reliant components
2004 3 Prohibits components not signed with authenticode from being executed
2100 3 Prohibits opening files based on content, and not file extensions
2101 0 Allows web sites in less privileged web content zones to navigate into this zone
2102 0 Allows script-initiated windows without size or position constraints
2103 0 Allows the status bar to be updated by scripts
2200 3 Prohibits auto prompting for file downloads
2201 3 Prohibits auto prompting for ActiveX controls
2300 0 Allows web pages to use restricted protocols for active content
2301 3 Prohibits the use of the phishing filter
2500 3 Turns on protected mode (Windows Vista only)
2702 3 Prohibits ActiveX filtering
Table 12. Modifications to HKEY_CURRENT_USERSoftwareMicrosoftInternet Explorer
MainFeatureControlfeature_browser_emulation
Registry entry Value Result
iexplore.exe 0x2AF8 Runs WebBrowser control in Internet Explorer 11 Standards Mode
[CURRENT PROCESS] 0x2AF8 Runs WebBrowser control in Internet Explorer 11 Standards Mode
Table 13. Hooked APIs
Hooked API Effect
GetAddrInfoExW Modifies udata var used by Poweliks
GetAddrInfoW Modifies udata var used by Poweliks
LoadLibraryW Checks if the library being loaded belongs to Broadcom CrystalHD
GetProcAddress Disables several DTS high quality audio APIs
CoGetClassObject Disables audio and prevents certain file types from automatically being opened by Internet Explorer
CoCreateInstance Disables audio and prevents certain file types from automatically being opened by Internet Explorer
GetCursorPos Gives cursor position determined by Poweliks instead of the actual cursor position
waveOutOpen Sets the volume level
CreateWindowExW Determines if the current window is of the DirectUIHWND type
Figure 11. Downloads disabled dialog box
15. Page 15
The evolution of the fileless click-fraud malware Poweliks
Unlike most malware, this component is programmed with an abundance of ActiveX and COM usage. The hooked
CoGetClassObject function in Figure 12 provides an example.
If one of the two interfaces matches, a “class not registered” error message is returned instead. In essence, this
disables the two interfaces.
The AttachmentExecute class deals with how Internet Explorer opens files. It is the setting responsible for
displaying the ‘Always ask before opening this type of file’ prompt when certain file types, such as PDF or DOC
files, are clicked in Internet Explorer. This API hooking coupled with one of the registry entries shown in Table 11
prevents the user from downloading and executing files in the normal way.
The MMDeviceEnumerator class is responsible for finding and enabling multimedia resources. The threat uses
several functions, as it did with file downloads, to disable sound. This may be so that Poweliks does not alert the
user to any advertisements with sound.
Figure 12. Hooked API checking interfaces
16. Changing the Run
subkey in the
registry is a basic
action frequently
used by various
pieces of
malware.
TRICKS AND INNOVATIONS
17. Page 17
The evolution of the fileless click-fraud malware Poweliks
Tricks and innovations
Registry protection
As previously discussed, Poweliks creates an extra registry subkey with a protection mechanism that keeps it
from being opened.
This registry subkey contains an entry created using the 0x06 byte and the 0x08 byte, which are not in the
range of the Unicode printable character sets. By creating an entry like this, Poweliks prevents the entire
LocalServer32 subkey from being read or deleted properly. While some registry tools can read that subkey
correctly, the default Windows Registry Editor (regedit.exe) cannot and specific tools that can handle these
special characters are needed in order to properly read and delete this registry entry. Even with administrative
privileges, the LocalServer32 key cannot be deleted outright on some versions of Windows, including Windows
7 and 8. This is because the subkey belongs to the TrustedInstaller group and the Administrators group will only
have read access by default. The correct permissions must be modified in order to delete the unreadable entry.
CLSID hijacking
Changing the Run subkey in the registry is a basic action frequently used by various pieces of malware. Poweliks
innovated in this area by finding new loading points for its code using CLSID hijacking. CLSID entries in the
registry are tied to certain functionalities that Microsoft requires for necessary Windows processes, such as
Explorer, to run properly. By altering what these CLSIDs do, Poweliks is able to hijack their functionality and
replace them with its own. We have verified that Poweliks uses the following three CLSIDs as load points:
• {FBEB8A05-BEEE-4442-804E-409D6C4515E9}
• {73E709EA-5D93-4B2E-BBB0-99B7938DA9E4}
• {AB8902B4-09CA-4BB6-B78D-A8F59079A8D5}
{FBEB8A05-BEEE-4442-804E-409D6C4515E9} is known as “ShellFolder for CD Burning” and was introduced
with Windows XP. It provides support for XP’s native CD burning capabilities and can be turned off if other
software is used to burn CDs. However, this is normally turned on and any file specified in the “InProcServer32”
key will get loaded and executed when the computer is started. This CLSID was only used by Wowliks and has not
been seen in use by Poweliks.
{73E709EA-5D93-4B2E-BBB0-99B7938DA9E4} is known as “WMI Provider Subsystem Host.” WMI is used to
extend the functionality of Windows drivers.
{AB8902B4-09CA-4BB6-B78D-A8F59079A8D5} is known as the “Thumbnail Cache Class Factory for Out of
Proc Server” and is a powerful load point. As the name suggests, it is responsible for creating thumbnails
for multimedia files within a window. Not only does this CLSID get loaded with Windows, any file in the
“LocalServer32” key is loaded every time a folder is opened. What this means for Poweliks is that even if the
Watchdog process has been terminated, the Poweliks registry entry will be launched again once Explorer
attempts to update or create new thumbnails.
To hijack the CLSIDs, Poweliks
first needs to know what operating
system the compromised computer
is running. It uses more than one
method to determine this. First,
the API GetVersion is called. The
other method used by Poweliks is to
check a defined Windows structure directly. In this case, it checked the KUSER_SHARED_DATA structure. If the
major version number of the installed OS is 5 then the WMI load point is used. Otherwise, the threat would use
the thumbnail CLSID.
Table 14. Load point selected by operating system
CLSID used Operating system
{73E709EA-5D93-4B2E-BBB0-99B7938DA9E4} 2000, XP, Server 2003
{AB8902B4-09CA-4BB6-B78D-A8F59079A8D5} Vista, Server 2008, 7, Server 2012, 8
18. Page 18
The evolution of the fileless click-fraud malware Poweliks
Fileless persistence
Poweliks has discarded the standard technique of preserving itself by using a hidden file on the compromised
computer. Instead, it uses the registry for persistence and achieves this persistence through the use of
JavaScript. Normally, malware will place an entry in the Run subkey that points to a malicious executable which
is then executed. Poweliks makes the Run subkey call rundll32.exe, a legitimate Windows executable used to
load DLLs, and passes in several parameters. These parameters include JavaScript code that eventually results
in Poweliks being loaded into memory and executed.
Rundll32 takes in the following arguments:
RUNDLL.EXE <dllname>,<entrypoint> <optional arguments>
The <dllname> passed into rundll32.exe is mshtml.dll, which contains code to interpret JavaScript, among other
things.
The <entrypoint> passed in is the name of the function inside mshtml.dll that interprets and executes
JavaScript.
The <optional argument> passed in is the JavaScript that is used load and execute Poweliks.
The registry entry in Figure 13 demonstrates what it will look like at the end of this process.
In this case, Poweliks stores itself in one of the previously mentioned CLSIDs it chose to modify instead of the
Run key in order to hide and then start when the operating system loads. The “(Default)” entry contains the call
to rundll32.exe and uses JavaScript to define which DLL will be used along with proper arguments to continue
loading Poweliks.
Zero-day privilege escalation
In December 2014, we noticed that Poweliks was using a Windows zero-day exploit for privilege escalation,
which we reported to Microsoft. The company designated this vulnerability MS15-004 and released a patch for
it in January. The vulnerability allows an attacker to execute an arbitrary file with elevated privileges on the
compromised computer.
The vulnerability is in the TS WebProxy component and the specific vulnerable function is CTSWebProxy::Start
RemoteDesktop. Normally, this function executes the terminal services executable (mstsc.exe) and the path to
mstsc.exe is supplied by the user. Before executing the filepath provided, Windows checks that the supplied path
legitimately leads to mstsc.exe. The path must end with mstsc.exe and it must start in the system folder, as seen
in the following example:
• %Windir%System32mstsc.exe
This can be changed when the zero-day exploit is used. By using directory traversal characters, the check can be
Figure 13. Loading JavaScript code through the registry
19. Page 19
The evolution of the fileless click-fraud malware Poweliks
bypassed so it leads to a path that no longer points to mstsc.exe, as seen in the following example:
• %Windir%System32....tempbad.exemstsc.exe..
Continuing with the example, this path will pass the check, but will actually execute the following file instead:
• %Temp%bad.exe
There were actually two different vulnerabilities that had the same effect. In the 32-bit version of twsbprxy.exe,
there were no checks on the path and in the 64-bit version of the file, there were checks but Windows allowed an
incorrect path to be provided.
Poweliks uses the code in Figure 14 to prepare the string to load mstsc.exe.
Poweliks uses the exploit twice, once to run regedit and once to run a batch file. The following string was used to
execute the batch file:
• %Windir%System32....%UserProfile%Local SettingsTemptmpxxx.cmdmstsc.exe..
The .cmd file previously created by Poweliks executes the Watchdog process. To invoke the exploit, Poweliks
initializes the Terminal Services Web Proxy through its CLSID, as seen in Figure 15.
Figure 14. Exploit string to load mstsc.exe
Figure 15. Terminal Services Web Proxy initialized through Poweliks’ CLSID
20. Page 20
The evolution of the fileless click-fraud malware Poweliks
Advertisements
Advertisement requests
Poweliks comes with a default list of keywords (previously discussed in the Poweliks 1.7 section) that it uses to
generate requests for ads. The threat pretends that the victim legitimately searched for these keywords and then
contacts an ad network so it knows where to direct the victim. Poweliks sends a request to the URL returned by
the ad network and then receives payment for downloading the advertisement. These techniques are used by
other click-fraud botnets such as Trojan.Zeroaccess and Trojan.Adclicker.
Figure 16 demonstrates how Poweliks requests its advertisements.
The C&C server may also send legitimate advertisements as opposed to fake advertisements, as seen in Figure
17.
In legitimate cases such as these, Poweliks may send a “utm_source” value to the final ad page to let the
advertiser know who sent the user to them. “Utm_source” is used for tracking purposes and was originally part
of Urchin Traffic Monitor, a program to analyze website statistics. The “utm_source” value is used to inform
marketers from the legitimate website which group is responsible for directing whoever clicked on the ad to
them so they can give the legitimate website ad revenue.
Some of the ad requests that Poweliks receives may result in malicious web pages being displayed on the
affected computer. This opens the door for other malware to enter the already compromised computer. For
example, one of the websites visited by Poweliks resulted in Trojan.Cryptowall being installed on the computer.
Figure 16. Poweliks advertisement request
21. Page 21
The evolution of the fileless click-fraud malware Poweliks
At one point, we observed Poweliks issuing a request for “symptoms lupus” and the compromised computer sent
the following request:
GET /?186a7d7e7d60687d767c797a747d6b7d796a7b70367b7775 HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-
shockwave-flash, */*
Referer: http://expendablesearch.com/search.php?q=symptoms+lupus
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
Connection: Keep-Alive
Host: e609b5.81e95.b8a435.eb5aa22.30a3c3.8a.i2t845vj518.federallead.pw
This request led to a web page hosting an instance of the Magnitude Exploit Kit. The Magnitude Exploit Kit
served a Flash file containing an exploit that delivered a Trojan.Cryptowall variant. This malware locked the
victim out of the compromised computer. While the computer may have initially been infected with Poweliks, it
ended up being compromised with additional malware.
Responding to advertisements
Poweliks also has the ability to respond to advertisements by clicking on them or responding to form
submissions to earn money. Since Poweliks clicks the advertisements, the Poweliks creators are more than
likely subscribing to a cost-per-click advertising model to generate money rather than a view-based model. The
Figure 17. Legitimate advertisement shown by Poweliks (right side, middle)
22. Page 22
The evolution of the fileless click-fraud malware Poweliks
following response provides an example.
<?xml version=”1.0” encoding=”UTF-8”?>
<records>
<query>symptoms lupus</query>
<record>
<title><![CDATA[freezonegamez.org]]></title>
<description><![CDATA[Free Online Games]]></description>
<url><![CDATA[http://browsgamesfree.net]]></url>
<clickurl><![CDATA[http://184.164.143.90/click.php?c=9d04531516ec2a5fa7871808ecfc
7ff1b35fa354e22cdd8f639a638fc330add78cabbc69311c09bc530a50c578a39f304bc54000a
8d9d98cd5cbbe186c4f28b1dd5c7efb592dda17ebe065b8bfc7368f]]></clickurl>
<bid>0.000344</bid>
</record>
</records><ref>http://expendablesearch.com/search.php?q=symptoms+lupus</
ref><id>4</id>
This section of code signifies a bid value. In terms of
ads and payment models, this is the monetary value
provided when an ad is clicked. In this example, we
observed around 3,000 ad requests by Poweliks
at an average bid amount of US$0.000503, for a
revenue total of $1.51. We can conservatively assume
that one infected computer can generate this much
revenue per day.
To actually click on the advertisements, Poweliks
uses ActiveX and COM programming. It uses this
programming to create windows, place HTML in the
window, and then parse the HTML it placed. Poweliks
also uses these programming tools to deliver the ads
to the victim on the compromised computer.
Since HTML allows for various ways to load a
multimedia file, Poweliks needs to parse the
advertisement it requested. For advertisements with
videos, Poweliks passes in both the ITHMLDocument2
and IHTMLElementCollection COM interfaces to find
the actual advertisement and simulate a user clicking
on the play button. To handle regular advertisements,
Poweliks simply moves the mouse cursor randomly
within the ad window and clicks.
Poweliks can also handle form submissions in a
variety of ways. Poweliks’ C&C server provides
the arbitrary data that should be placed in the
form. Poweliks may perform arbitrary searches on various search sites and then perform click-fraud on any
advertisements sent back from the search queries. To the advertiser, this would look like the advertisement was
served, displayed, and clicked legitimately from a search result shown to the user.
Figure 18. Poweliks parses HTML to ‘press play’
23. Page 23
The evolution of the fileless click-fraud malware Poweliks
Potential ties between Poweliks
and other malware
Poweliks and Trojan.Bedep Trojan.Bedep share a number
of similarities. The exact same zero-day exploit, Microsoft
Windows Remote Privilege Escalation Vulnerability (CVE-
2015-0016), was being used by Bedep at the same time it
was being used by Poweliks and they both operate on an
in-memory-only basis. Bedep also acts as a downloader
and has a similar coding style to Poweliks. In fact, Bedep
has been observed downloading and installing Poweliks
(along with other threats) on compromised computers.
However, despite the coincidences and similarities, there
is no conclusive evidence linking the authors of Poweliks
and Bedep together.
Figure 19. Poweliks clicks on a regular advertisement
Figure 20. Automatic form submission
24. CONCLUSION
Poweliks uses a
number of tricks
to hide itself in the
registry, using a
naming technique
that makes it hard
for users to find
and remove its
registry entries.
25. Page 25
The evolution of the fileless click-fraud malware Poweliks
Conclusion
In a world of file-based malware, Poweliks stands out from the crowd because of its nature as a fileless threat. It
is innovative in its ability to persist by deeply embedding itself inside the Windows registry.
Poweliks uses a number of tricks to hide itself in the registry, using a naming technique that makes it hard for
users to find and remove its registry entries. It also uses CLSID hijacking as runtime load points in the registry
to launch itself on reboot. Poweliks even exploits a zero-day privilege escalation vulnerability to help it to
take control of compromised computers. It’s interesting to see, that despite these advanced techniques and
innovations, the creators of Poweliks are just interested in running a click-fraud botnet operation to earn money
from ad revenue.
While the ads are not shown to victims, the downloading and processing of ads consume processing and network
bandwidth and could potentially expose victims to secondary infections from malvertisement. This can lead to
numerous threats ending up on a victim’s computer, or even with the victim being completely locked out of their
computer because the secondary threats could include ransomware.
Poweliks is a glimpse of what future threats could do. The innovations seen in Poweliks demonstrate that
malware authors are more determined than ever to earn money off of their creations.
Resources
Trojan.Poweliks
http://www.symantec.com/security_response/writeup.jsp?docid=2014-080408-5614-99
Trojan.Poweliks Removal Tool
http://www.symantec.com/security_response/writeup.jsp?docid=2014-111020-0511-99
Trojan.Bedep
http://www.symantec.com/security_response/writeup.jsp?docid=2015-020903-0718-99
Trojan.Cryptowall
http://www.symantec.com/security_response/writeup.jsp?docid=2014-061923-2824-99
Trojan.Zeroaccess
http://www.symantec.com/security_response/writeup.jsp?docid=2011-071314-0410-99
Trojan.Adclicker
http://www.symantec.com/security_response/writeup.jsp?docid=2002-091214-5754-99
Microsoft Security Bulletin MS15-004
https://technet.microsoft.com/library/security/ms15-004
CVE-2015-0016
http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-0016
Trojan.Poweliks: A threat inside the system registry
http://www.symantec.com/connect/blogs/trojanpoweliks-threat-inside-system-registry
Win32/Poweliks
http://www.kernelmode.info/forum/viewtopic.php?f=16&t=3377
26. Page 26
The evolution of the fileless click-fraud malware Poweliks
From Alureon/Wowliks to Poweliks botnet (distribution in Affiliate mode)
http://malware.dontneedcoffee.com/2014/07/from-alureonwowliks-to-poweliks-botnet.html
How Ad Networks are Being Used for Scamvertising
https://zvelo.com/how-ad-networks-are-used-for-scams-scamvertising/
Analysis of a Triple Click Fraud Threat
http://stopmalvertising.com/rootkits/analysis-of-a-triple-click-fraud-threat.html
2014-11-15 (Malware Traffic Analysis)
http://malware-traffic-analysis.net/2014/11/15/index.html
Poweliks – Command Line Confusion
http://thisissecurity.net/2014/08/20/poweliks-command-line-confusion/