Virtual Disk Driver

Hi everyone!

I’m having difficulties with my school project. I want to build a Disk Encryption system (like FreeOTFE or TrueCrypt). I use the virtual disk driver from Bo Branten, FileDisk, and try to insert encryption in it.

I’ve built the source. But when I run the program, I get error message like this:

’ The system can’t find the path specified '.

The error comes from CreateFile function in my control program. I read and compare the code in FileDisk and my program, but I can’t find any differences. So, is it possible there is something wrong with the driver code? I successfully build the driver code and copied the system file to the driver folder.

Can someone tell me what is wrong? Sorry, if there is something inappropriate in my posting. Thank you.

Ira

For the record, Filedisk is is pirated. Bo Branten used Jamey Kirby’s
source code without crediting him, and there may be other issue as well;
I don’t know.

What is it you are trying to do exactly? Are you using Filedisk as a
working drive for encryptpion, or are you actually modifying it?

mm

xxxxx@yahoo.com wrote:

Hi everyone!

I’m having difficulties with my school project. I want to build a Disk Encryption system (like FreeOTFE or TrueCrypt). I use the virtual disk driver from Bo Branten, FileDisk, and try to insert encryption in it.

I’ve built the source. But when I run the program, I get error message like this:

’ The system can’t find the path specified '.

The error comes from CreateFile function in my control program. I read and compare the code in FileDisk and my program, but I can’t find any differences. So, is it possible there is something wrong with the driver code? I successfully build the driver code and copied the system file to the driver folder.

Can someone tell me what is wrong? Sorry, if there is something inappropriate in my posting. Thank you.

Ira

Other than the source being stolen, it is somewhat out of date. I know it
had been updated by StorageCraft many times since that version. Good luck
and don’t bother asking for help in this newsgroup as no one with the
experience will assist.

wrote in message news:xxxxx@ntdev…
> Hi everyone!
>
> I’m having difficulties with my school project. I want to build a Disk
> Encryption system (like FreeOTFE or TrueCrypt). I use the virtual disk
> driver from Bo Branten, FileDisk, and try to insert encryption in it.
>
> I’ve built the source. But when I run the program, I get error message
> like this:
>
> ’ The system can’t find the path specified '.
>
> The error comes from CreateFile function in my control program. I read and
> compare the code in FileDisk and my program, but I can’t find any
> differences. So, is it possible there is something wrong with the driver
> code? I successfully build the driver code and copied the system file to
> the driver folder.
>
> Can someone tell me what is wrong? Sorry, if there is something
> inappropriate in my posting. Thank you.
>
> Ira
>

You should use the ramdisk sample from the wdk. Then you will have something
that actually works on current OS releases, isn’t stolen intellectual
property, is KMDF based, and you get to ask questions here without being
told to go away :slight_smile:

On Dec 17, 2007 11:05 PM, wrote:

> Hi everyone!
>
> I’m having difficulties with my school project. I want to build a Disk
> Encryption system (like FreeOTFE or TrueCrypt). I use the virtual disk
> driver from Bo Branten, FileDisk, and try to insert encryption in it.
>
> I’ve built the source. But when I run the program, I get error message
> like this:
>
> ’ The system can’t find the path specified '.
>
> The error comes from CreateFile function in my control program. I read and
> compare the code in FileDisk and my program, but I can’t find any
> differences. So, is it possible there is something wrong with the driver
> code? I successfully build the driver code and copied the system file to the
> driver folder.
>
> Can someone tell me what is wrong? Sorry, if there is something
> inappropriate in my posting. Thank you.
>
> Ira
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>


Mark Roddy

Hmm… I don’t know any of that. Thank you for telling me all this.

What I was trying to do is to insert encryption to the filedisk. I guess now I have to get this wdk and ramdisk, learn both, and come back here if I get trouble.

Thank you everyone! Wish me luck!

One question: Are you trying sector level encryption or file level encryption?

Sector level. In my mind, this is what I want to do:

I want to create a file as a ‘host’. This file will have the same size with the virtual disk you want. When the right password is given, this file will be represented as a virtual disk. So, everything that’s inserted into the virtual disk is actually written and encrypted to this file.

