{"slug": "readme-md", "title": "README.md", "summary": "This README file explains that the provided script cannot use `YAML.dump(payload)` to generate a useful payload, as it only produces a worthless YAML representation of a `Gem::Requirement` object. Instead, the script is a handcrafted conversion of the serialization produced by `Marshal.dump`, with a second version based on a more recent write-up about a universal deserialization gadget for Ruby 2.x and 3.x.", "body_md": "Based on excellent write-up from https://www.elttam.com.au/blog/ruby-deserialization/\nDoesn't work to use YAML.dump(payload)\nin the above script. This only produces the following YAML, which is worthless:\n--- !ruby/object:Gem::Requirement\nrequirements:\n- - \">=\"\n- !ruby/object:Gem::Version\nversion: '0'\nThis is just a handcrafted conversion of the serialization done by Marshal.dump\nSecond version is based on the more recent and equally excellent writup from https://devcraft.io/2021/01/07/universal-deserialisation-gadget-for-ruby-2-x-3-x.html", "url": "https://wpnews.pro/news/readme-md", "canonical_source": "https://gist.github.com/staaldraad/89dffe369e1454eedd3306edc8a7e565", "published_at": "2019-03-01 16:14:46+00:00", "updated_at": "2026-05-22 22:05:49.835788+00:00", "lang": "en", "topics": ["cybersecurity"], "entities": ["elttam.com.au", "devcraft.io", "Ruby", "Gem::Requirement", "Gem::Version", "Marshal", "YAML"], "alternates": {"html": "https://wpnews.pro/news/readme-md", "markdown": "https://wpnews.pro/news/readme-md.md", "text": "https://wpnews.pro/news/readme-md.txt", "jsonld": "https://wpnews.pro/news/readme-md.jsonld"}}