Using Nmap Remotely Through F5 FirePass VPN

Well, we all use the common hacking tools of the trade like Nmap. Some of us use it on Windows and some on Linux. This post is for the people using it on Windows.
I was connected to a network remotely through the company’s F5 VPN appliance and I wanted to scan the internal network.

It looked like:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Rafel>nmap -PN -sS -p 445 192.168.1.*

Once I pressed “Enter” I got:
Starting Nmap 4.85BETA10 ( ) at 2009-11-10 00:34 Jerusalem Standard Time
WARNING: Using raw sockets because ppp0 is not an ethernet device. This probably won’t work on Windows.

pcap_open_live(ppp0, 100, 0, 2) FAILED. Reported error: Error opening adapter: The system cannot find the device specified. (20). Will wait 5 seconds then retry.

pcap_open_live(ppp0, 100, 0, 2) FAILED. Reported error: Error opening adapter: The system cannot find the device specified. (20). Will wait 25 seconds then retry.

Call to pcap_open_live(ppp0, 100, 0, 2) failed three times. Reported error: Error opening adapter: The system cannot find the device specified. (20)

There are several possible reasons for this, depending on your operating system:
LINUX: If you are getting Socket type not supported, try modprobe af_packet or recompile your kernel with SOCK_PACKET enabled.

*BSD: If you are getting device not configured, you need to recompile your kernel with Berkeley Packet Filter support. If you are getting No such file or directory, try creating the device (eg cd /dev; MAKEDEV ; or use mknod).

*WINDOWS: Nmap only supports ethernet interfaces on Windows for most operations because Microsoft disabled raw sockets as of Windows XP SP2. Depending on the reason for this error, it is possible that the — unprivileged command-line argument will help.

SOLARIS: If you are trying to scan localhost or the address of an interface and are getting ‘/dev/lo0: No such file or directory’ or ‘lo0: No DLPI device found’, complain to Sun. I don’t think Solar is can support advanced localhost scans. You can probably use “-PN -sT localhost” though.


Then I realized that the VPN connection was a PPP device which is probably at the top of the device type interfaces order list and Nmap is trying to use it in order to scan, which is the point of failure because Nmap on Windows without RAW sockets (means Windows XP SP2+) can only use Ethernet devices. So I try played “Imaginary Linux on Windows” and added the option “-e eth0″ which specifies using the Ethernet device indexed at 0 and it worked like a charm.

C:\Documents and Settings\Rafel>nmap -PN -sS -p 445 -e eth0 192.168.1.*

Starting Nmap 5.00 ( ) at 2009-11-10 00:49 Jerusalem Standard Time
Interesting ports on XXXXX (
445/tcp filtered microsoft-ds

Nmap done: 1 IP address (1 host up) scanned in 6.03 seconds


Bypassing Windows Unknown Publisher Verification For Web Downloaded Executables

I was in another day of jumping from a client to a client, securing another bank in Israel when my girlfriend called and said “Honey, I am at the office, I have absolutely nothing to do and I can’t connect from here to our computer at home to continue my project”. I said, O.K, let’s see what we can do on a 5 minute phone call. Now just want to make it clear, my girlfriend is an Information System Instructor, she is no developer or hacker.

Me: “Honey, go to, can you download it?”
Her: “yes, but when I run the setup.exe it says something weired like ‘windows has blocked this software because it can’t verify the publisher’ and it won’t let me install”

Me: “O.K, Open Start-Run, type notepad and space, now click on setup.exe and drag it to the text box at Start->Run. Now add ‘:Zone.Identifier’ just before the last quotes. What do you see?”
Her: “I see something like ZoneId=3, now what?”
Me: “I can’t talk, going into a meeting, try to change it to 1 or delete everything, bye bye bye”

After 10 minutes I get an SMS “thanks honey it worked!!!”.
Well we found a bug, I wouldn’t really call it a “Privilege Escalation” but I guess you don’t have to be a hacker to bypass windows security restrictions :)


Exploiting WebView through Internet Explorer to remotely discover windows directory

As for any large product, Microsoft Windows operating system is built on its previous versions code. Some of this code even goes back until Microsoft Windows 98.

In Windows 98 a new look was introduced called “WebView” which included the way folders are displayed and the way the desktop is displayed are all HTML templates which were also editable to the default administrative user.You can read more about it here:

Those HTML Templates had the extension “htt”. In order for the folder templates to function properly and being able to display the current folder, a few automatically expended variables were added to the module filtering the “htt” files. These are:
%TEMPLATEDIR% (hardcoded)
%THISDIRPATH% (hardcoded)
%THISDIRNAME% (hardcoded)
%LOGOLINE% (registry)

This mechanism lives until today deeply inside Windows XP’s code in two modules inside the system32 folder:

    1) Webvw.dll
    2) Mshtml.dll

Webvw.dll is the module which is responsible for all the Webview installation and normal activity and mshtml.dll is the main module for HTML Filtering & Rendering used Windows Explorer and Internet Explorer.

When Microsoft Windows is installed and webvw.dll is registered, it adds it CLSID and a few registry keys. The interesting ones are these:
Default = “%SystemRoot%\Web\wvleft.bmp”
Default = “%SystemRoot%\Web\wvline.gif”

Every time an htt file is rendered, without any local-remote or any zone consideration, those variables are replaced with the current system’s path.
This is the code inside mimeflt.cpp which contains the bug:Lines 360 to 433:


