{"id":22050315,"url":"https://github.com/klezvirus/deser-py","last_synced_at":"2025-05-08T23:22:21.338Z","repository":{"id":112318167,"uuid":"245883933","full_name":"klezVirus/deser-py","owner":"klezVirus","description":"Python Deserialization Payload Generator","archived":false,"fork":false,"pushed_at":"2020-03-15T14:27:18.000Z","size":22,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-31T19:21:14.912Z","etag":null,"topics":["deserialization","deserialization-vulnerability","jsonpickle","pickle","python","pyyaml"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/klezVirus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-08T20:34:22.000Z","updated_at":"2024-08-12T19:58:31.000Z","dependencies_parsed_at":"2023-05-12T22:15:14.865Z","dependency_job_id":null,"html_url":"https://github.com/klezVirus/deser-py","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klezVirus%2Fdeser-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klezVirus%2Fdeser-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klezVirus%2Fdeser-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klezVirus%2Fdeser-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/klezVirus","download_url":"https://codeload.github.com/klezVirus/deser-py/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253161531,"owners_count":21863756,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deserialization","deserialization-vulnerability","jsonpickle","pickle","python","pyyaml"],"created_at":"2024-11-30T14:21:06.930Z","updated_at":"2025-05-08T23:22:21.322Z","avatar_url":"https://github.com/klezVirus.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# deser-py\n\nDeser-py is a script to automatically generate serialized payloads for Python driven applications, which deserialize data from user input using one of the following vulnerable module:\n\n* _pickle, cPickle\n* jsonpickle\n* yaml, ruamel.yaml\n\nThe generated payloads are designed to operate both with system and Popen, which allow to execute system commands on the target. When choosing among them, conisder that Popen, as a class, is considered more reliable than system to gain RCE capabilities.\n\nThis tool has been realised as part of a research on common deserialization issues. For further information, consider reading the following article:\n\n* [The Big Problem of Serialisation](https://klezvirus.github.io/The_Big_Problem_of_Serialisation/)\n\n## Usage\n\nUsing deser-py is very straightforward::\n\n```\n$ python3 deser-py.py -h\nusage: deser-py.py [-h] [-d] [-s] [-v {os,subprocess}] -f {pickle,json,yaml,#}\n                   [-c COMMAND]\n\ndeser-py - A simple serialization payload generator\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -d, --debug           Enable debug messages\n  -s, --save            Save payload to file\n  -v {os,subprocess}, --vector {os,subprocess}\n                        Save payload to file\n  -f {pickle,json,yaml,#}, --format {pickle,json,yaml,#}\n                        Serialization archive format\n  -c COMMAND, --command COMMAND\n                        Command for the payload\n```\n\n## Requirements\n\nIn order to use **deser-py**, jsonpickle and PyYAML modules must be installed:\n\n```\npip install -r requirements.txt\n```\n\n## TODO:\n\n* Implement automatic reverse shell mode\n* Implement encoding schemes:\n    - base64\n    - urlencoded\n    - others\n\n#### References\n\n* [PyYAML - Exploit-DB](https://www.exploit-db.com/docs/47655)\n* [Exploiting jsonpickle](https://versprite.com/blog/application-security/into-the-jar-jsonpickle-exploitation/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklezvirus%2Fdeser-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fklezvirus%2Fdeser-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklezvirus%2Fdeser-py/lists"}