.

Help with basic command prompt

<<

JayOni

User avatar

Newbie
Newbie

Posts: 21

Joined: Fri May 27, 2011 7:30 pm

Location: US

Post Fri May 27, 2011 7:45 pm

Help with basic command prompt

First off I would like to say that I am still a student and just recently I just started learning how to use the cmd prompt and I hope nobody get mad at me for asking such a simple question.

I'm looking at PING, when I do PING <IP address> why does the same exact thing show as PING -a, <IP address>? I know -a is to resolve addresses to host names but im a little confused as to what that really means and why it would look like a normal PING.

Also I'd like to know what would be a point of a continuous ping using -t unless its an form of attack on a workstation. (And what would be the syntx to stop it the help file in my cmd promt says "to stop type control-c" would i type PING -c <ip address>?
<<

hayabusa

User avatar

Hero Member
Hero Member

Posts: 1662

Joined: Mon Jan 29, 2007 2:59 pm

Post Fri May 27, 2011 8:37 pm

Re: Help with basic command prompt

Hi JayOni.

First, ping -a will give you a hostname that an IP resolves to, if the IP is registered in DNS, or a nameservice.  If not, you'll get the same address returned as a result, similar to what you get without the -a.  So, it's useful if you have an IP you're looking at, and want to see what hostname belongs to the address.  Say you review a log, and see an IP regularly hits your firewall.  You might try -a, to see if you can determine the host.  Subsequently, in a test, you might ping sweep a range of addresses, to see which are responding.  You might then try to see what the ones are, that respond to the initial sweep.

Next, -t is handy if you're doing connectivity testing.  For instance, if you suspect you have connection issues, or want to see if there's packet loss, etc, you might run a continuous ping, to see if you are not getting responses to all your ping packets (meaning it either dropped your outbound packets, or the return packets, somewhere.

There are other scenarios where you might use it, but that's one example.

As for stopping it, the combination of ctrl-c essentially stops the running ping process, in it's tracks.  Like 'break'
Last edited by hayabusa on Fri May 27, 2011 8:40 pm, edited 1 time in total.
~ hayabusa ~ 

"All men can see these tactics whereby I conquer, but what none can see is the strategy out of which victory is evolved." - Sun Tzu, 'The Art of War'


OSCE, OSCP , GPEN, C|EH
<<

JayOni

User avatar

Newbie
Newbie

Posts: 21

Joined: Fri May 27, 2011 7:30 pm

Location: US

Post Fri May 27, 2011 8:43 pm

Re: Help with basic command prompt

ah thanks for helping me out very useful :). my classes are 5 weeks long and i couldnt afford to wait till tuesday (we got monday off) im constantly studying so i appreciate the timely response  ;D
<<

JayOni

User avatar

Newbie
Newbie

Posts: 21

Joined: Fri May 27, 2011 7:30 pm

Location: US

Post Fri May 27, 2011 8:49 pm

Re: Help with basic command prompt

May you could answer another noobish question, and keep in mind im not looking for a how to guide but more of general understanding.

I've been learning about ports and stuff and know like 15 of the main ports, but i've sorta been wondering how people (mostly hackers i would suppose) gain access threw ports to your computer remotely I know you have to have the port open and they would probably run a port scanner on you or something to see which ones you got going but how do they access it from there (do they use the command prompt or a 3rd party software)?
<<

cd1zz

User avatar

Recruiters
Recruiters

Posts: 566

Joined: Sun Oct 03, 2010 9:01 pm

Post Fri May 27, 2011 9:01 pm

Re: Help with basic command prompt

A port that is open means there is some software or hardware device that is listening for connections. The way to "get in" is to exploit that software or hardware that is listening. Usually crappy code causes these problems with this software/hardware.

A very basic example:

You do a port scan and see that port 21 is open which commonly used for FTP. You then enumerate the service to try and figure out which software is running that FTP server....you determine that it is SuperCrappyFTP version 1.0 . Then, you dig around on exploit databases and find out that there is a known buffer overflow exploit for that version. The rest you can figure out on your own. But that is how a hacker would gain access through an FTP port.

Return to Tutorials

Who is online

Users browsing this forum: No registered users and 1 guest

cron
.
Powered by phpBB® Forum Software © phpBB Group.
Designed by ST Software