How to Get a *Good* Shell Account

GUIDE TO (mostly) HARMLESS HACKING 

Beginners' Series #3 Part 1 

How to Get a *Good* Shell Account  
 
In this Guide you will learn how to: 
· tell whether you may already have a Unix shell account  
· get a shell account  
· log on to your shell account  
____________________________________________________________ 


You've fixed up your Windows box to boot up with a lurid hacker logo. You've renamed "Recycle Bin"
"Hidden Haxor Secrets." When you run Netscape or Internet Explorer, instead of that boring corporate logo,
you have a full-color animated Mozilla destroying New York City. Now your friends and neighbors are
terrified and impressed. 

But in your heart of hearts you know Windows is scorned by elite hackers. You keep on seeing their hairy
exploit programs and almost every one of them requires the Unix operating system. You realize that when it
comes to messing with computer networks, Unix is the most powerful operating system on the planet. You
have developed a burning desire to become one of those Unix wizards yourself. Yes, you're ready for the
next step. 

You're ready for a shell account. SHELL ACCOUNT!!!! 
  
***************************************************** 
Newbie note: A shell account allows you to use your home computer as a terminal on which you can give
commands to a computer running Unix. The "shell" is the program that translates your keystrokes into Unix
commands. With the right shell account you can enjoy the use of a far more powerful workstation  than you
could ever dream of affording to own yourself. It also is a great stepping stone to the day when you will be
running some form of Unix on your home computer. 
***************************************************** 
  
Once upon a time the most common way to get on the Internet was through a Unix shell account. But
nowadays everybody and his brother are on the Internet. Almost all these swarms of surfers want just two
things: the Web, and email. To get the pretty pictures of today's Web, the average Internet consumer wants
a mere PPP (point to point) connection account. They wouldn't know a Unix command if it hit them in the
snoot. So nowadays almost the only people who want shell accounts are us wannabe hackers. 

The problem is that you used to be able to simply phone an ISP, say "I'd like a shell account," and they
would give it to you just like that. But nowadays, especially if you sound like a teenage male, you'll run into
something like this: 

ISP guy: "You want a shell account? What for?"  

Hacker dude: "Um, well, I like Unix."  

"Like Unix, huh? You're  a hacker, aren't you!" Slam, ISP guy hangs up on you. 
 So how do you get a shell account? Actually, it's possible you may already have one and not know it. So
first we will answer the question, how do you tell whether you may already have a shell account? Then, if
you are certain you don't have one, we'll explore the many ways you can get one, no matter what, from
anywhere in the world. 

How Do I Know Whether I Already Have a Shell Account?  

First you need to get a program running that will connect you to a shell account. There are two programs
with Windows 95 that will do this, as well as many other programs, some of which are excellent and free. 

First we will show you how to use the Win 95 Telnet program because you already have it and it will always
work. But it's a really limited program, so I suggest   that you use it only if you can't get the Hyperterminal
program to work. 

1) Find your Telnet program and make a shortcut to it on your desktop. 
· One way is to click Start, then Programs, then Windows Explorer. 
· When Explorer is running, first resize it so it doesn't cover the entire desktop. 
· Then click Tools, then Find, then "Files or Folders." 
· Ask it to search for "Telnet."  
· It will show a file labeled C:\windows\telnet (instead of C: \ it may have another drive). Right click on this
file. 
· This will bring up a menu that includes the option "create shortcut."   Click on "create shortcut" and then
drag the shortcut to the desktop and drop it. 
· Close Windows Explorer. 

2) Depending on how your system is configured, there are two ways to connect to the Internet. The easy
way is to skip to step three. But if it fails, go back to this step. Start up whatever program you use to access
the Internet. Once you are connected, minimize the program. Now try step three. 

3) Bring up your Telnet program by double clicking on the shortcut you just made. 
· First you need to configure Telnet so it actually is usable. On the toolbar click "terminal," then
"preferences," then "fonts."  Choose "Courier New," "regular" and 8 point size. You do this because if you
have too big a font, the Telnet program is shown on the screen so big that the cursor from your shell
program can end up being hidden off the screen.  OK, OK, you can pick other fonts, but make sure that 
when you close the dialog box that the Telnet program window is entirely visible on the screen. Now why
would there be options that make Telnet impossible to use? Ask Microsoft.  
· Now go back to the task bar to click Connect, then under it click "Remote system." This brings up another
dialog box. 
· Under "host name" in this box   type in the last two parts of your email address. For examp le, if your email
address is jane_doe@boring.ISP.com, type "ISP.com" for host name. 
· Under "port" in this box, leave it the way it is, reading "telnet." 
· Under "terminal type," in this box, choose "VT100."  
· Then click the Connect button and wait to see what happens. 
· If the connection fails, try entering the last three parts of your email address as the host, in this case
"boring.ISP.com." 
  
