완료됨
셀코드 작성을 이렇게 하는게 맞나요?
저는 일단 아래의 방법으로 해서 성공했긴했는데 영 아닌거같아서...
objdump -d
로 hex 로 된 코드를 뽑아내서- 댓글대로
\x0a
이렇게 바로 넣으면 안되서 (원래 안되는거 아닌가요?) 아래 코드를 이용해 따로 파일로 뺀 후
void BinaryToShellCode()
{
ofstream file("shellcode");
string in;
while(1)
{
cin >> in;
if (cin.eof()) break;
stringstream str(in);
string tmp;
char binary;
while (!str.eof())
{
str >> tmp;
binary = std::stoi("0x"+ tmp, nullptr, 16);
file << binary;
}
}
file.close();
}
nc host1.dreamhack.games 23497 < shellcode
이렇게 리디렉션으르 걸기
보통은 어떻게 쉘코드를 뽑아내나요?
#pwnable
작성자 정보