Copy Bytes
I’ve seen so many posts from ppl complaining about CopyMemory, vbaCopyBytes and so on being dettected by Avira and some other AVs but there are many more APIs to do the same.
Here is a simple example, moving 4 bytes using lstrcpynW, more than enough to patch an address and do whatever we want.
Private Declare Function lstrcpynW Lib “kernel32″ (ByVal lDstVal As Long, ByVal lSrcVal As Long, ByVal iMaxLength As Long) As Long
Private Sub Form_Load()
Dim lSource As Long
Dim lDst As LonglDst = 0
lSource = 123
lstrcpynW VarPtr(lDst), VarPtr(lSource), 4
Debug.Print lSource = lDstEnd Sub

Recent Comments