I just want to make something like FreeOTFE or TrueCrypt, etc, but not as fancy as them. I am just curious and interested to make one. That’s all.

– Oh! I am waiting my WDK from my friend and trying to learning RamDisk and WDK now.

Hello everyone!!

– I am a newbie, so please forgive me for my lack of knowledge.

I posted something about virtual disk driver a month ago. I want to insert my encryption code into a virtual disk driver so I can make an on the fly encryption system, like freeOTFE or TrueCrypt, but in simpler way.

I took everyone’s advice to get the newest WDK. So, I’ve got myself a WDK - Windows Server 2008 Pre-RTM with HyperV and a new virtual disk driver, Imdisk. My problem is when I built the original ImDisk (without my encryption code), I got error message like this:

errors in directory c:\winddk\6001.17121\src\imdisk 1.03\imdisk_source\cli
c:\winddk\6001.17121\bin\makefile.new(460) : error U1052: file ‘c:\winddk\6001.17121\src\imdisk\objchk_wxp_x86\i386_objects.mac’ not found
errors in directory c:\winddk\6001.17121\src\imdisk 1.03\imdisk_source\cli
nmake.exe /nologo BUILDMSG=Stop. -i BUILD_PASS=PASS2 LINKONLY=1 NOPASS0=1 MAKEDIR_RELATIVE_TO_BASEDIR=src\imdisk 1.03\imdisk_source\cli failed - rc = 2

Anyone knows something about this? Is it an incompatibility problem? How can it be fixed?

Thank you…

get those spaces out of your pathnames- “imdisk 1.03\imdisk_source” -
is just asking for trouble.

By the way you really should have started with the latest released WDK
(6000) not the beta WDK for the upcoming 2008 release, but that is a
minor issue.

On Jan 18, 2008 10:49 PM, wrote:
> Hello everyone!!
>
> – I am a newbie, so please forgive me for my lack of knowledge.
>
> I posted something about virtual disk driver a month ago. I want to insert my encryption code into a virtual disk driver so I can make an on the fly encryption system, like freeOTFE or TrueCrypt, but in simpler way.
>
> I took everyone’s advice to get the newest WDK. So, I’ve got myself a WDK - Windows Server 2008 Pre-RTM with HyperV and a new virtual disk driver, Imdisk. My problem is when I built the original ImDisk (without my encryption code), I got error message like this:
>
> errors in directory c:\winddk\6001.17121\src\imdisk 1.03\imdisk_source\cli
> c:\winddk\6001.17121\bin\makefile.new(460) : error U1052: file ‘c:\winddk\6001.17121\src\imdisk\objchk_wxp_x86\i386_objects.mac’ not found
> errors in directory c:\winddk\6001.17121\src\imdisk 1.03\imdisk_source\cli
> nmake.exe /nologo BUILDMSG=Stop. -i BUILD_PASS=PASS2 LINKONLY=1 NOPASS0=1 MAKEDIR_RELATIVE_TO_BASEDIR=src\imdisk 1.03\imdisk_source\cli failed - rc = 2
>
> Anyone knows something about this? Is it an incompatibility problem? How can it be fixed?
>
> Thank you…
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
>


Mark Roddy

> I use the virtual disk driver from Bo Branten

Wait for Mr.Burn’s reply to the above statement…

Anton Bassov

Did you get that statement from the earlier post? I didn’t see it in this
post. If it is based upon the stolen code from Bo Branten, then he should
try the lottery instead of this newsgroup.

wrote in message news:xxxxx@ntdev…
>> I use the virtual disk driver from Bo Branten
>
> Wait for Mr.Burn’s reply to the above statement…
>
> Anton Bassov
>

> ----------

From: xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com] on behalf of xxxxx@hotmail.com[SMTP:xxxxx@hotmail.com]
Reply To: Windows System Software Devs Interest List
Sent: Saturday, January 19, 2008 5:40 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Virtual Disk Driver

> I use the virtual disk driver from Bo Branten

Wait for Mr.Burn’s reply to the above statement…

