BetaArchive Logo
Navigation Home Database Screenshots Gallery Image Uploader Server Info FTP Servers Wiki Forum RSS Feed Rules Please Donate
UP: 16d, 4h, 14m | CPU: 30% | MEM: 5432MB of 11686MB used
{The community for beta collectors}

Forum rules


Any off topic discussions should go in this forum. Post count is not increased by posting here.
FTP Access status is required to post in this forum. Find out how to get it


Post new topic Reply to topic  [ 9 posts ] 
Author Message
 PostPost subject: Virtual PC 2007/2004 Additions shared folder insight        Posted: Sun Apr 07, 2019 6:03 pm 
Reply with quote
FTP Access
Offline

Joined
Thu May 29, 2014 10:39 am

Posts
109

Location
Ljubljana Slovenia

Favourite OS
Windows 95 Plus
Hi there
today I was playing with Shared folders in DOS 6.22 on VPC 2007 using 2004 Guest Additions (fshare.exe) app and was wondering what makes it tick

Shared folders work a bit diferently on VPC than on VirtualBox or Vmware where they are using SMB to share files

So I am wondering were VPC 2004 Additions ever open sourced or source code (at least from fshare.exe) is somewhere to be found as I wonder what command does fshare.exe (in guest) have to send to VPC 2007/2004 for it to know that shared folders are installed and it allows you to chose a folder to share and what does VPC need to send to the guest for it to show that drive and files on it, essentially what protocol they use for Shared folders

So if anyone has any idea/insight about this please share it

I know VPC is old and it doesn't even work on 64 bit Win10 but still its shared folders always fascinated me


Top  Profile
 PostPost subject: Re: Virtual PC 2007/2004 Additions shared folder insight        Posted: Mon Apr 08, 2019 1:46 pm 
Reply with quote
Donator
User avatar
Offline

Joined
Sun Dec 30, 2007 8:12 am

Posts
1210

Location
Brisbane, Queensland

Favourite OS
OS/2 Wrp 3.0
Apparently, the magic of getting a client to send a request to the host is to use a magic bop (ie a bad operation), that causes a system fault. This is the magic used in OS/2, for vmdisks.

The alternate is that there are magic interrupts in the emulated bios that wake the machine up.

tcc can apparently tell if it's running in a virtual pc.


Top  Profile  WWW
 PostPost subject: Re: Virtual PC 2007/2004 Additions shared folder insight        Posted: Thu Apr 11, 2019 5:44 pm 
Reply with quote
FTP Access
Offline

Joined
Thu May 29, 2014 10:39 am

Posts
109

Location
Ljubljana Slovenia

Favourite OS
Windows 95 Plus
os2fan2 wrote:
Apparently, the magic of getting a client to send a request to the host is to use a magic bop (ie a bad operation), that causes a system fault. This is the magic used in OS/2, for vmdisks.

The alternate is that there are magic interrupts in the emulated bios that wake the machine up.

tcc can apparently tell if it's running in a virtual pc.


:)
any PoC (sample C/C++ program would be a better word for that) to test that?
let's say telling VPC 2007 that shared folders are enabled

would be great if someone had source for fshare.exe


Top  Profile
 PostPost subject: Re: Virtual PC 2007/2004 Additions shared folder insight        Posted: Thu Apr 11, 2019 8:04 pm 
Reply with quote
Donator
User avatar
Offline

Joined
Sun Aug 12, 2012 4:33 pm

Posts
2004

Location
Czechia
Are you sure that fshare.exe doesn't just implement the interface of whatever network adapter is emulated by Virtual PC and use the SMB protocol to communicate with the host? I don't think they would go through the struggle of deploying some awkward mechanism just to have shared folders in DOS. It does use SMB for Windows guests, so it only makes sense to use it for MS-DOS guests as well.

_________________
AlphaBeta, stop brainwashing me immediately!

Image


Top  Profile
 PostPost subject: Re: Virtual PC 2007/2004 Additions shared folder insight        Posted: Sat Apr 13, 2019 3:15 pm 
