Need help with using CMBChine online bank USB token with Win

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
fracting
Level 1
Level 1
Posts: 7
Joined: Fri Dec 17, 2010 2:09 am

Need help with using CMBChine online bank USB token with Win

Post by fracting » Thu Jan 12, 2012 10:34 am

Hello,

I'm looking forward to make a USB token working with Wine. The token
is used by CMBChine online bank ( http://english.cmbchina.com/ ) , and
the Client for the token can be download from
http://121.15.172.132/download/PB/PbSetup60.exe
( http://www.cmbchina.com/cmbpb/v36/pb.htm )

I've follow http://wiki.winehq.org/USB, but get some trouble.

Here is what I've tried:
0. Build and install the patched Wine. ( wine-1.3.36-223-gc7cc9a1 with
USB patch for 1.3.36 )

1. Plug in my USB token, get the bus number and chmod the usb device.
$ lsusb
Bus 001 Device 009: ID 1483:c007
Full information: http://pastebin.com/vBYW0hKS

$ sudo chmod a+rw /dev/bus/usb/001/009
fracting@fracting-redhat:~/wine-git$ ls -l /dev/bus/usb/001/009
crw-rw-rw- 1 root root 189, 8 2012-01-12 21:26 /dev/bus/usb/001/009

2. Install the Client for the USB token:
$ wine PbSetup60.exe

The installer extract two `.dat` file into windows/system32/drivers directory:
.
├── CertClient.dat
├── CMBProtector.dat
└── mountmgr.sys

winedump CertClient.dat show that, it only depends on hal.dll and ntoskrnl.exe
winedump CMBProtector.dat only show hal.dll and ntoskrn.exe depending as well.

winedump -j export show nothing for both.

3. According to the Wine USB wiki, the registry should be modified,
but the installer PbSetup60.exe has set the registry. The mentioned
key/value of registry has a bit different between Windows's and
Wine's, I try to import the mentioned key/value from Windows to Wine,
but the result seems no different, the below steps and logs are
generated without Windows registry, if someone need another log with
Windows registry I'll update one.


4. Start the Client:
$ cd drive_c/windows/system32
$ wine PersonalBankPortal.exe

A login Window will display, the title in Chinese is
"用户登陆(MG6.0.4.8)", means "user logon" in English.


This exe will load {f2eb8999-766e-4bf6-aaad-188d398c0d0b} at runtime,
which is PersonalBankMain.ocx in the same directory.
Unfortunately, PersonalBankMain.ocx depends on hid.dll, according to
Wine USB wiki:
" Drivers which depend on modules other than ntoskrnl.exe, hal.dll,
usbd.sys will not work. "
Any luck?

5.
A WINEDEBUG=+winedevice trace show that, CertClient.dat and
CMBProtector.dat is loaded by PersonalBankPortal.exe :

trace:winedevice:ServiceMain starting service L"CMB8100"
trace:winedevice:ServiceMain starting service L"CMBProtector"
trace:winedevice:load_driver loading driver
L"C:\\windows\\system32\\Drivers\\CertClient.dat"
trace:winedevice:load_driver_module
L"C:\\windows\\system32\\Drivers\\CertClient.dat": relocating from
0x10000 to 0x440000
...
trace:winedevice:load_driver loading driver
L"C:\\windows\\system32\\Drivers\\CMBProtector.dat"
trace:winedevice:load_driver_module
L"C:\\windows\\system32\\Drivers\\CMBProtector.dat": relocating from
0x10000 to 0x550000

6.
A WINEDEBUG=+usbhub trace show:
trace:usbhub:add_usb_devices add 1483:c007

7.
- Click on the "使用移动è¯

Locked