Exetools  

Go Back   Exetools > General > General Discussion

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 06-14-2005, 17:19
vodu
 
Posts: n/a
Execution Code by using real CPU! no Emulation!!

Hi every body,

I know there are many CPU emulator free and open source around the web. But I like to execute code by real CPU for its speed. I think I can run code by making a new thread inside my program. Problem is program can not work with making a memory access virtualization and Stack memory virtualization. In on sentence, what should I do for emulation access to memory? How can I detect when Instruction Pointer come to access to memory? Some one said to me I muss play with exception. Is it true? If yes, how can I do?

Vodu,
Reply With Quote
  #2  
Old 06-15-2005, 15:04
bilbo bilbo is offline
Friend
 
Join Date: Jul 2004
Posts: 103
Rept. Given: 36
Rept. Rcvd 15 Times in 12 Posts
Thanks Given: 15
Thanks Rcvd at 17 Times in 11 Posts
bilbo Reputation: 15
Yes, it's true.
Try playing with VirtualProtectEx() using PAGE_GUARD as new access protection.
Any following attempt to read from or write to a guarded page causes the system to raise a STATUS_GUARD_PAGE exception.

Anyway, I don't think that if you raise an exception at every memory access you will be faster than emulating the CPU or single stepping through your code...

Best regards, bilbo
Reply With Quote
  #3  
Old 06-17-2005, 01:15
vodu
 
Posts: n/a
Quote:
Originally Posted by bilbo
Yes, it's true.
Try playing with VirtualProtectEx() using PAGE_GUARD as new access protection.
Any following attempt to read from or write to a guarded page causes the system to raise a STATUS_GUARD_PAGE exception.
Thank you but do you think VMware work on this method?

Quote:
Originally Posted by bilbo
Anyway, I don't think that if you raise an exception at every memory access you will be faster than emulating the CPU or single stepping through your code...
I think at least running all code except Memory access will be fast. What about privilege instruction how I can detect them? with which exception?
Reply With Quote
  #4  
Old 06-17-2005, 16:08
bilbo bilbo is offline
Friend
 
Join Date: Jul 2004
Posts: 103
Rept. Given: 36
Rept. Rcvd 15 Times in 12 Posts
Thanks Given: 15
Thanks Rcvd at 17 Times in 11 Posts
bilbo Reputation: 15
I would love to know how VMWare works, but I don't know...
By the way, I have never tried to reverse it, because it refuses to run on an old AMD K6 I have, and I don't like this...

Quote:
What about privilege instruction how I can detect them? with which exception?
That's another issue. They generate GP (General Protection - handled by interrupt slot 13).

Regards, bilbo
Reply With Quote
  #5  
Old 06-18-2005, 05:12
vodu
 
Posts: n/a
VMWare use ring-0. Do you know how we can make an exception handling process by using a sys file. Is there any sample in DDK? How it detect memory access and privilged commend? VMWARE and VPC2004 both only work on 2000 and XP. they do not work on Win2003 and Win98.!?
It seem they dont use exception handling in ring-3...
Reply With Quote
  #6  
Old 06-29-2005, 19:40
SnipER.UA
 
Posts: n/a
Old VirtualPC (before Microsoft buy Conetix) works on every Windows OS. I tested it on a Win98. VMWare never works on Win9x, only NT kernel OS.
Old VirtualPC (version 5 or earlier) uses .vxd or .sys pedending of kernel. I think using full CPU emulation is only one possibilty to create working x86 virtual machine. So operation on Ring0 is required.
And think about target-system-independent mode (real, protected or V86).
BTW why VirtualPC don't work on Win2k3? I didn't test it but if it really don't work - we can use Microsoft Virtual Server 2005, specially designed for 2k3.
Reply With Quote
  #7  
Old 07-01-2005, 19:21
md5
 
Posts: n/a
VMWare Workstation works with Windows 2000/XP/2003 as well as many flavors of Linux:
http://www.vmware.com/support/ws5/doc/intro_hostreq_ws.html#wp1000805

If you'd like to play around with memory access, in a similar fashion to a virtual machine, you may want to have a look at Bochs, a Free Open Source emulator, which can be found here:
http://bochs.sourceforge.net/

Looking at its source code might help you find what you're looking for
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
Code execution exploit to run Doom inside Doom (for DOS) CarrotStickCam Source Code 0 11-04-2022 01:47
The Legend of Zelda Ultimate Glitch Explained [Arbitrary Code Execution] mcp General Discussion 1 09-20-2016 16:48
Stack execution .. is it blocked on Windows??? yaa General Discussion 5 12-03-2007 21:22
How to execute a snippet of code before the main execution! Android General Discussion 8 10-04-2006 01:22
Execution protection in WinXP SP2 nine General Discussion 1 12-16-2003 04:11


All times are GMT +8. The time now is 22:57.


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