GIDForums  

Go Back   GIDForums > Computer Programming Forums > Assembly Language
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 04-Jan-2008, 10:33
mybwp mybwp is offline
New Member
 
Join Date: Jan 2008
Posts: 3
mybwp is on a distinguished road

Hooking Assembly Language Instructions


Is it possible to hook and modify the return values of x86 assembly instructions like: RDTSC and CPUID?
  #2  
Old 04-Jan-2008, 15:50
davekw7x davekw7x is offline
Outstanding Member
 
Join Date: Feb 2004
Location: Left Coast, USA
Posts: 4,710
davekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to behold

Re: Hooking Assembly Language Instructions


Quote:
Originally Posted by mybwp
Is it possible to hook and modify the return values of x86 assembly instructions like: RDTSC and CPUID?

There is an example here that works for me on Linux/GNU platforms: http://www.agner.org/optimize/?e=0#testp

There are instructions for compiling with various Windows compilers, but I haven't tested any.

Regards,

Dave
  #3  
Old 04-Jan-2008, 18:15
mybwp mybwp is offline
New Member
 
Join Date: Jan 2008
Posts: 3
mybwp is on a distinguished road

Re: Hooking Assembly Language Instructions


Thanks for your reply! I think i m not able to properly communicate my problem...Actually i want to know is there any method by which i can intercept assembly language instructions just as i can hook windows api calls and then i can modify their return values. Similarly if i want to return a modified vendorstring in result of CPUID instruction instead of the actual one, is it possible to do such thing?
  #4  
Old 04-Jan-2008, 18:52
davekw7x davekw7x is offline
Outstanding Member
 
Join Date: Feb 2004
Location: Left Coast, USA
Posts: 4,710
davekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to behold

Re: Hooking Assembly Language Instructions


Quote:
Originally Posted by mybwp
Actually i want to know ...
My blackhat friends tell me that anything is possible. They respected my request that they not tell me how.

Sorry.

Regards,

Dave
  #5  
Old 05-Jan-2008, 01:30
mybwp mybwp is offline
New Member
 
Join Date: Jan 2008
Posts: 3
mybwp is on a distinguished road

Re: Hooking Assembly Language Instructions


Yeah from the same BH guys work, i precieve that if there is present a hypervisor/VMM that emulates CPU than it can intercept and play with these instructions....I am just wondering in the absence of virtualization, when interacting with real CPU, is it somehow possible implementing such interception mechanism? Thanks for your time!
  #6  
Old 30-Jan-2008, 19:45
whitepenguin whitepenguin is offline
New Member
 
Join Date: Dec 2007
Posts: 9
whitepenguin is on a distinguished road

Re: Hooking Assembly Language Instructions


Well yes , RDTSC and CPUID are allowed to execute in Ring 3 programs, So feel free to mess with it
 
 

Recent GIDBlogToyota - 2008 September Promotion by Nihal

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Program Not working, assembly language czerdrill Assembly Language 1 28-Oct-2007 14:13
Please help me with assembly language! czerdrill Assembly Language 0 20-Oct-2007 13:13
Assemblers & assembly language BlueFireCO. Assembly Language 2 26-Mar-2007 09:56
which language ? onauc C++ Forum 2 19-Nov-2004 02:53

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 03:13.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.