Now if you have a shell account you should next get a message asking you to login. It may look something
like this: 

Welcome to Boring Internet Services, Ltd. 

Boring.com S9 -  login: cmeinel 
Password: 
Linux 2.0.0.  Last login: Thu Apr 10 14:02:00 on ttyp5 from pm20.kitty.net. 
sleepy:~$ 

If you get something like this you are in definite luck. The important thing here, however, is that the
computer used the word "login" to get you started. If is asked for anything else, for example "logon," this is
not a shell account. 

As soon as you login, in the case of Boring Internet Services you have a Unix shell prompt on your screen.
But instead of something this simple you may get something like: 

BSDI BSD/OS 2.1 (escape.com) (ttyrf) 

login: galfina 
Password: 
Last login: Thu Apr 10 16:11:37 from fubar.net 

                   ___________________  ______  ______________ 
             ___ /    ___/   ___/      \/      \/  __  /   ___/ 
          _____ /    ___/\__   /   /__/   /   /  /___/   ___/ 
        _______ /     /  /   /   /   /  /       /  /   /   /   / 
    _________  \_____/ \_____/\_____/\__/___/\_/    \_____/  .com 
                              [ ESCAPE.COM ] 

__________________________________________________________________ 

PLEASE NOTE: 

        Multiple Logins and Simultaneous Dialups From Different Locations Are  
_NOT_ Permitted at Escape Internet Access.  
__________________________________________________________________ 

Enter your terminal type, RETURN for vt100, ? for list: 

Setting terminal type to vt100. 
Erase is backspace. 
  

                                      MAIN 
                                Escape Main Menu  
----[05:45PM] ----------------------------------------------------- 

 ==> H) HELP       Help & Tips for the Escape Interface. (M) 
     I) INTERNET   Internet Access & Resources (M) 
     U) USENETM    Usenet Conferences (Internet Distribution) (M) 
     L) LTALK      Escape Local Communications Center (M) 
     B) BULLETINS  Information on Escape, Upgrades, coming events. (M) 
     M) MAIL        Escape World Wide and Local Post Office (M)  
     F) HOME        Your Home Directory (Where all your files end up) 
     C) CONFIG     Config your user and system options  (M) 
     S) SHELL      The Shell (Unix Environment) [TCSH] 
     X) LOGOUT     Leave System 

     BACK      MAIN      HOME      MBOX      ITALK     LOGOUT   
----[Mesg: Y]------------ [ TAB key toggles menus ]-------[Connected:   0:00]---  
CMD> 

In this case you aren't in a shell yet, but you can see an option on the menu to get to a shell. So hooray, you
are in luck, you have a shell account. Just enter "S" and you're in. 

Now depending on the ISP you try out, there may be all sorts of different menus, all designed to keep the
user from having to ever stumble across the shell itself. But if you have a shell account, you will probably
find the word "shell" somewhere on the menu. 

If you don't get something obvious like this, you may have to do the single most humiliating thing a
wannabe hacker will ever do. Call tech support and ask whether you have a shell account and, if so,   how to
login. It may be that they just want to make it really, really hard for you to find your shell account. 

Now personally I don't care for the Win 95 Telnet program. Fortunately there are many other ways to check
whether you have a shell account. Here's how to use the Hyperterminal program, which, like Telnet, comes
free with the Windows 95 operating system. This requires a different kind of connection. Instead of a PPP
connection we will do a simple phone dialup, the same sort of connection you use to get on most computer
bulletin board systems  (BBS). 

1) First, find the program Hyperteminal and make a shortcut to your desktop. This one is easy to find. Just
click Start, then Programs, then Accessories. You'll find Hyperterminal on the accessories menu. Clicking on
it will bring up a window with a bunch of icons. Click on the one labeled "hyperterminal.exe."  

2) This brings up a dialog box called "New Connection." Enter the name of your local dialup, then in the next
dialog box enter the phone dialup number of your ISP. 

3) Make a shortcut to your desktop. 

4) Use Hyperterminal to dial your ISP. Note that in this case you are making a direct phone call to your shell
account rather than trying to reach it through a PPP connection. 

Now when you dial your ISP from Hyperterminal you might get a bunch of really weird garbage scrolling
down your screen. But don't give up. What is happening is your ISP is trying to set up a PPP connection
with Hyperterminal. That is the kind of connection you need in order to get pretty pictures on the Web. But
Hyperterminal doesn't understand PPP. Unfortunately I've have not been able to figure out why this
happens sometimes or how to stop it. But the good side of this picture is that the problem may go away the
next time you use Hyperterminal to connect to your ISP. So if you dial again you may get a login sequence.
I've found it often helps to wait a few days and try again. Of course you can complain to tech support at
your ISP. But it is likely that they won't have a clue on what causes their end of things to try  to set up a PPP
session with your Hyperterminal connection. Sigh. 

But if all goes well, you will be able to log in. In fact, except for the PPP attempt problem, I like the
Hyperterminal program much better than Win 95 Telnet. So if you can get this one to work, try it out for
awhile. See if you like it, too. 

There are a number of other terminal programs that are really good for connecting to your shell account.
They include Qmodem, Quarterdeck Internet Suite, and Bitcom. Jericho recommends Ewan, a telnet program
which also runs on Windows 95. Ewan is free, and has many more features than either Hyperterminal or Win
95 Telnet. You may download it from jericho's ftp site at sekurity.org in the /utils directory. 

OK, let's say you have logged into your ISP with your favorite program. But perhaps it still isn't clear
whether you have a shell account. Here's your next test. At what you hope is your shell prompt, give the command "ls -alF." If you have a real, honest- to-goodness shell account, you should get something like
this: 
> ls -alF 
total 87 
drwx--x--x     5 galfina  user     1024 Apr 22 21:45 ./  
drwxr-xr-x   380 root     wheel    6656 Apr 22 18:15 ../  
-rw- r--r--    1 galfina  user    2793 Apr 22 17:36 .README 
-rw- r--r--    1 galfina  user     635 Apr 22 17:36 .Xmodmap  
-rw- r--r--    1 galfina  user     624 Apr 22 17:36 .Xmodmap.USKBD  
-rw- r--r--    1 galfina  user     808 Apr 22 17:36 .Xresources  
drwx--x--x     2 galfina  user      512 Apr 22 17:36 www/  
etc. 

This is the listing of the files and directories of your home directory. Your shell account may give you a
different set of  directories and files than this (which is only a partial listing). In any case, if you see
anything that looks even a little bit like this, congratulations, you already have a shell account! 

******************************************************* 
Newbie note: The first item in that bunch of dashes and letters in front of the file name tells you what kind of
file it is.   "d" means it is a directory, and "-" means it is a fi le. The rest are the permissions your files have.
"r" = read permission, "w" = write permission, and "x" = execute permission (no, "execute" has nothing to
do with murdering files, it means you have permission to run the program that is in this file). If t here is a
dash, it means there is no permission there. 

The symbols in the second, third and fourth place from the left are the permissions that you have as a user,
the following three are the permissions everyone in your designated group has, and the final three are the
permissions anyone and everyone may have. For example, in galfina's directory the subdirectory "www/" is
something you may read, write and execute, while everyone else may only execute. This is the directory
where you can put your Web page. The entire world may browse ("execute") your Web page. But only you
can read and write to it. 

If you were to someday discover your permissions looking like:  

 drwx--xrwx  newbie user     512 Apr 22 17:36 www/  

Whoa, that "w" in the third place from last would mean anyone with an account from outside your ISP can
hack your Web page! 
****************************************************** 

Another command that will tell you whether you have a shell account is "man." This gives you an online
Unix manual . Usually you have to give the man command in the form of  "man <command>" where
<command> is the name of the Unix command you want to study.  For example, if you want to know all the
different ways to use the "ls" command, type "man ls" at the prompt. 

On the other hand, here is an example of something that, even though it is on a Unix system, is not a shell
account: 

BSDI BSD/386 1.1 (dub-gw-2.compuserve.com) (ttyp7) 