void ConvertBytesToTChar(LPCBYTE pBuf, UINT nCharSize, LPTSTR psz, int cch) {

    if (SIZEOF(char) == nCharSize) {
         SHAnsiToTChar((LPCSTR)pBuf, psz, cch);
    } else {
        ASSERT(nCharSize == SIZEOF(WCHAR));
         SHUnicodeToTChar((LPCWSTR)pBuf, psz, cch);

void ExpandMacro(LPBYTE pszMacro, LPBYTE pszExpansion, int nBytes, UINT nCharSize) {

    TCHAR szExpansion[MAX_PATH];
    szExpansion[0] = TEXT('');
    TCHAR szTCharMacro[MAX_PATH];

    ConvertBytesToTChar(pszMacro, nCharSize, szTCharMacro, ARRAYSIZE(szTCharMacro));
    TCHAR szKey[MAX_PATH];
    StrCatBuff(szKey, TEXT("\\"), ARRAYSIZE(szKey));
    StrCatBuff(szKey, szTCharMacro, ARRAYSIZE(szKey));
    HKEY hkMacros;
    if (RegOpenKey(HKEY_CURRENT_USER, szKey, &hkMacros) == ERROR_SUCCESS && RegOpenKey(HKEY_LOCAL_MACHINE, szKey, &hkMacros) == ERROR_SUCCESS) {
        DWORD dwType;
        DWORD cbData = SIZEOF(szExpansion);
        SHQueryValueEx(hkMacros, NULL, NULL, &dwType, (LPBYTE)szExpansion, &cbData);

    ConvertTCharToBytes(szExpansion, nCharSize, pszExpansion, nBytes);

int CWebViewMimeFilter::_Expand(LPBYTE pszVar, LPBYTE * ppszExp) {
    if (!_StrCmp(pszVar, "TEMPLATEDIR", L"TEMPLATEDIR")) {
        if (!_szTemplateDirPath[0]) {
            GetMachineTemplateDir(_szTemplateDirPath, SIZEOF(_szTemplateDirPath), _nCharSize);

         *ppszExp = _szTemplateDirPath;

    } else if (!_StrCmp(pszVar, "THISDIRPATH", L"THISDIRPATH")) {
        if (!_szThisDirPath[0]) {
            _QueryForDVCMDID(DVCMDID_GETTHISDIRPATH, _szThisDirPath, SIZEOF(_szThisDirPath));
        *ppszExp = _szThisDirPath;

    } else if (!_StrCmp(pszVar, "THISDIRNAME", L"THISDIRNAME")) {
        if (!_szThisDirName[0]) {
            _QueryForDVCMDID(DVCMDID_GETTHISDIRNAME, _szThisDirName, SIZEOF(_szThisDirName));
        *ppszExp = _szThisDirName;

    } else {
        ExpandMacro(pszVar, _szExpansion, SIZEOF(_szExpansion), _nCharSize);
        *ppszExp = _szExpansion;

    return _StrLen(*ppszExp);

In Windows XP the variables “%THISDIRPATH%” and “%THISDIRNAME%” were removed from the Mime Filter which means %TEMPLATEDIR%, %BACKGROUNDIMAGE% and %LOGOLINE% would still be translated into the current windows directory.

The Proof Of Concept code (Remote WebView Macro Translation):
Save on a remote host with an htt extension and replace “http:///filter_trap.htt

--------------------------- filter_trap.htt start ------------------
[div id="LOGOLINE"]%LOGOLINE%[/div]
--------------------------- filter_trap.htt end -------------------

Microsoft was notified a few months ago, the problem will be fixed.


Security Cameras – To See Or Not To See?!

These days, security is going digital.
From live and automatic event log analysis up to personal “on-key” tokens and remotely controlled security cameras.
These technologies should be used carefully. For example if the token generates 6 digits and there is no password complexity enforcement, users can set their password to “1″ and then we’ll get a 7 character length password. If the data from the log will not be filtered and will be in html format, it may execute code. Even worse, if it is viewed at the command line console, it may execute code using the console color control characters.
When talking about security cameras, a security flaw in the camera’s simple application server may cause the entire video stream to be accessible to an intruder.

While consulting to a big financial customer, I discovered the security cameras installed are easily accessible to anyone thanks to a very simple logical flaw. Not to mention default user accounts, empty password sets, the ability to brute force, directory traversal and some classic authorization bypass vulnerabilities.

Most of the security cameras in my country are bought from Korea, some of the software is written by the vendor and some by the distributer. Both of them should pay much more attention to security so we won’t have the same classic vulnerabilities over and over again.
Attached are a few screen captures:
another white night at work
another white night at work
Clothing Shop
Clothing Shop
Coffee Shop
Coffee Shop
Eyes on the ball!!!
Eyes on the ball!!!
How's that shirt?
How’s that shirt?”
Anyone knows a Safe-Cracker?!
Anyone knows a Safe-Cracker?!

ICQ Phishing – You Type, They Sell

My friend ax1les has a 5 digit ICQ number and he always gets wiered messages that turn out to be phishing or links to trojans. A few days ago, he got this message:

He thought it would be a good idea that we’ll take a look at that website together, and we did :)

In the last decade russians really mad fun of the world using the Internet.
The website is a phishing website that “confirms” your ICQ account credentials are still valid (yeah right). The amazing thing is he didn’t even bother changing the title from the former text “” :)

But of course his business is really successful as he is also the owner of the mega-icq-shop, he is trying to hide so much that he event left it in the domain’s whois details……

Domain ID:D28335226-LRMS
Created On:20-Apr-2009 07:27:17 UTC
Last Updated On:29-Apr-2009 15:01:04 UTC
Expiration Date:20-Apr-2010 07:27:17 UTC
Sponsoring Registrar:Directi Internet Solutions Pvt. Ltd. d/b/a (R159-LRMS)
Registrant ID:DI_9732581
Registrant Name:Andrey Petrovich
Registrant Organization:Private person
Registrant Street1:Krasnoarmeyskaya 18 dom 4 kv 32
Registrant Street2:
Registrant Street3:
Registrant City:Moskva
Registrant State/Province:Moskva
Registrant Postal Code:132132
Registrant Country:RU
Registrant Phone:+7.4951783223
Registrant Phone Ext.:
Registrant FAX:
Registrant FAX Ext.:
Admin ID:DI_9732581
Admin Name:Andrey Petrovich
Admin Organization:Private person
Admin Street1:Krasnoarmeyskaya 18 dom 4 kv 32
Admin Street2:
Admin Street3:
Admin City:Moskva
Admin State/Province:Moskva
Admin Postal Code:132132
Admin Country:RU
Admin Phone:+7.4951783223
Admin Phone Ext.:
Admin FAX:
Admin FAX Ext.:
Billing ID:DI_9732581
Billing Name:Andrey Petrovich
Billing Organization:Private person
Billing Street1:Krasnoarmeyskaya 18 dom 4 kv 32
Billing Street2:
Billing Street3:
Billing City:Moskva
Billing State/Province:Moskva
Billing Postal Code:132132
Billing Country:RU
Billing Phone:+7.4951783223
Billing Phone Ext.:
Billing FAX:
Billing FAX Ext.:
Tech ID:DI_9732581
Tech Name:Andrey Petrovich
Tech Organization:Private person
Tech Street1:Krasnoarmeyskaya 18 dom 4 kv 32
Tech Street2:
Tech Street3:
Tech City:Moskva
Tech State/Province:Moskva
Tech Postal Code:132132
Tech Country:RU
Tech Phone:+7.4951783223
Tech Phone Ext.:
Tech FAX:
Tech FAX Ext.:
Name Server:NS1.AGHOST.RU
Name Server:NS2.AGHOST.RU

Anyway, the really wiered thing about this case is that while i am writing this post this website is not loading anymore…the DNS no longer resolves to any IP and their former IP reponse with “Apache is working properley” when requesting the Host “”.
May be I scared them away with a few little DNS requests or the cops just randomly knocked on their door :)   


The “DesktopSmiley, Not A Spyware” ToolBar

The “Not A Phishing Worm” really got me interested as it sent special Christmas messages so I decided to dig in just a bit. So as discovered, after the user supplies his MSN credentials, his friends get a link to the “Not A Phishing” website and a lot of tricky links leading to to download their toolbar. Which they say is “Not Spyware”.

So we got a non-phishing worm downloading a non-spyware program, let’s see its non-evil actions :)
The first thing I did was downloading the installer, which asks no questions and shows no EULA. It is also digitally signed by “DoubleD Advertising Limited”, well that’s really funny, we have got to give them that :)

So I ran it in a VM:

That is quite original! “A non-virtualized hardware system is required”, of course anybody technical gets how lame this lie is :)
why would an IE toolbar “require” a “non-virtualized hardware”, why would it even bother to check if it’s running under a virtualized environment unless it has some illegal actions to hide?!

Well i am defiantly not going to execute it on my machine :)
Maby i will test is some other day on a real machine with Restore-IT/Ghost

In the meantime, let’s take look at some of the things that it does:
It copies some IE settings from HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ to HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\ except for (AutoDetect and UNCAsIntranet which exist there and get modified):
ProxyBypass:1 (default 1)
IntranetName:1 (default 1)
MigrateProxy:1 (default 1)
AutoDetect:1 (default 0)
UNCAsIntranet:1 (default 0)
ProxyEnable:0 (default 0)

It sure looks like someone is going to assign a proxy for us :)

The setup process command-line:
“C:\Documents and Settings\Insider\Local Settings\Temporary Internet Files\{5617ECA9-488D-4BA2-8562-9710B9AB78D2}\stbup.exe” /new /src=user

the “/src=user” really sounds like there are cases which the user did not initiated the installation :) it could be used for self-update though.

