0%

LitCTF的web复现

我Flag呢?

直接查看源码找到flag

导弹迷踪

f12,在game.js中找到flag

Read more »

[HNCTF 2022 WEEK4]fun_sql

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
 <?
include "mysql.php";
include "flag.php";

if ( $_GET['uname'] != '' && isset($_GET['uname'])) {

$uname=$_GET['uname'];

if(preg_match("/regexp|left|extractvalue|floor|reverse|update|between|flag|=|>|<|and|\||right|substr|replace|char|&|\\\$|0x|sleep|\#/i",$uname)){
die('hacker');

}

$sql="SELECT * FROM ccctttfff WHERE uname='$uname';";
echo "$sql<br>";


mysqli_multi_query($db, $sql);
$result = mysqli_store_result($db);
$row = mysqli_fetch_row($result);

echo "<br>";

echo "<br>";
if (!$row) {
die("something wrong");
}
else
{
print_r($row);
echo $row['uname']."<br>";

}
if ($row[1] === $uname)
{
die($flag);
}
}
highlight_file(__FILE__);
Read more »

[安洵杯 2020]Validator

扫描目录发现两个文件:app.js与package.json

Read more »

ejs 模板引擎实现 RCE

需要ejs的版本为3.1.5,高版本的ejs直接把outputFunctionName属性值给删除了

首先探测一下该漏洞是否存在

Read more »

D3ctf-d3cloud复现

打开是一个Laravel页面

1
Laravel是一个基于PHP编程语言的免费开源的Web应用程序框架,它的目标是提高Web应用程序的开发效率和可维护性。Laravel框架使用了现代的PHP开发技术,并提供了丰富的功能和工具,使得开发人员能够更快捷地构建高质量的Web应用程序。
Read more »

[HZNUCTF 2023 preliminary]pickle

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import base64
import pickle
from flask import Flask, request

app = Flask(__name__)


@app.route('/')
def index():
with open('app.py', 'r') as f:
return f.read()


@app.route('/calc', methods=['GET'])
def getFlag():
payload = request.args.get("payload")
pickle.loads(base64.b64decode(payload).replace(b'os', b''))# 对payload参数进行base64解码,并且将os置换为空
return "ganbadie!"


@app.route('/readFile', methods=['GET'])
def readFile():
filename = request.args.get('filename').replace("flag", "????")
with open(filename, 'r') as f:
return f.read()


if __name__ == '__main__':
app.run(host='0.0.0.0')
Read more »

[虎符CTF] ezphp

之前在buu上做过,但是忘了,正好在nss上再做一遍

开局一段PHP代码

1
<?php (empty($_GET["env"])) ? highlight_file(__FILE__) : putenv($_GET["env"]) && system('echo hfctf2022');?> 
Read more »