Connected to CompuServe  

Host Name: cis  
 Enter choice (LOGON, HELP, OFF): 

The immediate tip-off that this is not a shell account is that it asks you to "logon" instead of "login:" 
  




How to Get a Shell Account 
  

What if you are certain that you don't already have a shell account? How do you find an ISP that will give
you one? 

The obvious place to start is your phone book. Unless you live in a really rural area or in a country where
there are few ISPs, there should be a number of companies to choose from. 

So here's your problem. You phone Boring ISP, Inc. and say, "I'd like a shell account." But Joe Dummy on
the other end of the phone says, "Shell? What's a shell account?"  You say "I want a shell account. SHELL
ACCOUNT!!!" He says, "Duh?" You say "Shell account. SHELL ACCOUNT!!!" He says, "Um, er, let me talk
to my supervisor." Mr. Uptight Supervisor gets on the phone. "We don't give out shell accounts, you dirty
&%$*# hacker." 

Or, worse yet, they claim the Internet access account they are giving you a shell account but you discover it
isn't one.  

To avoid this embarrassing scene, avoid calling big name ISPs. I can guarantee you, America Online,
Compuserve and Microsoft Network don't give out shell accounts. 

What you want to find is the seediest, tiniest ISP in town. The one that specializes in pasty-faced customers
who stay  up all night playing MOOs and MUDs. Guys who impersonate grrrls on IRC. Now that is not to
say that MUD and IRC people are typically hackers. But these definitely are your serious Internet addicts.
An ISP that caters to people like that probably also understands the kind of person who wants to learn Unix
inside and out.  

So you phone or email one of these ISPs on the back roads of the Net and say, "Greetings, d00d! I am an evil
haxor and demand a shell account pronto!"  

No, no, no!  Chances are you got the owner of this tiny ISP on the other end of the line. He's probably a
hacker himself. Guess what? He loves to hack but he doesn't want hackers (or wannabe hackers) for
customers. He doesn't want a customer who's going to be attracting email bombers and wa ging hacker war
and drawing complaints from the sysadmins on whom this deadly dude has been testing exploit code. 

So what you do is say something like "Say, do you offer shell accounts? I really, really like to browse the
Web with lynx. I hate waiting five hours for all those pretty pictures and Java applets to load. And I like to
do email with Pine. For newsgroups, I luuuv tin!"  

Start out like this and the owner of this tiny ISP may say something like, "Wow, dude, I know what you
mean. IE and Netscape really s***! Lynx uber alles! What user name would you like?"  

At this point, ask the owner for a guest account. As you will learn below, some shell accounts are so
restricted that they are almost worthless. 

But let's say you can't find any ISP within reach of a local phone call that will give you a shell account. Or
the only shell account you can get is worthless. Or you are well known as a malicious hacker and you've
been kicked off every ISP in town. What can you do?  
 Your best option is to get an account on some distant ISP, perhaps even in another country.  Also, the few
medium size ISPs that offer shell accounts (for example, Netcom) may even have a local dialup number for
you. But if they don't have local dialups,  you can still access a shell account located *anywhere* in the
world by setting up a PPP connection with your local dialup ISP, and then accessing your shell account
using a telnet program on your home computer. 

************************************************* 
Evil Genius Tip: Sure, you can telnet into your shell account from another ISP account. But unless you have
software that allows you to send your password in an encrypted form, someone may sniff your password
and break into your account. If you get to be well known in the hacker  world, lots of other hackers will
constantly be making fun of you by sniffing your password. Unfortunately, almost all shell accounts are set
up so you must expose your password to anyone who has hidden a sniffer anywhere between the ISP that
provides your PPP connection and your shell account ISP. 

One solution is to insist on a shell account provider that runs ssh (secure shell). 
************************************************** 

So where can you find these ISPs that will give you shell accounts? One good source is
http://www.celestin.com/pocia/. It provides links to Internet Service Providers categorized by geographic
region. They even have links to allow you to sign up with ISPs serving the Lesser Antilles! 

*********************************************** 
Evil Genius tip: Computer criminals and malicious hackers will often get a guest account on a distant ISP and
do their dirty work during the few hours this guest account is available to them. Since this practice provides
the opportunity to cause so much harm, eventually it may become really hard to get a test run on a guest
account. 
*********************************************** 

