{"id":38040,"date":"2019-10-31T22:21:20","date_gmt":"2019-10-31T19:21:20","guid":{"rendered":"https:\/\/prohoster.info\/blog\/propatchil-exim-propatch-eshhe-raz-svezhee-remote-command-execution-v-exim-4-92-v-odin-zapros\/"},"modified":"2021-02-01T11:37:46","modified_gmt":"2021-02-01T09:37:46","slug":"propatchil-exim-propatch-eshhe-raz-svezhee-remote-command-execution-v-exim-4-92-v-odin-zapros","status":"publish","type":"post","link":"https:\/\/prohoster.info\/pt\/blog\/administrirovanie\/propatchil-exim-propatch-eshhe-raz-svezhee-remote-command-execution-v-exim-4-92-v-odin-zapros","title":{"rendered":"Patchou o Exim \u2014 fa\u00e7a o patch novamente. Nova execu\u00e7\u00e3o remota de comandos no Exim 4.92 em uma \u00fanica solicita\u00e7\u00e3o","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p><img decoding=\"async\" alt=\"Patchou o Exim \u2014 fa\u00e7a o patch novamente. Nova execu\u00e7\u00e3o remota de comandos no Exim 4.92 em uma \u00fanica solicita\u00e7\u00e3o\" src=\"\/wp-content\/uploads\/2019\/09\/0bb4edaf80bcc0b602bf57c9d3b916be.jpg\" style=\"display:block;margin: 0 auto;\"><\/p>\n<p>Recentemente, no in\u00edcio do ver\u00e3o, surgiram convites em massa para atualizar o Exim para a vers\u00e3o 4.92 devido \u00e0 vulnerabilidade CVE-2019-10149 (<noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/455598\/\">Atualize urgentemente o exim para 4.92 \u2014 infec\u00e7\u00f5es est\u00e3o se espalhando \/ Habr<\/a><\/noindex>). E dias atr\u00e1s, descobriu-se que o malware Sustes decidiu explorar essa vulnerabilidade.<\/p>\n<p>Agora, todos os que atualizaram rapidamente podem novamente \"se alegrar\": em 21 de julho de 2019, o pesquisador Zerons descobriu uma vulnerabilidade cr\u00edtica no <strong>Exim Mail Transfer agent (MTA) ao usar TLS<\/strong> para vers\u00f5es de <strong>4.80 a 4.92.1<\/strong> inclusive, permitindo que um c\u00f3digo seja executado remotamente <strong>com privil\u00e9gios elevados.<\/strong> (<noindex><a rel=\"nofollow\" href=\"https:\/\/exim.org\/static\/doc\/security\/CVE-2019-15846.txt\">CVE-2019-15846<\/a><\/noindex>).<\/p>\n<p><noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><\/p>\n<h3 id=\"uyazvimost\">Vulnerabilidade<\/h3>\n<p>A vulnerabilidade est\u00e1 presente ao usar bibliotecas tanto GnuTLS quanto OpenSSL ao estabelecer uma conex\u00e3o TLS segura.<\/p>\n<p>Segundo o desenvolvedor Heiko Schlittermann, o arquivo de configura\u00e7\u00e3o no Exim por padr\u00e3o n\u00e3o utiliza TLS, no entanto, muitas distribui\u00e7\u00f5es durante a instala\u00e7\u00e3o criam os certificados necess\u00e1rios e incluem a conex\u00e3o segura. Al\u00e9m disso, vers\u00f5es mais novas do Exim configuram a op\u00e7\u00e3o <em>tls_advertise_hosts=*<\/em> e geram os certificados necess\u00e1rios.<\/p>\n<blockquote><p>depende da configura\u00e7\u00e3o. A maioria das distribui\u00e7\u00f5es a habilita por padr\u00e3o, mas o Exim precisa de um certificado+chave para funcionar como um servidor TLS. Provavelmente, as distribui\u00e7\u00f5es criam um Cert durante a configura\u00e7\u00e3o. Exims mais novos t\u00eam a op\u00e7\u00e3o tls_advertise_hosts padr\u00e3o definida como \u00ab*\u00bb e criam um certificado autoassinado, caso nenhum seja fornecido.<\/p><\/blockquote>\n<p>A vulnerabilidade em si reside no processamento incorreto do SNI (Server Name Indication, tecnologia introduzida em 2003 no RFC 3546 para solicitar ao cliente o certificado correto para um nome de dom\u00ednio, <noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/webo\/blog\/327410\/\">Dissemina\u00e7\u00e3o do padr\u00e3o TLS SNI \/ Blog da empresa WEBO Group \/ Habr<\/a><\/noindex>) durante o handshake TLS. Um invasor s\u00f3 precisa enviar SNI que termina com uma barra invertida (\u00ab\u00bb) e um caractere nulo (\u00bb \u00ab).<\/p>\n<p>Pesquisadores da Qualys descobriram um bug na fun\u00e7\u00e3o string_printing(tls_in.sni), que consiste em uma formata\u00e7\u00e3o incorreta de \u00ab\u00bb. Como resultado, uma barra invertida \u00e9 gravada de forma n\u00e3o escapada no arquivo de cabe\u00e7alho do spool de impress\u00e3o. Em seguida, esse arquivo com privil\u00e9gios \u00e9 lido pela fun\u00e7\u00e3o spool_read_header(), o que leva a uma sobrecarga de heap (heap overflow).<\/p>\n<p><strong>Vale ressaltar que, at\u00e9 o momento, os desenvolvedores do Exim criaram um PoC da vulnerabilidade com execu\u00e7\u00e3o de comandos em um servidor vulner\u00e1vel remoto, mas ele ainda n\u00e3o est\u00e1 dispon\u00edvel publicamente. Devido \u00e0 facilidade de explora\u00e7\u00e3o do bug, \u00e9 apenas uma quest\u00e3o de tempo, e um tempo relativamente curto.<\/strong><\/p>\n<p>Voc\u00ea pode consultar uma pesquisa mais detalhada da Qualys <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/Exim\/exim\/blob\/master\/doc\/doc-txt\/cve-2019-15846\/qualys.mbx\">aqui<\/a><\/noindex>.<\/p>\n<p><img decoding=\"async\" alt=\"Patchou o Exim \u2014 fa\u00e7a o patch novamente. Nova execu\u00e7\u00e3o remota de comandos no Exim 4.92 em uma \u00fanica solicita\u00e7\u00e3o\" src=\"\/wp-content\/uploads\/2019\/09\/435bc2e3828affdc9be2816036530718.jpg\" style=\"display:block;margin: 0 auto;\"><\/p>\n<p><em>Uso do SNI em TLS<\/em><\/p>\n<h3 id=\"kolichestvo-potencialno-uyazvimyh-publichnyh-serverov\">N\u00famero de servidores p\u00fablicos potencialmente vulner\u00e1veis<\/h3>\n<p>De acordo com estat\u00edsticas de um grande provedor de hospedagem <strong>E-Soft Inc<\/strong> em 1\u00ba de setembro, em servidores alugados, a vers\u00e3o 4.92 \u00e9 utilizada em mais de 70% dos hosts.<\/p>\n<p>Vers\u00e3o<br \/>\nN\u00famero de Servidores<br \/>\nPorcentagem<\/p>\n<p>4.92.1<br \/>\n6471<br \/>\n1.28%<\/p>\n<p><strong>4.92<\/strong><br \/>\n<strong>376436<\/strong><br \/>\n<strong>74.22%<\/strong><\/p>\n<p>4.91<br \/>\n58179<br \/>\n11.47%<\/p>\n<p>4.9<br \/>\n5732<br \/>\n1.13%<\/p>\n<p>4.89<br \/>\n10700<br \/>\n2.11%<\/p>\n<p>4.87<br \/>\n14177<br \/>\n2.80%<\/p>\n<p>4.84<br \/>\n9937<br \/>\n1.96%<\/p>\n<p>Outras vers\u00f5es<br \/>\n25568<br \/>\n5.04%<\/p>\n<p><em>Estat\u00edsticas da empresa E-Soft Inc<\/em><\/p>\n<p>Se pesquisarmos em um mecanismo de busca <noindex><a rel=\"nofollow\" href=\"https:\/\/www.shodan.io\/\"><strong>Shodan<\/strong><\/a><\/noindex>, dos 5.250.000 na base de servidores:<\/p>\n<ul>\n<li>cerca de 3.500.000 utilizam Exim 4.92 (cerca de 1.380.000 com SSL\/TLS);<\/li>\n<li>mais de 74.000 utilizam 4.92.1 (cerca de 25.000 com SSL\/TLS).<\/li>\n<\/ul>\n<p>Assim, existem aproximadamente <strong>1,5 milh\u00f5es<\/strong>.<\/p>\n<p><img decoding=\"async\" alt=\"Patchou o Exim \u2014 fa\u00e7a o patch novamente. Nova execu\u00e7\u00e3o remota de comandos no Exim 4.92 em uma \u00fanica solicita\u00e7\u00e3o\" src=\"\/wp-content\/uploads\/2019\/09\/53dac3e4d5d4a127f522a17ae1633084.jpg\" style=\"display:block;margin: 0 auto;\"><\/p>\n<p><em>Busca por servidores Exim no Shodan<\/em><\/p>\n<h3 id=\"zaschita\">Protecci\u00f3n<\/h3>\n<ul>\n<li>A op\u00e7\u00e3o mais simples, mas n\u00e3o recomendada, \u00e9 n\u00e3o usar TLS, o que resultar\u00e1 no envio de e-mails em texto claro.<\/li>\n<li>Uma alternativa mais prefer\u00edvel para evitar a explora\u00e7\u00e3o da vulnerabilidade \u00e9 atualizar para a vers\u00e3o <noindex><a rel=\"nofollow\" href=\"http:\/\/exim.org\/index.html\">Exim Internet Mailer 4.92.2<\/a><\/noindex>.<\/li>\n<li>Se a atualiza\u00e7\u00e3o ou instala\u00e7\u00e3o de uma vers\u00e3o corrigida n\u00e3o for poss\u00edvel, \u00e9 poss\u00edvel definir ACL na configura\u00e7\u00e3o do Exim para a op\u00e7\u00e3o <strong>acl_smtp_mail<\/strong> com as seguintes regras:\n<pre><code class=\"plaintext\"># to be prepended to your mail acl (the ACL referenced\n# by the acl_smtp_mail main config option)\ndeny    condition = ${if eq{}{${substr{-1}{1}{$tls_in_sni}}}}\ndeny    condition = ${if eq{}{${substr{-1}{1}{$tls_in_peerdn}}}}<\/code><\/pre>\n<\/li>\n<\/ul>\n<p>Fonte: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/jetinfosystems\/blog\/467089\/\">habr.com<\/a><\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u0421\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u0434\u0430\u0432\u043d\u043e, \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u043b\u0435\u0442\u0430, \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u043c\u0430\u0441\u0441\u043e\u0432\u044b\u0435 \u043f\u0440\u0438\u0437\u044b\u0432\u044b \u043a \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044e Exim \u0434\u043e \u0432\u0435\u0440\u0441\u0438\u0438 4.92 \u0438\u0437-\u0437\u0430 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438 CVE-2019-10149 (\u0421\u0440\u043e\u0447\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0439\u0442\u0435 exim \u0434\u043e 4.92 \u2014 \u0438\u0434\u0451\u0442 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0435 \u0437\u0430\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \/ \u0425\u0430\u0431\u0440). \u0410 \u043d\u0430 \u0434\u043d\u044f\u0445 \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0432\u0440\u0435\u0434\u043e\u043d\u043e\u0441 Sustes \u0440\u0435\u0448\u0438\u043b \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u044d\u0442\u043e\u0439 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c\u044e. \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0435 \u044d\u043a\u0441\u0442\u0440\u0435\u043d\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u0432\u0448\u0438\u0435\u0441\u044f \u043c\u043e\u0433\u0443\u0442 \u043e\u043f\u044f\u0442\u044c \u00ab\u043f\u043e\u0440\u0430\u0434\u043e\u0432\u0430\u0442\u044c\u0441\u044f\u00bb: 21 \u0438\u044e\u043b\u044f 2019 \u0433. \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c Zerons \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":28554,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[688],"tags":[],"class_list":["post-38040","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-administrirovanie"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.3 - aioseo.com -->\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\/pt\/blog\/administrirovanie\/propatchil-exim-propatch-eshhe-raz-svezhee-remote-command-execution-v-exim-4-92-v-odin-zapros\" \/>\n\t\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.3\" \/>\n\t\t<meta property=\"og:locale\" content=\"pt_PT\" \/>\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\u041f\u0440\u043e\u043f\u0430\u0442\u0447\u0438\u043b Exim \u2014 \u043f\u0440\u043e\u043f\u0430\u0442\u0447\u044c \u0435\u0449\u0435 \u0440\u0430\u0437. \u0421\u0432\u0435\u0436\u0435\u0435 Remote Command Execution \u0432 Exim 4.92 \u0432 \u043e\u0434\u0438\u043d \u0437\u0430\u043f\u0440\u043e\u0441 | ProHoster\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/pt\/blog\/administrirovanie\/propatchil-exim-propatch-eshhe-raz-svezhee-remote-command-execution-v-exim-4-92-v-odin-zapros\" \/>\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=\"2019-10-31T19:21:20+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2021-02-01T09:37:46+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\udd47Exim corrigido \u2014 corrija novamente. Nova execu\u00e7\u00e3o de comando remoto no Exim 4.92 em uma \u00fanica solicita\u00e7\u00e3o | ProHoster","description":"","canonical_url":"https:\/\/prohoster.info\/pt\/blog\/administrirovanie\/propatchil-exim-propatch-eshhe-raz-svezhee-remote-command-execution-v-exim-4-92-v-odin-zapros","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"pt_PT","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\u041f\u0440\u043e\u043f\u0430\u0442\u0447\u0438\u043b Exim \u2014 \u043f\u0440\u043e\u043f\u0430\u0442\u0447\u044c \u0435\u0449\u0435 \u0440\u0430\u0437. \u0421\u0432\u0435\u0436\u0435\u0435 Remote Command Execution \u0432 Exim 4.92 \u0432 \u043e\u0434\u0438\u043d \u0437\u0430\u043f\u0440\u043e\u0441 | ProHoster","og:url":"https:\/\/prohoster.info\/pt\/blog\/administrirovanie\/propatchil-exim-propatch-eshhe-raz-svezhee-remote-command-execution-v-exim-4-92-v-odin-zapros","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":"2019-10-31T19:21:20+00:00","article:modified_time":"2021-02-01T09:37:46+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"38040","title":null,"description":"","keywords":"","keyphrases":null,"primary_term":null,"canonical_url":"","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":null,"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 20:14:19","breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-03-01 01:16:23","updated":"2026-01-23 20:14:19","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/pt\/wp-json\/wp\/v2\/posts\/38040","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/pt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/pt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/pt\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/pt\/wp-json\/wp\/v2\/comments?post=38040"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/pt\/wp-json\/wp\/v2\/posts\/38040\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/pt\/wp-json\/wp\/v2\/media\/28554"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/pt\/wp-json\/wp\/v2\/media?parent=38040"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/pt\/wp-json\/wp\/v2\/categories?post=38040"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/pt\/wp-json\/wp\/v2\/tags?post=38040"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}