Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

建议在 check net.ipv4.conf.all.route_localnet 补充对利用所需其他条件的检查 #83

Open
XDTG opened this issue Mar 14, 2023 · 5 comments
Labels
good first issue Good for newcomers perf

Comments

@XDTG
Copy link

XDTG commented Mar 14, 2023

hi, @neargle 师傅,我在本地对 CVE-2020-8558 的复现中发现,如果在 pod 中要访问 host 上的 localhost tcp 服务,除了需要 pod 和 host 的 route_localnet 为 1 之外,还需要以下两个条件之一,来通过 pod 收到 host 回复包之后的源地址检查:

  1. pod 具有 CAP_NET_ADMIN,来修改 pod 中 127.0.0.1 的路由项

  2. /proc/sys/net/ipv4/conf/{all && interfaces}/rp_filter 均为 0(interfaces 不包含 lo),/proc/sys/net/ipv4/conf/{all || interface}/accept_local 为 1

在 Evaluate 功能中的 check net.ipv4.conf.all.route_localnet 可以添加上述两个条件的判断,可以进一步判断是否可以利用。

如果需要我可以晚些时间提交 pr

条件 1 参考的 issue
rp_filter, accept_local 的解释
其他人复现文章

@neargle
Copy link
Member

neargle commented Mar 14, 2023

对的,师傅的建议很棒,这个单项的check代码写的太早,是个半成品,判断确实不够充分。

@neargle neargle added good first issue Good for newcomers perf labels Mar 14, 2023
@neargle
Copy link
Member

neargle commented Mar 14, 2023

才看到师傅说可以 PR, 欢迎欢迎~ 如果有PR,我们会尽快抽时间Review(最近太忙了)。如果可以的话,也可以写个EXP。

@neargle
Copy link
Member

neargle commented Mar 30, 2023

@XDTG 咋样?

@XDTG
Copy link
Author

XDTG commented Mar 30, 2023

@neargle 不好意思呀,最近在找实习还没来得及写,可能得晚几天啦

@neargle
Copy link
Member

neargle commented Mar 30, 2023

@neargle 不好意思呀,最近在找实习还没来得及写,可能得晚几天啦

找实习呀,考虑深圳吗?我邮件联系你。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers perf
Projects
None yet
Development

No branches or pull requests

2 participants