That’s unfair. You’re replying to month old mail. OP was already informed about stolen code, took the message and now uses different driver sources. What else would you want?

I quickly compared imdisk sources to Branten’s one. There are similarities; imdisk was at least inspired. But now the code is twice as long and author apparently made a lot of work on this. Maybe he started with it on the beginning or maybe he was just inspired. He’d better write new code from scratch but anyway, the structure would be similar (I have such a driver written from scratch without using Jameys code).

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]

> Did you get that statement from the earlier post? I didn’t see it in this post.

Look carefully at the very first post on this thread, and pay a special attention to the sentence 3…

Anton Bassov

@ Mark Roddy:
Thank you! Yes, it’s the space… O dear! I’ll be more careful next time.
It works well and gives only one warning (c:\winddk\6001.17121\src\imdisk\cli\cl : warning D9025 : overriding ‘/GS’ with ‘/GS-’).
I chose this beta version because that is what’s available at Microsoft Connect.

@ Michael Vodicka
Yup, the imdisk code is twice as long, but I’ll only use the command line part for now. That should be enough for my assignment.

Ok, thank you, everyone!

> I quickly compared imdisk sources to Branten’s one. There are similarities;

imdisk was at least inspired. But now the code is twice as long and author
apparently made a lot of work on this

Idiomatically it is pretty much like changing stolen car’s engine plus repainting it - no matter what modifications you apply, the car is still stolen one…

Anton Bassov

> ----------

From: xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com] on behalf of xxxxx@hotmail.com[SMTP:xxxxx@hotmail.com]
Reply To: Windows System Software Devs Interest List
Sent: Saturday, January 19, 2008 11:15 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Virtual Disk Driver

> I quickly compared imdisk sources to Branten’s one. There are similarities;
> imdisk was at least inspired. But now the code is twice as long and author
> apparently made a lot of work on this

Idiomatically it is pretty much like changing stolen car’s engine plus repainting it - no matter what modifications you apply, the car is still stolen one…

Every analogy is somewhat wrong and this one, too. That’s why I prefer to not use and discuss analogies.

Anyway, the message is clear. It is always better to write own code from scratch than starting with any code taken from Internet. One may never know where is the code coming from and what problems it can cause in the future. It is rather easy to distinguish code source; in this case there were few completely equal lines and identifier names. Poor imdisk author may not ever know there is something wrong as Branten added GPL license to this code. And now he can be associated with a thief.

Writing code from scratch is also better for code quality. Other code, including WDK samples, may be used for inspiration and understanding, of course. But it is really different to debug and fix own code that somebody else’s one. It is almost 5 years I made my worst engineering decision ever and used BulkUsb DDK sample as a base of my driver. Today I had to fix yet another design bug coming from the original code which lead to BSOD at Vista. The time saved on the beginning was spent many times since then for fixes and rewrites. And I’m affraid it isn’t the most miserable WDK sample available…

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]

> Every analogy is somewhat wrong and this one, too.

Well, it is absolutely correct analogy, but only under one “small” condition - the thing in question is *actually* a property. At this point a logical question arises - what can qualify for being a property???

This question is much more tricky that it seems to be at the first glance. Imagine “reverse Bo Branten”, i.e. someone who takes sources from the public domain, applies some modification (that may be as insignificant as simply changing variable names and function declarations) to them, and then claims they are his property. Certainly, I put it to the extreme in this example - in practical terms, he may go further than that and “integrate” two totally unrelated samples that he has found in the public domain into the one. Certainly, it does involve some work on your own,
but can you really claim that the whole thing is 100% your property??? In fact, if the guy in question is really obnoxious, he can even start claiming that it is the original code writers who stole his “property”…

Therefore, I would rather make a clear distinction between the concept (methodology, algorithm, etc) and implementation - I believe that the former may be patented/copyrighted/etc, but the latter may not. The only thing that can qualify for being your property in the latter case is your *actual* program, i.e. its binary - if someone is using it without paying you anything, this is, indeed, a theft…

Anton Bassov

> Idiomatically it is pretty much like changing stolen car’s engine plus
repainting it -

