Finally, rules can be created to detect if Netcat is installed on any server on the network. Next, any new ports inbound or outbound will be detected.
NETCAT WINDOWS TO IP SOFTWARE
First, any new software installed, including a built-in utility like Netcat, will be detected. Additionally, Tripwire Enterprise Cybercrime Controls detect multiple points along the attack chain. Tripwire Log Center’s built in correlation rules quickly detect and alert on port scans, including the port scan described earlier. The Netcat tool allows the contents of a file to be piped into or out of the command, allowing the attacker to pilfer data out of the network or upload malicious files to the system.įortunately, Tripwire can help detect the usage of Netcat in your environment. While there are methods of transferring files, such as SCP, FTP or TFTP, these are generally either monitored closely or blocked via the firewall. To act as a relay, simple connect to a different IP address instead of localhost. Then the attacker could then pipe the command to a Netcat command which connects to the localhost on port 22, again redirecting standard output into the FIFO file referenced earlier. To work around this, the attacker would then simply setup a relay by creating a Netcat listener which reads from standard input from a FIFO file. Fortunately for security administrators, the -e option may not be included in the version of Netcat installed. When executing /bin/sh on Linux machines, or cmd.exe on Windows machines, you open a backdoor into the target system. Netcat has an option to execute a program and pass input from the listener to the program. While information leakage like this may not be necessarily dangerous, there are more nefarious actions that Netcat allows the attacker to perform, including opening backdoors and transferring files between systems. Figure 2: Netcat Fingerprintingįigure 2 shows that by interacting with the HTTP service on the target machine, we can infer that the machine is running Apache version 2.2.15, PHP 5.3.3, and is running on a CentOS operating system. By interacting with specific ports, we can gain even more valuable information from the system, including the application name, version and supporting operating system. Figure 1: Netcat PortscanĪs seen in Figure 1, the netcat client quickly and quietly scanned 192.168.1.3 on ports 10 through 25, identifying that port 22 is listening using SSH-2.0-OpenSSH 5.3. A simple command of ‘nc –nv –w1 ’ will scan the target IP address for the ports designated.
By having control over the outbound TCP or UDP connections, Netcat can be used as a port scanner to both identify open ports but also to fingerprint the services and applications available. It allows the user to connect and communicate to a remote port, or create a listener to allow remote connections in. Netcat is a powerful tool for system administrators and is commonly installed on many servers, including some Windows systems. On many popular distributions of Linux, a utility called Netcat is installed. The attacker is only using tools provided by the target organization, essentially “living off the LAN.” However, there are quite a few options for a motivated attacker to take advantage of built in applications and tools within the operating system to compromise, pivot and pilfer critical company data.
NETCAT WINDOWS TO IP DRIVERS
Being able to detect new applications, drivers and files is what Tripwire Enterprise excels at. Detecting and preventing malicious software from executing on critical systems has received a lot of attention in the information security industry lately.