IDEA2023.1.3破解,IDEA破解,IDEA 2023.1破解,最新IDEA激活码

SSRF攻击原理

IDEA2023.1.3破解,IDEA破解,IDEA 2023.1破解,最新IDEA激活码

什么是SSRF

一个对外的Web接口,改接口能让用户控制curl命令,去访问别的web服务。

简图如下
124_1.png

想象一下当用户请求的baidu.com/x.php?image=google.com/1.jpg 改成 baidu.com/x.php?image=private.com/php.info,是不是觉得原本不可能访问到内网的主机,现在就很容易就能做到了。

原理

PHP代码演示:

$url = $_GET['URL'];
curl($url);

function curl($url){
    $ch = curl_init(); // 初始化curl会话对象
    curl_setopt($ch,CURLOPT_URL,$url); // 抓取URL并把它传递给浏览器
    curl_setopt($ch,CURLOPT_HEADER,0); 
    curl_exec($ch); // 执行请求
    curl_close($ch);
}

1、查看代码的时候检查是否使用curl_setopt( )函数;
2、在看传入的url是否是来自外部;

防护

跳转的url参数只能是白名单里面的url。


Warning: A non-numeric value encountered in /data/wangzhan/tech.souyunku.com.wp/wp-content/themes/dux/functions-theme.php on line 1154
赞(61) 打赏



未经允许不得转载:搜云库技术团队 » SSRF攻击原理

IDEA2023.1.3破解,IDEA破解,IDEA 2023.1破解,最新IDEA激活码
IDEA2023.1.3破解,IDEA破解,IDEA 2023.1破解,最新IDEA激活码

评论 抢沙发

大前端WP主题 更专业 更方便

联系我们联系我们

觉得文章有用就打赏一下文章作者

微信扫一扫打赏

微信扫一扫打赏


Fatal error: Uncaught Exception: Cache directory not writable. Comet Cache needs this directory please: `/data/wangzhan/tech.souyunku.com.wp/wp-content/cache/comet-cache/cache/https/tech-souyunku-com/index.q`. Set permissions to `755` or higher; `777` might be needed in some cases. in /data/wangzhan/tech.souyunku.com.wp/wp-content/plugins/comet-cache/src/includes/traits/Ac/ObUtils.php:367 Stack trace: #0 [internal function]: WebSharks\CometCache\Classes\AdvancedCache->outputBufferCallbackHandler() #1 /data/wangzhan/tech.souyunku.com.wp/wp-includes/functions.php(5109): ob_end_flush() #2 /data/wangzhan/tech.souyunku.com.wp/wp-includes/class-wp-hook.php(303): wp_ob_end_flush_all() #3 /data/wangzhan/tech.souyunku.com.wp/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters() #4 /data/wangzhan/tech.souyunku.com.wp/wp-includes/plugin.php(470): WP_Hook->do_action() #5 /data/wangzhan/tech.souyunku.com.wp/wp-includes/load.php(1097): do_action() #6 [internal function]: shutdown_action_hook() #7 {main} thrown in /data/wangzhan/tech.souyunku.com.wp/wp-content/plugins/comet-cache/src/includes/traits/Ac/ObUtils.php on line 367