Created
July 29, 2018 15:13
-
-
Save native-m/50980cda502594af734e626604f5cfb7 to your computer and use it in GitHub Desktop.
Loss in x86 assembly
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
; I don't know why i made this | |
; nasm -f elf *.asm; ld -dynamic-linker /lib/ld-linux.so.2 -m elf_i386 -s -o fuckyou -lc *.o | |
extern printf | |
extern exit | |
section .data | |
str1 times 23 db 0 | |
section .text | |
global _start | |
_start: | |
lea eax, [str1] | |
; Keep the loss here | |
mov dword [eax], 4C692049h | |
mov byte [eax + 4], 0000000Ah | |
mov dword [eax + 5], 4C204949h | |
mov byte [eax + 9], 0000000Ah | |
mov dword [eax + 10], 73696854h | |
mov dword [eax + 14], 20736920h | |
mov dword [eax + 18], 73736F6Ch | |
; Kick the string | |
push eax | |
call printf | |
pop eax | |
; And kys | |
mov eax, 0xa | |
call exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment