命名的 FIFO 是否安全,可以防止普通用户看到敏感数据?

发布于 2024-08-15 17:06:45 字数 180 浏览 1 评论 0原文

如果我有一些敏感数据要在两个进程之间传输,我可以在 /tmp 中创建一个命名的 FIFO,并在使用后将其删除。我想知道这个方法安全吗?打破 FIFO 有多容易?

我知道有多种方法可以执行 IPC(进程间通信),但恕我直言,管道并不理想,因为它有时会在硬盘上留下缓冲数据;共享内存是安全的,但并不总是可行。

If I have some sensitive data to transfer between two processes, I can create a named FIFO in /tmp and delete it after use. I want to know if this method secure? How easy will it be to break the FIFO?

I know there are several ways to perform IPC(inter-processes communication), but IMHO, pipe is not ideal since it sometimes left buffered data on harddisk; shared memory is secure but not always feasible.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

终弃我 2024-08-22 17:06:45

简短的回答是否定的。 Fifo 只是任何进程都可以使用的命名管道。相反,我相信您可以为这些管道分配权限,这称为文件锁定,您可以说哪些用户、组、其他人具有使用这些管道的权限。尽管这取决于您试图保护您的信息安全的原因。我想你可以加密你的数据,这样在任何时候你的信息被泄露,攻击者都会得到胡言乱语。如果我是你,我会查找文件锁定。 Beejs IPC 指南非常好,尽管大多数人都看过该材料,但有时可能会缺乏。除此之外,祝你好运。

The short answer would be no. Fifo's are just named pipes that any process can use. Instead I believe that you can assign permissions to these pipes which is called file locking and you can say say which users,groups,others have what privileges to using these pipes. Though it depends what your trying to keep your info safe from. I'd imagine you could encrypt your data so that at any point your info is compromised, the attacker will end up with jibberish. I would look up file locking if I were you. Beejs IPC guide is pretty good, though most people have seen that material and it can sometimes be lacking. Other than that good luck.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文