Exetools  

Go Back   Exetools > General > General Discussion

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 05-16-2006, 04:41
deroko's Avatar
deroko deroko is offline
cr4zyserb
 
Join Date: Nov 2005
Posts: 217
Rept. Given: 13
Rept. Rcvd 30 Times in 14 Posts
Thanks Given: 7
Thanks Rcvd at 33 Times in 16 Posts
deroko Reputation: 30
yes, you may append your code to .sys but make sure to update checksum in PE header and to make code section writable. Any exception in r0 will cause bsod
__________________
http://accessroot.com
Reply With Quote
  #2  
Old 05-16-2006, 05:13
MarkusO
 
Posts: n/a
The PE-checksum will be your smallest problem if you plan to encrypt *.SYS files.

You must take care of what sections are loaded at which time, you must take care of the init callbacks, you will run into some big problems when trying to allocate memory and some other nasty problems. Just to name one, how do you plan to call LoadLibrary or GetProcAddres from Ring-0? KERNEL32 is not present and you can't use SEH to find the imports by trial and error.
Reply With Quote
  #3  
Old 05-16-2006, 06:35
OHPen's Avatar
OHPen OHPen is offline
Friend
 
Join Date: Aug 2003
Location: lost in code...
Posts: 92
Rept. Given: 0
Rept. Rcvd 0 Times in 0 Posts
Thanks Given: 0
Thanks Rcvd at 0 Times in 0 Posts
OHPen Reputation: 0
He have to use native api, but thats obvious...
Reply With Quote
  #4  
Old 05-17-2006, 07:55
deroko's Avatar
deroko deroko is offline
cr4zyserb
 
Join Date: Nov 2005
Posts: 217
Rept. Given: 13
Rept. Rcvd 30 Times in 14 Posts
Thanks Given: 7
Thanks Rcvd at 33 Times in 16 Posts
deroko Reputation: 30
Quote:
Originally Posted by MarkusO
Just to name one, how do you plan to call LoadLibrary or GetProcAddres from Ring-0? KERNEL32 is not present and you can't use SEH to find the imports by trial and error.
Simple, find ptr to ntoskrnl.exe from IDT and then cycle backward till you find ntoskrnl.exe base then locate ZwQuerySystemInformation to receive addresses of needed drivers and write GetProcAddress by yourself walking trough exports of needed .sys files At least that's how I would do it.
__________________
http://accessroot.com
Reply With Quote
  #5  
Old 05-17-2006, 08:34
swlepus
 
Posts: n/a
Quote:
Originally Posted by MarkusO
The PE-checksum will be your smallest problem if you plan to encrypt *.SYS files.

You must take care of what sections are loaded at which time, you must take care of the init callbacks, you will run into some big problems when trying to allocate memory and some other nasty problems. Just to name one, how do you plan to call LoadLibrary or GetProcAddres from Ring-0? KERNEL32 is not present and you can't use SEH to find the imports by trial and error.
I do not think make a PE checksum will encrypt the .sys file.
It only prevent some modifications.
Encrypt file can not be analyzed by static disassemble tool such as IDA pro.

And as we know, VMProtect can make protection on .sys file but not encrypt, even compress.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Encrypt and Decrypt with public key and private key(RSA based) CarrotStickCam Source Code 2 01-16-2023 14:53


All times are GMT +8. The time now is 11:30.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( Since 1998 )