Wargames靶场闯关记录之Bandit0~10关

Bandit系列

目录

OverTheWire: Wargameshttps://overthewire.org/wargames/

level 0--level 1

 level 1--level 2

 level 2--level 3

level 3--level 4

level 4--level 5

level 5--level 6

level 6--level 7

​level 7--level 8

level 8--level 9

level 9--level 10 


  靶场地址:

OverTheWire: Wargamesicon-default.png?t=N0U7https://overthewire.org/wargames/

level 0--level 1

这关直接给出登录名和密码,直接连接即可

ssh -p 2220 bandit0@bandit.labs.overthewire.org

 登录成功后,有一个readme文件,cat一下,得出密码,用作下一关的ssh登录密码

 

 

level 1--level 2

 利用上一关得到的密码登录ssh

ssh -p 2220 bandit1@bandit.labs.overthewire.org

 ls一下,发现文件名叫 ,在linux中-有特殊意义,所以直接cat不出来,ctrl+c一下

./表明是在当前路径下,再cat,密码就出来了

 

 

level 2--level 3

 利用上一关获取的密码登录ssh

这次文件名中有空格,可以利用双引号把文件名括起来

level 3--level 4

 这关是隐藏文件,在linux中,文件名前有点.就是隐藏文件可用ls -a来显示

可用ls -a来显示

 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.

这关题目说密码是存在人类可读的文件当中,所以需要判断文件的类型,用file 命令

file ./*                //匹配当前路径下的所有文件

只有-file07为可读的ASCII text类型,所以就是它了

level 5--level 6

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
  • not executable

 这关同样是找文件,文件过多,一个个找不太现实,根据题目要求:人类可读、1033字节、非可执行文件,可以用find命令匹配

 find . -type f -size 1033c           

//-type f指定为普通文件,-size 1033c指定为1033字节

 

找到文件,直接cat查看 

 

 

level 6--level 7

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

下一级的密码存储在 服务器,并具有以下所有属性:

  • 用户 Bandit7 所有
  • 由 Group Bandit6 拥有
  • 大小为 33 字节

这题还是找文件,所以可以用find命令

用-user指定用户,-group指定群组,-size指定大小,2>/dev/null因为find命令在根目录下查找会经常有很多权限的报错信息,所有在linux中通常用这种方式将错误信息重定向到“黑洞中”

find / -user bandit7 -group bandit6 -size 33c 2>/dev/null

level 7--level 8

Level Goal

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

Commands you may need to solve this level

man, grep, sort, uniq, strings, base64, tr, tar, gzip, bzip2, xxd

这关密码存在data.txt文件中,密码跟在单词millionth后面,所以用grep匹配单词

cat data.txt|grep millionth

 

level 8--level 9

关卡目标

下一级的密码存储在文件数据中.txt并且是唯一只出现一次的文本行

解决此级别可能需要的命令

grep, sort, uniq, strings, base64, tr, tar, gzip, bzip2, xxd

找到只出现一次的那一行,那就是用uniq命令了,但是使用之前需要先用sort命令对文本进行排序,因为uniq命令是通过对比上下两行是否一样来判断的,所以先sort再uniq,-u是直接获取

level 9--level 10 

关卡目标

下一级的密码存储在文件数据中.txt存储在为数不多的人类可读字符串之一中,前面有几个“=” 字符。

解决此级别可能需要的命令

grep, sort, uniq, strings, base64, tr, tar, gzip, bzip2, xxd

直接cat data.txt会出现一堆乱码,所以用strings命令,获取可读字符

 

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值