Comments (6)
Looks like an access violation exception in the line if (InjectionInfo->ProcessId == ProcessId)
The InjectionInfo is invalid
from injdrv.
Uh, yeah... looks like I missed locking of the InjInfoListHead
.
from injdrv.
Yes, that what I though.
Can you send an updated code with the lock?
from injdrv.
I also got BSOD when unloading the driver. Looks like the driver is not handling correctly the unload and there are still pending APC calls.
STACK_TEXT:
fffff88022aea5b8 fffff800
045b67b2 : 0000000000000050 fffff880
05401f90 0000000000000008 fffff880
22aea710 : nt!KeBugCheckEx
fffff88022aea5c0 fffff800
044e8ddc : 0000000000000008 fffff880
05401f90 fffff88022aea800 fffffa80
15ef08e0 : nt!MmAccessFault+0x2322
fffff88022aea710 fffff880
05401f90 : fffff8000448d6d4 fffff8a0
01b777a0 00000000c0000034 fffff8a0
01b77770 : nt!KiPageFault+0x35c
fffff88022aea8a8 fffff800
0448d6d4 : fffff8a001b777a0 00000000
c0000034 fffff8a001b77770 fffff8a0
01b77701 : <Unloaded_injdrv.sys>+0x1f90
fffff88022aea8b0 fffff800
04462eee : 00000000000fe6b0 00000000
00000000 fffffffffffc0000 00000000
00000072 : nt!KiDeliverApc+0x2e4
fffff88022aea930 fffff800
044e2787 : 00000000000fe670 00000000
c0000008 fffff88022aea9a0 fffff880
22aeaa30 : nt!KiContinueEx+0xfa
fffff88022aea9a0 fffff800
044ead53 : fffffa8015ef08e0 00000000
742e7f3d 000000007efdb001 00000000
c0000034 : nt!NtContinue+0x87
fffff88022aeaae0 00000000
77609cba : 0000000000000000 00000000
00000000 0000000000000000 00000000
00000000 : nt!KiSystemServiceCopyEnd+0x13
00000000000fdc38 00000000
00000000 : 0000000000000000 00000000
00000000 0000000000000000 00000000
00000000 : 0x77609cba
from injdrv.
FAULTING_IP:
injdrv.sys+1f90
fffff880`05401f90 ?? ???
from injdrv.
It appears that unloading driver that queues APCs is generally dangerous. It's possible to workaround this issue for KernelMode APCs, but it's more difficult with UserMode APCs.
I discussed this on twitter yesterday, you can check the discussion here: https://twitter.com/PetrBenes/status/1176810311657164805
You can take some ideas from there, but I unfortunatelly have no time currently to take care of this repo.
from injdrv.
Related Issues (20)
- Windows 7 x64 - InjMethodThunk method failing in ntdll!RtlEqualUnicodeString due to AV HOT 3
- Infection successful but dll is not loaded HOT 16
- bypass ProcessDynamicCodePolicy mitigation policy flagged processes. HOT 1
- Cannot inject dll due to signing issue
- Error on build HOT 13
- don`t compiling
- inject any dll HOT 2
- InjMethodThunk issue
- BSOD Windows 10 HOT 1
- not support amd64 exe run on ARM64
- What should it be used for HOT 7
- MSB3191: Unable to create director HOT 1
- 0x139_3_CORRUPT_LIST_ENTRY_injdrv in InjCreateInjectionInfo while call InsertTailList HOT 1
- PsWrapApcWow64Thread cause normalRoutine to become invalid. HOT 6
- Inject to Running processes (with no altertable threads) HOT 3
- Issue after hooking MicrosoftEdgeCP.exe HOT 4
- Random crash for wow64 process in win10 X64 1809 HOT 1
- When the driver runs, the wow64 process under the 64-bit system of win8.1 can't get up. Has anyone encountered this problem? HOT 1
- Thread create messages? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from injdrv.