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

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

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

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

工具目录

分类

查看所有分类
Loading categories
omigod-lab — 一个用于学习开放管理基础设施代理(又名 "omigod")中 CVE-2021-38647 漏洞的 Vagrant 虚拟机测试实验室。 | Kitploit
工具/GitHubGitHub/craig-m-unsw/omigod-lab
漏洞分析漏洞利用渗透测试云安全学习与教育实验室与实践
GitHubcraig-m-unsw/omigod-lab

omigod-lab

一个用于学习开放管理基础设施代理(又名 "omigod")中 CVE-2021-38647 漏洞的 Vagrant 虚拟机测试实验室。

查看仓库
1224年前尚未审核

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

自述文件

一个教育实验室虚拟机,用于学习 Open Management Infrastructure 软件中 9.6 CVSS 未认证远程代码执行(RCE)漏洞(CVE-2021-38647)。

披露(原始研究):https://www.wiz.io/blog/omigod-critical-vulnerabilities-in-omi-azure

OMI 源代码:https://github.com/microsoft/omi

新闻:

  • https://nakedsecurity.sophos.com/2021/09/16/omigod-an-exploitable-hole-in-microsoft-open-source-code/
  • https://www.zdnet.com/article/omigod-azure-users-running-linux-vms-need-to-update-now/
  • https://threatpost.com/microsoft-patch-tuesday-exploited-windows-zero-day/169459/

分析文章:

  • https://censys.io/blog/understanding-the-impact-of-omigod-cve-2021-38647/

在继续之前,请先阅读以上部分内容。

环境搭建

  • 安装 Vagrant
  • 安装 支持的虚拟化平台
root@kitploit:~
git clone https://github.com/craig-m-unsw/omigod-lab.git
cd omigod-lab
vagrant up
vagrant ssh

这将搭建 Ubuntu 20.04(Focal Fossa)。感谢 Roboxes 提供的 Vagrant 镜像。

通过 Ansible playbook.yml 安装:

  • omi-1.6.8-0.ssl_110.ulinux.x64.deb - sha256:2e0813ee3f2a71028f071d9933ca2f336faaaf9b6126d5f1767ffcbc7e803279
  • scx-1.6.8-1.ssl_110.ulinux.x64.deb - sha256:1cba16e3b307177cbe15bd3fd8a2a87ab8d638846988202be8a17981b5e900c9

不要将这个虚拟机放到互联网上 :-)

漏洞利用

借助 Vagrant,从宿主机可以通过 localhost:5986 端口转发到虚拟机内的 5986 端口。现在我们有了一个可用的实验虚拟机。

CVE-2021-38647

我们只需向存在漏洞的 OMI 服务器发送一个 SOAP 请求。可以使用 Ansible 的 uri 模块 来发送以下 XML 载荷:

root@kitploit:~
cd /vagrant
ansible-playbook attack-play.yml -e "rcecmd=uptime"

你应该能在 <p:StdOut> 中看到 uptime 命令的输出。

如果将命令改为 id,你会看到 uid=0(root) gid=0(root) groups=0(root) 的输出。

😬😬😬

其他公开利用代码:

  • https://github.com/AlteredSecurity/CVE-2021-38647
  • https://github.com/horizon3ai/CVE-2021-38647
  • https://github.com/Immersive-Labs-Sec/cve-2021-38647

使用 OMI

微软的入门文档: https://github.com/microsoft/omi/blob/master/Unix/doc/omi/omi.pdf

检测

虚拟机内部已安装 auditd。

记录所有命令执行:

root@kitploit:~
sudo auditctl -a exit,always -F arch=b32 -S execve -k execve
sudo auditctl -a exit,always -F arch=b64 -S execve -k execve
root@kitploit:~
sudo tail -f /var/log/audit/audit.log

发送命令后的输出:

root@kitploit:~
type=SYSCALL msg=audit(1631977306.937:107): arch=c000003e syscall=59 success=yes exit=0 a0=7f906c002570 a1=7f906c001330 a2=7fffe5148108 a3=7f90751453f0 items=2 ppid=8552 pid=9974 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="sh" exe="/usr/bin/dash" key="execve"
type=EXECVE msg=audit(1631977306.937:107): argc=3 a0="/bin/sh" a1="-c" a2="whoami"
type=CWD msg=audit(1631977306.937:107): cwd="/var/opt/microsoft/scx/tmp"
type=PATH msg=audit(1631977306.937:107): item=0 name="/bin/sh" inode=5374016 dev=08:03 mode=0100755 ouid=0 ogid=0 rdev=00:00 nametype=NORMAL cap_fp=0 cap_fi=0 cap_fe=0 cap_fver=0 cap_frootid=0
type=PATH msg=audit(1631977306.937:107): item=1 name="/lib64/ld-linux-x86-64.so.2" inode=5377053 dev=08:03 mode=0100755 ouid=0 ogid=0 rdev=00:00 nametype=NORMAL cap_fp=0 cap_fi=0 cap_fe=0 cap_fver=0 cap_frootid=0
type=PROCTITLE msg=audit(1631977306.937:107): proctitle=2F62696E2F7368002D630077686F616D69
type=SYSCALL msg=audit(1631977306.937:108): arch=c000003e syscall=59 success=yes exit=0 a0=564c4e436b90 a1=564c4e436b38 a2=564c4e436b48 a3=7f5b83f28850 items=2 ppid=9974 pid=9975 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="whoami" exe="/usr/bin/whoami" key="execve"
type=EXECVE msg=audit(1631977306.937:108): argc=1 a0="whoami"
type=CWD msg=audit(1631977306.937:108): cwd="/var/opt/microsoft/scx/tmp"
type=PATH msg=audit(1631977306.937:108): item=0 name="/usr/bin/whoami" inode=5374366 dev=08:03 mode=0100755 ouid=0 ogid=0 rdev=00:00 nametype=NORMAL cap_fp=0 cap_fi=0 cap_fe=0 cap_fver=0 cap_frootid=0
type=PATH msg=audit(1631977306.937:108): item=1 name="/lib64/ld-linux-x86-64.so.2" inode=5377053 dev=08:03 mode=0100755 ouid=0 ogid=0 rdev=00:00 nametype=NORMAL cap_fp=0 cap_fi=0 cap_fe=0 cap_fver=0 cap_frootid=0
type=PROCTITLE msg=audit(1631977306.937:108): proctitle="whoami"

有人执行了 "whoami"。

微软在其关于检测的博文《关于 Azure VM 管理扩展中 OMI 漏洞的补充指南》中提到了这一点:

https://msrc-blog.microsoft.com/2021/09/16/additional-guidance-regarding-omi-vulnerabilities-within-azure-vm-management-extensions/

下载工具