BKDR_URSNIF.SM
TrojanSpy:Win32/Ursnif.gen!F (Microsoft), Backdoor.Win32.Agent.bwci (Kaspersky), Mal/Emogen-Y (Sophos), Win32/Spy.Ursnif.A (Eset)
Windows 2000, Windows XP, Windows Server 2003
Threat Type: Backdoor
Destructiveness: No
Encrypted: Yes
In the wild: Yes
OVERVIEW
Downloaded from the Internet, Dropped by other malware
This backdoor arrives on a system as a file dropped by other malware or as a file downloaded unknowingly by users when visiting malicious sites.
It executes commands from a remote malicious user, effectively compromising the affected system.
TECHNICAL DETAILS
198,581 bytes
, EXE
Yes
05 Oct 2012
Steals information, Compromises system security
Arrival Details
This backdoor 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 backdoor drops the following copies of itself into the affected system:
- %User Profile%\nah_{4 random characters}.exe
(Note: %User Profile% is the current user's profile folder, which is usually C:\Documents and Settings\{user name} on Windows 2000, XP, and Server 2003, or C:\Users\{user name} on Windows Vista and 7.)
It adds the following mutexes to ensure that only one of its copies runs at any one time:
- xmas_mutex
Autostart Technique
This backdoor adds the following registry entries to enable its automatic execution at every system startup:
HKEY_CURRENT_USER\SOFTWARE\Microsoft\
Windows\CurrentVersion\Run
nah_Shell = "%User Profile%\nah_{4 random characters}.exe"
Other System Modifications
This backdoor adds the following registry entries as part of its installation routine:
HKEY_CURRENT_USER\SOFTWARE\Microsoft\
Windows\CurrentVersion
nah_opt_reserv = "{BLOCKED}13.106 "
HKEY_CURRENT_USER\SOFTWARE\Microsoft\
Windows\CurrentVersion
nah_opt_forms = "/system/prinimalka.py/forms"
HKEY_CURRENT_USER\SOFTWARE\Microsoft\
Windows\CurrentVersion
nah_opt_options = "/system/prinimalka.py/options"
HKEY_CURRENT_USER\SOFTWARE\Microsoft\
Windows\CurrentVersion
nah_opt_command = "/system/prinimalka.py/command"
HKEY_CURRENT_USER\SOFTWARE\Microsoft\
Windows\CurrentVersion
nah_opt_file = "/system/prinimalka.py/cookies"
HKEY_CURRENT_USER\SOFTWARE\Microsoft\
Windows\CurrentVersion
nah_opt_ss = "/cgi-bin/trash.py"
HKEY_CURRENT_USER\SOFTWARE\Microsoft\
Windows\CurrentVersion
nah_opt_pstorage = "/cgi-bin/trash.py"
HKEY_CURRENT_USER\SOFTWARE\Microsoft\
Windows\CurrentVersion
nah_opt_certs = "/cgi-bin/trash.py"
HKEY_CURRENT_USER\SOFTWARE\Microsoft\
Windows\CurrentVersion
nah_opt_idproject = "000055"
HKEY_CURRENT_USER\SOFTWARE\Microsoft\
Windows\CurrentVersion"
nah_opt_pauseopt = "1200"
Backdoor Routine
This backdoor executes the following commands from a remote malicious user:
- Archive and upload file(s)
- Capture screenshot
- Clear cookies
- Download and Execute other files
- List running process
- Reboot the affected system
- Steal certificates and cookies
- Update/Download a configuration file
- Upload a log file which contains stolen information
It connects to the following URL(s) to send and receive commands from a remote malicious user:
- http://{BLOCKED}3.2/system/prinimalka.py/command
Stolen Information
This backdoor sends the gathered information via HTTP POST to the following URL:
- http://{BLOCKED}3.2/system/prinimalka.py/forms
NOTES:
It checks the existence of the following registry key:
HKEY_CURRENT_USER\Software\Classes\FirefoxHTML\shell\open\command
If it exists, it gets the folder location of firefox.exe and creates the following file:
- {folder location}\chrome\amba.jar
Oncethe file mentioned above is executed, it drops the following file:
- {folder location}\chrome\amba.js - detected as JS_URSNIF.DJ
It also modifies the following file to point to amba.jar:
- {folder path}\chrome\browser.manifest
It injects itself into all running processes to remain memory-resident except for the following processes:
- svchost.exe
- [System Process]
- System
- smss.exe
- winlogon.exe
- lsass.exe
- avp
- csrss.exe
- services.exe
It hooks the following API calls to hide its behavior on the affected system:
- CreateProcessA
- CreateProcessW
- FindFirstFileA
- FindNextFileA
- FindFirstFileW
- FindNextFileW
- RegEnumValueA
- RegEnumValueW
It hooks the following API calls to search for network traffic for a predetermined HTML elements:
- InternetCloseHandle
- InternetQueryDataAvailable
- InternetReadFile
- InternetReadFileExA
- HttpSendRequestA
- HttpSendRequestW
- HttpOpenRequestW
- HttpOpenRequestAl
It attempts to steal sensitive online banking information, such as user names and passwords from the following financial institutions:
- trade
- schwab
- fidelity
- paypal
- wamu bank
- wellsfargo
- suntrust
- usaa
- wachovia
It does this by injecting certain HTML codes to the site.
SOLUTION
9.200
Step 1
Before doing any scans, Windows XP, Windows Vista, and Windows 7 users must disable System Restore to allow full scanning of their computers.
Step 2
Remove the malware/grayware file dropped/downloaded by BKDR_URSNIF.SM
- JS_URSNIF.DJ
Step 3
Since this malware cannot be removed in normal and safe mode, it is necessary to restart using the Windows Recovery Console. To restart the system using the Windows Recovery Console:
• On Windows XP and Server 2003 systems:
- Click Start>Run. In the Open input box, type secpol.msc and press Enter.
- In the left panel, double-click Local Policies>Security Options.
- In the right panel, double-click Recovery Console: Allow floppy copy and access to all drives and folders.
- Select Enabled and click OK.
- Insert the Windows Installation CD into the CD drive, then restart your computer.
- When prompted, press any key to boot from the CD.
- On the main menu, type r to go to the Recovery Console.
- Type the number that corresponds to the drive and directory that contains Windows (usually C:\WINDOWS) and press Enter.
- Type the Administrator password and press Enter.
- In the input box, type the following then press Enter:
SET AllowAllPaths = TRUE
del %User Profile%\nah_{4 random characters}.exe - Type exit and press Enter to restart the system normally.
• On Windows Vista and 7 systems:
- Insert your Windows Installation DVD in the DVD drive, then Press the restart button.
- When prompted, press any key to boot from the DVD.
- Depending on your Windows Installation DVD, you might be required to select the installation language. Then on the Install Windows window, choose your language, locale, and keyboard layout or input method. Click Next, then click Repair your computer.
- Select Use recovery tools that can help fix problems starting Windows. Select your installation of Windows. Click Next.
- If the Startup Repair window appears, click Cancel, Yes, then Finish.
- In the System Recovery Options window, click Command Prompt.
- In the Command Prompt window, type the following then press Enter:
del %User Profile%\nah_{4 random characters}.exe
(Note: In Windows 7, all local drives will be assigned one more than normal. For example, the C: drive becomes D:.) - Type exit and press Enter to close the Command Prompt window.
- Click Restart to restart the system normally.
Step 4
Delete this registry value
Important: Editing the Windows Registry incorrectly can lead to irreversible system malfunction. Please do this step only if you know how or you can ask assistance from your system administrator. Else, check this Microsoft article first before modifying your computer's registry.
- In HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
- nah_Shell = "%User Profile%\nah_{4 random characters}.exe"
- nah_Shell = "%User Profile%\nah_{4 random characters}.exe"
- In HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion
- nah_opt_reserv = "{BLOCKED}13.106"
- nah_opt_reserv = "{BLOCKED}13.106"
- In HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion
- nah_opt_forms = "/system/prinimalka.py/forms"
- nah_opt_forms = "/system/prinimalka.py/forms"
- In HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion
- nah_opt_options = "/system/prinimalka.py/options"
- nah_opt_options = "/system/prinimalka.py/options"
- In HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion
- nah_opt_command = "/system/prinimalka.py/command"
- nah_opt_command = "/system/prinimalka.py/command"
- In HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion
- nah_opt_file = "/system/prinimalka.py/cookies"
- nah_opt_file = "/system/prinimalka.py/cookies"
- In HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion
- nah_opt_ss = "/cgi-bin/trash.py"
- nah_opt_ss = "/cgi-bin/trash.py"
- In HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion
- nah_opt_pstorage = "/cgi-bin/trash.py"
- nah_opt_pstorage = "/cgi-bin/trash.py"
- In HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion
- nah_opt_certs = "/cgi-bin/trash.py"
- nah_opt_certs = "/cgi-bin/trash.py"
- In HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion
- nah_opt_idproject = "000055"
- nah_opt_idproject = "000055"
- In HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion"
- nah_opt_pauseopt = "1200"
- nah_opt_pauseopt = "1200"
Step 5
Search and delete this file
Step 6
Scan your computer with your Trend Micro product to delete files detected as BKDR_URSNIF.SM. 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 7
Restore deleted/modified files and/or registry entries from backup
*Note: Only Microsoft-related files/keys/values will be restored. If this malware/grayware also deleted registry keys/values related to programs that are not from Microsoft, please reinstall those programs on your computer.
- {folder path}\chrome\browser.manifest
Did this description help? Tell us how we did.