Lets examine some of the the strings in the memory of this “DoubleD” software:
Well, i don’t want to point a blaming finger but it seems this “legitimate smiley IE toolbar” is very interested in getting some access to our saved PuTTY SSH hosts…quite innocent

There are a lot of weird stuff this spyware does, like starting a local proxy which explains how they steal data from IE and makes this self-updating software a cool way to make a non-botnet botnet :)
It also implements an SSH client and almost every famous encryption algorithm (rinjdeal, AES, des, 3des, blowfish) looks like it does local MITM attacks to SSH login software.

So get root and Smile away with it :)


The MSN “Not A Phishing Worm”

This is a funny one actually :)
I am just working as usual when I got the following message on my MSN Messenger:

This is how real girls party. Great high quality pictures on

Now of course i understood that it’s a worm, but still, lets see where it leads to.
So I went into the site and it looked like this:

With what i have seen until now, this is a classic phising site, I saw dozens
like it for Yahoo! in the past. But wait! lets look at that GREY text blow:

Terms of Use / Privacy Policy:

By filling out this form, you authorize T P Ltd to spread the word about this new 100% real and upcoming Messenger Community Site. You will receive your share of the credit in helping us spread the word. This is a harmless Community site which is offering users a platform to meet each other for free.

We do not share your private information with any third parties. By using our service/website you hereby fully authorize T P Ltd to send messages of a commercial nature via Instant Messages and E-Mails on behalf of third parties via the information you provide us. This is not a “phishing” site that attempts to “trick” you into revealing personal information. Everything we do with your information is disclosed here. If you are under eighteen (18), you MUST obtain permission from a parent or guardian before using our website/service.

This page is not affiliated with or operated by Microsoft(tm) or MSN Network(tm).


We may temporarily access your MSN account to do a combination of the following: 1. Send Instant Messages to your friends promoting this site. 2. Introduce new entertaining sites to your friends via Instant Messages.

This is a free service. You will not be asked to pay at any time. You will not be subscribed to anything asking for payment. This service is made possible by many hours of human effort.

T P Ltd reserves the right to change the terms of use / privacy policy at any time without notice. To view the latest version of this privacy policy, simply bookmark this page for future reference.

You understand that this agreement shall prevail if there is any conflict between this agreement and the terms of use you accepted when you signed up with MSN. You also understand that by temporarily accessing your msn account, T P Ltd is NOT agreeing to MSN’s terms of use and therefore not bound by them.

This agreement shall be construed and governed by the law of the republic of Panama. You expressly consent to the exclusive venue and personal jurisdiction of the courts located in the Republic of panama for any actions arising from or relating to this agreement.

If any provision of this agreement is held to be invalid, illegal or unenforceable for any reason, such invalidity, illegality or unenforceability shall not effect any other provisions of this agreement, and this agreement shall be construed as if such invalid, illegal or unenforceable provision had not been contained herein.

Copyright 2008 T P Ltd

OK, they said in the text:

This is not a “phishing” site that attempts to “trick” you into revealing personal information.

So they don’t want our usernames and password, which is also the EMAIL of most people, yeah I believe them, sure.

They just want to:

1. Send Instant Messages to your friends promoting this site. 2. Introduce new entertaining sites to your friends via Instant Messages.

Which is completely different with what a worm does. A worm just spreads and “introduces”, “entertaining” sites with a lot of porn and exploits.

