Skip to content

Instantly share code, notes, and snippets.

@ChaitanyaHaritash
Created March 20, 2019 16:32
Show Gist options
  • Save ChaitanyaHaritash/b5c86c3b688519061a13b02d78b73782 to your computer and use it in GitHub Desktop.
Save ChaitanyaHaritash/b5c86c3b688519061a13b02d78b73782 to your computer and use it in GitHub Desktop.
gggg.asm
; Simple Implementation of WinExec API in FASM
; @bofheaded
format PE console
entry start
include 'C:\fasm\INCLUDE\WIN32A.INC'
include 'C:\fasm\INCLUDE\API\KERNEL32.inc'
section '.text' code readable executable
; command to execute
cmd db 'mshta.exe vbscript:Execute("MsgBox(""Works!"",64,""testing"")(window.close)")',0
; EntryPoint
start:
invoke WinExec,cmd,0
invoke ExitProcess,0
section '.idata' import data readable
library kernel,'kernel32.dll'
import kernel,\
WinExec,'WinExec',\
ExitProcess,'ExitProcess'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment