|
| 1 | +# Bandit |
| 2 | + |
| 3 | +:::info |
| 4 | + |
| 5 | +The Bandit wargame is aimed at absolute beginners. It will teach the basics needed to be able to play other wargames. |
| 6 | + |
| 7 | +Bandit 夺旗游戏专为绝对初学者设计。它将教授参与其他夺旗游戏所需的基础知识。 |
| 8 | + |
| 9 | +::: |
| 10 | + |
| 11 | +:::note Note for beginners |
| 12 | + |
| 13 | +这个游戏和大多数其他游戏一样,是按关卡组织的。你从第 0 关开始,尝试 “通过” 或 “完成” 它。完成一个关卡后,你会获得关于如何开始下一关的信息。网站上的 `Level <X>` 页面包含了如何从上一关进入第 X 关的信息。例如,“Level 1” 的页面提供了从第 0 关进入第 1 关的方法。本游戏的每个关卡都有对应的页面,所有这些页面都可以通过本页面左侧的侧边菜单访问。 |
| 14 | + |
| 15 | +在游戏中,你会遇到许多完全不知道该怎么做的情况。别慌!也不要放弃!这个游戏的目的是让你学习基础知识,而学习基础知识的一部分就是阅读大量的新信息。如果你从未使用过命令行,一个好的起点是阅读这篇用户命令的入门介绍。 |
| 16 | + |
| 17 | +当你不知道如何继续时,可以尝试以下几种方法: |
| 18 | + |
| 19 | +1. 如果你知道一个命令,但不知道如何使用它,可以通过输入 `man <命令>` 来查看手册(man 页面)。例如,输入 `man ls` 学习 `ls` 命令。`man` 命令本身也有手册,可以试试 `man man`。在使用 `man` 时,按 `q` 键退出(你也可以使用 `/` 搜索,按 `n` 和 `N` 切换搜索结果)。 |
| 20 | +2. 如果没有 `man` 页面,该命令可能是 `shell` 内置命令。这种情况下,可以使用 `help <命令>` 来查看帮助。例如,`help cd`。 |
| 21 | +3. 使用搜索引擎:你的搜索引擎是你最好的朋友,学会如何高效使用它!推荐使用 Google。 |
| 22 | +4. 如果仍然卡住,可以通过聊天加入我们的讨论。 |
| 23 | + |
| 24 | +你已经准备好开始了!从页面左侧链接的第 0 关开始吧。祝你好运! |
| 25 | + |
| 26 | +::: |
| 27 | + |
| 28 | +## Level 0 |
| 29 | + |
| 30 | +:::info Level Goal |
| 31 | + |
| 32 | +本关的目标是让您使用 SSH 登录游戏。您需要连接的主机是 `bandit.labs.overthewire.org`,端口为 2220。用户名为 `bandit0`,密码为 `bandit0`。登录后,请访问 “第 1 关” 页面,了解如何闯过第 1 关。 |
| 33 | + |
| 34 | +::: |
| 35 | + |
| 36 | +构建 SSH 登录命令参数 |
| 37 | + |
| 38 | +```shell |
| 39 | +┌──(randark ㉿ kali)-[~] |
| 40 | + |
| 41 | +# ASCII Art |
| 42 | + |
| 43 | +
|
| 44 | +# ASCII Art |
| 45 | +
|
| 46 | +Welcome to OverTheWire! |
| 47 | +
|
| 48 | +If you find any problems, please report them to the #wargames channel on |
| 49 | +discord or IRC. |
| 50 | +
|
| 51 | +--[Playing the games]-- |
| 52 | +
|
| 53 | + This machine might hold several wargames. |
| 54 | + If you are playing "somegame", then: |
| 55 | +
|
| 56 | + * USERNAMES are somegame0, somegame1, ... |
| 57 | + * Most LEVELS are stored in /somegame/. |
| 58 | + * PASSWORDS for each level are stored in /etc/somegame_pass/. |
| 59 | +
|
| 60 | + Write-access to homedirectories is disabled. It is advised to create a |
| 61 | + working directory with a hard-to-guess name in /tmp/. You can use the |
| 62 | + command "mktemp -d" in order to generate a random and hard to guess |
| 63 | + directory in /tmp/. Read-access to both /tmp/ is disabled and to /proc |
| 64 | + restricted so that users cannot snoop on eachother. Files and directories |
| 65 | + with easily guessable or short names will be periodically deleted! The /tmp |
| 66 | + directory is regularly wiped. |
| 67 | + Please play nice: |
| 68 | +
|
| 69 | + * don't leave orphan processes running |
| 70 | + * don't leave exploit-files laying around |
| 71 | + * don't annoy other players |
| 72 | + * don't post passwords or spoilers |
| 73 | + * again, DONT POST SPOILERS! |
| 74 | + This includes writeups of your solution on your blog or website! |
| 75 | +
|
| 76 | +--[Tips]-- |
| 77 | +
|
| 78 | + This machine has a 64bit processor and many security-features enabled |
| 79 | + by default, although ASLR has been switched off. The following |
| 80 | + compiler flags might be interesting: |
| 81 | +
|
| 82 | + -m32 compile for 32bit |
| 83 | + -fno-stack-protector disable ProPolice |
| 84 | + -Wl,-z,norelro disable relro |
| 85 | +
|
| 86 | + In addition, the execstack tool can be used to flag the stack as |
| 87 | + executable on ELF binaries. |
| 88 | +
|
| 89 | + Finally, network-access is limited for most levels by a local |
| 90 | + firewall. |
| 91 | +
|
| 92 | +--[Tools]-- |
| 93 | +
|
| 94 | + For your convenience we have installed a few useful tools which you can find |
| 95 | + in the following locations: |
| 96 | +
|
| 97 | + * gef (https://github.com/hugsy/gef) in /opt/gef/ |
| 98 | + * pwndbg (https://github.com/pwndbg/pwndbg) in /opt/pwndbg/ |
| 99 | + * gdbinit (https://github.com/gdbinit/Gdbinit) in /opt/gdbinit/ |
| 100 | + * pwntools (https://github.com/Gallopsled/pwntools) |
| 101 | + * radare2 (http://www.radare.org/) |
| 102 | +
|
| 103 | +--[More information]-- |
| 104 | +
|
| 105 | + For more information regarding individual wargames, visit |
| 106 | + http://www.overthewire.org/wargames/ |
| 107 | +
|
| 108 | + For support, questions or comments, contact us on discord or IRC. |
| 109 | +
|
| 110 | + Enjoy your stay! |
| 111 | +
|
| 112 | +bandit0@bandit:~$ whoami |
| 113 | +bandit0 |
| 114 | +``` |
| 115 | +
|
| 116 | +## Level 0 → Level 1 |
| 117 | +
|
| 118 | +:::info Level Goal |
| 119 | +
|
| 120 | +下一级的密码保存在主目录下名为 `readme` 的文件中。 使用此密码通过 SSH 登录 `bandit1`。 每当找到某个关卡的密码时,请使用 SSH(2220 端口)登录该关卡并继续游戏。 |
| 121 | +
|
| 122 | +::: |
| 123 | +
|
| 124 | +首先查看文件内容 |
| 125 | +
|
| 126 | +```shell |
| 127 | +bandit0@bandit:~$ cat readme |
| 128 | +Congratulations on your first steps into the bandit game!! |
| 129 | +Please make sure you have read the rules at https://overthewire.org/rules/ |
| 130 | +If you are following a course, workshop, walkthrough or other educational activity, |
| 131 | +please inform the instructor about the rules as well and encourage them to |
| 132 | +contribute to the OverTheWire community so we can keep these games free! |
| 133 | +
|
| 134 | +The password you are looking for is: ZjLjTmM6FvvyRnrb2rfNWOZOTa6ip5If |
| 135 | +``` |
| 136 | +
|
| 137 | +接下来登录`bandit1`用户 |
| 138 | +
|
| 139 | +```shell |
| 140 | +┌──(randark㉿kali)-[~] |
| 141 | + |
| 142 | +# ...... |
| 143 | +bandit1@bandit:~$ whoami |
| 144 | +bandit1 |
| 145 | +``` |
| 146 | +
|
| 147 | +TODO 未完成 |
0 commit comments