TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Exploiting a Use-After-Free for code execution in every version of Python 3

35 点作者 yasoob大约 3 年前

1 comment

cwalv大约 3 年前
This is a pretty long article that should have started with the last section:<p>&gt; So what?<p>&gt; What’s the point of this whole thing, can’t you just do os.system(...)? Well, yes.<p>&gt; Given that you need to be able to execute arbitary Python code in the first place, this exploit won’t be useful in most settings. However, it may be useful in Python interpreters which are attempting to sandbox your code, through restricting imports or use of Audit Hooks, for example. This exploit doesn’t use any imports and doesn’t create any code objects, which will fire import and code.__new__ hooks, respectively. My exploit will only trigger a builtin.__id__ hook event, which is much more likely to be permitted.
评论 #31385322 未加载