# Bandit Writeup(Level 0-10)

Target Host: bandit.labs.overthewire.org

Target Port: 2220

## 1. 推荐学习资料

• Linux在线资源
• Shell在线资源
• 实体书籍
• 《鸟哥的Linux私房菜 基础学习篇 第四版》(京东,当当均有售)

## 2. Level 0

### 2.1. 关卡目标

The password for the next level is stored in a file called readme located in the home directory. Use this password to log into bandit1 using SSH. Whenever you find a password for a level, use SSH (on port 2220) to log into that level and continue the game.

## 3. Level 1

### 3.1. 关卡目标

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

### 3.2. 解决方案

• d = directory 目录
• - = 普通文件
• l = link file 链接文件
• b 装置文件里面的可供储存的接口设备(可随机存取装置)
• c 装置文件里面的串行端口设备,例如键盘,鼠标(一次性读取装置)

• . 代表当前目录
• .. 代表上一级目录
• ~ 代表用户的home目录
• / 代表根目录

-Bash 中是一个特殊符号, 我们用 cat 输出这样的文件的时候需要在前面加上./ , 以表示这是一个文件.

## 4. Level 2

### 4.1. 关卡目标

The password for the next level stored in a file called spaces in this filename located in the home directory

## 5. Level 3

### 5.1. 关卡目标

The password for the next level is stored in a hidden file in the inhere directory.

## 6. Level 4

### 6.1. 关卡目标

The password for the next level is stored in the only human-readable
file in the inhere directory. Tip: if your terminal is messed
up, try the “reset” command.

## 7. Level 5

### 7.1. 关卡目标

The password for the next level is stored in a file somewhere under the inhere directory and has all of the following properties:

• 1033 bytes in size
• not executable

## 8. Level 6

### 8.1. 关卡目标

The password for the next level is stored somewhere on the server and has all of the following properties:

• owned by user bandit7
• owned by group bandit6
• 33 bytes in size

## 9. Level 7

### 9.1. 关卡目标

The password for the next level is stored in the file data.txt
next to the word millionth

## 10. Level 8

### 10.1. 关卡目标

The password for the next level is stored in the file data.txt
and is the only line of text that occurs only once

## 11. Level 9

### 11.1. 关卡目标

The password for the next level is stored in the file data.txt
in one of the few human-readable strings, beginning with several ‘=’
characters.

## 12. Level 10

### 12.1. 关卡目标

The password for the next level is stored in the file data.txt,
which contains base64 encoded data