By using our service/website you hereby fully authorize T P Ltd to send messages of a commercial nature via Instant Messages and E-Mails on behalf of third parties via the information you provide us.

Yeah why not, take my account and send spam “on behalf of third parties” and if they get like hacked or something, we are not responsible, you agreed to this.

I believe this should be called “Legal Phishing User Agreement” or “Worm As A Service”.
It is also a little wiered that a “legal” domain called “” is dealing with MSN accounts and not PICTURES FROM PARTIES and has unlimited(*.) subdomains and only 1 page, don’t you think?!
Ofcourse they used the domain protection:

Admin Name:WhoisGuard Protected
Admin Organization:WhoisGuard

Well, don’t fill any form you see without reading the small (and in this case GREY) prints :)

The same worm also sends this message:

“[msn_dst_user], claim your Prize!

Any file or subdomain in redirects to

Which is also registered by WHOISGuard.
Both these websites were built to make people download this:

Which they claim is:

“Download DesktopSmiley to get 1000′s of FREE Smileys!
It’s totally FREE! No Registration. No Spyware.”

Yes, a toolbar advertised by a WORM is not spyware, sure…
The example above was version 2.0c. It seems these guys used different methods and different domains and different company names in the older versions (which is typical to viruses and spyware but not to legitimate software).
The following example belongs to an older version 1.1c whi MSN message:


Which prompts a download for “” which is an EXE file with a COM extension and where ran “True Type Detection” will be made by windows loader and it will execute as the regular EXE file it is.
Those people don’t care a bit and they left “Directory Browsing” open in the subdomain’s root, check it out at:
They even forgot to remove their private packer from the site:

They also have a version at: (which i think just went down…)
Which loads ”” and ”” and VERIFYS the request’s REFERER is ”” so direct reference to these files returns “404 Not Found”.


A new MSN Worm

Are viruses attracted to me specifically or it happens to everyone and they just don’t notice or say nothing about it. It getting really hard to speak with people using instant messengers and to be sure it is them sending you a message and not a virus.

Before i begin, let’s notice a few close viruses :)
Is a different one, older one from July. Reported and still not fully detected by vendors.

Now for the painful part, this:
a little older variant that was covered in June!!! that is 5 month ago!! the detection rates were nasty, they still are as you will see afterwards…
The point I don’t get is why don’t AV vendors take care of the missed detections at least AFTER some security researcher publishes an analysis?!

I got a message from a friend who is currently having a trip in thailand and i was amazed to see that his computer sent me a message with a link with my msn email in it. I clicked the link and here a file download prompt pops up and the file name is: “virus-PIC006.JPG-www.myspace.exe”.
Well, as tired as i may be, i would never be THAT tired to execute it :)

So i saved it and started to analyze!
Well what is it? it is a self extracting cab archive(almost original :) with resource details spoofed to be a microsoft file! (it even looks like it was edited manually using a tool such as Resource Hacker)
File Version: “6.0.2900.2180″
Description: “Win32 Cabinet Self-Extractor ” (may be they thought we won’t notice the spaces :)
Company: “Microsoft Corporation”
File Version: “6.00.2900.2180 (xpsp_sp2_rtm.040803-2158)”
Internal Name: “Wextract ”
Language: “English (United States)”
Original File name: “WEXTRACT.EXE ”
Product Name: “Microsoft® Windows® Operating System”
Product Version: “6.00.2900.2180″

Well again it seems that Winrar is more effective than an Anti-Virus, where it detects it as a self-extracting archive so i know it’s no simple exe:

The funniest think about this “trap file” is that it has double extension of .jpg………..exe that comes with the default icon of a jpeg file

BUT when you switch to DETAILS view in the browser, then you see its 16×16 icon which is a setup icon:

Dear bad guys! use some of that money you steal to do some Q&A for your bot droppers!
O.K let’s see if our friends know it:

9 of 36…wow!
Could it be that Symantec, Mcafee, Kaspersky, F-Secure, Panda, Sophos all the great brands does not even suspect it?! and that Microsoft which is quite new in the AV business catches it?! I want to point out Dr. Web again for being a good detector(comparing to the concept of an Anti-Something) as Kaspersky once were, before they went to enterprise and from tech to GUI (if i was kaspersky, i would by dr web…just a thought)

So we extract the sfx and we get a file called test.exe with a jpg icon, this time it’s not an archive, here comes the real shame, it is not even packed!!!
Let’s see if our friends know it:

it is just a simple VC++ executable that uses dynamic function calls with the simplest use of a rolling xor running on the string “somenigz’, quite amusing :)

.text:0040122E mov [ebp+var_340], 0
.text:00401238 push offset Source ; “¦âöÉàöíâPÆöé馔
.text:0040123D call sub_401000
.text:00401242 add esp, 4
.text:00401245 push eax ; lpProcName
.text:00401246 push offset aFgqfaXaa ; “Üöâƒö¥-+¯ò¥¥”
.text:0040124B call sub_401000
.text:00401250 add esp, 4
.text:00401253 push eax ; lpModuleName
.text:00401254 call ds:GetModuleHandleA
.text:0040125A push eax ; hModule
.text:0040125B call ds:GetProcAddress

You can see these letters “Üöâƒö¥-+¯ò¥¥” which are clearly XORed sent to a function, the classic “decrypt my dll name and then the function in it and call it”. Of course “sub_401000″ is the decrypt function:

.text:0040105D Rolling_Xor_Loop: ; CODE XREF: sub_401000+85j
.text:0040105D mov edx, [ebp+var_C]
.text:00401060 add edx, 1
.text:00401063 mov [ebp+var_C], edx
.text:00401066 loc_401066: ; CODE XREF: sub_401000+5Bj
.text:00401066 cmp [ebp+var_C], 9
.text:0040106A jnb short loc_401087
.text:0040106C mov eax, [ebp+Str]
.text:0040106F add eax, [ebp+var_8]
.text:00401072 mov ecx, [ebp+var_C]
.text:00401075 mov dl, [eax]
.text:00401077 xor dl, byte ptr aSomenigz[ecx] ; “somenigz”
.text:0040107D mov eax, [ebp+Str]
.text:00401080 add eax, [ebp+var_8]
.text:00401083 mov [eax], dl
.text:00401085 jmp short Rolling_Xor_Loop

