{"id":7054,"date":"2022-01-26T10:59:45","date_gmt":"2022-01-26T09:59:45","guid":{"rendered":"https:\/\/geko.cloud\/?p=7054"},"modified":"2022-01-26T10:59:45","modified_gmt":"2022-01-26T09:59:45","slug":"security-incident-with-the-pkexec-linux-privilege-escalation-binary","status":"publish","type":"post","link":"https:\/\/geko.cloud\/en\/security-incident-with-the-pkexec-linux-privilege-escalation-binary\/","title":{"rendered":"Security incident with the pkexec linux privilege escalation binary"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">A <strong>high-risk privilege escalation vulnerability<\/strong> has surfaced in the <strong>pkexec terminal tool<\/strong> that controls privilege escalation in Linux shells and is <strong>pre-installed in all major Linux distributions<\/strong> like Debian, CentOS or Ubuntu. This vulnerability <strong>allows users with a limited privilege terminal session to escalate into full privileges in the local machine<\/strong>, effectively getting root access. This vulnerability is <strong>trivially exploited<\/strong> and already has <strong>proof of concept exploits in circulation<\/strong>. All versions of the pkexec utility since it launched in 2009 are vulnerable, however major distributions are already distributing patches on their repositories.<\/span><\/p>\n<h2><b>Reach<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">This vulnerability is exploitable <strong>from any Linux user terminal session<\/strong>. It is not a first step in an exploit chain, but it makes privilege <strong>escalation from an unprivileged shell trivial<\/strong>, which means it can bring a higher risk in systems exposed to the internet with vulnerable software (like a popular CMS or CRM) by enabling a longer, more dangerous exploit chain. <strong>All versions of the pkexec utility since it launched in 2009 are vulnerable<\/strong>, however major distributions are already distributing patches on their repositories.<\/span><\/p>\n<h2><b>Indicators of Compromise<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">A <strong>possible indicator of compromise<\/strong> for this vulnerability is a <strong>log entry<\/strong> that contains the string \u201c<\/span><span style=\"font-weight: 400;\">The value for the SHELL variable was not found the \/etc\/shells file<\/span><span style=\"font-weight: 400;\">\u201d. Searching for this text on the system logs can be an indicator that the vulnerability was exploited on that local system where the logs are being analyzed.<\/span><\/p>\n<h2><b>Patches and mitigations<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">All versions of the pkexec utility since it launched in 2009 are vulnerable, however <strong>major distributions are already distributing patches<\/strong> on their repositories. You can <strong>update pkexec from the system\u2019s package manager<\/strong> to patch this vulnerability. If no patch is available for your distribution yet, <strong>the binary\u2019s privilege escalation can be disabled<\/strong> by removing the SUID bit from the binary file: chmod 0755 pkexec\u00a0<\/span><\/p>\n<p>&nbsp;<\/p>\n<h2><b>Sources<\/b><\/h2>\n<p><a href=\"https:\/\/cve.mitre.org\/cgi-bin\/cvename.cgi?name=CVE-2021-4034\"><span style=\"font-weight: 400;\">https:\/\/cve.mitre.org\/cgi-bin\/cvename.cgi?name=CVE-2021-4034<\/span><\/a><\/p>\n<p><a href=\"https:\/\/www.qualys.com\/2022\/01\/25\/cve-2021-4034\/pwnkit.txt\"><span style=\"font-weight: 400;\">https:\/\/www.qualys.com\/2022\/01\/25\/cve-2021-4034\/pwnkit.txt<\/span><\/a><\/p>\n<p><a href=\"https:\/\/isc.sans.edu\/diary\/rss\/28272\"><span style=\"font-weight: 400;\">https:\/\/isc.sans.edu\/diary\/rss\/28272<\/span><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A high-risk privilege escalation vulnerability has surfaced in the pkexec terminal tool that controls privilege escalation in Linux shells and is pre-installed in all major Linux distributions like Debian, CentOS or Ubuntu. This vulnerability allows users with a limited privilege terminal session to escalate into full privileges in the local machine, effectively getting root access. [&hellip;]<\/p>\n","protected":false},"author":38,"featured_media":7061,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[126],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Security incident with the pkexec linux privilege escalation binary - Geko Cloud<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/geko.cloud\/es\/incidente-de-seguridad-con-la-herramienta-de-escalado-de-privilegios-pkexec\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Security incident with the pkexec linux privilege escalation binary - Geko Cloud\" \/>\n<meta property=\"og:description\" content=\"A high-risk privilege escalation vulnerability has surfaced in the pkexec terminal tool that controls privilege escalation in Linux shells and is pre-installed in all major Linux distributions like Debian, CentOS or Ubuntu. This vulnerability allows users with a limited privilege terminal session to escalate into full privileges in the local machine, effectively getting root access. [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/geko.cloud\/es\/incidente-de-seguridad-con-la-herramienta-de-escalado-de-privilegios-pkexec\/\" \/>\n<meta property=\"og:site_name\" content=\"Geko Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2022-01-26T09:59:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/geko.cloud\/wp-content\/uploads\/2022\/01\/linux.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"728\" \/>\n\t<meta property=\"og:image:height\" content=\"380\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Geko Cloud\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@geko_cloud\" \/>\n<meta name=\"twitter:site\" content=\"@geko_cloud\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/geko.cloud\/es\/incidente-de-seguridad-con-la-herramienta-de-escalado-de-privilegios-pkexec\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/geko.cloud\/es\/incidente-de-seguridad-con-la-herramienta-de-escalado-de-privilegios-pkexec\/\"},\"author\":{\"name\":\"Geko Cloud\",\"@id\":\"https:\/\/geko.cloud\/es\/#\/schema\/person\/c87e3587fb419825d72ac2043e798ab6\"},\"headline\":\"Security incident with the pkexec linux privilege escalation binary\",\"datePublished\":\"2022-01-26T09:59:45+00:00\",\"dateModified\":\"2022-01-26T09:59:45+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/geko.cloud\/es\/incidente-de-seguridad-con-la-herramienta-de-escalado-de-privilegios-pkexec\/\"},\"wordCount\":336,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/geko.cloud\/es\/#organization\"},\"image\":{\"@id\":\"https:\/\/geko.cloud\/es\/incidente-de-seguridad-con-la-herramienta-de-escalado-de-privilegios-pkexec\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/geko.cloud\/wp-content\/uploads\/2022\/01\/linux.jpg\",\"articleSection\":[\"Incidents\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/geko.cloud\/es\/incidente-de-seguridad-con-la-herramienta-de-escalado-de-privilegios-pkexec\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/geko.cloud\/es\/incidente-de-seguridad-con-la-herramienta-de-escalado-de-privilegios-pkexec\/\",\"url\":\"https:\/\/geko.cloud\/es\/incidente-de-seguridad-con-la-herramienta-de-escalado-de-privilegios-pkexec\/\",\"name\":\"Security incident with the pkexec linux privilege escalation binary - Geko Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/geko.cloud\/es\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/geko.cloud\/es\/incidente-de-seguridad-con-la-herramienta-de-escalado-de-privilegios-pkexec\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/geko.cloud\/es\/incidente-de-seguridad-con-la-herramienta-de-escalado-de-privilegios-pkexec\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/geko.cloud\/wp-content\/uploads\/2022\/01\/linux.jpg\",\"datePublished\":\"2022-01-26T09:59:45+00:00\",\"dateModified\":\"2022-01-26T09:59:45+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/geko.cloud\/es\/incidente-de-seguridad-con-la-herramienta-de-escalado-de-privilegios-pkexec\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/geko.cloud\/es\/incidente-de-seguridad-con-la-herramienta-de-escalado-de-privilegios-pkexec\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/geko.cloud\/es\/incidente-de-seguridad-con-la-herramienta-de-escalado-de-privilegios-pkexec\/#primaryimage\",\"url\":\"https:\/\/geko.cloud\/wp-content\/uploads\/2022\/01\/linux.jpg\",\"contentUrl\":\"https:\/\/geko.cloud\/wp-content\/uploads\/2022\/01\/linux.jpg\",\"width\":728,\"height\":380,\"caption\":\"Incidente de seguridad con la herramienta de escalado de privilegios pkexec\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/geko.cloud\/es\/incidente-de-seguridad-con-la-herramienta-de-escalado-de-privilegios-pkexec\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Portada\",\"item\":\"https:\/\/geko.cloud\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Security incident with the pkexec linux privilege escalation binary\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/geko.cloud\/es\/#website\",\"url\":\"https:\/\/geko.cloud\/es\/\",\"name\":\"Geko Cloud\",\"description\":\"Servicios de consultor\u00eda cloud y devops\",\"publisher\":{\"@id\":\"https:\/\/geko.cloud\/es\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/geko.cloud\/es\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/geko.cloud\/es\/#organization\",\"name\":\"Geko Cloud\",\"url\":\"https:\/\/geko.cloud\/es\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/geko.cloud\/es\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/geko.cloud\/wp-content\/uploads\/2021\/10\/geko_logo-positivo.png\",\"contentUrl\":\"https:\/\/geko.cloud\/wp-content\/uploads\/2021\/10\/geko_logo-positivo.png\",\"width\":1650,\"height\":809,\"caption\":\"Geko Cloud\"},\"image\":{\"@id\":\"https:\/\/geko.cloud\/es\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/geko_cloud\",\"https:\/\/www.instagram.com\/gekocloud\/\",\"https:\/\/www.linkedin.com\/company\/gekocloud\",\"https:\/\/www.youtube.com\/channel\/UC5EFLCqUM7fEaXSa_0nWowQ\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/geko.cloud\/es\/#\/schema\/person\/c87e3587fb419825d72ac2043e798ab6\",\"name\":\"Geko Cloud\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/geko.cloud\/es\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/10fe5eb7a547a27afabbe3a5a0f60c96?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/10fe5eb7a547a27afabbe3a5a0f60c96?s=96&d=mm&r=g\",\"caption\":\"Geko Cloud\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Security incident with the pkexec linux privilege escalation binary - Geko Cloud","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/geko.cloud\/es\/incidente-de-seguridad-con-la-herramienta-de-escalado-de-privilegios-pkexec\/","og_locale":"en_US","og_type":"article","og_title":"Security incident with the pkexec linux privilege escalation binary - Geko Cloud","og_description":"A high-risk privilege escalation vulnerability has surfaced in the pkexec terminal tool that controls privilege escalation in Linux shells and is pre-installed in all major Linux distributions like Debian, CentOS or Ubuntu. This vulnerability allows users with a limited privilege terminal session to escalate into full privileges in the local machine, effectively getting root access. [&hellip;]","og_url":"https:\/\/geko.cloud\/es\/incidente-de-seguridad-con-la-herramienta-de-escalado-de-privilegios-pkexec\/","og_site_name":"Geko Cloud","article_published_time":"2022-01-26T09:59:45+00:00","og_image":[{"width":728,"height":380,"url":"https:\/\/geko.cloud\/wp-content\/uploads\/2022\/01\/linux.jpg","type":"image\/jpeg"}],"author":"Geko Cloud","twitter_card":"summary_large_image","twitter_creator":"@geko_cloud","twitter_site":"@geko_cloud","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/geko.cloud\/es\/incidente-de-seguridad-con-la-herramienta-de-escalado-de-privilegios-pkexec\/#article","isPartOf":{"@id":"https:\/\/geko.cloud\/es\/incidente-de-seguridad-con-la-herramienta-de-escalado-de-privilegios-pkexec\/"},"author":{"name":"Geko Cloud","@id":"https:\/\/geko.cloud\/es\/#\/schema\/person\/c87e3587fb419825d72ac2043e798ab6"},"headline":"Security incident with the pkexec linux privilege escalation binary","datePublished":"2022-01-26T09:59:45+00:00","dateModified":"2022-01-26T09:59:45+00:00","mainEntityOfPage":{"@id":"https:\/\/geko.cloud\/es\/incidente-de-seguridad-con-la-herramienta-de-escalado-de-privilegios-pkexec\/"},"wordCount":336,"commentCount":0,"publisher":{"@id":"https:\/\/geko.cloud\/es\/#organization"},"image":{"@id":"https:\/\/geko.cloud\/es\/incidente-de-seguridad-con-la-herramienta-de-escalado-de-privilegios-pkexec\/#primaryimage"},"thumbnailUrl":"https:\/\/geko.cloud\/wp-content\/uploads\/2022\/01\/linux.jpg","articleSection":["Incidents"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/geko.cloud\/es\/incidente-de-seguridad-con-la-herramienta-de-escalado-de-privilegios-pkexec\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/geko.cloud\/es\/incidente-de-seguridad-con-la-herramienta-de-escalado-de-privilegios-pkexec\/","url":"https:\/\/geko.cloud\/es\/incidente-de-seguridad-con-la-herramienta-de-escalado-de-privilegios-pkexec\/","name":"Security incident with the pkexec linux privilege escalation binary - Geko Cloud","isPartOf":{"@id":"https:\/\/geko.cloud\/es\/#website"},"primaryImageOfPage":{"@id":"https:\/\/geko.cloud\/es\/incidente-de-seguridad-con-la-herramienta-de-escalado-de-privilegios-pkexec\/#primaryimage"},"image":{"@id":"https:\/\/geko.cloud\/es\/incidente-de-seguridad-con-la-herramienta-de-escalado-de-privilegios-pkexec\/#primaryimage"},"thumbnailUrl":"https:\/\/geko.cloud\/wp-content\/uploads\/2022\/01\/linux.jpg","datePublished":"2022-01-26T09:59:45+00:00","dateModified":"2022-01-26T09:59:45+00:00","breadcrumb":{"@id":"https:\/\/geko.cloud\/es\/incidente-de-seguridad-con-la-herramienta-de-escalado-de-privilegios-pkexec\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/geko.cloud\/es\/incidente-de-seguridad-con-la-herramienta-de-escalado-de-privilegios-pkexec\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/geko.cloud\/es\/incidente-de-seguridad-con-la-herramienta-de-escalado-de-privilegios-pkexec\/#primaryimage","url":"https:\/\/geko.cloud\/wp-content\/uploads\/2022\/01\/linux.jpg","contentUrl":"https:\/\/geko.cloud\/wp-content\/uploads\/2022\/01\/linux.jpg","width":728,"height":380,"caption":"Incidente de seguridad con la herramienta de escalado de privilegios pkexec"},{"@type":"BreadcrumbList","@id":"https:\/\/geko.cloud\/es\/incidente-de-seguridad-con-la-herramienta-de-escalado-de-privilegios-pkexec\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Portada","item":"https:\/\/geko.cloud\/en\/"},{"@type":"ListItem","position":2,"name":"Security incident with the pkexec linux privilege escalation binary"}]},{"@type":"WebSite","@id":"https:\/\/geko.cloud\/es\/#website","url":"https:\/\/geko.cloud\/es\/","name":"Geko Cloud","description":"Servicios de consultor\u00eda cloud y devops","publisher":{"@id":"https:\/\/geko.cloud\/es\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/geko.cloud\/es\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/geko.cloud\/es\/#organization","name":"Geko Cloud","url":"https:\/\/geko.cloud\/es\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/geko.cloud\/es\/#\/schema\/logo\/image\/","url":"https:\/\/geko.cloud\/wp-content\/uploads\/2021\/10\/geko_logo-positivo.png","contentUrl":"https:\/\/geko.cloud\/wp-content\/uploads\/2021\/10\/geko_logo-positivo.png","width":1650,"height":809,"caption":"Geko Cloud"},"image":{"@id":"https:\/\/geko.cloud\/es\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/geko_cloud","https:\/\/www.instagram.com\/gekocloud\/","https:\/\/www.linkedin.com\/company\/gekocloud","https:\/\/www.youtube.com\/channel\/UC5EFLCqUM7fEaXSa_0nWowQ"]},{"@type":"Person","@id":"https:\/\/geko.cloud\/es\/#\/schema\/person\/c87e3587fb419825d72ac2043e798ab6","name":"Geko Cloud","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/geko.cloud\/es\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/10fe5eb7a547a27afabbe3a5a0f60c96?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/10fe5eb7a547a27afabbe3a5a0f60c96?s=96&d=mm&r=g","caption":"Geko Cloud"}}]}},"_links":{"self":[{"href":"https:\/\/geko.cloud\/en\/wp-json\/wp\/v2\/posts\/7054"}],"collection":[{"href":"https:\/\/geko.cloud\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/geko.cloud\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/geko.cloud\/en\/wp-json\/wp\/v2\/users\/38"}],"replies":[{"embeddable":true,"href":"https:\/\/geko.cloud\/en\/wp-json\/wp\/v2\/comments?post=7054"}],"version-history":[{"count":2,"href":"https:\/\/geko.cloud\/en\/wp-json\/wp\/v2\/posts\/7054\/revisions"}],"predecessor-version":[{"id":7063,"href":"https:\/\/geko.cloud\/en\/wp-json\/wp\/v2\/posts\/7054\/revisions\/7063"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/geko.cloud\/en\/wp-json\/wp\/v2\/media\/7061"}],"wp:attachment":[{"href":"https:\/\/geko.cloud\/en\/wp-json\/wp\/v2\/media?parent=7054"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/geko.cloud\/en\/wp-json\/wp\/v2\/categories?post=7054"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/geko.cloud\/en\/wp-json\/wp\/v2\/tags?post=7054"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}