Download free port scanner software
Port ScanningPort Scanning is one of the most popular among the reconnaissance techniques attackers use. All machines connected to a LAN or connected to Internet via a modem run many services that listen at certain ports. A service is a program that waits inside a loop for a request message from a client, and acts on the request. By port scanning the attacker finds which ports are available (i.e., being listened to by a service). Essentially, a port scan consists of sending a message to each port, one at a time. The kind of response received indicates whether the port is used and can then be probed further for weakness. The various techniques in scanning are summarized in the paper by Foydor (NMap author). A full understanding of these depends on understanding IP filtering and other firewall techniques. So re-read this chapter afterwards. Port Scanning TermsPort scanning usually, but not always, means scanning for TCP ports, which are connection-oriented and therefore give good feedback to the attacker. Port Numbers Sockets Strobe Fragmented packets This stealth approach fragments the IP datagrams within the TCP header. This bypasses some packet filter firewalls acting as "packet filters" because they cannot see a complete TCP header that can match their filter rules. UDP scan Sweep Bounce scanThe ability to hide their tracks is important to attackers. Therefore, attackers scour the Internet looking for systems they can bounce their attacks through. FTP bounce scanning takes advantage of a vulnerability in FTP servers, which honors a request that the FTP server open a connection to a third party on a particular port. This makes the FTP server to scan and send back the results. This bouncing through an FTP server hides the attacker's address. This technique is similar to IP spoofing. Here are some examples.
Stealth scanOne problem, from the perspective of the attacker, with port scanning is that it is easily logged by services listening at the ports. They see an incoming connection, but no data, so they log an error. Stealth scan techniques avoid this. The half-open scan only partially opens a connection, but stops halfway through. This is also known as a SYN scan because it only sends the SYN packet. This stops the service from ever being notified of the incoming connection. Another technique sends erroneous packets at a port, expecting that open listening ports will send back different error messages than closed ports. The most common of these scans is the FIN scan, which attempts to close a connection that is not open. If no service is listening at the target port, the operating system will generate an error message. If a service is listening, the operating system will silently drop the incoming packet. Therefore, no response indicates a listening service at the port. However, since packets can be dropped accidentally on the wire or by firewalls, this is not a very effective scan. Other techniques consist of XMAS scans where all flags in the TCP packet are "lit up" (set), or NULL scans where none of the bits are set. Different operating systems respond differently to these scans, and hence the attacker needs to know what OS the target host is running. SOCKS port probeSOCKS is a system targeted at the home PC user that allows multiple machines to share a common Internet connection. The reason that attackers scan for this is because a large percentage of users misconfigure SOCKS. WinGate is a commercial product that can be installed on a single machine that has the actual Internet connection. All the other machines within the home connect to the Internet through the machine running WinGate. The problem with SOCKS and products like WinGate is that the source and destination addresses are not carefully checked. A misconfigured host will allow external machines to access the internal home network, and also it may allow an attacker access to other Internet machines. This allows the attacker to hide his/her true location. Many IRC chat servers often scan clients for open SOCKS servers. They will kick off such people with a message indicating how to fix the problem. Fingerprinting an OSFingerprinting is the technique of interpreting the responses of a system in order to figure out what it is. To make this more effective, unexpected but well-chosen combinations of data are sent to the system in order to trigger unique-enough responses. This is because while most systems respond alike with correct data, they rarely respond the same way when sent unusual data. This document is available from Prabhaker Mateti, Associate Professor at Wright State University.
|
|