温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

redis配置文件与未授权访问

发布时间:2020-08-03 16:47:06 来源:网络 阅读:11988 作者:wx5b0b88843cb2a 栏目:安全技术

redis配置文件与未授权访问

0x00 redis简述

REmote DIctionary Server(Redis) 是一个由Salvatore Sanfilippo写的key-value存储系统。
Redis是一个开源的使用ANSI C语言编写、遵守BSD协议、支持网络、可基于内存亦可持久化的日志型、Key-Value数据库,并提供多种语言的API。它通常被称为数据结构服务器,因为值(value)可以是 字符串(String), 哈希(Map), 列表(list), 集合(sets) 和 有序集合(sorted sets)等类型。

0x01 redis配置文件

配置文件名称:redis.conf
默认路径:/etc/redis.conf
默认端口:6379
redis配置文件中与权限和密码有关的字段:

# bind 192.168.1.100 10.0.0.1
# bind 127.0.0.1 ::1
# internet, binding to all the interfaces is dangerous and will expose the
# following bind directive, that will force Redis to listen only into
bind 0.0.0.0

# If the master is password protected (using the "requirepass" configuration
# requirepass foobared

bind代表允许访问的ip
requirepass 代码访问redis的密码

0x02 那种情况下,redis存在未授权访问

启动方式 对应进程 配置文件 是否存在未授权访问
./redis-server 00:00:00 redis-server 0.0.0.0:6379 没有配置文件 不存在
./redis-server redis.conf redis-server 0.0.0.0:6379 bind 0.0.0.0 存在
./redis-server redis.conf redis-server 0.0.0.0:6379 默认配置 不存在
./redis-server redis.conf redis-server 0.0.0.0:6379 requirepass foobared; bind 0.0.0.0 不存在

综上表名redis未授权访问的条件是:

  • 加载了配置文件(./redis-server redis.conf)
  • 允许任何ip登录,或者自己的ip在允许范围内(bind 0.0.0.0)
  • 未设置密码(#requirepass foobared)
向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI