From owner-freebsd-security@FreeBSD.ORG Wed Mar 21 18:45:56 2007 Return-Path: X-Original-To: freebsd-security@freebsd.org Delivered-To: freebsd-security@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D889B16A418 for ; Wed, 21 Mar 2007 18:45:56 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outJ.internet-mail-service.net (outJ.internet-mail-service.net [216.240.47.233]) by mx1.freebsd.org (Postfix) with ESMTP id C1A3513C517 for ; Wed, 21 Mar 2007 18:45:56 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.32) with ESMTP; Wed, 21 Mar 2007 11:01:31 -0700 Received: from [10.251.22.38] (nat.ironport.com [63.251.108.100]) by idiom.com (Postfix) with ESMTP id F26F6125B34; Wed, 21 Mar 2007 11:29:32 -0700 (PDT) Message-ID: <46017986.4020607@elischer.org> Date: Wed, 21 Mar 2007 11:29:26 -0700 From: Julian Elischer User-Agent: Thunderbird 1.5.0.10 (Macintosh/20070221) MIME-Version: 1.0 To: David Wolfskill , freebsd-security@freebsd.org References: <20070321123033.GD31533@bunrab.catwhisker.org> In-Reply-To: <20070321123033.GD31533@bunrab.catwhisker.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Wed, 21 Mar 2007 23:22:12 +0000 Cc: Subject: Re: Reality check: IPFW sees SSH traffic that sshd does not? X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Security issues \[members-only posting\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Mar 2007 18:45:56 -0000 David Wolfskill wrote: > This note is essentially a request for a reality check. > > I use IPFW & natd on the box that provides the interface between my home > networks and the Internet; the connection is (static) residential DSL. > > I configured IPFW to accept & log all SSH "setup" requests, and use natd > to forward such requests to an internal machine that only accepts public > key authentication; that machine's sshd logs SSH-specific information. > > Usually, the SSH setup requests logged by IPFW correspond with sshd > activity (whether authorized or not); I expect this. > > What has come as rather a surprise, though, is that every once in a > while, I will see IPFW logging setup requests that have no corresponding > sshd activity logged at all. > > This morning (in reviewing the logs from yesterday), I found a set of > 580 such setup requests logged from Mar 20 19:30:06 - Mar 20 19:40:06 > (US/Pacific; currently 7 hrs. west of GMT/UTC), each from 204.11.235.148 > (part of a VAULT-NETWORKS netblock). The sshd on the internal machine > never logged anything corresponding to any of this. > > I cannot imagine any valid reason for SSH traffic to my home to be > originating from that netblock. I perceive nothing comforting in the > lack of sshd logging the apparent activity. > > Lacking rationale to do otherwise, I interpret this as an attack: > I've modified my IPFW rules to include a reference to a table rather > early on; IP addresses found in this table are not permitted to > establish SSH sessions to my networks, and the attempted activity > is logged. (I also use the same technique on my laptop and my work > desktop, and -- manually, so far -- keep the tables in question > synchronized.) > > I have accordingly added the VAULT-NETWORKS netblocks to this table, > pending either information or reason to remove those specifications. > > Granted, there appears to be no access granted, but the lack of sshd > logging makes me nervous. Access may not need to be granted if they think that that version of sshd can be made to 'break' (via a printf bug or stack overflow for example) before it gets as far as that. they probably haven't succeeded as they were still trying, but it's still probably worth looking at what they were trying to do. (malformed fields or something) > > Have other folks noticed this type of behavior? Have I gone off the > deep end of paranoia? (Yes, I expect that some of "them" really are out > to get me. What can I say; it's an occupational hazard.) > > Thanks! > > Peace, > david