wargame_bandit level0-25全攻略

前些日子,朋友给我推荐了一个网站,上面可以做跟渗透有关的题。正热衷于此苦于不得其门而入的我很高兴地入坑了。

一开始我做的题是vortex,这个系列的题是跟缓冲区溢出有关的,难度相对较大,做得我苦不堪言。当终于在第四道题上卡死,不知道自己错在哪儿。干脆去别的题目上消遣一下找找手感。

目标转向了,推荐的入门题,bandit。

 

注:这些题的形式基本相同,通过ssh和给定的用户名密码连接到一个服务器上,再根据所有的资源和它给出的提示,尝试获得下一个等级的密码(用户名即为bandit+level)。服务器是linux系统,因此做题需要对linux有一定的了解。

 


Bandit这套题主要考验的是对linux bash以及各种工具,命令的灵活运用。



Bandit Level 0

Level Goal

The goal of this level is for you to log into the game using SSH. The host to which you need to connect is bandit.labs.overthewire.org. The username isbandit0 and the password is bandit0. Once logged in, go to the Level 1 page to find out how to beat Level 1.

正如同题目字面意思所说,只要用ssh连接到给出的域名上就好了。用户名密码都已经给出。

 

$ ssh bandit0@bandit.labs.overthewire.org

 

等到提示要输入密码时,输入bandit0。本人第一次输入时犯傻,纳闷输入为何无反应一点都不显示。直到我想起linux的密码输入从来都是没有回显的……

 


 

 

Bandit Level 0 → Level 1

Level Goal

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 to log into that level and continue the game.

由于是入门题目,相当简单,只要从home下读出readme的内容即可。

$ cat readme

就这么简单,就获得了下一个等级的密码。

 

 


Bandit Level 1 → Level 2

Level Goal

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

这道题同样没什么难度。即从home中读出一个文件名为“-”的文件。了解linux的人应该知道,在bash中,“-”即短杠会被解析为stdin,也就是标准输入流。我一开始尝试:

$ cat -

这条命令会等待你从终端输入字符,然后回显你输入的任何字符,直到输入eof (Ctrl-D)为止。如何摆脱bash的转义呢?我使用了一个很简单的方法:

$ cat ./-

在linux中“.”表示当前目录,紧跟其后的短杆就不会被解析为stdin了。于是就顺利读出了下一个等级的密码。

 

 


Bandit Level 2 → Level 3

Level Goal

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

仍然是一个特殊的文件名,这道题可能比上一道还要简单一些。得益于bash的自动补全机制,当输入:

$ cat ./sp

按下tab键,这条命令就会自动补全为:
$ cat ./space\ in \this \filename

可以看到自动对其中的空格进行了转义。

 

 

 

Bandit Level 3 → Level 4

Level Goal

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

完成它很简单,只要你知道,linux表示隐藏文件的方式,就是在文件名的前面加上“.”,这样执行ls的时候就不会列出这个文件了。

 

$ cat inhere/.

如上题,按下tab就帮你补全了。

 

 

  

 

 

Bandit Level 4 → Level 5

Level Goal

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.

当进入inhere文件夹,你会找到很多个文件,其中大部分用cat读出之后都是乱码。你只要找到唯一一个非乱码的文件,它就是你需要的密码了。

 

 

 

Bandit Level 5 → Level 6

Level Goal

The password for the next level is stored in a file somewhere under the inhere directory and has all of the following properties: - human-readable - 1033 bytes in size 

  • 3
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值