아래의 소스를 이용한다.

#include <stdio.h>

int main()
{
        long shell= 0x40058ae0; //system 함수의 주소

        while(memcmp((void*)shell, "/bin/sh", 8)) //system함수의 주소에서 8바이트씩 /bin/sh를 비교해서 찾는다.
                shell++; //못찾으면 다음 주소로

        printf("/bin/sh = %p\n",shell); //"/bin/sh" 주소 출력

}



+ Recent posts