
Level10
level10의 계정으로 접속한 후 hint를 확인해보았습니다.

hint에서 공격 대상 파일에 대한 정보가 없으므로, find 명령어를 이용하여 level11의 권한을 가지고 있는 파일이 존재하는지 검색해 보았습니다.

파일이 없습니다. 또한, level10의 home 디렉토리에 program이라는 디렉토리가 존재하지만, root소유이기 때문에 확인이 불가능합니다.

혹시, 프로그램을 시스템이 시작될 때 자동으로 시작되도록 등록하는 설정이 해당 파일에 있을 수 있으므로, rc.local 파일을 확인해 보았습니다.

level10이라는 이름의 프로그램이 존재함을 알 수 있습니다. 실행중인 프로세스인지 확인하기 위해ps명령을 이용해 보았습니다.

level10이라는 이름으로 실행중인 프로세스는 없으므로, 이 프로그램은 데몬 형태가 아닌 단순한 프로세스임을 알 수 있습니다. 데몬은 계속 반복해서 실행되는 프로세스를 의미하고, 단순 프로세스는 한번만 실행되는 프로세스를 의미합니다.
힌트에 나와있는 공유메모리는 다음과 같은 방식으로 사용됩니다.

문제의 조건들을 이용하여 코드를 작성해보면 다음과 같이 작성할 수 있습니다.

해당 파일을 컴파일한 후 실행시켜보면, 다음과 같이 level11의 password를 획득할 수 있습니다.

No comments:
Post a Comment