How To Unlock Your Computers True Potential - Use Command Prompt
This, seemingly un-useable utility is the most powerful thing on your system -- Even that expensive graphics card you purchased is nothing without the aid of this interpreter.— Martin Heeremans
Command Prompt, What Is It and What it's Used For
So, you have a PC (or laptop) right?
Have you previously had someone hack (technically crack) your system leaving you completely locked out?
Have you had someone fix your computer and all they did was input a few non-sensical commands into what looked like a black screen then presto, problem was solved?
If any of those ring true then it looks like you have seen, or been a victim of command prompt (cmd.exe) attacking/helping capabilities.
This, seemingly un-useable utility is the most powerful thing on your system -- Even that expensive graphics card you purchased is nothing without the aid of this interpreter.
Yeah, BIOS is all you have if your operating system has been deleted... Believe me, that is as basic as things can get in terms of computing fun.
Many people misinterpret (which is funny because they're using an interpreter when they say it) command prompt with old the old school DOS or MS-DOS programs.
Unfortunately, (for some to hear this, it actually hurts), CMD.EXE is an interpreter that interprets the users commands in a "shell" then prompts them to the Win32 console, giving it more capabilitis than the DOS programs that are now defunct were ever able to.
However, it still offers the same usability and features, as well as some more, plus a few extra curveballs, or quirks on the side that get thrown in with your windows command prompt.
So, what's a win32 console?... It's very much like that game console the kids have in the bedroom (the one with the obnoxious games on it they play at high volume where all they do is shoot things..)
The same way that thing interprets commands to play that game about killing things, is a similar method that your command prompt uses. And yes, the computer can kill things too. But this is not advised, nor, will I even try to teach you that.
However, for April Fools pranks and the like, I will show you how to make another computer in your house that someones connected too say some pretty funny things and then shutdown....
Although it is appropriate to mention that powershell is a more powerful command prompting tool for windows. To fully understand the basics of that "shell" you need to understand cmd.exe first, giving you the fundamentals of a command interpreters interface or "shells" commands.
By the end of this, you will be able to use CMD.EXE to run some very useful and important files, you will find out just how fun the old internet was, if we find a hacker on your system we will show you how to block their ports and find out what kind of infection it is so you can ready yourself to take action.
Where To Find WIndows Command Prompt
Click on "Start"
Type "CMD.EXE" in search bar
The Command Console Opens
Note: in all of the examples in this tutorial that use inverted commas " ", the word space, or enter, those terms and characters are not part of the command.
Computing was invented by America. Therefore code is written using the American Standards Code (ASC) where words are written in American spelling
Command Prompt (CMD.EXE) and Its Power
As said before, command prompt is an interpreter that makes changes to your operating system win32 console.
Because of this capability, you can cause a few little hiccups if you don't know the basic commands, how to use them as well as accessing a commands help section within cmd.exe.
Before any commands are taught though, we need to get you to open command prompt and then make some very simple entries so we can explain exactly what you done, what is happening so you can see the "coolness", "awesomeness" and power of computing. As well as admire what you have just done!
As said, in this tutorial we will only briefly cover the interpreters available commands, just enough to get you using the command line like a pro.
So you know what "primary language" the interpreter takes, as with all computing code, it is written in ASC which uses American spellings. e.g. Tomato, Tomatah...
So, let's begin by opening up command prompt and doing your first commands.
Open command prompt from windows by typing cmd.exe in the start menu's search panel then click enter.
Next the Command Interpreter Console, CMD.EXE opens...
Most People Call It The Hackscreen, Fear Not...
Your Command Prompt Work In Action!
Looks Much Better...
Lets Give it Some Flair.... I like Green....
Hmmmm, Command Prompt.... Pretty boring name huh?
If this is an interpreter we're going to use, it needs more then just the programs name. I mean, where's the awesome that is so me in that?
First, let's think of a name...
I like, know that I am hardcore... Terminator?... No, too generic, so not me, needs to be unique... Skull Fracture? Nope, finished that when I was 16... Ah hah, got it...Matrix Evolved... (I just made that up, pretty cool huh...)
Ok, we have a name! Now, what color should the writing on this screen be to suit its new name....
Now, we have something we want to do with the interpreter, lets do it and learn something that is cool and easy to do, modify it with the "&" attribute as well as see a help list using the "/?" (help) command line.
This will also make it easier for me to explain the command line fundamentals.
Well lets do this, lets get this thing rolling!
In the command prompt window, let's change the name of the interpreter until you close the window by either typing "exit" and hitting enter, or simply clicking the "x" that terminates every window.
With the command prompt open enter the following command.
"title" space "Matrix Evolved" Enter (remember no comma's " ", the word space or enter. Space is you pushing space-bar, enter is the same effect and comma is letting you know the written command and attribute)
Notice the windows new name!!!
Now, I know you're excited because that was pretty cool and I bet you want to show the person sitting next to you. But just sit back and we will make this look more true to its current name.
We will change the text color by using the "color" command.
The color command uses 2 digits (known as hex) to express the foreground and background color palette. Both are entered in the same command line and must be chosen from the selections available (we will discuss the help prompts in a moment for those.... I know you're excited, just wait!)
Until then we will use the one I have chosen. Enter the below command and attribute.
"color" space "02" enter.
Now go brag if ya want, but when ya get back, it's time for more learning OK!
What Happened, Revving For More I Bet!
How did you go?
No And Then!!!
The "&" Command
Ok now this important CMD.EXE attribute is the & attribute. It is used to string multiple commands and their attributes in one line.
I want you to use this attribute so you can get a bit of a grasp on what it does. So, lets use it!
Now as you have already changed the background, foreground (text basically) and interpreter name, we can use these commands and attributes you already know and add the & command.
Write the next line in command prompt.
"title" space "Matrix Terminal" space "&" space "color" space "07" enter.
Did you notice that you just performed two commands at once! (well done again!)
When used correctly, you now officially have twice the command prompting power!
But, wait up... We need that green back! (You can change the text color using the "color" command you already know)
I think, the new name should stick though!
On-wards and Code-wards
Hang On, Help Is On Its Way!
Help Using The Interpreters Called Upon In CMD.EXE
This bit of this tutorial is about getting help from someone who knows exactly how the cmd.exe interface works.
When you're stuck, and in need of desperate help with the many commands and attributes you can enter into the window, who ya gonna call?...
All the time, worldwide and with no internet connection you can call up a free help screen from the command prompt screen.
All you have to do is add the help attribute at the end of the command your not sure of. So that's the command, a space, then a forward slash and the help help icon /?.
For example, to see this enormous palette of colors available that can be displayed as the foreground/background (lol, it's tiny!) type below.
"color" space "/?"enter
As in the top right picture, all possible modifications of the attribute are displayed, as well as the command string, AKA, the way you would enter the command and its following attributes into the interpreter.
Also, never, ever forget. The help command can be used for every command you can enter into the interpreter.
The discovery of how fun and useful command prompt is will truly benefit all of mankind...— Martin Heeremans
The Process You Now Know
Starting Command Prompt in Administrator Mode
Seeing If You Have Been Hacked Using Command Prompt
This is possibly the most important feature that command prompt has to let you know that something isn't right and that you could possibly be infected. And if you are indeed infected, we will need to fix for you ASAP.
To do this we will use 2 commands.
Although there are a few other ways you could do this, we will use the netstat and netsh commands.
With the netstat command you will be able to tell for sure if someone has infected your system and is listening by looking at the services name, port number then comparing that to a known list of infected ports.
With the netsh command you will be able to block the infected ports.
First, command prompt needs to be opened in Administrator mode. Do that by right clicking on command prompt and selecting the "Administration" mode option.
Once opened type in the following command string.
"netstat" space "-a" space "-b" enter
What you will get is a long list of current devices talking with your computer. The attribute -a lists all devices on the network while -b is in regard to displaying the binary files name, or programs name on those ports.
Example IP and port number that could be listed -- 188.8.131.52:554
So you know what's what we will help you understand the whole IP address and port number.
The IP address are the first four numbers displayed 184.108.40.206. They represent a company who runs that service (eg Vodafone) as well as the actual address of that server on the internet (your browser automatically changes a typed websites URL into this same format to start a HTTP conversation)
The port number is displayed after the IP, its length can be up to 5 numbers long. The number can range anywhere form 1 to 65536. (that's right, every computer has more then 60,000 able to be used ports for communicating)
In closing, the bit of importance which we are going to check is the port number, not the IP. A virus will open up its usual ports to start its attack so it's these that we will close, taking its capabilities to communicate away.
Don't suddenly freak out thinking that you must be hacked because they're so many ports that are listening, some can't obtain ownership and some are established.
Computers are forever talking through there communication port for updates and so forth, it will always be happening.
What you should be cautious of though is a name of a program that has a random name like svcprocess or similar. If you find a name like that, google its port number and program name to see what it is. I have provided a link below which is a list of known attacked ports.
Think You're Hacked, Check Your Open Ports To See If They're Known For Infection
How To Cut Off an Attacked Ports Connection
Need To Shut Off a Port For Suspicious Activity?
Ok, so you have found a suspicious port and now you think you may need to shut it off to stop this service making requests.
For this you will need to use the netsh command.
The command is used for anything associated with the firewall or internet in terms of traffic rules, exemptions and as we are about to see, port blocking (netsh essentially means internet shutdown).
First we will close the ports that are being used and then, if you feel that closing the ports has had no effect, or if you made a mistake, we will show you how to change the port back to open, as well as reset the firewall back to the default rules/settings.
This will give you the ability to completely return the firewall back to what the values were before you started to make changes, saving you from any possible mistakes.
In the IP address shown earlier there was a port number of 554. Lets close port 554 using the following netsh command string. Enter all the following commands andattributes exactly as shown below. With all special characters included (you're so good at using command prompt now that you no longer need the extra help I gave you before!)
netsh advfirewall firewall delete rule name="Open SQL Server Port 554" protocol=tcp localport=554
To turn your suspicious port off using this string, change the port number from 554 to your suspicious port.
To open the port back up, type in the next command exactly as follows.
netsh advfirewall firewall add rule name="Open SQL Server Port 544" dir=in action=allow protocol=TCP localport=544
Now you have opened and closed a few ports, if you achieved the desired results and you have other computers connected to your local network, you will need to apply the same firewall rules to those PC's as well.
To make it easy we will use the export command to create a rule file so you can then save that new set of rules to a USB or portable drive. Then you can import them onto your other computers firewall settings from the USB or portable drive.
To export the rules to a windows firewall file, type the following command.
netsh advfirewall export "C:\temp\WFconfiguration.wfw"
To change the files stored location, change from \temp folder to \desktop and so forth. The name of the file needs to stay the same however.
Now, transfer that file to the next computer using the import command.
netsh advfirewall import "C:\folder you saved the file in\WFconfiguration.wfw"
If you make any mistakes and you're worried you have caused a big error, just change everything back to normal with the reset string as follows.
netsh advfirewall reset
The CMD.EXE Commands You Have Just Learnt
Help Menu (command space /?)
The color command modifies foreground and background colors
the title command modifies the title of the interpreter until the session is closed.
The help menu's (/?) are actually accessed using the help attribute. Although not a command, it needs to be re-iterated
Literally translates to network statistics.
Network shutdown is used to modify the firewall settings.
More Commands From Windows Technet
How To Telnet - Surfing The First Internet
For Windows 7 Users..
Telnet, Internet Old-School
The internet has come a long way hasn't it?
For most, that line is negligible as for them, the internet has always been the way it is. In fact, if anything, it's improved.
For us command based (Linux predominantly) users, that could be a bit different.
Although every OS uses telnet, there are very little public servers available to use them on so hardly anyone other then us geeks knows how to use it properly.
It is essential for the protection of your own data that you understand the telnet service. A hacker may activate your telnet service in order to have unrestricted communication with your system and give them the ability to send you any file they want.
And seeings that you have caught onto cmd.exe so well, Telnet is just another command line based thing for you to use while your new skills are blazing hot.
Even though there are very little servers available that run the telnet service, believe it or not, the entire old school internet that relied upon the telnet server and client was saved, in its entirety, and then put onto a permanent server for all public to access.
With that particular service you will get to speak to Eliza, the free online psychologist. Play old school online games, find bulletin boards and enter an IRC room (Internet Relay Chat).
But first, as I once enjoyed it and I hope you do too, I will to show you the power of ASCii code at work with the STAR WARS episode iv a new hope recaptured using the coding format.
First thing you have to do is turn your telnet service on (make sure you turn it back off when you're finished using it after all of this)
For Windows 7 users
Click on "Start"
Click on "Control Panel"
Click "Programs and Features"
Click the link in the top left hand corner named "Turn Features On or Off"
Scroll down and tick the check boxes "Telnet Client" and "Telnet server"
Once it has turned it on, from command prompt type telnet to open the telnet client.
Now the telnet client command is turned on and ready to be dusted off for its first use, it's time to crack your knuckles and get them ready for some work.
Telnet, Internet Old-School— Martin Heeremans
Have You Used Telnet Before
Did you ever surf the net back in the day?
Star Wars, In Code Style!
To Exit From Telnet Use the Escape Character
Using The Telnet Command Line
The same way we entered commands with the cmd.exe interpreter earlier, is the same way we enter commands into the telnet command line.
I don't mean that they're the same command terms, they just have a similar pattern of how you will use them.
The first commands we will use will be the O command. This is used to "open" a connection port so we can enter a hosts URL or I.P. address.
Then we will enter our first host that we will use as a demonstration. As promised, I'm going to show you STAR WARS episode iv using ASCii animation!
So let's connect to the internet!
Type in the commands exactly as below.
After you enter the final command, notice the window is now playing STAR WARS!
To exit the asciimation at any time, push both the ctr key and the ] key at the same time.
The ] symbol is located in the above picture.
Eliza, The TeleHack PsychoTherapist (I think)
How Cool Was Star Wars In ASCII Format?? Time For Therapy, and a Joke!
Now if you watched until the end and was happy with that then we have a whole other bag of stuff here with your name on it!
Now, remember I mentioned Eliza the online therapist (or Psychologist) and a joke? I reckon we have a session with her and then a have a laugh.
Eliza is a good one for the first example because she uses the telehack server just as the joke server does (hack in this instance means improve. That's the original meaning to the word hack anyway, to improve upon something).
So together this will get you onto the original, preserved internet and using its most basic parts, for now.
To speak to eliza, we have to access the original telehack server. To do this, as before, at the Telnet screen, we will connect to the host using the "o" command.
To connect to the telehack server, type the following commands.
The client will then connect you to the server and you will see the main screen we all used to see back in the day.
To talk to eliza enter the following command.
After you hit enter, eliza starts talking... Enjoy your conversation with her!
To exit your therapy session, at anytime press the ctrl key and the letter c at the same time. This escape character disconnects you from the host only, not the server as the previous escape character did.
Now you have met eliza, it's time for a joke.
You connect to the joke server the same way you connected to eliza. Type the joke command as follows.
after pressing enter you will be shown a random joke from back in the day... Really funny stuff sometimes!
Your Telnet Commands and Escape Character
"ctr" + "]"
"ctrl" + "c"
Shows a help list for the command your in
Opens a port to connect to a host
The telehack server Psychotherapist
Get a spot of comedy if you get bored
creates a new user account
Terminates connection to host
Terminates connection to server
Lets you log into your account.
Opens up a chat window with a user
Opens a link window with a user - You will see everything the linked user does and vice versa
Typing unlink and the users name takes away there ability to link with you
Create a User Account
Creating a User Account to Use the Server
This is pretty cool, telnet, being the first ever internet, and designed for communication was designed with things like email, chatrooms and games.
Being that Telnet was the first internet service things will look quite different. There functionality is very much the same (actually telnet is completely unrestricted unlike SSH protocol) and the features they offer are almost identical.
To use Eliza and some other aspects of the telehack server you don't need to have an account.
But other features like email will require you to create an account.
After you create an account you then are logged in as the user profile you just created, letting you use the servers features.
To create and login to an account, we will use the newuser command. Type the following.
After typing new user you are asked to accept the terms. You don't have to read the policies but you do have to be over 13 years old.
now that you have created and logged into a new user account, typing the finger command gives you a list of active users and there last activity. My name is marty86, if you find me in the finger list, you can open up a chatroom with me or send me an email.
To open up a chat window, use the talk command as follows.
Next, the chatroom window opens. To exit the chatroom, use the host escape character, not the server escape character. This will keep you logged into telehack, but not cut our connection.
Want a private conversation or want to see what I am doing from my screen?? Use the link command instead of talk and i'll show you.
How To Send An Email
Sending Email With the Email Client
Now this is the most oldest form of email you have most probably ever seen, and if you haven't ever used an email client like this, it can be very a confusing, and frustrating experience.
But guess what, I'm here to help! In fact, don't be afraid to say hi to me so I can show you some cool old school games to play that will keep you busy for hours!
Before I show you how to get into your email, I need you to notice that when you type at the moment, you're into the @ prompt screen.
This is considered as your home screen. You need to be back at this home screen to do another command that uses a different function. To get back to there type quit.
When we go into the mail client, we will be at the "&" prompt screen.
Type the following commands to get to your inbox.
That's it! Now you're at your inbox. You should have got a delivery from the postmaster, you can read it from here by pressing the number next to the email.
Let's send your first email.
At your mailbox type.
Next you have to type the person to send it to. Remember my username? Msg me if you like or exit the mail prompt and type finger to see who is online to choose to send an email too
Navigating Email Commands and Prompt Screens
The "@" Prompt Screen
The "&" prompt screen
"ctr" + "d"
The home screen
Another prompter, not the homescreen
Opens an email in send function
Sends the email
List of all your emails
Deletes an email
How Did You Go?
Did you end up surfing the internet 1980's style and get to use cmd.exe
Wow, that was huge wasn't it? I hope you had fun and learned a few cool tricks along the way.
Just remember, after using telnet, close the telnet client and telnet service from the turn windows features on or off menu.
If you have any questions just type them in the comments capsule, or better yet, Telnet me.