From: Vincent Le T. <vin...@my...> - 2016-02-27 22:13:53
|
Hi, For those developping/debugging on Windows I may have something interesting for you. To debug my programs, I needed to capture APDU. I was getting tired of making winscard.dll stubs for x64 & x86 and for each Windows version. Typically new minidriver (like GIDS) are using SCardReadCache / WriteCache functions which are not available on older version. I was also limited for lsass.exe debug. Api Monitor (http://www.rohitab.com/apimonitor) can solve the lsass problem with this patch ( http://www.rohitab.com/discuss/topic/41981-updated-api-definitions/?p=10102474 ). But it shouldn't run on production system because at the disconnection, lsass crashes everytimes. Another solution is kernel debugging (windbg). But this is not easy to use and not very user friendly for APDU debugging. Then, I had to debug something on the shared smart card reader on VMWare. That's why I made a small developper program I called APDUTrace ( http://download.mysmartlogon.com/APDUTrace/APDUTrace.exe). In short, this is a stand alone .exe which a filter driver embedded. Because this is a upper filter driver, it collects the APDU at the system level before the APDU is sent to the smart card reader. Launch the .exe (as admin) press "Live tracing" and enjoy. Valid for all x64, x86 systems from Windows XP to Windows 10 Boot time logging is also available. I've done some tests but like new programs there are hidden bugs. To test in a VM before and feedbacks are welcome ! regards, -- -- Vincent Le Toux My Smart Logon www.mysmartlogon.com |