web
管理员
页面提示说要管理员登陆,发现cookie里面有个user=guest
,改成user=admin
发包即可,第一次好像失败了,第二次加了个xff,成功得到flag,不知道是网络原因还是题目要求xff,当时网络有点卡
Easy_sql
一个成绩查询页面,发现有备份源码index.php.bak
<?php
require("conf/config.php");
if (isset($_REQUEST['id'])) {
$id = $_REQUEST['id'];
if (preg_match("/\d.+?\D.+/is",$id)){
//也就是数字后面不能跟英文
die("Attack detected");
}
$query = "SELECt text from UserInfo WHERe id = " . $id. ";";
$results = $conn->query($query);
echo "学号:" . $id . ",成绩为: ".$results->fetch_assoc()['text'];
}
?>
绕过正则,就是个union注入了,最后构造
ord('a')-ord('b') union select group_ concat(flag) from bankdb.flag
进行绕过,得到flag
misc
签到
一个文档,里面没什么信息,改成zip,发现flag
BBQ
附件是一大串字符,base64解码得到一堆base64,base64隐写了,跑一下,得到flag
脚本
import re
import base64
b64chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
f = open('flag.txt','r')
base64str = f.readline()
pattern2 = r'(\S)==$'
pattern1 = r'(\S)=$'
binstring = ''
while(base64str):
if re.compile(pattern2).findall(base64str):
mstr = re.compile(pattern2).findall(base64str)[0]
mbin = bin(b64chars.find(mstr))
mbin2 = mbin[0:2] + mbin[2:].zfill(6)
stegobin = mbin2[-4:]
binstring += stegobin
elif re.compile(pattern1).findall(base64str):
mstr = re.compile(pattern1).findall(base64str)[0]
mbin = bin(b64chars.find(mstr))
mbin2 = mbin[0:2] + mbin[2:].zfill(6)
stegobin = mbin2[-2:]
binstring += stegobin
base64str = f.readline()
for i in range(0,len(binstring),8):
print(chr(int(binstring[i:i+8],2)),end='')
crypto
rsa
签到密码题,给了c,p,n,分解n,跑一下即可得到flag
总结
太菜了太菜了,暑假要猛学一波了,希望线下awd不要被日穿了