You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
This is related to this recent blog post that we can expend the vulnerable instances to all kind of application which are using the recv_pyobj method on an open TCP socket.
TLDR: the recv_pyobj sends the received TCP message to a pickle deserialize method which is unsafe and leads to code injection.
importzmq# Create a ZeroMQ contextcontext=zmq.Context()
# Create a REP (Reply) socketsocket=context.socket(zmq.REP)
# Bind the socket to a TCP addresssocket.bind("tcp://*:5555") # Listen on port 5555print("Server is listening on tcp://*:5555...")
whileTrue:
try:
# Receive a Python objectreceived_obj=socket.recv_pyobj()
print(f"Received object: {received_obj}")
# Send a response back to the clientresponse=f"Server received: {received_obj}"socket.send_pyobj(response)
exceptKeyboardInterrupt:
print("Server shutting down...")
break# Clean upsocket.close()
context.term()
a client simply pickle the exploit object and send it through the TCP socket.
I'm not sure, but for writing a python tsunami plugin we maybe need to add a pypi package too. i don't know if this is possible or not.
The text was updated successfully, but these errors were encountered:
Could you provide a bit more details on how you would identify a vulnerable service? Would you just send the pickle exploit to every TCP service? Which for us, would be considered a bit too aggressive/prone to denial of service.
Hello,
This is related to this recent blog post that we can expend the vulnerable instances to all kind of application which are using the
recv_pyobj
method on an open TCP socket.TLDR: the
recv_pyobj
sends the received TCP message to a pickle deserialize method which is unsafe and leads to code injection.references:
https://pyzmq.readthedocs.io/en/latest/howto/morethanbindings.html#builtin-serialization
https://pyzmq.readthedocs.io/en/latest/api/zmq.html#zmq.Socket.recv_pyobj
a simple example can be this:
a pyZMQ server:
a client simply pickle the exploit object and send it through the TCP socket.
I'm not sure, but for writing a python tsunami plugin we maybe need to add a pypi package too. i don't know if this is possible or not.
The text was updated successfully, but these errors were encountered: