Penetration Testing with Shellcode: Detect, exploit, and secure network-level and operating system vulnerabilities by Hamza Megahed

Penetration Testing with Shellcode: Detect, exploit, and secure network-level and operating system vulnerabilities by Hamza Megahed

Author:Hamza Megahed [Megahed, Hamza]
Language: eng
Format: epub
Tags: COM043050 - COMPUTERS / Security / Networking, COM046070 - COMPUTERS / Operating Systems / Linux, COM053000 - COMPUTERS / Security / General
Publisher: Packt Publishing
Published: 2018-02-13T23:00:00+00:00


Now, let's build the bind syscall:

xor rax, rax

add rax, 50

xor rsi , rsi

inc rsi

syscall

We'll move on to next function, which is accept:

clientfd = accept(sockfd, NULL, NULL);

The accept function takes three arguments. The first is sockfd, and again, it is already stored in the RDI register; we can set the second and the third arguments to zero. Let's get the accept syscall number:

$ cat /usr/include/x86_64-linux-gnu/asm/unistd_64.h | grep accept

The output of the preceding command is shown in the following screenshot:



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.