Coder Social home page Coder Social logo

changeofpace / mouclassinputinjection Goto Github PK

View Code? Open in Web Editor NEW
279.0 279.0 77.0 162 KB

MouClassInputInjection implements a kernel interface for injecting mouse input data packets into the input data stream of HID USB mouse devices.

License: MIT License

C 12.15% C++ 87.85%

mouclassinputinjection's People

Contributors

changeofpace avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mouclassinputinjection's Issues

Failed to move the mouse.

Hi, When I try to use the mouse function, it failed with the below error message:

17:48:15.661  ERR  5988:2436  MouiiCL.exe      Processing IOCTL_INJECT_MOUSE_MOVEMENT_INPUT. 
17:48:15.661  DBG  5988:2436  MouiiCL.exe      Injecting mouse movement input data.  (ProcessId = 0xFB0, IndicatorFlags = 0x000, MovementX = 20, MovementY = 20) 
17:48:15.661  ERR  5988:2436  MouiiCL.exe      Unexpected indicator flags. (movement type) 

The click working fine. Only move does not work.
Environment: Windows 10 20H2 running in vmware.
Any help will be appreciated!

Thanks!

Unable to load driver

Trying the MouClassInputInjection on Win 10, built with VS2019:

C:\Users\WDKRemoteUser\Desktop\kbtest>\drivertest\devcon install \drivertest\drivers\mouclassinputinjection.inf HID_DEVICE_SYSTEM_MOUSE
Device node created. Install is complete when drivers are installed...
Updating drivers for HID_DEVICE_SYSTEM_MOUSE from C:\drivertest\drivers\mouclassinputinjection.inf.
devcon failed.

C:\Users\WDKRemoteUser\Desktop\kbtest>MouiiCL.exe
MouiiIoInitialization failed: 2

Not sure if INF file is correct. Remote deploy gives some errors. See same issue with MouHidInputHook...

MhdDriverEntry failed 0xC0000034

Hello i am unable to load the driver it fails on MhdDriver entry with the status code 0xC0000034 wich is STATUS_OBJECT_NAME_NOT_FOUND and before on ObReferenceObjectByName failed 0xC0000034 seems like it can't find the device of mouhid.sys but mouhid is running any solution to this?

Bin / demo

Hi we are students and need a binary file to give a presentation about mouse different (undetected) simulation.

Can you please compile an exe / bin file (for single and double mouse clicks)? Our goal is to simulate a single click and double click by commandline.

Thank you! Can you share the download link here we'll thank you and give you credits in our reports.

Inject Mouse Input Data To Non-Interactive Desktop?

Hello,

Let's say i have DesktopA and DesktopB.
On DesktopB i have mspaint.exe running, DesktopB is not active now(non-interactive).

It would be possible to send mouse input if i specify ProcessId=mspaint.exe which is on DesktopB, while active desktop is DesktopA?

Thanks

Manual mapping with kdmapper

Hello!

Firstly, this question maybe doesn't fit on your Issues board, so I'll understand if I don't get any feedback. Still, it may also be useful for others interested in using your driver.

I was wondering if you could give me some insight as to why I can't seem to access the driver from MouiiCL. I'm loading the driver using kdmapper, you can check out my MouClassInputInjection fork for the necessary changes that had to be made to load the driver through kdmapper.

KDMapper output (successfully loaded, DriverEntry returned success code):

[<] Loading vulnerable driver
[+] NtLoadDriver Status 0x0
[+] PiDDBLock Ptr fffff8060ab0a17d
[+] PiDDBCacheTable Ptr fffff8060ab0d92b
[+] PiDDBLock Locked
[+] PiDDBCacheTable result -> TimeStamp: 5284eac3
[+] Found Table Entry = FFFFC78E1B44C750
[+] PiDDBCacheTable Cleaned
[+] Image base has been allocated at 0xFFFFE38171BCF000
[+] Skipped 0x1000 bytes of PE Header
[<] Calling DriverEntry 0xFFFFE38171BD6000
[+] DriverEntry returned 0x00000000
[<] Unloading vulnerable driver
[+] MmUnloadedDrivers Cleaned
[+] NtUnloadDriver Status 0x0
[+] Vul driver data destroyed before unlink
[+] success

Before loading the driver, running MouiiCL.exe:

MouiiIoInitialization failed: 2

Error code 2 signals ERROR_FILE_NOT_FOUND

After loading the driver, running MouiiCL.exe:

MouiiIoInitialization failed: 433

Error code 433 appears to be an undocumented error code (error codes), but from looking around it appears to signal "A device which does not exist was specified." (source)

Any insight would be greatly appreciated.

c++ mouse event

How can i tell my C++ app too send a mouse event please ?

i have tested and all works. Now i need to make my c++ do a mouse movement.

Any help would be much appreciated

Windows 11 fails

Any chance you could update this for Windows11? I've installed the latest Windows driver kit.

I'm getting an error while building stating that "Windows7 is not a supported OS version."

Windows 10 Update

Hello and thanks for releasing your work!

May I know what it needs to be updated to get this working for Windows 10, please?
image

can you help me with this i am a beginner here bear with me pls

ty for looking into this
ive done including headers from MOUIICL but now i dont know what to do with mouinjectmovementinput and the compiler is throwing a loads of error i dont know how to fix them , a little help is needed , may god bless you with happiness :)

Differentiating injected clicks from normal clicks

Hi, I have been using this program for some time, and I think its fantastic. I just had a simple question. Is is possible to differentiate the clicks injected through this driver from actual mouse clicks¿

Like for example could you edit the MSLLHOOKSTRUCT struct and add a custom dwExtraInfo (that would signify that click was injected instead of real)¿. How would one go about doing that¿ Ive read through the src but I am not nearly advanced enough to get into driver development.

Thanks a lot for your help,

Have a good day.

MouiiIoInitializeMouseDeviceStackContext failed: 317

Hello,

I would like to try MouiiCL in a Virtual Machine. I did the following :

  • installed Windows 7 x64 in Virtual Box.
  • enabled testsigning : bcdedit /set testsigning on and reboot
  • installed the driver : sc create MouClassInputInjection type= kernel binPath="C:\Data\MouClassInputInjection\MouClassInputInjection.sys"
  • start the driver : sc start MouClassInputInjection
  • start MouiiCL, the output is :
    Initializing the mouse device stack context for the driver.
    Waiting for user to provide mouse button and movement input.
    MouiiIoInitializeMouseDeviceStackContext failed: 317
    MouInitializeDeviceStackContext failed: 317

The error code 317 from MSDN :
ERROR_MR_MID_NOT_FOUND
The system cannot find message text for message number 0x%1 in the message file for %2.

DebugView output
image

Any idea on what I did wrong ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.