Decoded XORed strings, by order, are:

This shows us this was not written by simple kids! this is a professional code injection using thread contexts, this teaches us that the guys “on the wild” have learned beyond besides CreateRemoteThread!!!

It seems that this version relates to: which is unknown to “norton safe web” (yeah right): but it’s older variant is known “”:
What separates us from the criminals is the “protected domain services” which is mostly used by criminals…again no internet cops :)

Now it executes itself! parses its duplicate’s PE and sections and injects code into it!
Then it dumps a hidden exe in %windir%(c:\windows) called fxstaller.exe(48kb) which this time has a jpg icon in both the 32×32 and the 16×16 :)

This exe drops/downloads image.exe(48kb) in a new temp folder in %temp%

This results are crippy!!! i guess Dr.Web also failed and there is no one left to trust but Microsoft!
Then service.exe(144kb) is dropped at %windir$\system32\service.exe, a hidden file with a darth vader icon :)

This exe of darkness downloads and executes a file to c:\msn.exe

Now some deeper information, for the researchers among us. Why their url is not blocked?! because they are tricky!!!
They “try” do download which redirects to

Then it requests
GET /cn?sid=40545F5A4F1F545B365C365836085B51363A0C1B1F000A0C4939080A02495B4F0A000D542F5C2B282F2D5A5C5A2D5E2C5D5A5B282B2B5E582C5F5151592D2C515D2A5A5A4F081D544F131854594F1D1954594F080F0F000D54585F515D51504F04061B1901000D5408075B0E4F1B0C1F000D54505C505B692901 HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)

And gets

HTTP/1.1 200 OK
Date: Thu, 13 Nov 2008 00:04:56 GMT
Server: Apache/2.0.61 (FreeBSD) PHP/5.2.3 with Suhosin-Patch mod_fastcgi/2.4.2
Set-Cookie: sid=EE1DDFD5947B45F595556BD6D7E9C1A7; expires=Sat, 07-Nov-2009 19:04:56 GMT

Content-Length: 127
Connection: close
Content-Type: text/html


Then it sends stuff about me, to get the commands for this cool trojan!

g_Version: 1156
g_ClientGUID: ,`Xc,q!`!q-Kk!JcXX-yK9NNGqKNk=!!
g_UID: Xk!-,=c=Xyy9yyqqXkJky9NkNh=,,,,,
g_SetID: [QJx
g_AffiliateID: y9NkNh
g_ResourceID: MnOM
g_URL: 8

g_Client: .Sf"yhJ:y9N:y!y:9` %?[H[Q]F:FBxFf@8/FQ”`:y:J9GGg)O?BFVO S[VE Ji8.K"-:G:`-!G:y!8vR"^yJG8Z}V"|OW?Om8*) uOxFfUO?On U}" =?}m8rc="GG^G!^aa^NG^`9^Gk8*K [VV}]QUf”0S*S!p[IO"f[n[f)rvSp[IO"f[n[fb8 =?}m86Wn"GGGGGkGh>#GGGGGkGq8p]IWO? }a H?}VOff}?f” y8.f_fO?cnIFQ” 1Of8o)]VV=}QQ”QOBO?o=}QQ”QOBO?o=}QQp]I”Go,FAO” =”z/.pq*/)zf~fUOI!JzQQQAPFF.:nAAo.QF fFMO” !kkoqOaX?}mfO?”D=”zS?}x?[I ,FAOfz.QUO?QOU KYHA}?O?z.KeSZ*uK:KeKD ^Q}'}IOoqOfEU}H)~fUOI"qOfEU}Ho
g_GZipSupported: U?]O
g_RevID: h9J-
g_First: y
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
Content-Length: 37
Cache-Control: no-cache

)vcv.)v.=) 0%nDDn@%r}MFAA[|FfU}?~" @b

And gets:
HTTP/1.1 200 Ok
Server: nginx/0.5.35
Date: Thu, 13 Nov 2008 00:05:26 GMT
Content-Type: text/html; charset=iso-8859-1
Connection: close
Pragma: No-cache
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Content-Length: 219
Content-Language: en
Set-Cookie: uid=Xk!-,=c=Xyy9yyqqXkJky9NkNh=,,,,,; expires=Mon, 09-Dec-2007 13:46:00 GMT
Set-Cookie: guid=,`Xc,q!`!q-Kk!JcXX-yK9NNGqKNk=!!; expires=Mon, 09-Dec-2007 13:46:00 GMT
Set-Cookie: cn=y; expires=Mon, 09-Dec-2007 13:46:00 GMT
Test: [B[FA
g_AdCategory: )}IO
g_ConnectionPerDay: k
g_Popup: U?]O
g_PopupPerDay: yGy
g_RSD: ‘UUH”88}WFOWO:V}I8x}88o’UUH”88nO?}]fUF:V}I8x}88o
g_RedirectServers: ‘UUH”88NJ:hN:J!`:!`8x}88o’UUH”88N`:y-:y99:y-G8x}88o’UUH”88N!:ykh:yy`:ykN8x}88o
g_RevFlag: G
g_ServerIPs: gWOfV}?}:V}I”NGigNh:yNN:y9:!9″NGigN!:ykh:yy`:yk-”NGi
g_SetIDWas: _Q?OAO[fOn
g_StatisticsUploadDelay: y
g_StealFocus: a[AfO
g_UID: Xk!-,=c=Xyy9yyqqXkJky9NkNh=,,,,,
g_URL: 8

+=/~..`Y. ……..B……..X

Then it “trys” to download and again redirected to:
Then it downloads to c:\msn.exe
From here it looks like it is the same old tech viruses (keyloggers and the classics, i don’t have time for these files…..):
rundll32.exe C:\WINDOWS\system32\vtUolLBS.dll,a (vtUolLBS…. == random name)
rundll32.exe C:\WINDOWS\system32\nnnljiiI.dll,c
rundll32.exe C:\WINDOWS\system32\iifgHbyY.dll,a

So let’s summarize!

Evil hosts:

