Jump to content
Tuts 4 You

VirtualProtect issue


GautamGreat

Recommended Posts

GautamGreat
Posted

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?

CodeExplorer
Posted

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!
 

GautamGreat
Posted
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

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
×
×
  • Create New...