r/programming • • 18d ago

Java4Shell: RCE in OpenJDK Base64 (Calif)

https://calif.io/java4shell/
324 Upvotes

45 comments sorted by

View all comments

Show parent comment

6

u/CherryLongjump1989 18d ago edited 18d ago

Base64 is re-chunked binary data. You split up your binary data into 6 bit segments and pad them with 2 more bits to get a byte. It's one of the main ways you can shove incompatible binary formats into other binary formats, and it just so happens to fall into the range of ASCII characters. So it's extremely versatile and efficient whenever you have to transfer binary data across a wide variety of protocols, without having to to transcode at every step of the way. So in other words it's ideal for anything network related.