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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Malicious LuaJIT bytecode

5 点作者 cbetz超过 9 年前

1 comment

buserror超过 9 年前
I&#x27;m a big fan and user of Luajit, and as much as I understand the problem of &#x27;trusting&#x27; loading files around, in the case of LuaJIT anyone using the API would be &#x2F;crazy bonkers&#x2F; to load code from anywhere else than a very specific, very closed source base.<p>Luajit has FFI, that allows you you to call back into any C code, libraries, structure and so forth, so by definition you KNOW the LUA you run in LuaJIT is not &#x27;safe scripting&#x27; but more or less part of the running process, with no barrier (and thats part of the beauty of it).<p>The good news is, you 1) can&#x27;t easily load lua files in LuaJit and 2) can make your own &#x27;loader&#x27; in your LuaJIT application that can match a hash for anything you load, before it&#x27;s loaded - it&#x27;s fairly trivial in fact.<p>So that article could be replaced by search&#x2F;replacing with something like &#x27;if you load a dynamic library in C and dybload() a symbol and call it, it CAN BE NASTY!&#x27; well yeah, it can. Don&#x27;t trust external code, otherwise someone will make a clickbait out of you :-)
评论 #10562096 未加载