Giter Club home page Giter Club logo

Comments (8)

cedric05 avatar cedric05 commented on May 25, 2024 1

sorry that my point is irrelevant to this issue. but wanted to share my views.
thanks

from sandboxed-api.

cedric05 avatar cedric05 commented on May 25, 2024
2. The `AllowSystemMalloc` interface, it's implemented very complexed,not only limit the system call ` but also limit the args.  why?  What references do you have? or have some evidence ?`

even i think the same.
as far as i know this project is tightly coupled to google's protocol buffers. AllowRead, Allowsocketrecive and lot of other calls should be add must and should.
which seems to be bad.
having it tied to google's protocal buffer is bad. there are scenarios where protocalbuffers are not accepted, we always have to write wrappers and allow those syscalls.
IMO.
@cblichmann any ideas?

from sandboxed-api.

fluxchief avatar fluxchief commented on May 25, 2024

Hi,

  1. In the ideal case you have a look at what syscalls the sandboxee actually uses and whitelist them individually, potentially by checking for the contents of the arguments.
    In order to make it less cumbersome to write policies, we created some helper functions that will whitelist commonly used syscalls which brings us to
  2. AllowSystemMalloc - I don't know if I have a different codebase, but it allows munmap, mremap(MREMAP_MAYMOVE) and mmap with specific parameters. Those are syscalls that are used by the system malloc on my machine and it seems to be the same for others. Asking for references or evidence is.. difficult as those allocators change over time.

Can you elaborate on what this has to do with protobufs? Sapi has support for protobufs, but there is no need to use them.

from sandboxed-api.

fluxchief avatar fluxchief commented on May 25, 2024

Another comment on creating a policy, you can use the "sandbox2_danger_danger_permit_all_and_log" flag to do some 'strace like' logging of all syscalls that are used by the sandboxee. This doesn't necessarily mean that it is minimal or effective afterwards. You might be able to return errors on some syscalls without breaking the program (libc has some fallbacks when syscalls are not available), also some syscalls should potentially not be enabled at all, e.g. ptrace.

from sandboxed-api.

cedric05 avatar cedric05 commented on May 25, 2024

now i get it. execution is launching new process and transfer data with protocol buffers.
for better explanation refer here

from sandboxed-api.

wingo1990 avatar wingo1990 commented on May 25, 2024

Another comment on creating a policy, you can use the "sandbox2_danger_danger_permit_all_and_log" flag to do some 'strace like' logging of all syscalls that are used by the sandboxee. This doesn't necessarily mean that it is minimal or effective afterwards. You might be able to return errors on some syscalls without breaking the program (libc has some fallbacks when syscalls are not available), also some syscalls should potentially not be enabled at all, e.g. ptrace.

Thank you! You mean that i should choose what policies after i know the execute bin's all system calls. But that very paradoxical, if i knew the all system calls, i know if it is safe or not. so i do not need the sandbox protection.
I think establishing a security policy is very difficult. Maybe it's a balance between functionality and security。 if limit too much, that affects functionality, and if you limit too few, that's a security risk。

from sandboxed-api.

fluxchief avatar fluxchief commented on May 25, 2024

Ah, you have a different usecase then. I was under the assumption that you'd like to sandbox a binary that might get exploited, not a unknown binary that should not mess with your system.

Can you maybe give me some more details here? Is it one unknown application? Do you want a 'generic' policy? What exactly are your goals? You can always run the binary in a VM with this flag, get the list of syscalls and apply it outside of the VM.

from sandboxed-api.

cblichmann avatar cblichmann commented on May 25, 2024

Closing this question as @fluxchief has answered it.

from sandboxed-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.