The AV vendors should receive my scanned files from virustotal.
I will also make an exception on this one and upload a sample for all the involved executable!
archive password: “virus”

Stop them, sue them, black list them, hack them, they are stealing from all of us!
Fight for digital law enforcement!!!


Pen-Tests in 2008 and Why don’t you crack ssh?

I made a pen-test lately to a medium size American firm and it seems public remote exploits for devices such as Juniper, Netopia, Cisco (telnet) and default Linux services has gone to as low as one or two for each since 2004.

Since any respectable firm has windows update turned on and the Fedora style Linux distribution also has automatic updates, I got to the conclusion that the cycle of:
Safe –> Research –> Exploit –> Public Disclosure –> Patch –> Automatic Update –> Safe
results that Black-Box Penetration Testers don’t have much to show the client except for configuration errors and a few user enumerations and less critical stuff that don’t get fixed by the vendors.

The solution for that would be that pen-testers will find their own exploits. That is why in the last years most of the written tools are fuzzers.
Cisco, Netopia, Juniper and Linux services were already fuzzed as hell before they were shipped to clients so this doesn’t seem to be a good approach to the problem.

My suggestions:
1) if you are a pen-tester, research and discover your own vulnerabilities and create workarounds for them, show it to your client and keep it to yourself!
2) If you are a researcher, supply a working P.O.C because the pen-testers doesn’t have time to buy that machine and develop a working shellcode to work with your vulnerability

Being 13 hops away from the machines I had been pen-testing I was amazed to see that products which are extremely mainstream and trusted fail for such a simple task.
I used Nmap to scan the network range (of course with -P0 or -PN in the new version) and just two HTTP servers were discovered from 8 hosts, as I am not a big fan of Nmap I returned to what I was using in the past GFI Languard.

I scanned the targets using GFI Languard (which is a great tool when used inside local networks) and I set complete TCP and UDP ports scan with 20 seconds TCP timeout and 8 seconds UDP timeout, this timeouts are EXTREME and should achieve the most accurate results. The scan results were very poor, detecting about 3 open ports on 8 machines!!! Of course I checked nothing else is running on my internet connection to make sure this was just a bad dream. I scanned again and one more port was discovered, SSH!

I decided this cannot be true and I returned to Nmap using the “slow and Intensive” scan and the results were better, about 5 TCP ports and 1 SNMP, I thought “still no way that is all they got!”

Finally, I installed the latest version of Nessus (Tenable Nessus 3), configured it to be with high timeouts and ran the scan. The results were AMAZING!!! It didn’t miss any of what the other scanners have found and he discovered 15 more UDP ports and 7 more TCP ports. From now on, I am only scanning with Nessus, my time is worth it!

Now that I had some interesting services to attack, I wanted to try and log into one of the Linux machines using SSH. To me it sounds simple, “I will download a dictionary/brute force SSH tool and that’s it”. Apparently not!
There is an ancient perl script running all across the web to do SSH and “expect” THAT-IS-LAME. Some guy really agreed about that and wrote a ruby script to use the lib NET::SSH and automate attempts, quite similar to Tim’s SShatter perl script, that is nice but still no multithreading supported.
Of course you may think “Why not use T.H.C Hydra?”, the answer would be because by default it’s not configured to be compiled with LIBSSH and you got to get some libs, you will burn a few hours to make it work!

My dear friend “Kiril Nesenko” AKA “axi1es” wrote for YOU guys the script for “The Common Lazy Fedora Guy” which will download hydra, the SSH and other libs, will configure and compile it and will execute the Hydra all automatically, enjoy! :)


Automated spreading of malware through vBulletin forums

Where would it be better to attack then where all the people trust each other?
A single individual or a group of individuals of which tracks lead to Turkish people and Chinese hosting or Chinese partners is spreading viruses though infected files and setup installations shared in vBulletin forums. It seems these individuals have a registration bot with captcha bypass mechanism for vBulletin 3.7.xx versions (may be other versions too) and they are using it to spread all kinds of malware.

I first found this when examining another Kaspersky 2009 installation located at:

The username spreading this message is “hakan_72_123″ and with a simple google search we can see:

Hakan is not very shy to use the bot with his own name, go figure maby he is infecting thousands of forums manually?!
Anyway he in which explains a lot :)

So what did he do? he took the time to upload Kaspersky 2009 to

Well I just checked and it has been 2 month since I found it and the bad guy extended the business for torrents too, this is the same virus under the title “Kaspersky Antivirus 2009 Full + Key [App][] “:

Inside the rar there is a txt file with the text:

1- program demo deðil full sürümdür.

2- key girmek için þu sýrayý takip et
license-merge-activate using key-brovse= buradan keyleri
çýkarttýðýn klasörü seçip listenin en altýndakin üzerine çýft týklayýp
keyi gir.


What they did is instead of the standard shared .msi file, they put a WinRAR self-extracting archive with an icon of an msi file. They made the archive so that WinRar’s shell extension doesn’t recognize it as extractable. Once executed it drops a file called svchost.exe in “%ProgramFiles%\Outlook Express\” which is a refreshing path to drop a trojan downloader in :)
It executes the svchost.exe (compressed with MiniPE) which then executes
the trojan downloaded to %temp%\wmoptimizer.dll using rundll32.exe:

rundll32.exe “%temp%\wmoptimizer.dll”, RunSetup_Install

svchost.exe uses the classic URLDownloadToFileW and ShellExecuteW to download and execute:

These is the whois information for

Registration Service Provided By: Chinese DQ Network Tech Corp.

Domain name:

Registrant Contact:
Shawn Lee
Shawn Lee

B-902,Zhongxing Huayuan,No.1102,Zhongshan Dadao,Tianhe Distr
Guang Zhou, Guangdong 510660

