Serial Killer Silently Pwning Your Java Endpoints
asd-f03-serial-killer-silently-pwning-your-java-endpoints asd-f03-serial-killer-silently-pwning-your-java-endpoints
Exis;ng Mi;ga;on Advice Simply remove gadget classes from ClassPath (FoxGlove’s advice) Not feasible given more and more gadgets becoming available Blacklist & Whitelist based check at ObjectInputStream.resolveClass Different implementa@ons of this "Lookahead"-Deserializa@on exist: Use of ObjectInputStream subclass in applica@on’s deserializa@on code Agent-based (AOP-like) hooking of calls to ObjectInputStream.resolveClass() Blacklists: Bypasses might exist (in your dependencies or your own code) Whitelists: Difficult to get right & DoS though JDK standard classes possible Ad hoc SecurityManager sandboxes during deserializa@on 20
Exis;ng Mi;ga;on Advice Simply remove gadget classes from ClassPath (FoxGlove’s advice) Not feasible given more and more gadgets becoming available Blacklist & Whitelist based check at ObjectInputStream.resolveClass Different implementa@ons of this "Lookahead"-Deserializa@on exist: Use of ObjectInputStream subclass in applica@on’s deserializa@on code Agent-based (AOP-like) hooking of calls to ObjectInputStream.resolveClass() Blacklists: Bypasses might exist (in your dependencies or your own code) Whitelists: Difficult to get right & DoS though JDK standard classes possible Ad hoc SecurityManager sandboxes during deserializa@on Execu@on can be deferred a]er deserializa@on: we’ll show later how… 21
- Page 1 and 2: SESSION ID: ASD-F03 Alvaro Muñoz S
- Page 3 and 4: What is Java Serializa;on again? Ta
- Page 5 and 6: Standing on the Shoulder of Giants
- Page 7 and 8: Triggering Execu;on via "Magic Meth
- Page 9 and 10: Exploi;ng "Magic Methods" But what
- Page 11 and 12: Exploi;ng Invoca;onHandler (IH) Gad
- Page 13 and 14: New RCE Gadget in BeanShell (CVE-20
- Page 15 and 16: New RCE Gadget in Jython (CVE pendi
- Page 17 and 18: Demo of aMack Let’s take a look a
- Page 19: Exis;ng Mi;ga;on Advice Simply remo
- Page 23 and 24: Bypassing LookAhead Blacklists New
- Page 25 and 26: Example (has been fixed) org.apache
- Page 27 and 28: Demo of bypass Let’s take a look
- Page 29 and 30: Exploi;ng JNA 1 2 calc.exe 3 4 ja
- Page 31 and 32: #RSAC Finding Vulnerabili;es & Gadg
- Page 33 and 34: Finding Direct Deserializa;on Endpo
- Page 35 and 36: Finding Gadgets for Fun & Profit Si
- Page 37 and 38: Passive Deserializa;on Endpoint Det
- Page 39 and 40: Hardening Advice #RSAC
- Page 41 and 42: Apply What You Have Learned Today N
Exis;ng Mi;ga;on Advice<br />
Simply remove gadget classes from ClassPath (FoxGlove’s advice)<br />
Not feasible given more and more gadgets becoming available<br />
Blacklist & Whitelist based check at ObjectInputStream.resolveClass<br />
Different implementa@ons of this "Lookahead"-Deserializa@on exist:<br />
Use of ObjectInputStream subclass in applica@on’s deserializa@on code<br />
Agent-based (AOP-like) hooking of calls to ObjectInputStream.resolveClass()<br />
Blacklists: Bypasses might exist (in your dependencies or your own code)<br />
Whitelists: Difficult to get right & DoS though JDK standard classes possible<br />
Ad hoc SecurityManager sandboxes during deserializa@on<br />
20