java - Security of uploading and parsing Named Binary Tag files (NBT) via PHP -
i'm building application deals uploading/downloading named binary tag files (nbt).
after they're uploaded need parse them , information.
i'm bit concerned security wise don't have necessary knowledge understand how they're build or kind of data expect them.
what sanity checks can perform, when files uploaded, make sure indeed nbt files.
should concerned when parsing them?
if there's else should concerned with, please, tell.
i realize these vague questions. there aren't lot of answers on google, else wouldn't here.
the file-format nbt simple , compact. it's binary stream (uncompressed or gzipped), specified notch.
one "problem" comes special crafted nbt-files, contains lot of empty lists , lists of lists ... memory-overhead of parsing these may result in service failure (mostly because created objects each entry fills memory).
one solution limit amount of entries reading , when reaching limit dropping parsed file.
i published java-library reading nbt-files (but without having limit), maybe helps understand file-format.
edit: forgot share website "exploit": http://arstechnica.com/security/2015/04/just-released-minecraft-exploit-makes-it-easy-to-crash-game-servers/
Comments
Post a Comment