But if you want to find a good shell account the hacker way, here's what you do.   Start with a list of your
favorite hacker Web sites. For example, let's try http://ra.nilenet.com/~mjl/hacks/codez.htm. 

You take the beginning part of the URL (Uniform Resource Locator) as your starting point. In this case it is
"http://ra.nilenet.com." Try surfing to that URL. In many cases it will be the home page for that ISP. It
should have instructions for how to sign up for a shell account. In the case of Nile Net we strike hacker
gold: 

 Dial-up Accounts and Pricing  

                        NEXUS Accounts  

NEXUS Accounts include: Access to a UNIX Shell, full 
Internet access, Usenet newsgroups, 5mb of FTP and/or 
WWW storage space, and unlimited time. 
One Time Activation Fee: $20.00 
Monthly Service Fee: $19.95 or 
Yearly Service Fee: $199.95  

Plus which they make a big deal over freedom of online speech. And they host a great hacker page full of
these Guides to (mostly) Harmless Hacking! 

How to Login to Your Shell Account  

Now we assume you finally have a guest shell account and are ready to test drive it. So now we need to
figure out how to login. Now all you hacker geniuses reading this, why don't you just forget to flame me for
telling people how to do something as simple as how to login. Please remember that everyone has a first
login. If you have never used Unix, this first time can be intimidating. In any case, if you are a Unix genius
you have no business reading this Beginners' Guide. So if you are snooping around here looking for
flamebait, send your flames to /dev/null. 

*********************************************************** 
Newbie note: "Flames" are insulting, obnoxious rantings and ravings done by people who are severely
lacking in social skills and are a bunch of &$%@#!! but who think they are brilliant computer savants. For
example, this newbie note is my flame against &$%@#!! flamers. 
 "/dev/null" stands for "device null." It is a file name in a Unix operating system. Any data that is sent to
/dev/null is discarded. So when someone says they will put something in "/dev/null" that means they are
sending it into permanent oblivion. 
*********************************************************** 

The first thing you need to know in order to get into your shell account is your user name and password.
You need to get that information from the ISP that has just signed you up. The second thing you need to
remember is that Unix is "case sensitive." That means if your login name is "JoeSchmoe" the shell will think
"joeschmoe" is a different person than "JoeSchmoe" or "JOESCHMOE."  

OK, so you have just connected to your shell account for the first time. You may see all sorts of different
stuff on that first screen. But the one thing you will always see is the prompt: 

 login: 

Here you will type in your user name. 

In response you will always be asked : 

 Password: 

Here you type in your password.  

After this you will get some sort of a prompt. It may be a simple as: 

 % 

or 
 $ 

or 

 > 

Or as complicated as:  

 sleepy:~$ 

Or it may even be some sort of complicated menu where you have to choose a "shell" option before you get
to the shell prompt. 

Or it may be a simple as: 

 #  
********************************************************** 
Newbie note: The prompt "#" usually means you have the superuser powers of  a "root" account. The Unix
superuser has the power to do *anything* to the computer. But you won't see this   prompt unless either the
systems administrator has been really careless -- or someone is playing a joke on you. Sometimes a hacker
thinks he or she has broken into the superuser account because  of seeing the "#" prompt. But sometimes
this is just a trick the sysadmin is playing. So the hacker goes playing around in what he or she thinks is the
root account while the sysadmin and his friends and the police are all laughing at the hacker. 
********************************************************** 

Ready to start hacking from your shell account? Watch out, it may be so crippled that it is worthless for
hacking. Or, it may be pretty good, but you might inadvertently do something to get you kicked off. To
avoid these fates, be sure to read Beginners' Series #3 Part 2 of How to Get a *Good* Shell Account, coming
out tomorrow. 

In that GTMHH section you will learn how to: 

· explore your shell account 
· decide whether your shell account is any good  for hacking  
· keep from losing your shell account  
  

In case you were wondering about all the input from jericho in this Guide, yes, he was quite helpful in
reviewing it and making suggestions. Jericho is a security consultant runs his own Internet host,
obscure.sekurity.org. Thank you, jericho@dimensional.com, and happy hacking! 


GUIDE TO (mostly) HARMLESS HACKING 

Beginners' Series #3 Part 2 

How to Get a *Good* Shell Account  
____________________________________________________________ 
  

____________________________________________________________ 
In this section you will learn: 

