The gMan nixWiki

Because the mind is made of Teflon...

User Tools

Site Tools


cheat_sheets_nc

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
cheat_sheets_nc [2022/11/20 20:25] – [NetCat (nc)] gmancheat_sheets_nc [2023/01/12 00:52] (current) – [NetCat (nc)] gman
Line 1: Line 1:
 ====== NetCat (nc) ====== ====== NetCat (nc) ======
 +
 +NetCat is a popular **remote access tool.**
 +  * It has a small footprint so it's portable.
 +  * It can set up a reverse shell easily... 
  
 Local listener for reverse shell:  Local listener for reverse shell: 
Line 26: Line 30:
 <code>nc [target IP] 21</code> <code>nc [target IP] 21</code>
  
 +Send output from a listener to a text file:
 +
 +<code>
 +nc -nvlp [port number] > filename.txt
 +</code>
 +
 +Send output from a text file to a remote machine: 
 +
 +<code>
 +nc [IP Address] [port] < filename.txt
 +</code>
  
 ---- ----
Line 43: Line 58:
 **Source**: [[https://eternallybored.org/misc/netcat/ | eternallybored.org]] (much thanks) **Source**: [[https://eternallybored.org/misc/netcat/ | eternallybored.org]] (much thanks)
  
-==== Ncat ====+----  
 + 
 +====== Ncat ======
  
 [[https://nmap.org/ncat/ | Ncat]] is a much-improved reimplementation of the Netcat.  [[https://nmap.org/ncat/ | Ncat]] is a much-improved reimplementation of the Netcat. 
 +  * I has a variety of different capabilities... 
 +  * SSL
 +  * Proxies
 +  * SendMail
 +  * Chain together Ncat sessions for pivoting.
  
 If you need a statically compiled version of ncat.exe that you can just drop on a Windows system and use without having to run any installer or copy over extra library files: [[https://nmap.org/dist/ncat-portable-5.59BETA1.zip | Ncat 5.59BETA1]] ({{ :downloads:ncat-portable-5.59beta1.zip | local download }}) If you need a statically compiled version of ncat.exe that you can just drop on a Windows system and use without having to run any installer or copy over extra library files: [[https://nmap.org/dist/ncat-portable-5.59BETA1.zip | Ncat 5.59BETA1]] ({{ :downloads:ncat-portable-5.59beta1.zip | local download }})
Line 53: Line 75:
 If you need a portable version of a newer Ncat release, see the [[ https://secwiki.org/w/Nmap/Ncat_Portable | Ncat portable compilation instructions]].  If you need a portable version of a newer Ncat release, see the [[ https://secwiki.org/w/Nmap/Ncat_Portable | Ncat portable compilation instructions]]. 
  
----- 
  
cheat_sheets_nc.1668975955.txt.gz · Last modified: by gman