Bandit Level 1 → Level 2

장일영·2024년 5월 10일

Bandit

목록 보기
2/33

Level

Goal

The password for the next level is stored in a file called - located in the home directory

다음 레벨의 패스워드는 home 디렉토리에 - 파일에 저장되어 있다.

Commands you may need to solve this level

ls , cd , cat , file , du , find

Helpful Reading Material

Google Search for “dashed filename”
Advanced Bash-scripting Guide - Chapter 3 - Special Characters

Exploit

-: redirection from/to stdin or stdout

cat - 명령어는 키보드 입력을 기다리거나 다른 프로세스에서 전송된 데이터를 기다리게 된다. 파일 이름이 -일 때 이를 cat 명령어로 읽으려면 해당 파일의 위치를 상대경로, 또는 절대경로로 정확히 지정해야 한다.

cat ./-

0개의 댓글