Netcat Slides
Netcat Slides
connectivity using
Netcat
Presented by:
ASTHA SHAH 170280116102
KENA SHAH 170280116105
SHWETAL SOLANKI 170280116114
Purpose of Presentation…?
How to do it …?
D:\tools\nc>nc -v www.hotmail.com 80
DNS fwd/rev mismatch: www.hotmail.com != hotmail.se
DNS fwd/rev mismatch: www.hotmail.com !=
ld.cb.msn.com
DNS fwd/rev mismatch: www.hotmail.com !=
ld.cb.msn.com
www.hotmail.com [207.68.171.233] 80 (http) open
-v
Controls the verbosity level
-w <seconds>
Sets the network inactivity timeout
-p <port number>
Binds the connection to specific port
number
Options
-o <file name>
To obtain hexdump file of data sent
either way
-l
Makes netcat wait for inbound
connections
And once connection is established it
transfers the data
Interesting -l
On client end
D:\tools\nc>nc 192.168.0.100 1234
Options
-L
Listen harder
-r
Randomize port numbers
-z
Zero – I/O mode [used in scanning]
Options
-e <program name>
Allows to execute a program
(dangerous)
-d
Allows to run in detached mode
without console window
-u
Makes a UDP connection instead of
TCP connection
Options
-s <address>
Local source address
-i <seconds>
Specifies delay interval for lines sent
or ports scanned
-t
Answer telnet negotiation
USES:
Port Scanning
• nc –v –w 5 –r davinci.newcs.uwindsor.ca 20-30
D:\tools\nc>nc -v -w 5 -r davinci.newcs.uwindsor.ca 20-30
davinci.newcs.uwindsor.ca [137.207.76.3] 22 (?) open
SSH-2.0-Sun_SSH_1.0
davinci.newcs.uwindsor.ca [137.207.76.3] 28 (?) open
davinci.newcs.uwindsor.ca [137.207.76.3] 20 (ftp-data) open
davinci.newcs.uwindsor.ca [137.207.76.3] 23 (telnet) open
internet2 proxy-telnet [v3.1] ready
D:\tools\nc>
USE IT GOOD
Performance Testing
D:\tools\nc>nc -l -p 21 -e cmd.exe
LISTENER
D:\tools\nc>
Request
Environment