ASPI Spy




Page last changed: March 07, 2006


This demonstrates how to make a very basic and small ASPI spy utility. The binary is just 18 kilobytes, half of which is text required in order to show readable sense data.

Usage

  1. Put a "normal" ASPI layer DLL file into the folder of the application you want to spy on
  2. Rename this file to something, whatever you like, as long as the extension is .dll
  3. Copy the wnaspi32.dll file from the download section to the same folder as the original ASPI layer. Note: Even when the application you plan to use this with accepts ASPI layers with different files names, this spy dll must not be renamed. Otherwise, it will load itself recursively until something bad happens. This will be fixed later.
  4. When launching an application using this ASPI layer, a simple protocol file will be created in the folder which this application considers its 'current' folder. For read(10) and write(10) commands, the user buffer data will not be logged.

Additional notes

Sample log excerpt

08:40:48.390  0:0:0 
          Write (10)
              2A 00 00 05  24 80 00 00   20 00 

          Target Status: CHECK CONDITION
          Sense Code   : LOGICAL UNIT NOT READY, LONG WRITE IN PROGRESS
          Sense Area   : 70 00 02 00  00 00 00 0E   00 00 00 00  04 08 


08:40:48.406  0:0:0 
          Read buffer capacity
              5C 00 00 00  00 00 00 00   0C 00 

          Input Buffer: 
              00 0A 00 00  00 18 80 00   00 01 80 00  

08:40:48.406  0:0:0 
          Write (10)
              2A 00 00 05  24 80 00 00   20 00 

08:40:48.406  0:0:0 
          Write (10)
              2A 00 00 05  24 A0 00 00   20 00 

08:40:48.406  0:0:0 
          Write (10)
              2A 00 00 05  24 C0 00 00   01 00 

          Target Status: CHECK CONDITION
          Sense Code   : LOGICAL UNIT NOT READY, LONG WRITE IN PROGRESS
          Sense Area   : 70 00 02 00  00 00 00 0E   00 00 00 00  04 08 


08:40:48.406  0:0:0 
          Write (10)
              2A 00 00 05  24 C0 00 00   01 00 

08:40:48.500  0:0:0 
          Synchronize cache
              35 02 00 00  00 00 00 00   00 00 

08:40:49.500  0:0:0 
          Test Unit Ready
              00 00 00 00  00 00 

08:40:49.500  0:0:0 
          Read Capacity
              25 00 00 00  00 00 00 00   00 00 

          Input Buffer: 
              00 00 00 00  00 00 00 00   

          Target Status: CHECK CONDITION
          Sense Code   : LOGICAL UNIT NOT READY, OPERATION IN PROGRESS
          Sense Area   : 70 00 02 00  00 00 00 0E   00 00 00 00  04 07 


08:40:50.500  0:0:0 
          Read Capacity
              25 00 00 00  00 00 00 00   00 00 

          Input Buffer: 
              00 00 00 00  00 00 00 00   

          Target Status: CHECK CONDITION
          Sense Code   : LOGICAL UNIT NOT READY, OPERATION IN PROGRESS
          Sense Area   : 70 00 02 00  00 00 00 0E   00 00 00 00  04 07 

Contact

Alexander Noé
alexander.noe@s2001.tu-chemnitz.de

You can contact me in english, german or french.

Download: