Device Drivers Filled with Flaws, Pose Risk 189
Gary W. Longsine writes "Security Focus describes device drivers as an untapped source of buffer overflows, posing substantial risk not typically considered as part of a standard risk assessment. The security risks of device drivers on both Windows and Linux, including network (remotely exploitable) and hardware drivers (typically only locally exploitable) are discussed in the article. I've noticed that software you wouldn't expect sometimes installs a device driver component. I can understand this as a component of an antivirus or host based firewall, but it seems to be an oddly common design pattern on Windows, which clearly poses substantial risk."
Design pattern (Score:4, Interesting)
Could someone give me examples of this? Most software I use doesn't do this. It seems more of a design pattern for DRM stuff (like DVD audio).
Re:Design pattern (Score:5, Informative)
Re:Design pattern (Score:3, Informative)
Nice.
Re:Design pattern (Score:3, Informative)
Well, actually, Windows will reboot post install for a number of reasons, but for a game using Starforce, it makes sense.
Re:Design pattern (Score:3, Informative)
Wrong! Installing drivers is not a major cause of reboots on Windows. The only time you absolutely need to reboot is if you update the boot disk driver. There is no different than Linux. Any properly written Windows driver can be installed or updated without a reboot -- if the driver writer didn't do their job, blame them, not the OS.
The real cause of most reboots are attempts to replace active user-mode executables (EXE or DLL). Executable files cannot be replaced while they're running. This makes i
Re:Design pattern (Score:2)
BTW what is a boot disk driver? Is it something that you'd use if you, say, hot swapped your boot drive from IDE to SATA? Makes no sense my friend.
Re:Design pattern (Score:2)
Funny, I just changed my laptop's nvidia drivers two days ago, and no reboot was required. Are you sure you have your facts straight?
Re:Design pattern (Score:2)
When going from the default Windows driver to the 'real' Nvidia display drivers, there is a reboot required, no ifs ands or buts. Subsequent upgrades may not require this (as I don't constantly upgrade nvidia drivers on windows machines).
My original point still stands, installing drivers requires a Windows reboot (under certain circumstances).
Jeez, this is
Re:Design pattern (Score:2)
I think a reboot is required when one driver doesn't "fit" the hardware in place. I'm not sure of the specifics. But in my experience, if any driver (except for a mass storage driver on which the boot volume resides) requires a reboot, you're probably using the wrong driver, or a very poorly made "driver install utility".
So yes, I suppose your point stands, but only real
Re:Design pattern (Score:3, Insightful)
It's very much different than a reboot. My system keeps running, but the 'paint job' stops. You could have other processes in the background doing their job (like copying files in another shell or whatever) while you do the update. You unload the old kernel driver, load the new one, start X back up.
Re:Design pattern (Score:2)
Re:Design pattern (Score:2)
Re:Design pattern (Score:2)
Not true, in fact you could write your X applications to keep executing and re-attach once the X server was running again if you felt the need.
My music runs as a background process for this very reason. If X goes down I don't want it to take my music down with it.
Re:Design pattern (Score:2)
I've required post-install reboots in the following situations:
- Video device driver installations. (Win95-A also required restarting when you changed bit-depth.)
- Microsoft Age of Mythology, when it installed MS-XML on a system that did not include it previously. (Which seems to explain why it needs Admin privilages to install. System was XP.)
- Clon
Windows design flaws (Score:3, Interesting)
Yup. This is a major design flaw in the Windows kernel that dates way back. It's a significant part of the reason that you don't have to reboot Linux for anything other than a new kernel, but Windows frequently ne
Re:Windows design flaws (Score:2)
Windows Server 2003 significantly improves the terminal. It's not quite BASH, but it's actually pretty usable.
"Microsoft's decision to not support "real" links, just shortcuts, in their user-mode software."
This is a UI choice. Symlinks can behave poorly if they are abused. If you want them in Windows, there's a command-line tool to do it (in the XP resource kit) or you can get a program like Junction Link Magic. It's part of the k
Re:Design pattern (Score:2)
there are many examples ... (Score:5, Informative)
This leads to many problems like stuff found recently in almost all Computer Associates eTrust Antivirus [securiteam.com] products. Because Zonealarm licenced the same software, they were affected, too.
This is just one example of many :
So many well known enterprice Antivurs/Firewall companys create drivers that lead to security flaws and it is not limited to Windows....
MOD PARENT UP INFORMATIVE (Score:1)
Re:there are many examples ... (Score:1)
Re:there are many examples ... (Score:2)
Thanks for the information. Do you have any examples of non-Windows operating systems that have this category of problem in firewall software? (Antivirus not being an issue except for pre-OSX Macs.)
Re:Design pattern (Score:5, Informative)
I was thinking the same thing. Obviously some stuff will have a driver it installs because it is required for whatever it's doing. Examples of valid ones roll off easy enough: Daemon Tools (ISO emulation), UltraMon (multi-monitor manager), hardware-heavy optical disk apps like Alcohol 120% and Blindwrite, OpenVPN.
I think often times the reasons behind device driver usage are linked very closely to efficiency and ease of implementation. If you need close hardware access and want to be fast and efficient doing it then a device driver is probably best. Even if it were possible doing it with some sort of hook and DLL system, it's going to be a lot slower and more of a kludge.
I figure that while device drivers are another part of software that needs to be analyzed for security flaws, they really aren't that special. One of the simplest security flaws, a buffer overflow, can still be found in who knows how many programs? The fact that a driver runs near the kernel is something to watch for, but methods like DLL injection have enabled people to get kernel-privileged access before on Windows (remember getAdmin for Win2000?).
Re:Design pattern (Score:2)
Re:Design pattern (Score:2)
Re:Design pattern (Score:2)
i dont blame the 3rd party programers here. i blame MS shody work that forces them to this.
see previous examples of "disk intensive" software that installs drivers to compensate for windows lack of performance. you dont see schillys cdrecord package installing drivers in linux, BSD, Solaris, etc. to work properly. and i can still listen to music and surf the web while it burns a
Re:Design pattern (Score:5, Informative)
Re:Design pattern (Score:2)
Oh, wait...
Re:Design pattern (Score:2)
VS_VERSION_INFO
StringFileInfo
0000 04B0
CompanyName
Microsoft Corporation
FileDescription
Frame buffer simulator
FileVersion
5.00.2134.1
InternalName
videosim.sys
LegalCopyright
Copyright (C) Microsoft Corp. 1981-1999
OriginalFilename
videosim.sys
Produc t Name
Microsoft(R) Windows (R) 2000 Operating System
ProductVersion
5.00.2134.1
VarFileInfo
Translation
Re:Design pattern (Score:2)
To get round this the solutions I found on google are to write your own file system device driver. Many such drivers are available to buy.
One hardware driver one from way back. (Score:5, Interesting)
Surprisingly it still works on some systems more than 18 years after I first tried it.
Re:One hardware driver one from way back. (Score:5, Informative)
Re:One hardware driver one from way back. (Score:5, Informative)
Melissa
Re:One hardware driver one from way back. (Score:4, Insightful)
Re:One hardware driver one from way back. (Score:2)
Since Windows.
Re:One hardware driver one from way back. (Score:2)
Re:One hardware driver one from way back. (Score:3, Informative)
+++ATH0 is the modem command to hangup.
Re:One hardware driver one from way back. (Score:2, Informative)
+++ATH0 is the command you send to the modem to make it hang up.
Re:One hardware driver one from way back. (Score:2, Informative)
ATHO means "hang up"
so, "+++ATH0" being sent from the computer means hang this modem up now!
to embed that into a ping, use the "ping -f data" command, with data being +++ATH0 in aschii/hex
Re:One hardware driver one from way back. (Score:2, Interesting)
Re:One hardware driver one from way back. (Score:2, Funny)
Re:One hardware driver one from way back. (Score:1)
That's quite an amusing thought.
I used to see the sequence in people .signature files some time ago. I gess that got a kick out of diconnecting people reading email or usenet.
Re:One hardware driver one from way back. (Score:2)
Come off it mods, that was funny! What harm does it do? What's up, get caught out and taking your embarrassment out on the poster?
Re:One hardware driver one from way back. (Score:1, Informative)
How would that happen? The command has to be fed to the modem from the local system. If they type it into a reply and post it, then I could see that happening, but not just from reading. This is why the original poster said that it should be in a ping command -- the reply causes the hangup, not the ping.
Of course, there's also the point that someone else made that the modem is only supposed to enter command mode if the
Re:One hardware driver one from way back. (Score:3, Interesting)
Re:One hardware driver one from way back. (Score:2)
A number of ISPs had this kind of modems, so some fucktards used to put this in their sigs. (oh well for typical luser it's enough to put "press alt-f4 for more details" in the sig
There was even an attempt of using complex commands to make the modem dial back. That didn't work, unfortunately...
Re:One hardware driver one from way back. (Score:4, Informative)
Re:One hardware driver one from way back. (Score:1, Informative)
> what does +++ATH0 mean?
ping -p 2b2b2b415448300d
+++ puts a modem into command mode
AT tells it to come to attention
H0 tells it to change hook status to 0 (which means hangup)
when this is sent from a machine connected to a modem that's vulnerable, it will tell the modem to execute those commands. The return ping is what does this.
Re:One hardware driver one from way back. (Score:1)
ping -p 'ATH0+++' 127.0.0.1
as for ATH0+++, it tells the modem to hangup basically. If the right conditions are right (OS, drivers and hardware) the pattern string is passed as is thru the modem and evaluated. Google for >modem AT commands.
Re:One hardware driver one from way back. (Score:1)
Re:One hardware driver one from way back. (Score:2, Interesting)
You soon learnt the proper initialisation string to stop your modem hanging up. Something to do with setting the proper mask in one of the S registers, if I remember correctly.
Re:Defective drivers, yes (Score:2)
No. It should be surrounded by one second of nothing. The inter-plus timing is irrelevant.
For who is that news ? (Score:1)
Re:For who is that news ? (Score:2)
by default the inb/outb family of instructions is privileged - so you need supervisor/ring0 (ie. kernelmode) to execute them and there's a trap otherwise (which delegates to kernel, which can _check_ your arguments against some tables and grant your call, or not)
unfortunately in OSS unices there's a workaround in that root (uid 0) gets those calls for free to make xfree86 (and derivatives) happy.
this workaround doesn't check if you're actually
Re:For who is that news ? (Score:2)
I think the parent is referring to the IO ports (sometimes called registers) on the IO bus, not the CPU registers.
Video games are the worst offenders (Score:5, Informative)
For example, a few months ago, the nProtect anti-cheat system, which installs device drivers, had a buffer overflow in it that allowed local privilege escalation.
Melissa
Multimedia Keyboards (Score:5, Interesting)
whatever happend to the good old days when an IBM model M was all you needed
Re:Multimedia Keyboards (Score:4, Funny)
Re:Multimedia Keyboards (Score:2)
I for my part never installed ANY drivers for keyboard or mouse, but the "page forward/back" buttons of the mouse worked at once.
The same with my new usb keyboard... plugged in... "new HID-usb device found", after that the volume control buttons/program shortcut buttons worked at once.
Re:Multimedia Keyboards (Score:2)
No - there was a class of multimedia keyboards released in the Windows 95 era, which generally required a customized driver.
One example:
- The keyboard that was with a NEC computer purchased in ~1997 had kays that allowed launching special tasks. At the time, a special driver was required as well.
- Some functions of the driver adjusted sound volume, and provided visual feedback on the screen. This OSD was not compatable with DirectX/OpenGL applications and
Re:Multimedia Keyboards (Score:3, Interesting)
the box says it supports IE only (a mouse suporting a browser!? wtf!?) which refers to the forward and back butons. but if you don't install the crappy software, the buttons work fine in firefox.
I suspect the main purpose of the software is just to try to force a taskbar icon on users to act as a form of self-advertising. it certainly isn't to make the mou
duh. (Score:5, Informative)
Re:duh. (Score:1)
I'm not a programmer, but from what I've read on /. lazy programming is the main explanation for missing/improper bounds checking.
Is it really that hard? Does it take that much more effort?
not that easy (Score:5, Insightful)
Now to go around this problem the attacker may need to get the user to execute some code on the machine and this could mean that if the code is executed - even on a Linux box for example, and the code exploits a device driver flaw, due to the monolythic kernel structure of Linux it is in principle possible to execute code that will say change user privileges to admin level. I guess this would be much more difficult with a microkernel approach like what Hurd is supposed to be, because even device drivers will run in managed memory mode.
Re:not that easy (Score:2)
Seeing as how drivers are often closed source - even some on Linux - we rely upon IP holders and their developers for both design and maintainance. Rarely do you get good service in both areas. Especially when drivers are "free" (i.e. you pay for the product and get a driver with it), maintainance is not popular among businesses unless it is a major p
Re:not that easy (Score:2, Insightful)
Today there are literally thousands of variants different worms exploiting dozens of different buffer overflows. Most of them are derivative, relying on published source code produced by one person, and sometimes on a toolkit. If there are dozens or hundreds of buffer overflows in commonly used device drivers, they will get discovered and some of them will be exploited. Some of them mi
Re:not that easy (Score:5, Informative)
Drivers on Windows NT are reasonably well protected. If a driver attempts to do something it's not supposed to (like access an address outside of its assigned address space) this will be trapped by the kernel and you'll get a STOP error (BSOD). That's what the STOP errors are for, any event where a device driver has performed an action that could compromise the data in the system if the system were allowed to go on running. It's also why STOP errors drop you out to standard VGA text - to avoid using the graphics drivers anymore.
Probably the greatest security flaw you could acheive in a driver is a denial of service, although they run at the kernel level, they still don't have system-wide access. There may be some way to gain that, but I doubt it. They certainly don't have access to user mode, and to access disks and e-mail clients and so on they'd have to go up to user mode level. Due to the lockdown on their address space drivers cannot communicate with oneanother, and in order to access the disk or network they'd need to do so through another driver which they can't "see".
So the most you'd get is a BSOD, which is annoying, but you can always head into safe mode and disable the driver to fix that. If the exploit was in a disk driver or something, you could be very, very fucked though.
Re:not that easy (Score:2)
Are [secunia.com] you [ciac.org] sure? [techtarget.com]
Re:not that easy (Score:2)
Re:not that easy (Score:2)
Re:not that easy (Score:2)
Re:not that easy (Score:3, Informative)
There's nothing stopping a driver running malicious code from connecting to the \Device\Tcp device to open a socket, using ZwCreateFile to copy a malware app into th
ATI (Score:4, Informative)
Re:ATI (Score:2)
The odd thing is, I have owned more ATI cards than any other brand ('cept maybe Matrox in my older systems), and I've never really had a notable stability or performance problem with ATI drivers, except with the installer for a Fire GL X1. For some reason, you have to have the card in the computer to get to the point where the ATI installer will let you get to the point where you can uninstall the drivers.
Why is this a bigger risk on windows? (Score:2)
I've noticed that software you wouldn't expect sometimes installs a device driver component. I can understand this as a component of an antivirus or host based firewall, but it seems to be an oddly common design pattern on Windows, which clearly poses substantial risk.
So why is this a bigger risk for Windows? After all, what is a software driver to windows? Essentially another DLL that starts at boot, right? Well...plenty of apps install those.
My point is, why does having it be a driver make it mor
Re:Why is this a bigger risk on windows? (Score:4, Insightful)
The referenced article at Security Focus points out that inspection of device drivers in Linux revealed similar defects in device drivers.
Device drivers are more interesting than user land software because they run in kernel space, allowing the exploit to be immediately useful to perform nasty things like install rootkits and trojans, log keystrokes, etc.
Re:Why is this a bigger risk on windows? (Score:1, Insightful)
That aside, though, there's a lot of poorly-written software out there, even from the big boys, that can't properly handle restricted user accounts and requires you to log in as an administrator. It's quite daft, but that's the world of Windows (and, in some cases, Windows developers porting to Mac OS and Linux).
Re:Why is this a bigger risk on windows? (Score:2)
Any exploit on a driver would not be able to do anything too drastic other than throw up a
How to make money from this (Score:1, Interesting)
2. Write a virus that inserts itself into Excel and subtly changes the results of certain spreadsheets used to calculate the cost/value of leases - by about 1%, no more.
3. Buy a small manufacturer of CDROM drives.
4. Insert the virus into their device drivers.
5. Sell the resultant equipment really cheaply to your target.
6. Wait four years until the target co. thinks it's solvent (according to your buggered spreadshe
Re:How to make money from this (Score:2)
Certain spreadsheets...
Which ones? Identified how? You have specific information of exactly how they compute cost/earnings?
Buy a small manufacturer of CDROMS
Uh, yeah. OK.
Sell the resultant equipment...
How many corps buy individual CDROM drives? How do you convince them to buy yours?
Keep other companies from buying your borked CDROM drives?
Wait four years...
By which time they will most likely have changed Excel
Re:How to make money from this (Score:2)
Even better, with these programs there is a valid reason to connect to the internet (i.e. to get definitions and app. updates). It would probably cost less than 10M too (mind you, creating a CDROM brand from scratch doesn't cost nearly 10M, outside of a handful of top-end firms, it's all private label + customizations now).
Re:How to make money from this (Score:2)
They must be running very outdated OSes...
Between 5 CD-ROMs, 3 CD-RWs, 1 DVD/CD-RW, and 1 DVD+-RW I have never needed a driver on any OS other than DOS. Even for DOS, it still just used a generic driver which shipped with the OS, not a manufacturer-provided piece of software.
Have you ever asked yourself... (Score:1, Interesting)
Because with DirectX/DRI programs in userspace can access directly the hardware, and since the hardware is flawed they could easily gain root/Administrator privileges
"Built For Windows" (Score:3, Insightful)
My reasons were so that a reinstall is a simpler affair, but it appears I may have been reaping security benefits too...
Typo in the headline (Score:2, Funny)
Device Drivers Filled with Flaws, Pose Risk
Another Slashdot typo: they obviously misspelt "SUV" as "Device".
Open Documentation == Safe & Reliable Drivers (Score:3, Interesting)
Apple Mac USB support (Score:2)
Why do we even need device drivers at all? (Score:3, Interesting)
Why do we even need device drivers at all? I've worked on (used, administered) two different kinds of major operating systems (and a couple more smaller ones) that did not use device drivers at all. The answer to thise question reflects a condition that those two major OSes did not have to deal with: lack of standardized hardware.
The original IBM System 360, released in the 1960s, effectively had relatively standardized hardware. That was because IBM made all the hardware. When other manufacturers eventually made their own hardware, they were forced to make that hardware compatible. A manufacturer of a disk drive had to make it accept every hardware command that IBM's own models accepted, or it would not work. No provision existed in the operating systems for these machine to install or load a special device driver, short of modifying the source directly (which was all in assembly code for the mainframe CPU architecture).
I/O operations in the original System 360, and to a great extend in the 370 and 390 that followed, is quite uniform compared to the PC architecture. Although IBM popularized this architecture, it was actually the design of the 8088 CPU that caused things to be quite non-uniform due to it's lack of any I/O architecture (it only had a simplistic in/out CPU instruction set, which effectively functioned like fetch/store instructions in a private address space). This meant every peripheral (like a serial port) had to operate its own way. Microsoft's DOS operating system furthered the dependency on device drivers being added by making it relatively easy to do. So by combining an architecture that was very poor at I/O, absent of an I/O standard, and an OS that made discrete device drivers easy, we have this become dependent on this.
A computer architecture could still be built that includes a standardized I/O infrastructure (e.g. all devices interface the same way) and standardized I/O command set (e.g. all operations of the same class operate identically), and would not need individual device drivers. Each different class of device (e.g. a hard drive is an example of one class) would have its own I/O handling code in the OS which can be referred to as the device driver, but it would be one set of code that handles every device of that class. A command from the "hard drive handler" code in the OS to read a specific sector of storage would be exactly identical regardless of the size of the drive (if it accesses a non-existant sector, it always gets a standard error), the maker of the drive, and whether or not there is a gateway controller to interconnect legacy hardware (e.g. SCSI, IDE, SATA, etc). The same principle would be applied for all other classes of devices. All random accessible devices could then be bootable with merely the issuance of a basic "read a sector from offset N" command generated by a very simple firmware system ... for some standardized value of N for booting purposes.
Re:Easy solution (Score:3, Informative)
ugh (Score:3, Interesting)
1. Linus didn't say that, Raymond did. 2. By your own analysis, all famous open-source projects should be bug-free, right? Like Firefox, right?
Stop drinking the kool-aid. Open source is not a panacea for all software development problems, and Raymond made a lot of sweeping generalities in the book you're quotin
Re:ugh (Score:3, Insightful)
Now, I'm not saying that hackers will go and start fixing open source drivers just cause they're there, some will, but it is not something to count on. I am saying that crackers will go into that code and find the problems and start using them.
Once the bad guys see how something works exactly they can set up exploits muc
Re:ugh (Score:2)
Wrong. The phrase "all bug are shallow" simply means that, with enough eyes, *someone* will be able to find the solution to any given bug fairly quickly. i.e., to them, the bug will be "shallow". And this seems to be quite true, given the rate at which bugs in Firefox and other open source products are fixed (quite often within 24 hours). ESR's assertion makes
Re:ugh (Score:2)
You're using evidence of how fast bugs get fixed to show how easy they are to find. Not buying it.
I'm not saying each of his assertions is specifically wrong, but that
Re:ugh (Score:2)
No, I'm not. Let's review what I posted:
Wrong. The phrase "all bug are shallow" simply means that, with enough eyes, *someone* will be able to find the solution to any given bug fairly quickly. i.e., to them, the bug will be "shallow". And this seems to be quite true, given the rate at which bugs in Firefox and other open source products are fixed (quite often within 24 hours). ESR's assertion makes *no* c
Re:ugh (Score:2)
Then you're misinterpreting what Raymond said in the first place, which really stretches your credibility. See, the finding is what the "eyes" are for.
Re:ugh (Score:3, Insightful)
Certainly, no reasonable person will suggest that if you make some horrible software, putting the source on an ftp server w
Re:Is this another reason to buy a Mac? (Score:2, Funny)
Drivers that come with the OS are still drivers.
Re:Is this another reason to buy a Mac? (Score:1, Informative)
Drivers that come with the OS may still be drivers, but they can be patched through the OS vendor's normal software update process.
Third-party drivers? Who knows?
Re:Is this another reason to buy a Mac? (Score:1)
Re:Is this another reason to buy a Mac? (Score:3, Informative)
I tried that once. it suggested an update for my network card and pretty much fucked my system.
never again. never.
Re:Is this another reason to buy a Mac? (Score:3, Funny)