CVE-2023-32233 Poc(C/Python/Go)

渗透技巧 1年前 (2023) admin
344 0 0

The vulnerability CVE-2023-32233 is described as a use-after-free issue in the Netfilter nf_tables in the Linux kernel up to version 6.3.1. This problem arises during the processing of batch requests, which can be exploited to perform arbitrary read and write operations on kernel memory. Unprivileged local users can exploit this vulnerability to gain root privileges, due to the mishandling of anonymous sets1.

To detect this vulnerability, one approach would be to check the kernel version and the status of the nf_tables. If the kernel version is up to 6.3.1 and nf_tables is in use, there’s a potential for this vulnerability to exist.

Here is a simple C program that checks the kernel version:

CVE-2023-32233 Poc(C/Python/Go)


This program calls the uname function to get system information, including the kernel version. It then checks if the version is less than or equal to 6.3.1, in which case it reports a potential vulnerability.

Please note that this is a very rudimentary check and might not be accurate if the kernel has been patched. This program also does not check whether nf_tables is in use or not. For a more comprehensive check, you may want to use a vulnerability scanning tool which can accurately detect whether a system is vulnerable or not.

To compile and run this program, you can use the gcc compiler like so:

CVE-2023-32233 Poc(C/Python/Go)


here are the Python and Go versions of the program to check the Linux kernel version.

Python version:

CVE-2023-32233 Poc(C/Python/Go)


You can run this Python script by using the command: python check_vuln.py.

Go version:

CVE-2023-32233 Poc(C/Python/Go)


You can run this Go script by first building the program with go build check_vuln.go and then running the output binary with ./check_vuln.

Again, please note that these scripts only check the kernel version and do not check if nf_tables is in use. Also, they might not be accurate if the kernel has been patched. For a more comprehensive check, you should use a vulnerability scanning tool.



原文始发于微信公众号(小白嘿课):CVE-2023-32233 Poc(C/Python/Go)

版权声明:admin 发表于 2023年6月25日 下午5:07。
转载请注明:CVE-2023-32233 Poc(C/Python/Go) | CTF导航

相关文章

暂无评论

您必须登录才能参与评论!
立即登录
暂无评论...