summaryrefslogtreecommitdiff
path: root/x86_64/jmp_havoc.s
blob: 6dd734d0257349c9e34aa2e27db2a87d0039eec0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Play around with jumps

.section .text
.globl _start

_start:
	movq	$25, %rax
	jmp	thelabel

somewhere:
	movq	%rax, %rdi
	jmp	anotherlabel

label1:
	addq	%rbx, %rax
	movq	$5, %rbx
	jmp	here

labellabel:
	syscall

anotherlabel:
	movq	$60, %rax
	jmp	labellabel

thelabel:
	movq	%rax, %rbx
	jmp	there

here:
	divq	%rbx
	jmp somewhere

there:
	addq	$5, %rbx
	jmp	label1

anywhere:
	jmp	thelabel