Page 2 of 3
Re: How do I do it: OS almost like a library
Posted: Tue May 24, 2016 9:51 am
by onlyonemac
obfusc8or wrote:The downside with a SASOS could be lack of memory protection, unless you use a memory-safe programming language for application software.
Except that there's no way to enforce that a malicious developer uses a memory-safe programming language.
Re: How do I do it: OS almost like a library
Posted: Tue May 24, 2016 4:49 pm
by Rusky
Sure there is. It's a trade-off in flexibility, but it's easily possible.
Re: How do I do it: OS almost like a library
Posted: Wed May 25, 2016 2:07 am
by onlyonemac
Rusky wrote:Sure there is. It's a trade-off in flexibility, but it's easily possible.
Running everything in an interpreted bytecode (e.g. Java)?
Re: How do I do it: OS almost like a library
Posted: Thu May 26, 2016 4:06 am
by embryo2
onlyonemac wrote:Running everything in an interpreted bytecode (e.g. Java)?
Running everything under wise management. Bytecode and stuff are just some small bits of the picture.
Re: How do I do it: OS almost like a library
Posted: Thu May 26, 2016 9:04 am
by onlyonemac
embryo2 wrote:onlyonemac wrote:Running everything in an interpreted bytecode (e.g. Java)?
Running everything under wise management. Bytecode and stuff are just some small bits of the picture.
Like running heuristic binary code analysis before loading a binary to determine if it is memory-safe?
Re: How do I do it: OS almost like a library
Posted: Thu May 26, 2016 10:20 am
by Rusky
The point is, the OS has complete control over which code runs, so if the only format it accepts is something it can verify, it can enforce that everything is written in a memory safe way.
Re: How do I do it: OS almost like a library
Posted: Thu May 26, 2016 1:51 pm
by onlyonemac
Rusky wrote:The point is, the OS has complete control over which code runs, so if the only format it accepts is something it can verify, it can enforce that everything is written in a memory safe way.
So is your proposed "memory-safe programming language" compiled or interpreted? Because if it's compiled, the OS is going to have a hard time "verifying" that it is memory-safe.
Re: How do I do it: OS almost like a library
Posted: Thu May 26, 2016 2:16 pm
by Hellbender
onlyonemac wrote:Rusky wrote:The point is, the OS has complete control over which code runs, so if the only format it accepts is something it can verify, it can enforce that everything is written in a memory safe way.
So is your proposed "memory-safe programming language" compiled or interpreted? Because if it's compiled, the OS is going to have a hard time "verifying" that it is memory-safe.
Unless all code is compiled and signed by a trusted party (you), and OS checks code signature before running it.
Re: How do I do it: OS almost like a library
Posted: Thu May 26, 2016 6:53 pm
by Rusky
onlyonemac wrote:So is your proposed "memory-safe programming language" compiled or interpreted? Because if it's compiled, the OS is going to have a hard time "verifying" that it is memory-safe.
Nope, compiled-vs-interpreted has absolutely nothing to do with it. Compilers and interpreters both control 100% of the code they generate, so if you want to ban certain constructs or enforce run-time checks, they're both equally capable of doing so.
Re: How do I do it: OS almost like a library
Posted: Fri May 27, 2016 2:14 am
by onlyonemac
Rusky wrote:onlyonemac wrote:So is your proposed "memory-safe programming language" compiled or interpreted? Because if it's compiled, the OS is going to have a hard time "verifying" that it is memory-safe.
Nope, compiled-vs-interpreted has absolutely nothing to do with it. Compilers and interpreters both control 100% of the code they generate, so if you want to ban certain constructs or enforce run-time checks, they're both equally capable of doing so.
Except that, again, you can't ban what constructs the attacker's compiler generates.
Re: How do I do it: OS almost like a library
Posted: Fri May 27, 2016 4:20 am
by embryo2
onlyonemac wrote:you can't ban what constructs the attacker's compiler generates.
It can generate whatever it wants, but OS's verifier will refuse to accept the bull $hit.
Re: How do I do it: OS almost like a library
Posted: Fri May 27, 2016 5:15 am
by alexander
Another way to achieve it would be to compile during the installation process.
Re: How do I do it: OS almost like a library
Posted: Fri May 27, 2016 10:40 am
by Rusky
onlyonemac wrote:Except that, again, you can't ban what constructs the attacker's compiler generates.
So don't use the attacker's compiler. Distribute apps in some pre-machine-code form (e.g. source, AST, CFG, bytecode) and run the compiler locally, like alexander suggests. This has the added benefit that you can optimize for the local CPU, re-optimize apps on compiler updates, etc.
Re: How do I do it: OS almost like a library
Posted: Fri May 27, 2016 11:59 am
by onlyonemac
embryo2 wrote:onlyonemac wrote:you can't ban what constructs the attacker's compiler generates.
It can generate whatever it wants, but OS's verifier will refuse to accept the bull $hit.
So in other words, running heuristic binary code analysis as I suggested a few posts ago.
Re: How do I do it: OS almost like a library
Posted: Sat May 28, 2016 3:13 am
by embryo2
onlyonemac wrote:So in other words, running heuristic binary code analysis as I suggested a few posts ago.
Depends on the OS. If OS accepts binary code then it can use protection or it can employ the analysis. If OS doesn't accept binary then there are more options.