-
Notifications
You must be signed in to change notification settings - Fork 300
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #245 from teoberi/Fortify-proccheck-last
checksec FORTIFY detection (proccheck) last
- Loading branch information
Showing
12 changed files
with
123 additions
and
48 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
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
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 |
---|---|---|
@@ -1,7 +1,9 @@ | ||
#include <stdio.h> | ||
#include <unistd.h> | ||
|
||
int main() | ||
{ | ||
printf("Hello World\n"); | ||
sleep(2); | ||
return 0; | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,23 @@ | ||
section .data | ||
msg db 'Hello, World!', 0ah ;note the newline (Line Feed-LF) at the end (hex:0ah; decimal:10) | ||
len equ $ - msg ;calculate the length of the message | ||
delay dq 2, 100000000 ;define delay with Timespec structure members tv_sec, tv_nsec (qwords, 64-bit integer values) | ||
|
||
section .text | ||
global _start ;must be declared for linker (ld) | ||
|
||
_start: ;tells linker entry point | ||
mov rax, 1 ;system call for write (sys_write 1) | ||
mov rdi, 1 ;file descriptor (1 is stdout) | ||
mov rsi, msg ;address of string to output | ||
mov rdx, len ;message length | ||
syscall ;invoke operating system to do the write | ||
|
||
mov rax, 35 ;system call for nanosleep (sys_nanosleep 35) | ||
mov rdi, delay ;load the pointer to our delay | ||
mov rsi, 0 ;exit code 0 | ||
syscall ;invoke operating system to do the delay | ||
|
||
mov rax, 60 ;system call for exit (sys_exit 60) | ||
xor rdi, rdi ;exit code 0 | ||
syscall ;invoke operating system to exit |
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,23 @@ | ||
section .data | ||
msg db "Hello, world!", 0xa ;note the newline (Line Feed-LF) at the end (hex:0ah; decimal:10) | ||
len equ $ - msg ;calculate the length of the message | ||
delay dd 2, 100000000 ;define delay with Timespec structure members tv_sec, tv_nsec (dwords, 32-bit integer values) | ||
|
||
section .text | ||
global _start ;must be declared for linker (ld) | ||
|
||
_start: ;tells linker entry point | ||
mov eax,4 ;system call for write (sys_write 4) | ||
mov ebx,1 ;file descriptor (1 is stdout) | ||
mov ecx,msg ;address of string to output | ||
mov edx,len ;message length | ||
int 0x80 ;invoke operating system to do the write | ||
|
||
mov eax, 162 ;system call for nanosleep (sys_nanosleep 162) | ||
mov ebx, delay ;load the pointer to our delay | ||
mov ecx, 0 ;exit code 0 | ||
int 0x80 ;invoke operating system to do the delay | ||
|
||
mov eax,1 ;system call for exit (sys_exit 1) | ||
xor ebx, ebx ;exit code 0 | ||
int 0x80 ;invoke operating system to exit |
This file was deleted.
Oops, something went wrong.
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