Document not found! Please try again

Lab 7

106 downloads 252 Views 789KB Size Report
This ip is the ip of backtrack. NOTE: you need to the copy .exe file which named nc into this path to be able to run this command. . 3.
Lab.7

Internet Security

Introduction to using Netcat Objectives  To learn basic features of Netcat that using in security field.

Introduction Netcat is a computer networking service for reading from and writing network connections using TCP or UDP; this dual functionality suggests that Netcat runs in two modes: “client” and “server”. Netcat is designed to be a dependable “backend” device that can be used candidly or easily driven by other programs and scripts. At the same time, it is a feature-rich network debugging and investigation tool, since it can produce almost any kind of correlation you would need and has a number of built-in capabilities. Its list of features includes port scanning, transferring files, and port listening, and it can be used as a backdoor.

1

Lab.7

Internet Security

Lab Experiment Requirements: We need for this lab two machines , the first that runs BackTrack 3 and the other runs Windows XP . Procedures :

Part 1 : Listening on a TCP/UDP port with Netcat Listening on a TCP/UDP port using Netcat is useful for network debugging client applications, or otherwise receiving a TCP/UDP network connection. Let's try implementing a simple chat using Netcat. To be familiar with options of Netcat, you can type nc–h. see the figure below.

2

Lab.7

Internet Security

1. From Backtrack : we want to listen on port 50000 and accept incoming connections on this port , type: nc-lvvp50000 Check to see that port 50000 is indeed listening using netstat You will see listening on [any] 50000 ...

2. From Windows XP: connect to port 50000 on your Backtrack by typing nc-vv192.168.1.8 50000.

This ip is the ip of backtrack.

NOTE: you need to the copy .exe file which named nc into this path to be able to run this command. . 3. After connection established we can start chat as shown in the figures

below.

backtrack Netcat listening for port 50000 ; chat is opened after connection establishment

3

Lab.7

Internet Security

Windows XP establish connection with Backtrack ,then simple chat done

Part2 : Transferring files with Netcat Netcat can also be used to transfer files from one computer to another. This applies to text and binary files. In order to send a file from Computer 2 to Computer 1, try the following: 1. From Backtrack : We'll set up Netcat to listen to and accept the connection and to redirect any input into a file.type Nc -lvp 50005 > file.txt 2. In Windows machine we create text file test.txt; then we connect to listening Netcat on computer 1 (port 50005) and send the file,type: C:\>nc-vv192.168.1.850005