Reply with quote
FTP Access
Offline

Joined
Thu May 29, 2014 10:39 am

Posts
109

Location
Ljubljana Slovenia

Favourite OS
Windows 95 Plus
AlphaBeta wrote:
Are you sure that fshare.exe doesn't just implement the interface of whatever network adapter is emulated by Virtual PC and use the SMB protocol to communicate with the host? I don't think they would go through the struggle of deploying some awkward mechanism just to have shared folders in DOS. It does use SMB for Windows guests, so it only makes sense to use it for MS-DOS guests as well.


maybe it does, but it doesn't have its own IP in DOS and its mounted automaticly
I always had to use net use <driveLetter> \\computerName in VirtualBox and VmWare to acsess shared folders, but never in VPC


Top  Profile
 PostPost subject: Re: Virtual PC 2007/2004 Additions shared folder insight        Posted: Sun Apr 14, 2019 9:25 am 
Reply with quote
Donator
User avatar
Offline

Joined
Sun Dec 30, 2007 8:12 am

Posts
1210

Location
Brisbane, Queensland

Favourite OS
OS/2 Wrp 3.0
Have you thought of running fshare or the OS/2 equiv fsfilter.sys through some sort of debugger or decompiler?

OS/2 also has fsaccess.exe, which appears to be the OS/2 side of things.


Top  Profile  WWW
 PostPost subject: Re: Virtual PC 2007/2004 Additions shared folder insight        Posted: Sun Apr 14, 2019 8:01 pm 
Reply with quote
FTP Access
Offline

Joined
Mon Dec 24, 2007 6:07 pm

Posts
64
fshare.exe is using invalid asm instructions, which are caught by VirtualPC to do the required action.
Those instructions are bytes sequences 0x0f 0x3f xx yy or 0x0f 0xc7 0xc8 xx yy


Top  Profile
 PostPost subject: Re: Virtual PC 2007/2004 Additions shared folder insight        Posted: Fri Apr 19, 2019 11:40 pm 
Reply with quote
FTP Access
Offline

Joined
Thu May 29, 2014 10:39 am

Posts
109

Location
Ljubljana Slovenia

Favourite OS
Windows 95 Plus
rififi wrote:
fshare.exe is using invalid asm instructions, which are caught by VirtualPC to do the required action.
Those instructions are bytes sequences 0x0f 0x3f xx yy or 0x0f 0xc7 0xc8 xx yy


neat Now I just have to figure out how to send them
in BC++3.1 something like:
asm {
0x0f ax
}
but this would work x64 CPU has EAX and windows 7 is using protected mode and VPC is Virtualizer so I can't call hardware direcly from BC++?
using Dos 6.22 and BC++3.1 (one that has Turbo Vision built in (BTW: what is the diference between Turbo C++ and Brodland C++ is it Turbo Vision includsion?)) for testing


Top  Profile
 PostPost subject: Re: Virtual PC 2007/2004 Additions shared folder insight        Posted: Sat Apr 20, 2019 12:35 pm 
Reply with quote
FTP Access
Offline

Joined
Thu May 29, 2014 10:39 am

Posts
109

Location
Ljubljana Slovenia

Favourite OS
Windows 95 Plus
OK some update
I tried calling BIOS interupts with geninterrupt(int interupt number) included in dos.h like this
geninterrupt(15); //0x0f -> 15
geninterrupt(63); //0x3f -> 63
I gues I miss xx,yy in here, not sure what would that be

geninterrupt(15); //0x0f -> 15
geninterrupt(199); //0xc7 -> 199
geninterrupt(200); //0xc8 -> 200
I gues I miss xx,yy in here, not sure what would that be

but MS DOS just halts and I can't even CTRL+ALT+DELETE to restart, gues I called something wierd


Top  Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 




Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to:  

All views expressed in these forums are those of the author and do not necessarily represent the views of the BetaArchive site owner.

Powered by phpBB® Forum Software © phpBB Group

Copyright © 2006-2019

 

Sitemap | XML | RSS