Skip to content

Patching AmsiOpenSession by forcing an error branching

License

Notifications You must be signed in to change notification settings

SaadAhla/AMSI_patch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Inside AmsiOpenSession, there is a TEST instruction that sets the zero flag (ZF) , when the result of the AND operation is zero, and if the zero flag is 1 it will take the error branch because of the JZ instruction that will jump if ZF is 1 , but if everything is ok the error branching will never took , so what about forcing it by patching JZ to JNZ.
N.B : JZ is similar to JE and JNZ is similar to JNE :

image

You can see after patching JE to JNE using windbg , the Error branching is forced and AMSI is patched :

image

image

About

Patching AmsiOpenSession by forcing an error branching

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages