Bandit(0-5)

https://overthewire.org/wargames/

 

Bandit0

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, on port 2220. The username is bandit0 and the password is bandit0. Once logged in, go to the Level 1 page to find out how to beat Level 1.

 

知识点:

ssl常用命令

操作:

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

 

Bandit0->Bandit1

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 (on port 2220) to log into that level and continue the game.

 

知识点:

ls命令,cat命令

操作:

ls

cat file_name

密码:boJ9jbbUNNfktd78OOpsqOltutMc3MY1

 

Bandit1->Bandit2

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

 

知识点:

linux中短横线开始的文件名的操作稍有区别。由于linux中短横线往往具有命令后接选项的意义,所以在处理这些文件时往往采用./+短横线开始的文件名形式,如cat ./-。参考https://blog.csdn.net/u013590407/article/details/77937018

操作:

ls

cat ./-

密码:CV1DtqXWVFXTvM2F0k09SHz0YwRINYA9

 

Bandit2->Bandit3

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

 

知识点:

文件名有空格的操作:一般用\来表示。如cat space in file name可以输入cat space\in\file\name即可。

操作:

标准答案应该如上所示,但是我们可以取巧,直接tab补全,哈哈。

密码:UmHadQclWmgdLOKQ3YNgjWxGoRMb5luK

 

Bandit3->Bandit4

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

 

知识点:

ls命令查看隐藏文件

操作:

ls -a

cat ./.hidden

密码:pIwrPrtPN36QITSp3EQaw936yaFoFgAB

 

Bandit4->Bandit5

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命令查看文件类型。参考https://www.runoob.com/linux/linux-comm-file.html

操作:

file  ./-file*

cat  ./-file07

密码:koReBOKuIDDepwhWk7jZC0RTdopnAYKh

 

Bandit5->Bandit6

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

 

知识点:

du : 显示每个文件和目录的磁盘使用空间~~~文件的大小。

命令参数:

-a   #显示目录中文件的大小  单位 KB 。

-b  #显示目录中文件的大小,以字节byte为单位。

-c  #显示目录中文件的大小,同时也显示总和;单位KB。

-k 、 -m  #显示目录中文件的大小,-k 单位KB,-m 单位MB.

-s  #仅显示目录的总值,单位KB。

-h  #以K  M  G为单位显示,提高可读性~~~(最常用的一个~也可能只用这一个就满足需求了)

参考https://blog.csdn.net/qq_19167629/article/details/80915834

 

操作:

du -a -b

cat ./maybehere07/.file2

 

此处有一个疑惑,用du -a -b 可以直接看到密码文件大小为1033B,但是用du -a -h看到的同样的文件大小却是4k这是为什么??

 

另一种解法:

find . -type f -size 1033c

-size n[cwbkMG] : 档案大小 为 n 个由后缀决定的数据块。其中后缀含义为:
b: 代表 512 位元组的区块(如果用户没有指定后缀,则默认为 b)
c: 表示字节数
k: 表示 kilo bytes (1024字节)
w: 字 (2字节)
M:兆字节(1048576字节)
G: 千兆字节 (1073741824字节)
-type c : 档案类型是 c 。
d: 目录
c: 字型装置档案
b: 区块装置档案
p: 具名贮列
f: 一般档案
l: 符号连结
s: socket

 

密码:DXjZPULLxYr17uwoI01bNLQbtFemEgo7

 

 

 

 

 

 

 

 

 


 

 

 

 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值