Created
March 20, 2019 16:32
-
-
Save ChaitanyaHaritash/b5c86c3b688519061a13b02d78b73782 to your computer and use it in GitHub Desktop.
gggg.asm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; 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