text stringlengths 0 1.99k |
|---|
-- Shooting Shark |
Contributing Editor |
Note: For now you can contact Phrack Inc. at: |
Lunatic Labs: 415-278-7421 300/1200 (Sir Francis Drake or Elric of Imrryr) |
Free World: 301-668-7657 300/1200/2400/9600 (Disk Jockey) |
Phrack XV Table of Contents |
=========================== |
15-1. Phrack XV Intro by Shooting Shark (2K) |
15-2. More Stupid Unix Tricks by Shooting Shark (10K) |
15-3. Making Free Local Payfone Calls by Killer Smurf (7K) |
15-4. Advanced Carding XIV by The Disk Jockey (12K) |
15-5. Gelled Flame Fuels by Elric of Imrryr (12K) |
15-6. PWN I: The Scoop on Dan The Operator by KL (19K) |
15-7. PWN II: The July Busts by Knight Lightning (21K) |
15-8. PWN III: The Affidavit by SFD (6K) |
===== Phrack Magazine presents Phrack 15 ===== |
===== File 2 of 8 ===== |
I thought I had written everything there is to write about the Unix operating |
system until I was recently asked to put out yet another file... so I said |
"I'll try, but don't publish my file along with an article by The Radical |
Rocker this time!" These demands having been met, I booted up the PC and |
threw together... |
--- ---- ---- ------ ------ -- -- ---- ----- |
% Yet Even More Stupid Things to Do With Unix! $ |
--- ---- ---- ------ ------ -- -- ---- ----- |
By Shooting Shark. |
Submitted August 26, 1987 |
These two topics are methods of annoying other users of the system and |
generally being a pest. But would you want to see a file on *constructive* |
things to do with Unix? Didn't think so... |
-- ------- ----- --- --- ------ |
1. Keeping Users Off The System |
-- ------- ----- --- --- ------ |
Now, we all know by now how to log users off (one way is to redirect an 'stty |
0' command to their tty) but unless you have root privs, this will not work |
when a user has set 'mesg n' and prevented other users from writing to their |
terminal. But even users who have a 'mesg n' command in their .login (or |
.profile or .cshrc) file still have a window of vulnerability, the time |
between login and the locking of their terminal. I designed the following |
program, block.c, to take advantage of this fact. |
To get this source running on your favorite Unix system, upload it, call it |
'block.c', and type the following at the % or $ prompt: |
cc -o block block.c |
once you've compiled it successfully, it is invoked like so: |
block username [&] |
The & is optional and recommended - it runs the program in the background, |
thus letting you do other things while it's at work. |
If the user specified is logged in at present, it immediately logs them out |
(if possible) and waits for them to log in. If they aren't logged in, it |
starts waiting for them. If the user is presently logged in but has their |
messages off, you'll have to wait until they've logged out to start the thing |
going. |
Block is essentially an endless loop : it keeps checking for the occurrence of |
the username in /etc/utmp. When it finds it, it immediately logs them out and |
continues. If for some reason the logout attempt fails, the program aborts. |
Normally this won't happen - the program is very quick when run unmodified. |
However, to get such performance, it runs in a very tight loop and will eat up |
a lot of CPU time. Notice that near the end of the program there is the line: |
/*sleep(SLEEP) */ |
the /* and */ are comment delimiters - right now the line is commented out. |
If you remove the comments and re-compile the program, it will then 'go to |
sleep' for the number of seconds defined in SLEEP (default is 5) at the end of |
every loop. This will save the system load but will slightly decrease the |
odds of catching the user during their 'window of vulnerability.' |
If you have a chance to run this program at a computer lab at a school or |
somewhere similar, run this program on a friend (or an enemy) and watch the |
reaction on their face when they repeatedly try to log in and are logged out |
before they can do *anything*. It is quite humorous. This program is also |
quite nasty and can make you a lot of enemies! |
caveat #1: note that if you run the program on yourself, you will be logged |
out, the program will continue to run (depending on the shell you're under) |
and you'll have locked yourself out of the system - so don't do this! |
caveat #2: I wrote this under OSx version 4.0, which is a licensed version of |
Unix which implements 4.3bsd and AT&T sysV. No guarantees that it will work |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.