{"id":120608,"date":"2024-11-20T01:09:18","date_gmt":"2024-11-19T23:09:18","guid":{"rendered":"https:\/\/prohoster.info\/blog\/novosti-interneta\/uyazvimosti-v-utilite-needrestart-pozvolyayushhie-poluchit-root-dostup-v-ubuntu-server"},"modified":"2024-11-20T01:09:18","modified_gmt":"2024-11-19T23:09:18","slug":"uyazvimosti-v-utilite-needrestart-pozvolyayushhie-poluchit-root-dostup-v-ubuntu-server","status":"publish","type":"post","link":"https:\/\/prohoster.info\/es\/blog\/news\/uyazvimosti-v-utilite-needrestart-pozvolyayushhie-poluchit-root-dostup-v-ubuntu-server","title":{"rendered":"Vulnerabilidades en la utilidad needrestart que permiten obtener acceso root en Ubuntu Server","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>La empresa Qualys ha identificado tres vulnerabilidades en la herramienta needrestart, dise\u00f1ada para reiniciar procesos en segundo plano despu\u00e9s de actualizar las bibliotecas utilizadas por esos procesos. A partir de Ubuntu 21.04, la herramienta needrestart forma parte del entorno b\u00e1sico de Ubuntu Server, donde se ejecuta con privilegios de root al final de cada transacci\u00f3n del gestor de paquetes APT, escanea los procesos en ejecuci\u00f3n y reinicia aquellos que est\u00e1n relacionados con archivos que han cambiado despu\u00e9s de la actualizaci\u00f3n de paquetes. Las vulnerabilidades identificadas permiten a un usuario local sin privilegios obtener derechos de root en Ubuntu Server con la configuraci\u00f3n predeterminada.      <\/p>\n<p>Las vulnerabilidades est\u00e1n presentes en needrestart a partir de la versi\u00f3n 0.8 (2014) y se han solucionado en la versi\u00f3n 3.8 de needrestart. Los problemas tambi\u00e9n se han corregido en las distribuciones de Debian y Ubuntu. Como una soluci\u00f3n alternativa para bloquear la explotaci\u00f3n de la vulnerabilidad, se puede desactivar el escaneo de int\u00e9rpretes configurando el par\u00e1metro \"$nrconf{interpscan} = 0\" en el archivo de configuraci\u00f3n \/etc\/needrestart\/needrestart.conf.      <\/p>\n<p>Las vulnerabilidades est\u00e1n presentes en el c\u00f3digo que implementa el modo de detecci\u00f3n de actualizaci\u00f3n de scripts ejecutados con int\u00e9rpretes. Los problemas identificados son:  <\/p>\n<ul>\n<li class=\"l\"> CVE-2024-48990 \u2014 un usuario local puede lograr la ejecuci\u00f3n de c\u00f3digo con privilegios de root al crear condiciones para que se ejecute el int\u00e9rprete de Python con la variable de entorno PYTHONPATH configurada por el atacante. Adem\u00e1s del uso de Python, el ataque tambi\u00e9n puede llevarse a cabo (CVE-2024-48992) mediante el lanzamiento del int\u00e9rprete Ruby con la variable de entorno RUBYLIB.\n<p>Las vulnerabilidades son causadas por el hecho de que, durante el reinicio de un script modificado, la utilidad needrestart establece la variable de entorno PYTHONPATH en funci\u00f3n del contenido del archivo \/proc\/pid\/environ, que luego se utiliza para ejecutar su propio c\u00f3digo en Python. Por consiguiente, un atacante puede esperar a que ocurra una actividad relacionada con el gestor de paquetes APT, simular un cambio en su script y establecer la variable de entorno PYTHONPATH, que tambi\u00e9n se aplicar\u00e1 al ejecutar el c\u00f3digo Python incorporado en needrestart (\"import sys\n print(sys.path)\") con privilegios de root.    <\/p>\n<p>Por ejemplo, para explotar la vulnerabilidad, se puede iniciar un proceso de Python que quede en memoria permanentemente, estableciendo la variable de entorno \"PYTHONPATH=\/home\/test\", y colocar una biblioteca compartida \"home\/test\/importlib\/__init__.so\", que se ejecutar\u00e1 al ejecutar el c\u00f3digo Python privilegiado en needrestart.           <\/p>\n<li class=\"l\"> CVE-2024-48991 \u2014 un usuario local puede lograr la ejecuci\u00f3n de c\u00f3digo con privilegios de root al iniciar una condici\u00f3n de carrera, resultando en que needrestart inicie un int\u00e9rprete de Python ficticio proporcionado por el atacante en lugar del int\u00e9rprete de Python del sistema. La esencia de la vulnerabilidad es similar al problema mencionado anteriormente, la \u00fanica diferencia es que needrestart determina el nombre del proceso de Python (por ejemplo, \/usr\/bin\/python3) leyendo \"\/proc\/pid\/exe\".\n<p>Para explotar la vulnerabilidad, se puede crear un proceso \/home\/test\/race, que mediante el mecanismo inotify esperar\u00e1 el momento en que needrestart comience a leer el contenido de \/proc\/pid\/exe, y luego iniciar\u00e1 r\u00e1pidamente el int\u00e9rprete de Python del sistema a trav\u00e9s de la funci\u00f3n execve. Dado que needrestart no verifica si este es realmente Python, considerar\u00e1 que \/home\/test\/race es el int\u00e9rprete de Python y lo ejecutar\u00e1 para su c\u00f3digo.         <\/p>\n<li class=\"l\"> CVE-2024-11003 \u2014 un usuario local puede lograr la ejecuci\u00f3n de comandos shell arbitrarios con privilegios de root al crear condiciones para el procesamiento en needrestart de nombres de archivos en el formato \u00abcomando|\u00bb, cuya transmisi\u00f3n a la funci\u00f3n Perl open() resultar\u00e1 en la ejecuci\u00f3n del comando. De hecho, la vulnerabilidad se manifiesta en el m\u00f3dulo Perl ScanDeps (CVE-2024-10224), pero es provocada por la transmisi\u00f3n a este m\u00f3dulo de par\u00e1metros externos sin la debida validaci\u00f3n.\n<p>El ataque puede llevarse a cabo mediante la ejecuci\u00f3n de un script Perl con el s\u00edmbolo \u00ab|\u00bb en el nombre, por ejemplo, \u00ab\/home\/test\/perl|\u00bb. Durante la ejecuci\u00f3n de la funci\u00f3n scan_deps() en needrestart, se abrir\u00e1 este archivo a trav\u00e9s de la funci\u00f3n open(), que interpretar\u00e1 el s\u00edmbolo \u00ab|\u00bb como un indicador para ejecutar el programa \u00ab\/home\/test\/perl\u00bb y utilizar el flujo de salida obtenido de dicho programa.                 <\/ul>\n<p>Fuente: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/www.opennet.ru\/opennews\/art.shtml?num=62261\">opennet.ru<\/a> <\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Qualys \u0432\u044b\u044f\u0432\u0438\u043b\u0430 \u0442\u0440\u0438 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u0443\u0442\u0438\u043b\u0438\u0442\u0435 needrestart, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u043e\u0439 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0444\u043e\u043d\u043e\u0432\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u043f\u043e\u0441\u043b\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a. \u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 Ubuntu 21.04 \u0443\u0442\u0438\u043b\u0438\u0442\u0430 needrestart \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u0432 \u0441\u043e\u0441\u0442\u0430\u0432 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f Ubuntu Server, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0441 \u043f\u0440\u0430\u0432\u0430\u043c\u0438 root \u0432 \u043a\u043e\u043d\u0446\u0435 \u043a\u0430\u0436\u0434\u043e\u0439 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u043f\u0430\u043a\u0435\u0442\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430 APT, \u0441\u043a\u0430\u043d\u0438\u0440\u0443\u0435\u0442 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0442\u0435 \u0438\u0445 \u043d\u0438\u0445, \u0447\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[702],"tags":[],"class_list":["post-120608","post","type-post","status-publish","format-standard","hentry","category-news"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.2 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Qualys \u0432\u044b\u044f\u0432\u0438\u043b\u0430 \u0442\u0440\u0438 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u0443\u0442\u0438\u043b\u0438\u0442\u0435 needrestart, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u043e\u0439 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0444\u043e\u043d\u043e\u0432\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u043f\u043e\u0441\u043b\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/es\/blog\/news\/uyazvimosti-v-utilite-needrestart-pozvolyayushhie-poluchit-root-dostup-v-ubuntu-server\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.2\" \/>\n\t\t<meta property=\"og:locale\" content=\"es_ES\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u0423\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u0443\u0442\u0438\u043b\u0438\u0442\u0435 needrestart, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c root-\u0434\u043e\u0441\u0442\u0443\u043f \u0432 Ubuntu Server | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Qualys \u0432\u044b\u044f\u0432\u0438\u043b\u0430 \u0442\u0440\u0438 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u0443\u0442\u0438\u043b\u0438\u0442\u0435 needrestart, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u043e\u0439 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0444\u043e\u043d\u043e\u0432\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u043f\u043e\u0441\u043b\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/es\/blog\/news\/uyazvimosti-v-utilite-needrestart-pozvolyayushhie-poluchit-root-dostup-v-ubuntu-server\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2024-11-19T23:09:18+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2024-11-19T23:09:18+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Vulnerabilidades en la utilidad needrestart que permiten obtener acceso root en Ubuntu Server | ProHoster","description":"La empresa Qualys ha identificado tres vulnerabilidades en la utilidad needrestart, dise\u00f1ada para reiniciar procesos en segundo plano despu\u00e9s de la actualizaci\u00f3n de las bibliotecas utilizadas por los procesos de datos.","canonical_url":"https:\/\/prohoster.info\/es\/blog\/news\/uyazvimosti-v-utilite-needrestart-pozvolyayushhie-poluchit-root-dostup-v-ubuntu-server","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"es_ES","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u0423\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u0443\u0442\u0438\u043b\u0438\u0442\u0435 needrestart, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c root-\u0434\u043e\u0441\u0442\u0443\u043f \u0432 Ubuntu Server | ProHoster","og:description":"\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Qualys \u0432\u044b\u044f\u0432\u0438\u043b\u0430 \u0442\u0440\u0438 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u0443\u0442\u0438\u043b\u0438\u0442\u0435 needrestart, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u043e\u0439 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0444\u043e\u043d\u043e\u0432\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u043f\u043e\u0441\u043b\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a.","og:url":"https:\/\/prohoster.info\/es\/blog\/news\/uyazvimosti-v-utilite-needrestart-pozvolyayushhie-poluchit-root-dostup-v-ubuntu-server","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2024-11-19T23:09:18+00:00","article:modified_time":"2024-11-19T23:09:18+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"120608","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":"2026-01-23 08:09:19","breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2026-01-23 08:09:19","updated":"2026-01-23 08:09:19","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/posts\/120608","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/comments?post=120608"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/posts\/120608\/revisions"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/media?parent=120608"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/categories?post=120608"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/es\/wp-json\/wp\/v2\/tags?post=120608"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}