Netcat

De Linuxmemo.

(Différences entre les versions)
(Netcat en scanner de ports)
Ligne 1 : Ligne 1 :
[[Catégorie:Commandes]]
[[Catégorie:Commandes]]
-
Voir: [[Cryptcat]]
+
Voir: [[Cryptcat]], [[Ncat]], [[Nc]]
=== NETCAT CLIENT ===
=== NETCAT CLIENT ===

Version du 20 juillet 2020 à 12:59

Voir: Cryptcat, Ncat, Nc

Sommaire

NETCAT CLIENT

Ouvrir un socket:

NETCAT <adresse_ip_d'un_serveur> 6667
NETCAT -t <adresse_ip_d'un_serveur_telnet> 23


NETCAT SERVEUR

NETCAT -l -p 23
-l pour dire qu'on est en mode listen (on attend une connection sur un port)
-p 23 pour dire que le port sur lequel on attend la connection est le port 23.
NETCAT -L -p 23
-L majuscule annonce à NetCat qu'il doit attendre des connections en permanence (Windows).
pour Linux
while true; do ./netcat -l -p 55555 -e "/bin/bash"; done
NETCAT -l -p 80

REDIRECTIONS ENTREES/SORTIES

NETCAT -L -p 23 < wingate.txt
NETCAT -L -p 23 > wingate.log
NETCAT -L -p 23 -e c:\command.com
NETCAT -L -p 23 -d -e c:\command.com

Netcat en scanner de ports

netcat -vv 127.0.0.1 1-100 443
netcat -z -vv 127.0.0.1 1-100 443
netcat -zvn -w2 xxx.xxx.xxx.xxx 22
-z scan for listening daemons, without sending any data
-v verbose
-n Do not do any DNS or service lookups
-w timeout
netcat -zvn -w2 xxx.xxx.xxx.xxx 22-110
range port

Netcat en mode UDP

netcat -u 127.0.0.1 53
Outils personnels