· how to explore your shell account  
· Ten Meinel Hall of Fame Shell Account Exploration Tools  
· how to decide whether your shell account is any good for hacking  
· Ten Meinel Hall of Fame LAN and Internet Exploration Tools  
· Meinel Hall of Infamy Top Five Ways to Get Kicked out of Your Shell Account  
____________________________________________________________ 
  

How to Explore Your Shell Account  
  

So you're in your shell account. You've tried the "ls  -alF" command and are pretty sure this really, truly is a
shell account. What do you do next?  

A good place to start is to find out what kind of shell you have. There are many shells, each of which has
slightly different ways of working. To do this, at your prompt give the command "echo $SHELL." Be sure to type in the same lower case and upper case letters. If you were to give the command "ECHO $shell," for
example, this command won't work. 

If you get the response: 

 /bin/sh 

That means you have the Bourne shell.  

If you get: 

 /bin/bash 

Then you are in the Bourne Again (bash) shell. 

If you get: 

 /bin/ksh  

You have the Korn shell. 

If the "echo $SHELL" command doesn't work, try the command "echo $shell ," remembering to use lower
case for "shell."  This will likely get you the answer: 

 /bin/csh  

This means you have the C shell.  

Why is it important to know which shell you have? For right now, you'll want a shell that is easy to use. For
example, when you make a mistake in typing, it's nice to hit the backspace key and not see ^H^H^H on your
screen. Later, though, for running those super hacker exploits, the C shell may be better for you. 

Fortunately, you may not be stuck with whatever shell you have when you log in. If your shell account is
any good, you will have a choice of shells. 
Trust me, if you are a beginner, you will find bash to be the easiest shell to use. You may be able to get the
bash shell by simply typing the word "bash" at the prompt. If this doesn't work, ask tech support at your
ISP for a shell account set up to use bash. A great book on using the bash shell is _Learning the Bash
Shell_, by Cameron Newham and Bill Rosenblatt, published by O'Reilly. 

If you want to find out what other shells you have the right to use, try "csh" to get the C shell; "ksh" to get
the Korn shell, "sh" for Bourne shell, "tcsh" for the Tcsh shell, and "zsh" for the Zsh shell. If you don't
have one of them, when you give the command to get into that shell you will get back the answer "command
not found." 

Now that you have chosen your shell, the next thing is to explore. See what riches your ISP has allowed you
to use. For that you will want to learn, and I mean *really learn* your most important Unix commands and
auxiliary programs. Because I am supreme arbiter of what goes into these Guides, I get to decide what the
most important commands are. Hmm, "ten" sounds like a famous number. So you're going to get the: 

Ten Meinel Hall of Fame Shell Account Exploration Tools 

1) man <command name>  This magic command brings up the online Unix manual.  Use it on each of the commands below, today!
Wonder what all the man command options are? Try the "man  -k" option. 

2) ls 
Lists files. Jericho suggests "Get people in the habit of using "ls -alF". This will come into play down 
the road for security-conscious users." You'll see a huge list of files that you can't see with the "ls"
command alone, and lots of details. If you see such a long list of files that they scroll off the terminal screen,
one way to solve the problem is to use "ls  -alF|more." 

3) pwd 
Shows what directory you are in.  

4) cd <directory> 
Changes directories.  Kewl directories to check out include /usr, /bin and /etc.   For laughs, jericho suggests
exploring in /tmp. 

5) more <filename> 
This shows the contents of text files. Also you might be able to find "less" and "cat" which are similar
commands. 

6) whereis <program name> 
Think there might be a nifty program hidden somewhere?   Maybe a game you love? This will find it for you.
Similar commands are "find" and "locate." Try them all for extra fun. 

7) vi 
An editing program. You'll need it to make your own files and when you start programming while in your
shell account. You can use it to write a really lurid file for people to read when they finger you. Or try
"emacs." It's another editing program and IMHO more fun than vi. Other editing programs you may find
include "ed" (an ancient editing program which I have used to write thousands of l ines of Fortran 77 code),
"ex," "fmt," "gmacs," "gnuemacs," and "pico."  

8) grep 
Extracts information from files, especially useful for seeing what's in syslog and shell log files. Similar
commands are "egrep," "fgrep," and "look."  

9) chmod <filename> 
Change file permissions. 

