Re: [Python-Dev] Challenge: Please break this! (a.k.a restricted mode revisited)

2016年4月12日 05:28:18 -0700

2016年04月12日 14:18 GMT+02:00 Jon Ribbens <[email protected]>:
> The question is: with a minimal (or empty) set of builtins, and a
> restriction on ast.Name and ast.Attribute nodes, can exec/eval be
> made 'safe' so they cannot execute code outside the sandbox.
According to multiple exploits listed in this thread, no, it's not possible.
> If anyone had managed to find any more examples of holes in the
> original featureset after the first couple then I would agree with
> you, but they haven't.
See my latest exploit using functools.update_wrapper() + A.__setattr__() ;-)
>> As others pointed out, this particular approach (with maybe
>> different details) has been tried again and again and again
>
> This simply isn't true either. As far as I can see, only
> RestrictedPython has tried anything remotely similar, and
> to the best of my ability to determine, that project is not
> considerd a failure.
IMHO nobody seriously audited RestrictedPython. It doesn't mean that
it's secure.
When it was created, security was less important than nowadays.
Victor
_______________________________________________
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to