Administrative Contact:
Shawn Lee
Shawn Lee (
Fax: +86.02033875805
B-902,Zhongxing Huayuan,No.1102,Zhongshan Dadao,Tianhe Distr
Guang Zhou, Guangdong 510660

Technical Contact:
Shawn Lee
Shawn Lee (
Fax: +86.02033875805
B-902,Zhongxing Huayuan,No.1102,Zhongshan Dadao,Tianhe Distr
Guang Zhou, Guangdong 510660

The email also registers “”

Registration Service Provided By: Chinese DQ Network Tech Corp.

Domain name:

Administrative Contact:
Chinese DQ Network Tech Corp.
Ren XiaoFeng (
Fax: +299.05306260803
ZhongHuaDonglu 1038hao
HeZe, 274000

Technical Contact:
Chinese DQ Network Tech Corp.
Ren XiaoFeng (
Fax: +299.05306260803
ZhongHuaDonglu 1038hao
HeZe, 274000

Registrant Contact:
Chinese DQ Network Tech Corp.
Ren XiaoFeng

ZhongHuaDonglu 1038hao
HeZe, 274000

Well this is the part where I can only say, if you are reading this and in some kind of cyber police, DO SOMETHING!!!


Keylogger Running Under Kaspersky 2009

The last posts clearly show It is well known that static virus detection is not something AV vendors do well enough. Now this one is quite a story. As I was researching many trojans I was moving files into and out of my Virtual PC machine used to test viruses. My computer has kaspersky 2009 installed and running with maximum security settings (including keyloggers and kernel object modifications).

I accidentally executed without noticing on my host PC one of the samples I was testing in the VM. I was using my computer as usual and I began noticing some kind of tiny delays when typing a lot of text, the kind of delays I was experiencing when I first wrote my first keylogger. I was completely surprised to have this suspicious since I felt “almost safe” with my updating every 4 hours Kaspersky 2009.

Opening “Process Explorer” I began examining the running processes and noticed some wiered dll files running in all my processes.
They were in system32 and these are the AV test results for these 2 files day (also 2 month ago):

I was surprised by two things:
1) Kaspersky Anti-Keylogger “live protection” compromised all my personal information
2) Symantec was the only AV really detecting this and as a keylogger, which is very funny because their AV is a joke, I will send a few posts about that later

I can’t believe this! I am now uploading the files again to virustotal to see the updated scan results for today and i notice this:

The file was first received by virustotal in 2007.10.23 which is 1 year ago!!!!!!!!!
This only proves us 2 things:
1) The malicious code writers WERE INDEED using virustotal’s “don’t distribute samples to AV vendors” which was lately removed!
2) All Anti-Viruses didn’t detect this wide spread keylogger which is used to steal peoples information for THE LAST YEAR!!!

I here by thank the creator of the matrix for letting me find it on my PC after just 2 days.
Here are today’s result for kbdth2sys.dll:

So after 1 YEAR it has been undetected and 2 MONTH after the AV vendors got my uploaded samples we get this amazing 10 of 36 result which leaves it undetected for: Kaspersky, DrWeb, McAfee, BitDefender, Microsoft, Panda, F-Secure, Fortinet and others…

As for kbdvntcapi.dll after all this, detection hasn’t really changed, 4 heuristic detections and 1 symantec keylogger detection, still a sad story (at least for most people :)

Well, I uninstalled my kaspersky 2009 :)


AVs fail Again

Lately I have seen many web downloads, some at forums and some at rapidshare and also a few torrents such as “Adobe Acrobat 9″ that include installation and a crack.
The installation or crack is in a password protected rar file that in order to get the password, one must run the suppled tool called “XXX Password Generator”.

This installs another variant of the AntiVirus 2008, I can truly say I can’t tell anymore if it comes from the same guys, ok of course it’s them but there is just no way they got so much man power to write so many completely different versions!!!
Here are the websites it pops up to purchase from:

Installs executables at:
%ProgramFiles%\Antivirus 2008\Antivirus-2008.exe
which is today detected by 24 of 36 AV vendors

This virus adds a scary DANGER! iframe to your desktop.htt, who would remove this for you?

It installed some dlls and executables which are very known to AVs:

There is as another variant I found called “AntiMalwareGuard_Free.exe” packed with PECompact 2.xx, this is considered detected relatevly to the other variants 19 of 36 AV vendors detect it.

So where is the problem???
The Troajn Downloader it self wasn’t detected by any vendor and now 2 month after I found it (which means the vendors got the samples from my virustotal file upload 2 month ago), now it is detected by only 15 AV vendors!!!

Kaspersky! McAfee! TrendMicro! Panda! F-Secure! Fortinet! Where are you people?!?!?!?!

The malicious guys have no problem replacing the executables at the server side to avoid detection, they even have the man power to write completely new ones.


Google fooled by the “Fake Anti-Virus Virus”

You probably know by now about the fake Anti-Virus that is planted everywhere to fool people into buying it, go figure maby it will self update some day and will start stealing bank accounts…
I can’t believe we have come to this to point where it is so spread and has so much different domains and versions and nobody stops them!!!

The internet needs some kind of global FBI to keep control over these criminals!!!
These guys operate from Russia and they are the “180 Solutions” team (i proove it below) which shows everyone that a criminal business in the internet is profitable and grows over the last 5 years, at least if its running from a country safe for cyber criminals (Russia!!!)

These is a wide viral network and they check for existence of any of their products, I saved the list of internet explorer blocked/trusted they look here:

So they infect us through cracks and software installations (fake setups, SFX, exe binding) and p2p (torrent, emule) and of course OS and browser exploits through warez websites.
Still, something is missing… it’s working too well this time! well get this!!

Please join my experiment, let’s assume someone just opens google and wants to download the mp3 of the Sopranos T.V series titled “you got yourself a gun”, so he should search “download mp3 sopranos got yourself a gun”, you can test it yourself:

Last week result number three was:

Sopranos Theme Song
You woke up this morning Got yourself a gun, Complete Guide to Entertaining – Sopranos Stile! Entertaining with The Sopranos May 25, 2008 Download Sopranos … – 13k

Now result number six is :

mas woemns rights woems woemsn bottle opener woen woen am woen of …
… up this morning got yourself a woke up this morning got yourself a gun woke … sopranos woke up this morning mp3 woke up this morning mp3 sopranos woke … – 35k

One can clearly see that last week result is very very convincing and the new one is also similar to a way a warez/mp3 website would appear in google, this leads directly to a page with auto download offering of this fraud virus.

1) Why isn’t this blocked by google who “maps all the evil pages in the world”?!
2) Google search engine is helping the bad guys to publish their virus in the top 10 results!