10) rm <filename> 
Delete file. If you have this command you should also find "cp" for copy file, and "mv" for move file. 
  

How to Tell Whether Your Shell Account Is any Good for Hacking  
  

Alas, not all shell accounts are created equal.   Your ISP may have decided to cripple your budding hacker
career by   forbidding your access to important tools. But you absolutely must have access to the top ten
tools listed above. In addition, you will need tools to explore both your ISP's local area network (LAN) and
the Internet. So in the spirit of being Supreme Arbiter of Haxor Kewl, here are my: 

Ten Meinel Hall of Fame LAN and Internet Exploration Tools  

1) telnet <hostname> <port number or name>   If your shell account won't let you telnet into any port you want either on its LAN or the Internet, you are
totally crippled as a hacker. Dump your ISP now! 

2) who 
Shows you who else is currently logged in on your ISP's LAN. Other good commands to explore the other
users on your LAN ar e "w," "rwho, " "users." 

3) netstat 
All sorts of statistics on your LAN, including all Internet connections. For real fun, try "netstat  -r" to see the
kernel routing table. However, jericho warns "Be careful. I was teaching a friend the basics of summin g up a
Unix system and I told her to do that and 'ifconfig'. She was booted off the system  
the next day for 'hacker suspicion' even though both are legitimate commands for users." 

4) whois <hostname> 
Get lots of information on Internet hosts outside you LAN. 

5) nslookup 
Get a whole bunch more information on other Internet hosts. 

6) dig 
Even more info on other Internet hosts. Nslookup and dig are not redundant. Try to get a shell account that
lets you use both. 

7) finger 
Not only can you use finger inside your LAN. It will sometimes get you valuable informa> 


------------------------------------------------------------------------

Transfer interrupted!

sts. 

8) ping 
Find out if a distant computer is alive and run diagnostic tests  --  or just plain be a meanie and clobber people
with pings. (I strongly advise *against* using ping to annoy or harm others.) 

9) traceroute 
Kind of like ping with attitude. Maps Internet connections, reveals routers and boxes running firewalls. 

10) ftp  
Use it  to upload and download files to and from other computers. 

If you have all these tools, you're in great shape to begin your hacking career. Stay with your ISP. Treat it
well. 

Once you get your shell account, you will probably want to supplement the "man" command with a good
Unix book . Jericho recommends _Unix in a Nutshell_ published by O'Reilly. "It is the ultimate Unix
command reference, and only costs 10 bucks. O'Reilly r00lz."  

How to Keep from Losing Your Shell Account 
 So now you have a hacker's dream, an account on a powerful computer running Unix. How do you keep this
dream account? If you are a hacker, that is not so easy. The problem is that you have no right to keep that
account. You can be kicked off for suspicion of being a bad guy, or even if you become inconvenient, at the
whim of the owners. 

Meinel Hall 'O Infamy 
Top Five Ways to Get Kicked out of Your Shell Account  

1) Abusing Your ISP 
Let's say you are reading Bugtraq and you see some code for a new way to break into a computer. Panting
with excitement, you run emacs and paste in the code. You fix up the purposely crippled stuff someone put
in to keep total idiots from running it. You tweak it until it runs under your flavor of Unix. You compile and
run the program against your own ISP. It works! You are looking at that "#" prompt and jumping up and
down yelling "I got root! I got root!" You have lost your hacker virginity, you brilliant dude, you!  Only,
next time you go to log in, your password doesn't work. You have been booted off your ISP. NEVER, NEVER
ABUSE YOUR ISP! 

*********************************************************  
You can go to jail warning: Of course, if you want to break into another computer, you must have the
permission of the owner. Otherwise you are breaking the law. 
*********************************************************  

2) Ping Abuse.  
Another temptation is to use the powerful Internet connection of your shell account (usually a T1 or T3) to
ping the crap out of the people you don't like. This is especially common on Internet Relay Chat. Thinking of
ICBMing or nuking that dork? Resist the temptation to abuse ping or any other Internet Control Message
Protocol attacks. Use ping only as a diagnostic tool, OK? Please? Or else! 

3) Excessive Port Surfing  
Port surfing is telnetting to a specific port on another computer. Usually you are OK if you just briefly visit
another computer via telnet, and don't go any further than what that port offers to the casual visitor. But if
you keep on probing and playing with another computer, the sysadmin at the target computer will probably
email your sysadmin records of your little visits. (These records of port visits are stored in "messages," and
sometimes in "syslog" depending on the configuration of your target computer -- and assuming it is a Unix
system.) 

