Redis配置不当致使Root被提权漏洞

1.以较低的权限启动redis服务

方法

adduser lantredis
su lantredis -c '/usr/local/bin/redis-server /etc/redis/6312.conf' 

结果可以看出redis启动的服务是以刚创建的lantredis用户启动的

《Redis配置不当致使Root被提权漏洞》 image.png

3.绑定只是允许本地访问redis

在reids.conf文件中添加
bind 127.0.0.0

2.修改端口

在reids.conf中修改默认的访问端口

4.清除/root/.ssh/目录下的对应密匙

1.top查询占用CPU进程

  1. find / -name 进程
    3.rm -rf 文件
    4.ps -ef | grep -v grep | egrep ‘进程’ | awk ‘{print $2}’ | xargs kill -9
    5.crontab -l查看定时任务
    6.echo > /var/spool/cron/root清除定时任务
    7.清除/root/.ssh/目录下的对应密匙
    8.重启redis
    ./redis-cli shutdown(关闭redis)
    原文作者:小知大知
    原文地址: https://www.jianshu.com/p/9a6aaa227e4f
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