QUOTE(born2c0de @ 4 Dec, 2007 - 07:34 AM)

Windows Applications do not have permission to directly access any hardware device.
This is not exactly true. When it comes to video and audio, you have to do some backflips because the OS basically owns them. However, low level File I/O has always been available. e.g.
http://support.microsoft.com/kb/11988Of course, for .NET, this would be considered "unmanaged."
QUOTE(NoNonsense @ 4 Dec, 2007 - 05:50 PM)

Ok, and is there a significant difference in this kind of cases between C, C++, C# and .NET? Or is hardcore C the only langauge to accomplish this?
Any code is subject to the rules of the Operating System under which it runs. Windows locks down a lot of UI elements. As I mentioned above, file I/O is certainly the most open. There's a Win API function called
DeviceIoControl that lets you get down and dirty with everything.
You can all those functions from C, C++, and unmanaged .NET, with equal ease. In .NET, alot of Win API stuff is available through System.Runtime.InteropServices.
You can do a sector read inside Windows. There are other tools that do so, right?

I don't have code to hand, but certainly possible.
For byte by byte forensics... you need to know the file system layout. In the old days of FAT, a copy of Norton's Utilities, or any kind of sector editor, and you were off and running. FAT is wonderful to recover from, it's all right there if you know how to read it.
NTFS must still use some kind of partition format to store its data, but they've been less than forthcoming with what that format entails. You can see the bits and bypte, but they're not clearly stored. Some open source projects have black boxed NTFS. Most read reasonably well, but none claim 100% when it comes to writing.
Hope this helps.