bandit(26-34)

    科技2022-07-10  127

    Bandit Level 26 → Level 27

    Level Goal Good job getting a shell! Now hurry and grab the password for bandit27!

    知识点:

    同上一关卡

    操作:

    把本地shell压缩到6行以下,再进行登录。

    登陆后在阻塞的more中按v进入vi编辑页面,再按:进入命令行模式,执行命令set shell=/bin/sh  :sh得到shell。

    ls发现一个提权程序,利用其执行cat /etc/bandit_pass/bandit27即可得到密码。

    密码:3ba3118a22e93127a4ed485be72ef5ea

     

    Bandit Level 27 → Level 28

    Level Goal There is a git repository at ssh://bandit27-git@localhost/home/bandit27-git/repo. The password for the user bandit27-git is the same as for the user bandit27.

    知识点:

    git相关。参考:https://www.runoob.com/git/git-clone.html

    操作:

    mkdir /tmp/qwer

    git clone ssh://bandit27-git@localhost/home/bandit27-git/repo  

    密码:0ef186ac70e04ea33b4c1853d2526fa2

     

    Bandit Level 28 → Level 29

    Level Goal There is a git repository at ssh://bandit28-git@localhost/home/bandit28-git/repo. The password for the user bandit28-git is the same as for the user bandit28.

    Clone the repository and find the password for the next level.

     

    知识点:

    git相关。

    操作:

    git log

    git show

    密码:bbc96594b4e001778eee9975372716b2

     

    Level 29 → Level 30

    Level Goal There is a git repository at ssh://bandit29-git@localhost/home/bandit29-git/repo. The password for the user bandit29-git is the same as for the user bandit29. Clone the repository and find the password for the next level.

    知识点:

    git相关

    操作:

    git branch -a

    git log

    git show

    密码:5b90576bedb2cc04c86a9e924ce42faf

     

    Level 30 → Level 31

    Level Goal There is a git repository at ssh://bandit30-git@localhost/home/bandit30-git/repo. The password for the user bandit30-git is the same as for the user bandit30.

    Clone the repository and find the password for the next level.

    知识点:

    git相关.参考https://cloud.tencent.com/developer/section/1138782

    操作:

    git show-ref

    密码:47e603bb428404d265f59c42920d81e5

     

    Bandit Level 31 → Level 32

    Level Goal There is a git repository at ssh://bandit31-git@localhost/home/bandit31-git/repo. The password for the user bandit31-git is the same as for the user bandit31.

    Clone the repository and find the password for the next level.

     

    知识点:

    git提交文件,nano编辑器使用

    操作:

     echo 'May I come in?'>key.txt

    git add -f key.txt

    git commit

    git push

    密码:56a9bf19c63d650ce78e6ec0354ee45e

     

    Bandit Level 32 → Level 33

    After all this git stuff its time for another escape. Good luck!

    知识点:

    $0为shell名自身

    操作:

    登陆后发现shell中输入的命令都被大写后执行,这时可以输入$0进入非交互式的dash shell,查看id为bandit33,于是直接查看密码。

    密码:c9c3199ddf4121b10cf581a98d51caee

     

    Bandit Level 33 → Level 34

    At this moment, level 34 does not exist yet.

     

    待续。

     

    Processed: 0.018, SQL: 8