본문 바로가기

Wargame/LOB

/bin/sh 주소 찾기

반응형
01.#include <stdio.h>
02. 
03.int main(int argc, char **argv)
04.{
05.long shell;
06. 
07.shell = 0x4203f2c0;     // system()함수의 주소
08. 
09.while (memcmp((void *)shell, "/bin/sh", 8))
10.{
11.shell++;
12.}
13. 
14.printf("\"/bin/sh\" is at 0x%x\n", shell);
15.printf("print %s\n", shell);
16. 
17.return 0;
18.}


반응형