百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
B

bad_actor_poc

> 编程语言
开源

TL;DR 在 VSCode 中打开 innocentapp,您的 .ssh/idrsa 文件的内容将通过 TCP 发送到本地主机 8080。您甚至不需要 ...

326 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

TL;DR 在 VSCode 中打开 innocentapp,您的 .ssh/idrsa 文件的内容将通过 TCP 发送到本地主机 8080。您甚至不需要 ...

TL;DR

Open innocent_app in VSCode*, and the contents of your .ssh/id_rsa file will be sent over TCP to localhost:8080. You don't even need to open any files in the project!

*This assumes you have the rust toolchain available on your machine, and the rust-analyzer VSCode plugin.

Or watch the video example.

Exfiltrating secrets with Rust macros

This is a proof-of-concept of exfiltrating secrets from a developer's machine. Originally, the target was exfiltrate at compile-time, but it became apparent it was possible even before that step, i.e. during pre-processing.

How it works

When innocent_app is opened in VSCode, the editor runs enough of the Rust toolchain to expand the nefarious make_answer! macro, which opens .ssh/id_rsa and sends its contents to localhost:8080.

Run it yourself

  • Clone this repo: git clone https://github.com/lucky/bad_actor_poc.git
  • Listen on port 8080 locally, for example with nc -lk 8080
  • Open up the innocent_app in VSCode with rust-analyzer plugin

Once open, VSCode will analyze and index the code, including the expansion of macros, then you should see the contents of your .ssh/id_rsa private key in the nc window.

You can trigger the same behavior at compile-time by running cargo build in the innocent_app directory.

Notes

This may affect other editors. VSCode and rust-analyzer were used to confirm the attack vector, but are not exactly responsible for them. Any editor that expands a proc macro can do this.

There may be similar attacks for other languages. For example, it may be possible to attack Java annotation processing.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rust

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言