no matter what modifications you apply, the car is still stolen one…

With software, the amount of modifications can be 100% the size of the code.
This is like the “old genuine axe” with both the handle and the blade replaced.


Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

Maxim,

With software, the amount of modifications can be 100% the size of the code.

In such case (unless by “modification” we mean simply changing variables and function declaration), by applying 100% modification to the code you invariably change all the methodology it is based upon, so that, indeed, you are able to claim that a code is 100% yours.

This is why I said in my previous post that, in my opinion, the only thing you can claim ownership of is the concept your code is based upon. In context of this thread, the only question that matters is, in my opinion, whether Bo Branten’s stolen code was modified significantly enough to change the original code’s concepts. If it was, then it is already its author’s property that he chose to give away, so that the OP can use it. Otherwise, it is still stolen code, despite all modifications that were applied to it, so that the OP should avoid it…

To be honest, I don’t really care where the code samples that I see come from -I would not use them anyway. As I said quite a few times, I always write my code from the scratch, so that the only reason why I may look at someone’s sample is just to understand what it does and *why* it does things this way. In my opinion, this is the only way to go - how can you possibly use a sample if you don’t fully understand how it works???

Anton Bassov

  1. That is not the way copyright works. It has something to do with a
    specific expression and another expression would not violate the first’s
    copyright.

  2. Just renaming the variable and function names would not, probably, I
    think, remove the copyright violation. However, you method of using the
    ‘sample’ to understand the problems that must be solved would not be a
    violation.

  3. From what I have seen on the various newsgroups and even in my own
    experience when I was beginning to write drivers, I see a lot of drivers
    written by taking a ‘sample’ and changing the minimum to get their objective
    done. Too bad most of the examples are not complete enough and many don’t
    add enough error detection or support code to make the driver fully robust.

  4. When Jamey Kirby gave a copy of the scsi port driver to someone there
    was a license involved which restricts the use of the code to being included
    in a binary form only. There were probably other restrictions too that
    would apply beyond copyright. So therefore, placing the code in source form
    and doing the ‘Robin Hood’ trick is not a good thing. I don’t believe that
    package is available anymore, but Maxim can say for sure. It is also why
    the source code for filemon and regmon done by Sysinternals has not been
    available for many years. Until the Microsoft acquisition of Wininternals,
    the latest version could be purchased, but I suspect it is no longer
    available. It isn’t needed as much anymore, but Process Monitor is the
    current combination of those two utilities.

  5. From my understanding of your argument, providing source code for
    libraries would not be possible. I prefer to have source for any libraries
    and as many others have said the lack of source for NDIS, KMDF, UMDF, USB
    storage stack, 1934 storage stack, Io Manager, Cache Manager, and Memory
    Manager make writing for Windows much more difficult. I don’t think the
    availability of source would solve every problem because even Linux drivers
    have bugs and source code is available there.

wrote in message news:xxxxx@ntdev…
> Maxim,
>
>> With software, the amount of modifications can be 100% the size of the
>> code.
>
> In such case (unless by “modification” we mean simply changing variables
> and function declaration), by applying 100% modification to the code you
> invariably change all the methodology it is based upon, so that, indeed,
> you are able to claim that a code is 100% yours.
>
>
> This is why I said in my previous post that, in my opinion, the only thing
> you can claim ownership of is the concept your code is based upon. In
> context of this thread, the only question that matters is, in my opinion,
> whether Bo Branten’s stolen code was modified significantly enough to
> change the original code’s concepts. If it was, then it is already its
> author’s property that he chose to give away, so that the OP can use it.
> Otherwise, it is still stolen code, despite all modifications that were
> applied to it, so that the OP should avoid it…
>
> To be honest, I don’t really care where the code samples that I see come
> from -I would not use them anyway. As I said quite a few times, I always
> write my code from the scratch, so that the only reason why I may look at
> someone’s sample is just to understand what it does and why it does
> things this way. In my opinion, this is the only way to go - how can you
> possibly use a sample if you don’t fully understand how it works???
>
>
> Anton Bassov
>