Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results
The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.
Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/
Upcoming OSR Seminars | ||
---|---|---|
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead! | ||
Kernel Debugging | 30 January 2023 | Live, Online |
Developing Minifilters | 20 March 2023 | Live, Online |
Internals & Software Drivers | 17 April 2023 | Live, Online |
Writing WDF Drivers | 22 May 2023 | Live, Online |
Comments
That particular driver employs a number of anti-debugging techniques. It is by design that it is confusing to look at in the debugger. If you're trying to understand how a typical driver behaves, this is not the one to learn from.
they happen on a vanilla Win10 installation then? They are not always
the same in number, nor the same in overwritten data, but the offset
of the first incorrect BYTE is always the same.
I am trying to find a memory corruption issue in my own driver, and
clipsp is always the first driver that !chkimg reports errors on. I
wanted to catch what writes to those addresses, and whether it is me.
> That particular driver employs a number of anti-debugging techniques. It is
> by design that it is confusing to look at in the debugger. If you're trying
> to understand how a typical driver behaves, this is not the one to learn
> from.
>
A couple general observations:
It's reasonable to run with the assumption that the memory corruption you're chasing down is unlikely to be affecting this particular driver's code segments, and that this particular driver is just intentionally doing unusual stuff to itself.
I thought self-modying code was not possible due to CI, BTW?
> A couple general observations:
>
>
> * A driver that employs self-modifying code would always fail !chkimg since
> the code segment in memory doesn't match the segment on disk.
> * One common anti-debugging technique is to manually manipulate the
> processor's debug registers, to prevent breakpoints from functioning
> normally.
>
> It's reasonable to run with the assumption that the memory corruption
> you're chasing down is unlikely to be affecting this particular driver's
> code segments, and that this particular driver is just intentionally doing
> unusual stuff to itself.
>
> --
> Reply to this email directly or follow the link below to check it out:
> https://community.osr.com/discussion/comment/293685#Comment_293685
>
> Check it out:
> https://community.osr.com/discussion/comment/293685#Comment_293685
>
The operating system makes the rules. That means it doesn't always have to play by them
I should have a plaque made with that motto, and hang it on the wall of my office.
Peter
Peter Viscarola
OSR
@OSRDrivers
Not the general "not playing by its own rules", but that some part of
the OS can override CI/CG.
>> The operating system makes the rules. That means it doesn't always have to
>> play by them
>
> I should have a plaque made with that motto, and hang it on the wall of my
> office.