You probably already heard about Superfish adware that was pre-installed on Lenovo PCs, if not read it here. In this blogpost I’m making an attempt to analyze it.
Here is SHA1 hash of analyzed sample (NSIS Installer): A502EA9FAE7E8FE64308088ECC585B45EAD76DA1 - VT link
The SuperFish presents itself as “VisualDiscovery” software and it is based on Komodia engine. Unfortunately Komodia’s site is offline now, but you might find some information on this backup.
The SuperFish or VisualDiscovery installer works only on Windows 8 or 2012 and does not install itself on Windows 7 or 8.1.
The NSIS installer drops all files to C:\Program Files\Lenovo\VisualDiscovery and afterward executes following commands:
- run.exe 30000 VisualDiscovery.exe /Auto /Service
- run.exe 30000 C:\WINDOWS\system32\sc.exe start VisualDiscovery
- run.exe 30000 VDWFPInstaller.exe install
First two commands are for registration and starting the VisualDiscovery service. Last command installs driver.
VDWFPInstaller.exe
SHA1: B5D68FE790F0FD30198F7F6C19FA190F561F301E - VT link
This is a typical installer for drivers. However, there is one interesting thing inside - it contains code that detects various AV software and it checks if the installer is running inside Virtual Machine.
![](http://www.0xebfe.net/images/SuperFish_AV.png)
VDWFP drivers
- VDWFP.sys SHA1: A756FEAA8E32FAE58DAA5FA8983AF810EAFBF038 - VT link
- VDWFP64.sys SHA1: C38BF92AA13F875862D7153A05D16DD8DC3D9180 - VT link
The drivers (and also other binaries) are signed with expired certificate:
![](http://www.0xebfe.net/images/SuperFish_Expired_cert.png)
The driver contains following PDB path:
This driver implements connect redirector by using Windows Filtering Platform (WFP) - MSDN. Every time when new connection is created the driver inspects this connection and decides if this connection should be redirected to proxy according to the configuration.
The configuration is stored in following registry key:
Possible values:
- globalAppTable - applications to never intercept
- appTable - applications to intercept
- globalIpTable - IP addresses to never intercept
- ipTable - IP addresses to intercept
- globalPortTable - ports to intercept
- portTable - ports to never intercept
- andFlag
- portTableInverse
- ipTableInverse
- appTableInverse
Default values:
The user-mode component
Two main parts of user mode component are VisualDiscovery.exe and SuperfishCert.dll:
- VisualDiscovery.exe - SHA1: 343AF97D47582C8150D63CBCED601113B14FCCA6 - VT link
- SuperfishCert.dll - SHA1: EDE269E495845B824738B21E97E34ED8552B838E - VT link
However, the real payload of these two files is Zlib-compressed and encrypted with BlowFish crypto algorithm. The same files after unpacking:
- VisualDiscovery.exe - SHA1: 50221C3B0AEDB5BC26C6A7684182417AC9BCC6E2 - VT link
- SuperfishCert.dll - SHA1: 1FFEBCB1B245C9A65402C382001413D373E657AD - VT link
The SuperfishCert.dll has an internal name KomodiaCertDLL.dll and compiled on May 12 16:56:12 2014:
![](http://www.0xebfe.net/images/SuperFish_DLL.png)
The main purpose of this DLL is to install supplied malicious certificate to various applications. This DLL does not contain the certificate itself.
The service VisualDiscovery.exe is the main component of this adware. The binary of this service is statically linked with OpenSSL 1.0.1h and contains private and public certificates:
![](http://www.0xebfe.net/images/SuperFish_Priv_cert.png)
Here is whole certificate:
The private key is encrypted with password “komodia”, but probably you already know it from this blog.
This service implements proxy and performs MITM-attack on encrypted connections that go through the proxy:
![](http://www.0xebfe.net/images/SuperFish_MITM_proxy.png)
As you can see this piece software implements pretty generic technique to intercept encrypted connections. Blacklisting of installed certificate is a good idea, but actually in next versions it could just generate unique certificate for every new computer.
Purpose
Intercepting encrypted connections is definitely a bad thing. But what this software actually does?
The main purpose is injecting javascript from following URL to almost every HTML page according to settings:
'malware ' 카테고리의 다른 글
Komodia ring-0 rootkit Analysis (any malware that privescs could install it and use it (0) | 2015.02.21 |
---|---|
x86obf code virtualizer released for free (0) | 2015.02.21 |
Just another day at the office: A ZDI analyst’s perspective on ZDI-15-030 (0) | 2015.02.21 |
KOMODIA/SUPERFISH SSL VALIDATION IS BROKEN (0) | 2015.02.21 |
An Experimental Require Certificate Transparency Directive for HSTS (0) | 2015.02.21 |