picoCTF 2019 OverFlow 0 - Points: 100
문제

풀어봤어
소스를 살펴 보겠습니다.

문제의 제목대로 오버플로우시키는 문제입니다.
이것과 함께 문제처럼 보입니다.
htps : // 이 m/CTF만/있어 ms/아 84d848156603c520454
셸에서 경로를 확인합니다.

플래그를 표시하는 프로세스를 확인합니다.

발신자를 확인하면

이었다.
이 전 풀었을 때도 상세를 잘 모르겠습니다만, 우선 오버플로우 시키면 됩니다.

여기 처리에서 128자 이상이 buf에 들어가면 오버플로가 발생합니다.
input은 런타임에 인수로 전달할 수 있으므로 128자 이상의 문자열을 전달합니다.

130자를 넣어 보았습니다만, 안 되었습니다.
여기 근처가 이마이치 잘 모르겠습니다.
더 긴 문자를 넣어 보겠습니다.

할 수 있었습니다.
몇 글자 넣으면 좋았던 것만을 조사해 보겠습니다.

그렇다고 해서, 133문자까지는 안 되고 134문자 이후는 갈 수 없었습니다.
왜?
Reference
이 문제에 관하여(picoCTF 2019 OverFlow 0 - Points: 100), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/samohan/items/096de9d52a4440a46dd2
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
소스를 살펴 보겠습니다.

문제의 제목대로 오버플로우시키는 문제입니다.
이것과 함께 문제처럼 보입니다.
htps : // 이 m/CTF만/있어 ms/아 84d848156603c520454
셸에서 경로를 확인합니다.

플래그를 표시하는 프로세스를 확인합니다.

발신자를 확인하면

이었다.
이 전 풀었을 때도 상세를 잘 모르겠습니다만, 우선 오버플로우 시키면 됩니다.

여기 처리에서 128자 이상이 buf에 들어가면 오버플로가 발생합니다.
input은 런타임에 인수로 전달할 수 있으므로 128자 이상의 문자열을 전달합니다.

130자를 넣어 보았습니다만, 안 되었습니다.
여기 근처가 이마이치 잘 모르겠습니다.
더 긴 문자를 넣어 보겠습니다.

할 수 있었습니다.
몇 글자 넣으면 좋았던 것만을 조사해 보겠습니다.

그렇다고 해서, 133문자까지는 안 되고 134문자 이후는 갈 수 없었습니다.
왜?
Reference
이 문제에 관하여(picoCTF 2019 OverFlow 0 - Points: 100), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/samohan/items/096de9d52a4440a46dd2텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)