Re: All tcp ports open?

From: Chris Brenton (cbrenton@chrisbrenton.org)
Date: Mon Aug 30 2004 - 06:37:59 EDT


On Sun, 2004-08-29 at 03:04, Ben Timby wrote:
>
> I am pen-testing a Windows webserver, and a port scan reveals ALL tcp
> ports open. hping also confirms that a SA is returned for any S packets
> sent to any port I try.

Been there seen this, its how I like to configure a perimeter. ;-)

A number of firewalls will do this if you tweak them right. Gauntlet,
iptables, 4.x and prior Firewall-1, and TCPWrapper just to name a few.
You can also see this type of response out of load balancers and SYN
flood protection devices.

> I can connect via netcat any of the ports, and
> send data, but nothing is returned.

So you complete a TCP three packet handshake, send a single ACK with a
payload, and _nothing_ comes back, not even a RST? If so I would lean
more towards it being a firewall giving you this response.

> In order to verify services, I am
> required to connect and check for a banner or send appropriate protocol
> commands to elicit a response.

nmap is your friend:
nmap -sT -P0 -A -O -F -oN scan.txt 1.1.1.1/24

"-A" will do some app specific queries to see if there is actually
anything listening on the port.

I included "-O" because if all the IP's fingerprint exactly the same,
its very likely you are talking to a firewall. It sounded like you might
be checking only 1 IP address however, in which case you can't compare
the fingerprints of different IPs. You can however at least check to see
if the fingerprint is for a known firewall that displays the activity
you describe.

I included "-F" so you are not scanning *every* port. On the up side
your scan will go quicker. On the downside, you'll miss apps on
non-standard ports.

Happy fishing!
Chris

------------------------------------------------------------------------------
Ethical Hacking at the InfoSec Institute. All of our class sizes are
guaranteed to be 12 students or less to facilitate one-on-one interaction
with one of our expert instructors. Check out our Advanced Hacking course,
learn to write exploits and attack security infrastructure. Attend a course
taught by an expert instructor with years of in-the-field pen testing
experience in our state of the art hacking lab. Master the skills of an
Ethical Hacker to better assess the security of your organization.

http://www.infosecinstitute.com/courses/ethical_hacking_training.html
-------------------------------------------------------------------------------



This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 10:54:01 EDT