Friday, February 25, 2011

NetBIOS command

-: NetBIOS command :-


NetBIOS stands for "Network Basic Input Output System".
It was originally developed by IBM and Sytek as an Application Programming Interface (API) for client software to access LAN resources.
By default it runs on port 139.
NetBIOS gives the various information of the computers on a network, which includes computer name, username, domain, group, and many others.....!

The NBTSTAT Command :-
NBTSTAT is the command for manually interact with NetBIOS Over TCP/IP.
All the attributes (switches) used with nbtstat command and their usage can be viewed.
At the command prompt type-
C:\Windows>nbtstat


Sample NBTSTAT Response :-
C:\>nbtstat -A 117.200.160.174

NetBIOS Remote Machine Name Table
Name Type Status
----------------------------------------------
PRASANNA <00> UNIQUE Registered
INSECURE LABS <00> GROUP Registered
PRASANNA <03> UNIQUE Registered
PRASANNA <20> UNIQUE Registered
INSECURE LABS <1e> GROUP Registered

MAC Address = 86-95-55-50-00-00

An intruder could use the output from an nbtstat against your machines to begin gathering information about them.

"<03> in above table is nothing but the username of that system."

The next step for an intruder would be to try and list the open shares on the given computer, using the net view command.
Here is an example of the Net View command-
C:\>net view \\117.200.160.174
Shared resources at \\117.200.160.174
Sharename Type Comment
----------------------------------------
C Disk Drive C:\
MySofts Disk My Softwares Collection
E Disk Drive E:\

The command was completed successfully.


This information would give the intruder a list of shares which he would then use in conjunction with the Net Use command, a command used to enable a computer to map a share to it’s local drive, below is an example of how an intruder would map the C Share to a local G: drive, which he could then browse...!
C:\>net use G: \\117.200.160.174\C
The command was completed successfully.

C:\>G:

G:\>

Tuesday, February 22, 2011

F T P( file transfer protocol )

What is FTP?
The FTP (File Transfer Protocol) utility program is commonly used for copying files to and from other computers. These computers may be at the same site or at different sites thousands of miles apart. FTP is a general protocol that works on UNIX systems as well as a variety of other (non-UNIX) systems.
For the purposes of this Web page, the local machine refers to the machine you are initially logged into, the one on which you type the ftp command. The remote machine is the other one, the one that is the argument of the ftp command.
A user interface for the standard File Transfer Protocol for ARPANET, FTP acts as an interpreter on the remote machine. The user may type a number of UNIX-like commands under this interpreter to perform desired actions on the remote machine.
Most operating systems and communication programs now include some form of an FTP utility program, but the commands differ slightly between them. The following explanations and alphabetical list of commands refers to the common FTP utility program as provided on a UNIX machine. Check the documentation for your own machine to determine the comparable commands.
Most computers today include a windows-based type FTP program that is more PC-oriented and does not require full knowledge of these commands.
You can also perform FTP through a browser. For example, bring up Internet Explorer and type in
ftp://yourLoginName@IPaddress
instead of a normal web page URL.


The FTP site of the Computer Science department at CSU requires the user to use sftp, the secure version of FTP. Just type sftp instead of ftp, when you are using FTP in a terminal window.
________________________________________
Getting Started
To connect your local machine to the remote machine, type
ftp machinename
where machinename is the full machine name of the remote machine, e.g., purcell.cs.colostate.edu. If the name of the machine is unknown, you may type
ftp machinennumber
where machinennumber is the net address of the remote machine, e.g., 129.82.45.181. In either case, this command is similar to logging onto the remote machine. If the remote machine has been reached successfully, FTP responds by asking for a loginname and password.
When you enter your own loginname and password for the remote machine, it returns the prompt
ftp>
and permits you access to your own home directory on the remote machine. You should be able to move around in your own directory and to copy files to and from your local machine using the FTP interface commands given on the following page.
________________________________________
Anonymous FTP
At times you may wish to copy files from a remote machine on which you do not have a loginname. This can be done using anonymous FTP.
When the remote machine asks for your loginname, you should type in the word anonymous. Instead of a password, you should enter your own electronic mail address. This allows the remote site to keep records of the anonymous FTP requests.
Once you have been logged in, you are in the anonymous directory for the remote machine. This usually contains a number of public files and directories. Again you should be able to move around in these directories. However, you are only able to copy the files from the remote machine to your own local machine; you are not able to write on the remote machine or to delete any files there.
________________________________________
Common FTP Commands
? to request help or information about the FTP commands
ascii to set the mode of file transfer to ASCII
(this is the default and transmits seven bits per character)
binary to set the mode of file transfer to binary
(the binary mode transmits all eight bits per byte and thus provides less chance of a transmission error and must be used to transmit files other than ASCII files)
bye to exit the FTP environment (same as quit)
cd to change directory on the remote machine
close to terminate a connection with another computer
close brubeck closes the current FTP connection with brubeck,
but still leaves you within the FTP environment.
delete to delete (remove) a file in the current remote directory (same as rm in UNIX)
get to copy one file from the remote machine to the local machine
get ABC DEF copies file ABC in the current remote directory to (or on top of) a file named DEF in your current local directory.
get ABC copies file ABC in the current remote directory to (or on top of) a file with the same name, ABC, in your current local directory.
help to request a list of all available FTP commands
lcd to change directory on your local machine (same as UNIX cd)
ls to list the names of the files in the current remote directory
mkdir to make a new directory within the current remote directory
mget to copy multiple files from the remote machine to the local machine;
you are prompted for a y/n answer before transferring each file
mget * copies all the files in the current remote directory to your current local directory, using the same filenames. Notice the use of the wild card character, *.
mput to copy multiple files from the local machine to the remote machine;
you are prompted for a y/n answer before transferring each file
open to open a connection with another computer
open brubeck opens a new FTP connection with brubeck;
you must enter a username and password for a brubeck account
(unless it is to be an anonymous connection).
put to copy one file from the local machine to the remote machine
pwd to find out the pathname of the current directory on the remote machine
quit to exit the FTP environment (same as bye)
rmdir to to remove (delete) a directory in the current remote directory

________________________________________
Further Information
Many other interface commands are available. Also FTP can be run with different options.Please visit my blog for more information.

Friday, February 18, 2011

PING command

Ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS]
[-r count] [-s count] [[-j host-list] | [-k host-list]]
[-w timeout] destination-list
Options:
-t Pings the specified host until stopped.
To see statistics and continue - type Control-Break;
To stop - press Ctrl + C.
-a Resolve addresses to hostnames.
-n count Number of echo requests to send.
-l size Send buffer size.
-f Set Don't Fragment flag in packet.
-i TTL Time To Live.
-v TOS Type Of Service.
-r count Record route for count hops.
-s count Timestamp for count hops.
-j host-list Loose source route along host-list.
-k host-list Strict source route along host-list.
-w timeout Timeout in milliseconds to wait for each re



Examples
ping localhost
Pings the local host, this will allow you to see if the computer is able to send information out and receive the information back. Note that this does not send information over a network but may allow you to see if the card is being seen.
ping xxx.xxx.xxx.xxx
Allows you to ping another computer where the x's are located are where you would place the IP address of the computer you are attempting to ping. If this is not able to complete, this should relay back an unsuccessful message, which could be an indication of cable issues, network card issues, hub issue, etc.


Additional information
Is there a continuous ping options?
ping
-t
Use the -t option to ping any address until you cancel it by pressing Ctrl + C.