Click here to Skip to main content
12,352,573 members (60,856 online)
Rate this:
 
Please Sign up or sign in to vote.
I am trying to store all the keyboard inputs being monitored using the kbfiltr driver (given in the Windows Driver Kit). At present, I can only create a text file using the ZwCreateFile routine, inside the DriverEntry routine; but I cannot write any information to file inside the KbFilter_ServiceCallback function. Please help me as to how I can save the intercepted keyboard packets in the log file.
Posted 11-Nov-12 22:24pm

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

I did it differently, but you can give it a try,
KbFilter_IsrHook(
    PDEVICE_OBJECT         DeviceObject,               
    PKEYBOARD_INPUT_DATA   CurrentInput, 
    POUTPUT_PACKET         CurrentOutput,
    UCHAR                  StatusByte,
    PUCHAR                 DataByte,
    PBOOLEAN               ContinueProcessing,
    PKEYBOARD_SCAN_STATE   ScanState
    )
*DataByte gives you the actual intercepted keyboard value. You can create a buffer and add to it in a DPCforISR. Once in a while you can have IOCTL call from your application and write it to file.
  Permalink  
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.160621.1 | Last Updated 24 Nov 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100