This issue goes way beyond searching for downloads, I even got it seaching people:

This viral network is so large I truly believe only government power can stop it.
Some of the endless domains they use to spread this virus:


b.t.w its extremely intelligent to create a “virus not considered as a virus” and spread it as a fraud software which no law enforcement cares about and then once its planted in millions of computers just update it to do steal you want and then even change it back…combination of a breach in the law and in the way viruses are treated by the AV industry.


SO Common and yet EVIL goes free :)

Before I start this one, I must say I never thought of myself as a blogger.
I was always reading other people’s blog thinking they try to be “I am cool I have a blog” kind of people. Well, I just think the malicious stuff I see everyday should be shared with YOU :)

At these times, torrents are currently the world’s most active network for file sharing. The current windows version is always One of the most shared files and therefore crime follows there :)

I recently decided to put it to the test and downloade the most “seeded” file I found, which was “Windows XP Pro.Corp. Edition SP3 June 2008 Update + SATA Driver”, this is still one of the most shared files. Of course I scanned it using the latest fully updated version of Kaspersky 2009 and Dr.Web which according to my test, are currently the best detectors on the market. Well, nothing was found…

So I load the iso, the AutoRun executes and I just “feel” something is wrong!! I look at Process Explorer and I see a process called “file.exe”…hmmmmm….
I figured out that the bad guys replaced the original “setup.exe” with a silent self extract WinRar installation with the original setup icon, it extracts a Trojan Downloader called file.exe and the original setup.exe to the temp directory and executes both the Trojan and the original setup (with CurrentDirectory as the winrar install path).

Here is a scan of the malicious “setup.exe” (today, 2 month after I found this) installer:

I said O.K maby they didn’t go through the trouble marking the “Installer”, but they did all detect the Trojan Downloader, right?

Well, they didn’t :)
This is really funny to see that all you need to be “a top notch” malicious software is to just download WinRar and NIST (NullSoft Installation System) and create a windows xp sp3 installation torrent, this is after 20 years of Anti-Virus security techonology by 7 billion dollar a year market.

More funny stuff! the author of this virus was so lazy he just put a list the relative path to the real setup executable of all the software he will infect and share in the internet so the “setup.exe” he made will now try to execute a list of files which only one should exist on your infected download :)
Some Examples:

Be aware of what you download! it seems the best way to tell if its an infected setup is to right click setup.exe and see if WinRar suggests “Extract To” (I am joking of course)
The executed “file.exe” downloaded which is also a NIST file and also a Trojan Downloader and my upload was the first time it was scanned in virustotal and you can guess the results:
Whats really annoying me in this result is that the 3-4 Anti-Viruses that “supply a solution” above and detect the downloader DOES NOT DETECT THE CONSTANT FILE IT DOWNLOADS which means all the malware creator needs to do is modify the downloader or use a new one and there he goes again infecting the entire planet and getting away with it!

Now “3913574.exe” downloaded
Which is not packed by a known packer and even isn’t identified as having a “packed entropy” by PEiD. Its a small application compiled by ms vc++ 7/8, 72kb.
Its import table it quite limited and it calls GetProcAddress to get:
SetProcessPriorityBoost, WriteFile, GetEnvironmentVariableA, InternetOpenA, ExitProcess, GetTempPathA, InternetCloseHandle, CloseHandle, TerminateProcess, CreateFileA, DeleteFileA,SHChangeNotify, lstrcpyA, lstrcpyn, InternetGetConnectedState, GetAdaptersInfo
SetThreadPriority, GetModuleFileNameA, Sleep, ShellExecuteEx, InternetOpenUrlA

Of course the strings are not plaintext and its also not XOR, how refreshing!!! its a nice code that identified a header byte and multiples the bytes with a word per this header, may be it is some kind of little compression.
Now more then 10 executables are downloaded into your system, some are detected by some AV’s and some are not, they are packed with Armadillo v1.71 and some with ASPack v2.12

These executables are saved in:

  • MicroAV.exe


  • 1.exe, 2.exe, 3.exe, 4.exe, 5.exe, 7.exe

and of course to %windir%\system32

  • MicroAV.cpl, apgambly.dll, biqwetjd.dll and three dlls with names of a 8 random [a-zA-Z0-9] string

About 5-6 entries are added to registry->Run to load the processes that bug you in the system tray. This home made looking trojan is much more advanced then it appears to be…
Clearly these evil guys are advancing and they don’t stop at loading from registry->Run
they start using advanced loading methods such as registering as Authentication Packages to be loaded inside LSA and as logon notification dlls to be loaded inside winlogon.exe(which is one of the best places to be in since it cannot be terminated)

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify\yayxuSIb]

“Authentication Packages”=hex(7):6d,00,73,00,76,00,31,00,5f,00,30,00,00,00,43,\


Windows “Open File – Security Warning” Dialog

Not so long ago, I found one of the most bizzar bugs. It seems there is some kind of bug in the parsing of the command line read from the registry for filetype handled by explorer.exe. This was checked on Windows XP SP3 but I guess it existent in SP2 too. This bug allows controlling the icon which appears in the “Open File – Security Warning” Dialog for all the executables downloaded from the internet.

Each time you download a file from the internet/intranet to a drive with NTFS file system an ADS (Alternate Data Stream) ini file which is called “Zone.Identifier” is created. This hidden ini file specifies the zone file came from, this can be the internet or the local network (intranet).

You can see it using the following in cmd:

“more < exe_from_internet.exe:Zone.Identifier”

The ini will be printed to the screen:

When you “click” (shellexecute) a file which his handler is explorer.exe then the Zone.Identifier is checked and if the zone is 3 (internet) the following screen appears:

Well it appears that each time you try to open an executable that came from the internet, the icon that will appear in this dialog will be parsed from an executable file called “.exe” or “%1″ in any directory of the “PATH” environment variable for the user running explorer.exe, for example:


you can create such a file using “cmd /c type c:\windows\system32\calc.exe > c:\windows\.exe”
or write a code to use CreateFile :)

The file request is FASTIO_NETWORK_QUERY_OPEN and the icon is cached in memory until explorer.exe process is terminated. If you want to further explore this case, here is the call stack: