Ophiuchi - HackTheBox Writeup (10.10.10.227)

Posted on Sat, Jul 17, 2021 Medium Linux Web Application Insecure Deserialisation WebAssembly
Medium-difficulty Linux box on exploiting insecure deserialisation vulnerability in a SnakeYAML applet. Privilege escalation by reverse-engineering and forging a deploy-ready WebAssembly binary to exploit a command injection vulnerability in the deploy script.

Recon

Enumeration

HTTP Enumeration

Exploitation

SnakeYAML Deserialisation Attack

Privilege Escalation

Post-exploitation

Persistence

Resources

  1. https://www.appmarq.com/public/security,1039056,Avoid-insecure-use-of-YAML-deserialization-when-using-SnakeYaml-JEE
  2. https://github.com/mbechler/marshalsec/blob/master/marshalsec.pdf
  3. https://swapneildash.medium.com/snakeyaml-deserilization-exploited-b4a2c5ac0858
  4. https://github.com/artsploit/yaml-payload
  5. https://webassembly.github.io/wabt/demo/wasm2wat/index.html
  6. https://webassembly.github.io/wabt/demo/wat2wasm/index.html