Conficker Worm using Metasploit payload to spread
Thursday January 15, 2009 at 7:39 am CST
Posted by Xiao Chen
Recently we got some new samples of the W32/Conficker.Worm to analyze. While investigating we found that this worm has an exploit for the recent MS08-067 vulnerability and uses the exploitation method derived from the metasploit ms08_067_netapi module to spread itself. Below is the traffic packet capture snapshot sent by the worm:
As we can see from the image above, there are some random alphanumeric characters in the packet which seem to have been generated from Rex::Text.rand_text_alpha in ms08_067_netapi.rb. And if we do a byte order conversion of data in red box above, we get 3 addresses: 0×00020408, 0×6f8917c2, 0×6f88f807, which are the internal targets of the ms08_067_netapi.rb exploit as listed below (from metasploit):
# Metasploit's NX bypass for XP SP2/SP3
[ 'Windows XP SP3 English (NX)',
{
'Ret' => 0x6f88f807,
'DisableNX' => 0x6f8917c2,
'Scratch' => 0x00020408
}
], # JMP ESI ACGENRAL.DLL, NX/NX BYPASS ACGENRAL.DLL
The latest metasploit exploit, besides including Windows XP/2003 OS’s; also includes several targets for languages such as English, Arabic, Czech, Danish, German, Greek Spanish Finnish, French, Hebrew, Japanese, Chinese, etc. The exploit module of ms08_067_netapi in metasploit also provides the “smb_fingerprint()” function to detect the Windows version information, Service Pack information and also the language information of the target OS. This makes programming the worm much easier and can cause much bigger impact. By using the exploit from the metasploit module as the code base, a virus/worm programmer only needs to implement functions for automatic downloading and spreading. We believe that this can be accomplished by an average programmer who understands the basics of exploitation and has decent programming skills. After further analysis of the traffic capture, we found that only the functions for detecting OS version and Service Pack information were embedded into this worm. Hence without the remote OS language determination ‘feature’, this worm only targets the English OS versions at the time of writing the blog.
Here is a packet capture snippet used in this malware to detect the OS version and Service Pack information:
By sending SMB session setup and request, it can detect OS information of target machine. If the OS is Windows Server 2003, then the Service Pack information will also be returned.
Since there are a huge number of Windows XP systems it’s obvious that the worm writer did not want to miss out on this pool, hence this is why the worm determines what the Service Pack level is by accessing \SRVSVC named pipe, which is similar to the method used in metasploit smb_fingerprint() function :
if (os == 'Windows XP' and sp.length == 0)
# SRVSVC was blocked in SP2
begin
smb_create("\\SRVSVC")
sp = 'Service Pack 0 / 1'
rescue ::Rex::Proto::SMB::Exceptions::ErrorCode => e
if (e.error_code == 0xc0000022)
sp = 'Service Pack 2+'
end
end
end
So in this instance it’s obvious that malware/worm writers are abusing open source tools to their advantage to make their work easier.
For those who haven’t patched their machines, we suggest you install the MS08-067 patch ASAP! If you are a McAfee Host IPS or Network IPS user, we’ve verified that you are protected against this worm by our Signatures ID’s 3961 and 0×40709d00 respectively. For VirusScan users, the DAT update version 5444 has coverage to detect this worm.

January 15th, 2009 at 10:58
Conficker / Downadup – Microsoft: MSRT Released…
Microsoft vient de mettre à jour son outil de suppression des logiciels malveillants (Malicious Software Removal Tool).
L’outil MSRT est désormais capable de détecter et supprimer le ver Conficker/Downadup.
Si vous cherchez comment d…
January 15th, 2009 at 13:04
[...] AVERT Labs – Conficker Worm using Metasploit payload to spreadhttp://www.avertlabs.com/research/blog/index.php/2009/01/15/conficker-worm-using-metasploit-payload-… [...]
January 16th, 2009 at 08:07
It’s ironic that you mention that virus writers are using open source software to make their jobs easier, but fail to mention that they are also are simply using Windows to make their jobs easier
It’s even more ironic that now virus writers can simply use your blog to make their jobs easier, since you flat out identify and post the code that makes their jobs easier
January 18th, 2009 at 15:08
Isn’t it ironic that micro$oft patched this vulnerabilty back in October, probably when the malicious (and not very original) code writers decided they would prey upon the millions of windows users who don’t have a clue. As far as the McAfee providing the code to replicate such a worm (or improve it) is laughable. Give it your best shot and email it to me, I will gladly open it and let my micro$oft patch, or McAfee’s securtiy suite make quick work of it. If all else fails there is nothing like nightly backups with Acronis to restore everything in a matter of minutes. Freedom isn’t free and if you lock your house doesn’t it make sense to do the same with your computer? This is a matter of micro$oft vulnerabilties (which they caught in time) and lazy or ignorant windows users, take your pick; either way, the rest of us are GOOD.
January 27th, 2009 at 18:58
Does this mean that my McAfee antivirus will FINALLY start detecting metasploit payloads?
http://www.irongeek.com/i.php?page=videos/bypassing-anti-virus-with-metasploit
http://www.indepthdefense.com/2009/01/metasploit-visual-basic-payloads-in.html
February 12th, 2009 at 19:34
“Does this mean that my McAfee antivirus will FINALLY start detecting metasploit payloads?”
Didn’t you read anything that the previous poster wrote? About backing up and locking your doors and so forth and so on……
February 26th, 2009 at 03:30
[...] threat, and results in a non-prioritized approach to patching and remediation. Can you say “Conficker worm” and “MS08-067″? To help companies reduce “3,000 to 30″ – identifying [...]
March 30th, 2009 at 22:36
Not sure how to remove Conflicker. Please remove it for me or send me simple easy to follow instructions on how to remove Conflicker and other harmful items from my laptop computer. wildcanuck3@yahoo.com.
April 5th, 2009 at 21:06
[...] mentioned, the Conficker worm uses an exploit derived from the “ms08_067_netapi” Metasploit [...]
June 5th, 2009 at 11:19
[...] Xiao Chen reported that the exploit code that Conficker uses is from the Metasploit framework, specifically the ms08_067_netapi module. [...]
October 12th, 2009 at 13:53
[...] odoslaní tohto maličkého vylepšenia developerom MSF som náhodne zablúdil na stránku avertlabs.com a zistil, akým spôsobom vírus Conficker ( derivát MS08-067 ) napáda jazykové mutácie [...]
December 12th, 2009 at 04:05
[...] threat, and results in a non-prioritized approach to patching and remediation. Can you say “Conficker worm” and “MS08-067″? To help companies reduce “3,000 to 30″ – [...]