Jump to content
Tuts 4 You
Sign in to follow this  
GautamGreat

VirtualProtect issue

Recommended Posts

GautamGreat

Hi,

I am coding a dll for patching a vmp target. Everything goes well but when I change the permission of codesection using VirtualProtect api the function failed and program crashed when changing dwords in Codesection. When I change the permission manually through ollydbg then it works. Anyone can explain it why?

Share this post


Link to post
CodeExplorer

Did you tried GetLastError to see the error code, runned after VirtualProtect api to see why it failed?
Canging code section is not posible if it doesn't had the Write access flag!
Can you also post your code? Maybe I will figure out what you did wrong!
 

Share this post


Link to post
GautamGreat
7 minutes ago, CodeCracker said:

Did you tried GetLastError to see the error code, runned after VirtualProtect api to see why it failed?
Canging code section is not posible if it doesn't had the Write access flag!
Can you also post your code? Maybe I will figure out what you did wrong!
 

Hi I send full code to your inbox

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×
×
  • Create New...