From owner-freebsd-security@FreeBSD.ORG Thu Jan 30 18:31:48 2014 Return-Path: Delivered-To: freebsd-security@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E47BC878 for ; Thu, 30 Jan 2014 18:31:48 +0000 (UTC) Received: from batman.home4u.ch (batman.home4u.ch [IPv6:2001:8a8:1005:1::2]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 71E8C1830 for ; Thu, 30 Jan 2014 18:31:48 +0000 (UTC) X-Virus-Scanned: amavisd-new at home4u.ch Received: from flashback.wenks.ch (fabian@flashback.wenks.ch [IPv6:2001:8a8:1005:1::4]) (authenticated bits=0) by batman.home4u.ch (8.14.5/8.14.5) with ESMTP id s0UIViGM021513 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Thu, 30 Jan 2014 19:31:45 +0100 (CET) (envelope-from fabian@wenks.ch) Message-ID: <52EA9A90.4040608@wenks.ch> Date: Thu, 30 Jan 2014 19:31:44 +0100 From: Fabian Wenk User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: freebsd-security@freebsd.org Subject: Re: portscans and blackhole References: <52DD08F7.1000306@hfbk-hamburg.de> <52E910B0.4030606@wenks.ch> <52E93941.7080002@hfbk-hamburg.de> In-Reply-To: <52E93941.7080002@hfbk-hamburg.de> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Security issues \[members-only posting\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Jan 2014 18:31:49 -0000 Hello On 29.01.14 18:24, sa9k063 wrote: > On 01/29/2014 03:31 PM, Fabian Wenk wrote: >> system will see this as a “Connection refused”. By setting the TCP >> blackhole MIB to a numeric value of one, the incoming SYN segment is >> merely dropped, and no RST is sent, making the system appear as a >> blackhole. By setting the MIB value to two, any segment arriving on >> a closed port is dropped without returning a RST. This provides >> some degree of protection against stealth port scans. > > This added to the confusion and thus made me ask. The manpage says > for both values of net.inet.tcp.blackhole={1,2} that no RSTs are > sent out. > Both seem to drop SYNs and suppress sending a RST. > > Reading it again, the only conclusion i could get to regarding the > difference between 1 and 2 would be that for a value of 2, all other > tcp packets with flags other than SYN are additionally ignored. Is > this a better way to understand it ? Yes. I read it this way: If set to 1, it does drop and not send RST only for SYN packets, if set to 2, it does drop and not send RST for all packets. >> So it is possible, that you are hit with something else then SYN >> packets and should probably set net.inet.tcp.blackhole=2, or even >> with UDP packets, then also set net.inet.udp.blackhole=1. > > this remains as a likely explanation, ie FIN scans etc. > >> What output does 'sysctl -a | grep blackhole' show? > > it used to be > > net.inet.tcp.blackhole: 1 > net.inet.udp.blackhole: 1 > > since setting the tcp value to 2 no more messages like these popped > up supporting your line of thought. Then the behavior does match the man page and how I did understand it. bye Fabian