2 ms·
You essentially have a gateway into a very large chunk of code that was most likely not built with security in mind on the parsing side, on top of that you are
by jacquesm 5y ago
You essentially have a gateway into a very large chunk of code that was most likely not built with security in mind on the parsing side, on top of that you are guaranteed write access to some file system.
- danudey 5y agoIdeally you would sandbox this with: 1. No filesystem access 2. No network access 3. Input passed on stdin (or a pre-opened fd) 4. Output passed to stdout (or a pre-opened fd) 5. A hard timeout specified before the process is killed Suddenly bam, dramatically safer. If you're looking for a tool that can do all of this for you, check out firejail: https://firejail.wordpress.com/ https://firejail.wordpress.com/ It has a ton of options, but you can do all of what I suggested and more, really easily.
- cookiengineer 5y agoNote that firejail had a serious RCE in the way it parses URLs for at least emails. Personally, having read the codebase, I wouldn't put too much faith in its security, given how long it took that the meta character parsing problems were discovered. A user input facing software should always use fuzzing to uncover such bugs.