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

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -