Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
Tags
- 네트워크정리
- 혼자공부하는네트워크
- 공부기록
- overthewire 문제
- sk shieldus rookies 23기
- overthewire bandit level 0
- 객체지향
- bandit level 11 -> level 12 문제풀이
- kbdinteractiveauthentication
- bandit 비밀번호
- sk루키즈
- 네트워크이론정리
- 포인터와 배열
- 데이터와 로직
- Dreamhack
- 정보보안
- 보안
- bandit 문제풀이
- 오블완
- bandit level
- 네트워크문제
- overthewire bandit 문제
- web hacking
- 해킹
- AWS
- 취약점진단
- 함수와 디버깅
- overthewire bandit 문제풀이
- 티스토리챌린지
- 혼공네트
Archives
- Today
- Total
아임노드
[OverTheWire Bandit] Bandit Level 2 -> Level 3 문제풀이 (+공백이 있는 파일 읽기) 본문
[SK shieldus Rookies 23기] 공부 노트/OverTheWire Bandit 문제풀이
[OverTheWire Bandit] Bandit Level 2 -> Level 3 문제풀이 (+공백이 있는 파일 읽기)
Noody 2024. 11. 14.OverTheWire Bandit
Level 2 -> Level 3
목표 : bandit2 SSH에 접속하여 공백이 있는 파일 읽기
- bandit2에 접속
- 'spaces in this filename' 파일 읽기
풀이방법
1. bandit2 SSH에 접속 후 파일 확인
이전 문제에서 얻은 패스워드를 통해 bandit2로 접속한 후
다음 레벨을 위한 패스워드가 있는 'spaces in this filename'이 있는지 확인한다.
2. 공백이 있는 파일 읽기
공백이 있는 파일을 그대로 읽어들이면
띄어쓰기 된 글자를 각각의 별도의 파일로 인식하며,
파일이 없다고 나온다.
즉, 해당 파일을 하나의 파일로 인식하게 해야한다.
cat으로 읽되 공백이 있으므로 아래와 같은 방법을 따른다.
# cat 'spaces in this filename'
# cat "spaces in this filename"
# cat spaces\ in\ this\ filename
확인해보니 작은 따옴표('')나 큰 따옴표("") 어느 것을 사용해도 접근이 가능했다.
역슬래시(\)를 이용하는 방법도 있으나 따옴표로 감싸는 것이 가장 편리했다.
여러 방법이 있으니 참고로 알아두자.
'[SK shieldus Rookies 23기] 공부 노트 > OverTheWire Bandit 문제풀이' 카테고리의 다른 글
[OverTheWire Bandit] Bandit Level 4 -> Level 5 문제풀이 (+파일 유형 확인하기) (0) | 2024.11.17 |
---|---|
[OverTheWire Bandit] Bandit Level 3 -> Level 4 문제풀이 (+숨겨진 파일 읽기) (0) | 2024.11.16 |
[OverTheWire Bandit] Bandit Level 1 -> Level 2 문제풀이 (0) | 2024.11.14 |
[OverTheWire Bandit] Bandit Level 0 -> Level 1 문제풀이 (+cat 명령어로 파일 내용 읽기) (0) | 2024.11.12 |
[OverTheWire Bandit] Bandit Level 0 문제풀이 (+오류해결) (0) | 2024.11.12 |