{"id":403,"date":"2010-04-13T21:39:44","date_gmt":"2010-04-14T00:39:44","guid":{"rendered":"http:\/\/www.subterfugios.net\/blog\/?p=403"},"modified":"2010-04-13T21:39:44","modified_gmt":"2010-04-14T00:39:44","slug":"ataque-hacker-ao-issuesapacheorg","status":"publish","type":"post","link":"http:\/\/www.subterfugios.net\/blog\/ataque-hacker-ao-issuesapacheorg\/","title":{"rendered":"Ataque hacker ao issues.apache.org"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.subterfugios.net\/blog\/wp-content\/uploads\/2010\/04\/noplace.jpg\" alt=\"noplace\" title=\"noplace\" width=\"220\" height=\"286\" class=\"alignleft size-full wp-image-409\" \/><\/p>\n<p>H\u00e1 alguns meses, comentamos sobre a <a href=\"http:\/\/www.subterfugios.net\/blog\/arquivos\/2009\/11\/14\/tenha-uma-senha-forte-no-email\/\">senha de seu email e porque mant\u00ea-la segura<\/a>, muito segura. Ocorrido durante a semana passada, um ataque ao site de bugs da mais famosa organiza\u00e7\u00e3o open-source refor\u00e7a este apelo.<\/p>\n<p>Sup\u00f5e-se que um site como o issues.apache.org seja um exemplo de seguran\u00e7a da informa\u00e7\u00e3o. E \u00e9 de fato. Os sistemas est\u00e3o sempre atualizados e as pol\u00edticas de seguran\u00e7a s\u00e3o bem seguidas. Mesmo assim, isso n\u00e3o evitou que um grupo de hackers tivesse acesso de root ao servidor. Tudo come\u00e7ou com um XSS (cross-site scripting) no Jira usando uma tinyurl e acabou com indisponibilidade dos servi\u00e7os e comprometimento dos dados dos usu\u00e1rios.<\/p>\n<p>O resultado \u00e9 que os meliantes hoje t\u00eam posse da base de usu\u00e1rios do Jira, contendo email e hash da senha de milhares de usu\u00e1rios. Se voc\u00ea tinha um usu\u00e1rio no Jira da Apache, usava uma senha boba (ex.: shelovesyou, baseada em palavras de dicion\u00e1rio ou n\u00fameros simples) e tem a mesma senha em seu email, \u00e9 poss\u00edvel que sua conta j\u00e1 esteja em outras m\u00e3os.<\/p>\n<p>A diferen\u00e7a aqui \u00e9 que ficamos sabendo. Por ser uma funda\u00e7\u00e3o totalmente aberta e transparente, a Apache divulgou o passo-a-passo do que foi feito em seus servidores, como forma de explica\u00e7\u00e3o e de evitar novas ocorr\u00eancias. Aquele sitezinho Web 2.0 que voc\u00ea faz coisas Web 2.0 provavelmente n\u00e3o ser\u00e1 t\u00e3o nobre e voc\u00ea n\u00e3o ficar\u00e1 sabendo que sua senha (porque aquele sitezinho provavelmente n\u00e3o usa nem MD5) est\u00e1 \u00e0 solta por a\u00ed.<\/p>\n<p>Bem, o objetivo n\u00e3o \u00e9 dar li\u00e7\u00e3o de moral, nem me \u00e9 permitido pela coer\u00eancia. Comecei a escrever mesmo para compartilhar o relato do incidente. A Funda\u00e7\u00e3o Apache fez um resumo claro e did\u00e1tico da invas\u00e3o, que pode ser lido <a href=\"https:\/\/blogs.apache.org\/infra\/entry\/apache_org_04_09_2010\">neste link<\/a>. \u00c9 interessante porque n\u00e3o \u00e9 comum encontrar uma descri\u00e7\u00e3o assim. Cito um trecho aqui, grifado por mim:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.subterfugios.net\/blog\/wp-content\/uploads\/2010\/04\/feather-small.gif\" alt=\"feather-small\" title=\"feather-small\" width=\"203\" height=\"61\" class=\"aligncenter size-full wp-image-412 centered\" \/><\/p>\n<blockquote><p>\nOn April 5th, the attackers via a compromised Slicehost server opened a new issue, INFRA-2591. This issue contained the following text:<\/p>\n<p>    ive got this error while browsing some projects in jira http:\/\/tinyurl.com\/XXXXXXXXX [obscured] <\/p>\n<p>Tinyurl is a URL redirection and shortening tool. This specific URL redirected back to the Apache instance of JIRA, at a special URL containing a cross site scripting (XSS) attack. The attack was crafted to steal the session cookie from the user logged-in to JIRA. When this issue was opened against the Infrastructure team, several of our administators clicked on the link. This compromised their sessions, including their JIRA administrator rights.<\/p>\n<p>At the same time as the <strong>XSS attack<\/strong>, the attackers started a <strong>brute force attack <\/strong>against the JIRA login.jsp, attempting hundreds of thousands of password combinations.<\/p>\n<p>On April 6th, one of these methods was successful. Having gained administrator privileges on a JIRA account, the attackers used this account to disable notifications for a project, and to change the path used to upload attachments. The path they chose was configured to run JSP files, and was writable by the JIRA user. They then created several new issues and uploaded attachments to them. <strong>One of these attachments was a JSP file that was used to browse and copy the filesystem. <\/strong>The attackers used this access to create copies of many users&#8217; home directories and various files. They also uploaded other JSP files that gave them backdoor access to the system using the account that JIRA runs under.<\/p>\n<p>By the morning of April 9th, the attackers had installed a JAR file that would collect all passwords on login and save them. They then sent password reset mails from JIRA to members of the Apache Infrastructure team. These team members, thinking that JIRA had encountered an innocent bug, logged in using the temporary password sent in the mail, then changed the passwords on their accounts back to their usual passwords.<\/p>\n<p><strong>One of these passwords happened to be the same as the password to a local user account on brutus.apache.org, and this local user account had full sudo access.<\/strong> The attackers were thereby able to login to brutus.apache.org, and gain full root access to the machine. This machine hosted the Apache installs of JIRA, Confluence, and Bugzilla.<\/p>\n<p>Once they had root on brutus.apache.org, the attackers found that <strong>several users had cached Subversion authentication credentials<\/strong>, and used these passwords to log in to minotaur.apache.org (aka people.apache.org), our main shell server. On minotaur, they were unable to escalate privileges with the compromised accounts.<\/p>\n<p>About 6 hours after they started resetting passwords, we noticed the attackers and began shutting down services. We notified Atlassian of the previously unreported XSS attack in JIRA and contacted SliceHost. Atlassian was responsive. Unfortunately, SliceHost did nothing and 2 days later, the very same virtual host (slice) attacked Atlassian directly.<\/p>\n<p>We started moving services to a different machine, thor.apache.org. The attackers had root access on brutus.apache.org for several hours, and we could no longer trust the operating system on the original machine.<\/p>\n<p>By April 10th, JIRA and Bugzilla were back online.<\/p>\n<p>On April 13th, Atlassian provided a patch for JIRA to prevent the XSS attack. See JRA-20994 and JRA-20995 for details.<\/p>\n<p>Our Confluence wiki remains offline at this time. We are working to restore it.\n<\/p><\/blockquote>\n<p>Fiquei sabendo disso atrav\u00e9s de um email que come\u00e7ava assim:<\/p>\n<blockquote><p>De:\t&lt;root@apache.org&gt;<br \/>\nDear Joao Del Valle,<br \/>\nYou are receiving this email because you have a login, [suprimido], on the Apache JIRA installation, https:\/\/issues.apache.org\/jira\/&#8230;<\/p><\/blockquote>\n<p>Mas sem problemas, minha senha era bem boba, s\u00f3 para consultar e comentar issues. E a sua?<\/p>\n<div class=\"sharedaddy sd-sharing-enabled\"><div class=\"robots-nocontent sd-block sd-social sd-social-icon sd-sharing\"><div class=\"sd-content\"><ul><li class=\"share-facebook\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-facebook-403\" class=\"share-facebook sd-button share-icon no-text\" href=\"http:\/\/www.subterfugios.net\/blog\/ataque-hacker-ao-issuesapacheorg\/?share=facebook\" target=\"_blank\" title=\"Clique para compartilhar no Facebook\"><span><\/span><span class=\"sharing-screen-reader-text\">Clique para compartilhar no Facebook(abre em nova janela)<\/span><\/a><\/li><li class=\"share-twitter\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-twitter-403\" class=\"share-twitter sd-button share-icon no-text\" href=\"http:\/\/www.subterfugios.net\/blog\/ataque-hacker-ao-issuesapacheorg\/?share=twitter\" target=\"_blank\" title=\"Clique para compartilhar no Twitter\"><span><\/span><span class=\"sharing-screen-reader-text\">Clique para compartilhar no Twitter(abre em nova janela)<\/span><\/a><\/li><li class=\"share-jetpack-whatsapp\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"\" class=\"share-jetpack-whatsapp sd-button share-icon no-text\" href=\"https:\/\/api.whatsapp.com\/send?text=Ataque%20hacker%20ao%20issues.apache.org%20http%3A%2F%2Fwww.subterfugios.net%2Fblog%2Fataque-hacker-ao-issuesapacheorg%2F\" target=\"_blank\" title=\"Clique para compartilhar no WhatsApp\"><span><\/span><span class=\"sharing-screen-reader-text\">Clique para compartilhar no WhatsApp(abre em nova janela)<\/span><\/a><\/li><li class=\"share-end\"><\/li><\/ul><\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>H\u00e1 alguns meses, comentamos sobre a senha de seu email e porque mant\u00ea-la segura, muito segura. Ocorrido durante a semana passada, um ataque ao site de bugs da mais famosa organiza\u00e7\u00e3o open-source refor\u00e7a este apelo. Sup\u00f5e-se que um site como &hellip; <a href=\"http:\/\/www.subterfugios.net\/blog\/ataque-hacker-ao-issuesapacheorg\/\">Continue lendo <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n<div class=\"sharedaddy sd-sharing-enabled\"><div class=\"robots-nocontent sd-block sd-social sd-social-icon sd-sharing\"><div class=\"sd-content\"><ul><li class=\"share-facebook\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-facebook-403\" class=\"share-facebook sd-button share-icon no-text\" href=\"http:\/\/www.subterfugios.net\/blog\/ataque-hacker-ao-issuesapacheorg\/?share=facebook\" target=\"_blank\" title=\"Clique para compartilhar no Facebook\"><span><\/span><span class=\"sharing-screen-reader-text\">Clique para compartilhar no Facebook(abre em nova janela)<\/span><\/a><\/li><li class=\"share-twitter\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-twitter-403\" class=\"share-twitter sd-button share-icon no-text\" href=\"http:\/\/www.subterfugios.net\/blog\/ataque-hacker-ao-issuesapacheorg\/?share=twitter\" target=\"_blank\" title=\"Clique para compartilhar no Twitter\"><span><\/span><span class=\"sharing-screen-reader-text\">Clique para compartilhar no Twitter(abre em nova janela)<\/span><\/a><\/li><li class=\"share-jetpack-whatsapp\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"\" class=\"share-jetpack-whatsapp sd-button share-icon no-text\" href=\"https:\/\/api.whatsapp.com\/send?text=Ataque%20hacker%20ao%20issues.apache.org%20http%3A%2F%2Fwww.subterfugios.net%2Fblog%2Fataque-hacker-ao-issuesapacheorg%2F\" target=\"_blank\" title=\"Clique para compartilhar no WhatsApp\"><span><\/span><span class=\"sharing-screen-reader-text\">Clique para compartilhar no WhatsApp(abre em nova janela)<\/span><\/a><\/li><li class=\"share-end\"><\/li><\/ul><\/div><\/div><\/div>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"sharing_disabled":false,"spay_email":"","footnotes":"","jetpack_publicize_message":""},"categories":[1],"tags":[],"class_list":["post-403","post","type-post","status-publish","format-standard","hentry","category-etc"],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/pAkyI-6v","_links":{"self":[{"href":"http:\/\/www.subterfugios.net\/blog\/wp-json\/wp\/v2\/posts\/403","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.subterfugios.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.subterfugios.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.subterfugios.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.subterfugios.net\/blog\/wp-json\/wp\/v2\/comments?post=403"}],"version-history":[{"count":12,"href":"http:\/\/www.subterfugios.net\/blog\/wp-json\/wp\/v2\/posts\/403\/revisions"}],"predecessor-version":[{"id":417,"href":"http:\/\/www.subterfugios.net\/blog\/wp-json\/wp\/v2\/posts\/403\/revisions\/417"}],"wp:attachment":[{"href":"http:\/\/www.subterfugios.net\/blog\/wp-json\/wp\/v2\/media?parent=403"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.subterfugios.net\/blog\/wp-json\/wp\/v2\/categories?post=403"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.subterfugios.net\/blog\/wp-json\/wp\/v2\/tags?post=403"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}