Nido
May 20th, 2009, 14:04
Is it possible to modify NTDLL and reboot ?
Can anyone suggest any pointers or resources to making modifications to NTDLL ?
I'm not after other peoples snippets of the change they made to fulfill some requirement, but a broader overview of the concerns with simply making a modifications to NTDLL. Things to be aware of, things to check for, etc...
Things I can contribute:
* Have a way to recover the system (bootable ISO / USBdisk with something like BartPE is one easy way)
* Don't use your own workstation
have a 2nd PC.
* Ensure you always fixup the PE header checksum.
As you can see my knowledge soons runs out. The purpose of my interest is to have more control over anti-debugging measures without using ring-0.
One other question concerning NTDLL there are exported functions NtXXXX and ZwXXXX the NtXXXX series I understand are called from the user-mode context where the state of the machine is exactly the same as a the application.
I'd like to understand more about the ZwXXXX series of functions and the transitions between the two machine states. For example is the "FS" segment register which is used by user-mode to point to the Thread Local Storage (TIB/TEB), is it loaded with the same value for all contexts that ZwXXXX calls are made ?
Some of the anti-debugging area of interest have aliased implementations ("aliased" meaning 2 or more Export Address Table entries pointing to the same implementation of a function, since it is shared by the NtXXXX and the ZwXXXX series).
Can anyone suggest any pointers or resources to making modifications to NTDLL ?
I'm not after other peoples snippets of the change they made to fulfill some requirement, but a broader overview of the concerns with simply making a modifications to NTDLL. Things to be aware of, things to check for, etc...
Things I can contribute:
* Have a way to recover the system (bootable ISO / USBdisk with something like BartPE is one easy way)
* Don't use your own workstation

* Ensure you always fixup the PE header checksum.
As you can see my knowledge soons runs out. The purpose of my interest is to have more control over anti-debugging measures without using ring-0.
One other question concerning NTDLL there are exported functions NtXXXX and ZwXXXX the NtXXXX series I understand are called from the user-mode context where the state of the machine is exactly the same as a the application.
I'd like to understand more about the ZwXXXX series of functions and the transitions between the two machine states. For example is the "FS" segment register which is used by user-mode to point to the Thread Local Storage (TIB/TEB), is it loaded with the same value for all contexts that ZwXXXX calls are made ?
Some of the anti-debugging area of interest have aliased implementations ("aliased" meaning 2 or more Export Address Table entries pointing to the same implementation of a function, since it is shared by the NtXXXX and the ZwXXXX series).