Even if no one complains about you, some sysadmins habitually check the shell log files that keep a record
of everything you or any other user on the system has been doing in their shells. If your sysadmin sees a
pattern of excessive attention to one or a few computers, he or she may assume you are plotting a break-in.
Boom, your password is dead. 

4) Running Suspicious Programs  
If you run a program whose primary use is as a tool to commit computer crime, you are likely to get kicked
off your ISP. For example, many ISPs have a monitoring system that detects the use of the program
SATAN.   Run SATAN from your shell account and you are history. 
  

********************************************************** 
Newbie note: SATAN stands for Security Administration Tool for Analyzing Networks. It basically works
by telnetting to one port after another of the victim computer. It determines what program (daemon) is
running on each port, and figures out whether that daemon has a vulnerability that can be used to break into
that computer. SATAN can be used by a sysadmin to figure out how to make his or her computer safe. Or it
may be just as easily used by a computer criminal to break into someone else's computer. 
***********************************************************    

5) Storing Suspicious Programs  
It's nice to think that the owners of your ISP mind their own business. But they don't. They snoop in the
directories of their users. They laugh at your email. OK, maybe they are really high-minded and resist the
temptation to snoop in your email. But chances are high that they will snoop in your shell log files that
record every keystroke you make while in your shell account. If they don't like what they see, next they will
be prowling your program files. 

One solution to this problem is to give your evil hacker tools innocuous names. For example, you could
rename SATAN to ANGEL. But your sysdamin may try running your programs to see what they do. If any
of your programs  turn out to be commonly used to commit computer crimes, you are history. 

Wait, wait, you are saying. Why get a shell account if I can get kicked out even for legal, innocuous
hacking? After all, SATAN is legal to use. In fact, you can learn lots of neat stuff with SATAN. Most hacker
tools, even if they are primarily used to commit crimes, are also educational. Certainly if you want to become
a sysadmin someday you will need to learn how these programs work. 

Sigh, you may as well learn the truth. Shell accounts are kind of like hacker training wheels. They are OK for
beginner stuff. But to become a serious hacker, you either need to find an ISP run by hackers who will
accept you and let you do all sorts of suspicious things right under their nose. Yeah, sure. Or you can install
some form of Unix on your home computer. But that's another Guide to (mostly)  Harmless Hacking (Vol. 2
Number 2: Linux!). 
  
If you have Unix on your home computer and use a PPP connection to get into the Internet, your ISP is
much less likely to snoop on you. Or try making friends with your sysadmin and explaining what you are
doing. Who knows, you may end up working for your ISP! 

In the meantime, you can use your shell account to practice just about anything Unixy that won't make your
sysadmin go ballistic. 

************************************************************ 
Would you like a shell account that runs industrial strength Linux -- with no commands censored? Want to
be able to look at the router tables, port surf all.net, and keep SATAN in your home directory without
getting kicked out for suspicion of hacking? Do you want to be able to telnet in on ssh (secure shell)so no
one can sniff your password? Are you willing to pay $30 per month for unlimited access to this hacke r
playground? How about a seven day free trial account? Email haxorshell@techbroker.com for details. 
************************************************************ 

In case you were wondering about all the input from jericho in this Guide, yes, he was quite helpful in
reviewing this and making suggestions. Jericho is a security consultant and also runs his own Internet host,
obscure.sekurity.org. Thank you, jericho@dimensional.com, and happy hacking! 

_________________________________________________________  
Subscribe to our discussion list by emailing to hacker@techbroker.com with message "subscribe"  
Want to share some kewl stuph with the Happy Hacker list? Correct mistakes? Send your messages to
hacker@techbroker.com.   To send me confidential email (please, no discussions of illegal activities) use
cmeinel@techbroker.com and be sure to state in your message that you want me to keep this confidential. If
you wish your message posted anonymously, please say so! Direct flames to dev/null@techbroker.com.
Happy hacking! 
Copyright 1997 Carolyn P. Meinel. You may forward or post this GUIDE TO (mostly) HARMLESS
HACKING on your Web site as long as you leave this notice at the end. 
________________________________________________________ 
 

Popular Posts