file-special-bit
-
Dreamhack - file-special-bitwargame/Dreamhack 2023. 11. 14. 20:43
[Beginner - file-special-bit - misc] 일단 ssh id@[hostname] -p [port]를 통해 문제 환경에 접속한다. 비밀번호는 드림핵 문제에 나와있는 pw 치면 된다. ls로 뭐가 들어있는지 확인한다. ./chall flag 실행하려는데 갑자기 ruid랑 euid를 치라고 해서 모르니까 아무거나 눌러보았다. No.라고 뜬다. 검색해보니 ruid는 프로세스의 실제 소유자, euid는 effective user id로 이걸 통해 일시적으로 파일 소유자의 권한을 얻을 수 있다고 한다. id를 통해 나(chall)의 uid가 1000인 걸 알게 되었다. 문제에서 dream 유저의 권한으로 "flag"파일을 읽으라고 했으니까 id dream을 통해 dream의 uid를 살펴보았..