=introduction to denial of service=

extremely long tutorial explaining dos worth having a look at.

.a. introduction
.a.1. what is a denial of service attack?
.a.2. why would someone crash a system?
.a.2.1. introduction
.a.2.2. sub-cultural status
.a.2.3. to gain access
.a.2.4. revenge
.a.2.5. political reasons
.a.2.6. economical reasons
.a.2.7. nastiness
.a.3. are some operating systems more secure?

.b. some basic targets for an attack
.b.1. swap space
.b.2. bandwidth
.b.3. kernel tables
.b.4. ram
.b.5. disks
.b.6. caches
.b.7. inetd

.c. attacking from the outside
.c.1. taking advantage of finger
.c.2. udp and sunos 4.1.3.
.c.3. freezing up x-windows
.c.4. malicious use of udp services
.c.5. attacking with lynx clients
.c.6. malicious use of telnet
.c.7. malicious use of telnet under solaris 2.4
.c.8. how to disable accounts
.c.9. linux and tcp time, daytime
.c.10. how to disable services
.c.11. paragon os beta r1.4
.c.12. novells netware ftp
.c.13. icmp redirect attacks
.c.14. broadcast storms
.c.15. email bombing and spamming
.c.16. time and kerberos
.c.17. the dot dot bug
.c.18. sunos kernel panic
.c.19. hostile applets
.c.20. virus
.c.21. anonymous ftp abuse
.c.22. syn flooding
.c.23. ping flooding
.c.24. crashing systems with ping from windows 95 machines
.c.25. malicious use of subnet mask reply message
.c.26. flexlm
.c.27. booting with trivial ftp

.d. attacking from the inside
.d.1. kernel panic under solaris 2.3
.d.2. crashing the x-server
.d.3. filling up the hard disk
.d.4. malicious use of eval
.d.5. malicious use of fork()
.d.6. creating files that is hard to remove
.d.7. directory name lookupcache
.d.8. csh attack
.d.9. creating files in /tmp
.d.10. using resolv_host_conf
.d.11. sun 4.x and background jobs
.d.12. crashing dg/ux with ulimit
.d.13. nettune and hp-ux
.d.14. solaris 2.x and nfs
.d.15. system stability compromise via mount_union
.d.16. trap_mon causes kernel panic under sunos 4.1.x

.e. dumping core
.e.1. short comment
.e.2. malicious use of netscape
.e.3. core dumped under wuftpd
.e.4. ld under solaris/x86

.f. how do i protect a system against denial of service attacks?
.f.1. basic security protection
.f.1.1. introduction
.f.1.2. port scanning
.f.1.3. check the outside attacks described in this paper
.f.1.4. check the inside attacks described in this paper
.f.1.5. extra security systems
.f.1.6. monitoring security
.f.1.7. keeping up to date
.f.1.8. read something better
.f.2. monitoring performance
.f.2.1. introduction
.f.2.2. commands and services
.f.2.3. programs
.f.2.4. accounting

.g. suggested reading
.g.1. information for deeper knowledge
.g.2. keeping up to date information
.g.3. basic information

.h. copyright

.i. disclaimer

.0. foreword

in this paper i have tried to answer the following questions:

- what is a denial of service attack?
- why would someone crash a system?
- how can someone crash a system.
- how do i protect a system against denial of service attacks?

i also have a section called suggested reading were you can find
information about good free information that can give you a deeper
understanding about something.

note that i have a very limited experience with macintosh, os/2 and
windows and most of the material are therefore for unix use.

you can always find the latest version at the following address:

feel free to send comments, tips and so on to address:
[email protected]

.a. introduction

.a.1. what is a denial of service attack?

denial of service is about without permission knocking off
services, for example through crashing the whole system. this
kind of attacks are easy to launch and it is hard to protect
a system against them. the basic problem is that unix
assumes that users on the system or on other systems will be
well behaved.

.a.2. why would someone crash a system?

.a.2.1. introduction

why would someone crash a system? i can think of several reasons
that i have presentated more precisely in a section for each reason,
but for short:

.1. sub-cultural status.
.2. to gain access.
.3. revenge.
.4. political reasons.
.5. economical reasons.
.6. nastiness.

i think that number one and six are the more common today, but that
number four and five will be the more common ones in the future.

.a.2.2. sub-cultural status

after all information about syn flooding a bunch of such attacks
were launched around sweden. the very most of these attacks were
not a part of a ip-spoof attack, it was "only" a denial of service
attack. why?

i think that hackers attack systems as a sub-cultural pseudo career
and i think that many denial of service attacks, and here in the
example syn flooding, were performed for these reasons. i also think
that many hackers begin their carrer with denial of service attacks.

.a.2.3. to gain access

sometimes could a denial of service attack be a part of an attack to
gain access at a system. at the moment i can think of these reasons
and specific holes:

.1. some older x-lock versions could be crashed with a
method from the denial of service family leaving the system
open. physical access was needed to use the work space after.

.2. syn flooding could be a part of a ip-spoof attack method.

.3. some program systems could have holes under the startup,
that could be used to gain root, for example ssh (secure shell).

.4. under an attack it could be usable to crash other machines
in the network or to deny certain persons the ability to access
the system.

.5. also could a system being booted sometimes be subverted,
especially rarp-boots. if we know which port the machine listen
to (69 could be a good guess) under the boot we can send false
packets to it and almost totally control the boot.

.a.2.4. revenge

a denial of service attack could be a part of a revenge against a user
or an administrator.

.a.2.5. political reasons

sooner or later will new or old organizations understand the potential
of destroying computer systems and find tools to do it.

for example imaginate the bank a loaning company b money to build a
factory threating the environment. the organization c therefor crash a:s
computer system, maybe with help from an employee. the attack could cost
a a great deal of money if the timing is right.

.a.2.6. economical reasons

imaginate the small company a moving into a business totally dominated by
company b. a and b customers make the orders by computers and depends
heavily on that the order is done in a specific time (a and b could be
stock trading companies). if a and b can't perform the order the customers
lose money and change company.

as a part of a business strategy a pays a computer expert a sum of money to
get him to crash b:s computer systems a number of times. a year later a
is the dominating company.

.a.2.7. nastiness

i know a person that found a workstation where the user had forgotten to
logout. he sat down and wrote a program that made a kill -9 -1 at a
random time at least 30 minutes after the login time and placed a call to
the program from the profile file. that is nastiness.

.a.3. are some operating systems more secure?

this is a hard question to answer and i don't think that it will
give anything to compare different unix platforms. you can't say that
one unix is more secure against denial of service, it is all up to the

a comparison between windows 95 and nt on one side and unix on the
other could however be interesting.

unix systems are much more complex and have hundreds of built in programs,
services... this always open up many ways to crash the system from
the inside.

in the normal windows nt and 95 network were is few ways to crash
the system. although were is methods that always will work.

that gives us that no big different between microsoft and unix can
be seen regardning the inside attacks. but there is a couple of
points left:

- unix have much more tools and programs to discover an
attack and monitoring the users. to watch what another user
is up to under windows is very hard.

- the average unix administrator probably also have much more
experience than the average microsoft administrator.

the two last points gives that unix is more secure against inside
denial of service attacks.

a comparison between microsoft and unix regarding outside attacks
are much more difficult. however i would like to say that the average
microsoft system on the internet are more secure against outside
attacks, because they normally have much less services.

.b. some basic targets for an attack

.b.1. swap space

most systems have several hundred mbytes of swap space to
service client requests. the swap space is typical used
for forked child processes which have a short life time.
the swap space will therefore almost never in a normal
cause be used heavily. a denial of service could be based
on a method that tries to fill up the swap space.

.b.2. bandwidth

if the bandwidth is to high the network will be useless. most
denial of service attack influence the bandwidth in some way.

.b.3. kernel tables

it is trivial to overflow the kernel tables which will cause
serious problems on the system. systems with write through
caches and small write buffers is especially sensitive.

kernel memory allocation is also a target that is sensitive.
the kernel have a kernelmap limit, if the system reach this
limit it can not allocate more kernel memory and must be rebooted.
the kernel memory is not only used for ram, cpu:s, screens and so
on, it it also used for ordinaries processes. meaning that any system
can be crashed and with a mean (or in some sense good) algorithm pretty

for solaris 2.x it is measured and reported with the sar command
how much kernel memory the system is using, but for sunos 4.x there
is no such command. meaning that under sunos 4.x you don't even can
get a warning. if you do use solaris you should write sar -k 1 to
get the information. netstat -k can also be used and shows how much
memory the kernel have allocated in the subpaging.

.b.4. ram

a denial of service attack that allocates a large amount of ram
can make a great deal of problems. nfs and mail servers are
actually extremely sensitive because they do not need much
ram and therefore often don't have much ram. an attack at
a nfs server is trivial. the normal nfs client will do a
great deal of caching, but a nfs client can be anything
including the program you wrote yourself...

.b.5. disks

a classic attack is to fill up the hard disk, but an attack at
the disks can be so much more. for example can an overloaded disk
be misused in many ways.

.b.6. caches

a denial of service attack involving caches can be based on a method
to block the cache or to avoid the cache.

these caches are found on solaris 2.x:

directory name lookup cache: associates the name of a file with a vnode.

inode cache: cache information read from disk in case it is needed

rnode cache: holds information about the nfs filesystem.

buffer cache: cache inode indirect blocks and cylinders to realed disk

.b.7. inetd

well once inetd crashed all other services running through inetd no
longer will work.

.c. attacking from the outside

.c.1. taking advantage of finger

most fingerd installations support redirections to an other host.


$finger @[email protected]

finger will in the example go through system.one.com and on to
system.two.com. as far as system.two.com knows it is system.one.com
who is fingering. so this method can be used for hiding, but also
for a very dirty denial of service attack. lock at this:

$ finger @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@host.we.attack

all those @ signs will get finger to finger host.we.attack again and
again and again... the effect on host.we.attack is powerful and
the result is high bandwidth, short free memory and a hard disk with
less free space, due to all child processes (compare with .d.5.).

the solution is to install a fingerd which don't support redirections,
for example gnu finger. you could also turn the finger service off,
but i think that is just a bit to much.

.c.2. udp and sunos 4.1.3.

sunos 4.1.3. is known to boot if a packet with incorrect information
in the header is sent to it. this is the cause if the ip_options
indicate a wrong size of the packet.

the solution is to install the proper patch.

.c.3. freezing up x-windows

if a host accepts a telnet session to the x-windows port (generally
somewhere between 6000 and 6025. in most cases 6000) could that
be used to freeze up the x-windows system. this can be made with
multiple telnet connections to the port or with a program which
sends multiple xopendisplay() to the port.

the same thing can happen to motif or open windows.

the solution is to deny connections to the x-windows port.

.c.4. malicious use of udp services

it is simple to get udp services (echo, time, daytime, chargen) to
loop, due to trivial ip-spoofing. the effect can be high bandwidth
that causes the network to become useless. in the example the header
claim that the packet came from (loopback) and the target
is the echo port at system.we.attack. as far as system.we.attack knows
is system.we.attack and the loop has been establish.


packet type:udp
from udp port 7
to udp port 7

note that the name system.we.attack looks like a dns-name, but the
target should always be represented by the ip-number.

quoted from [email protected] (paul d. robertson) comment on
comp.security.firewalls on matter of "introduction to denial of service"

" a great deal of systems don't put loopback on the wire, and simply
emulate it. therefore, this attack will only effect that machine
in some cases. it's much better to use the address of a different
machine on the same network. again, the default services should
be disabled in inetd.conf. other than some hacks for mainframe ip
stacks that don't support icmp, the echo service isn't used by many
legitimate programs, and tcp echo should be used instead of udp
where it is necessary. "

.c.5. attacking with lynx clients

a world wide web server will fork an httpd process as a respond
to a request from a client, typical netscape or mosaic. the process
lasts for less than one second and the load will therefore never
show up if someone uses ps. in most causes it is therefore very
safe to launch a denial of service attack that makes use of
multiple w3 clients, typical lynx clients. but note that the netstat
command could be used to detect the attack (thanks to paul d. robertson).

some httpd:s (for example http-gw) will have problems besides the normal
high bandwidth, low memory... and the attack can in those causes get
the server to loop (compare with .c.6.)

.c.6. malicious use of telnet

study this little script:


while : ; do
telnet system.we.attack &

an attack using this script might eat some bandwidth, but it is
nothing compared to the finger method or most other methods. well
the point is that some pretty common firewalls and httpd:s thinks
that the attack is a loop and turn them self down, until the
administrator sends kill -hup.

this is a simple high risk vulnerability that should be checked
and if present fixed.

.c.7. malicious use of telnet under solaris 2.4

if the attacker makes a telnet connections to the solaris 2.4 host and
quits using:



then will inetd keep going "forever". well a couple of hundred...

the solution is to install the proper patch.

.c.8. how to disable accounts

some systems disable an account after n number of bad logins, or waits
n seconds. you can use this feature to lock out specific users from
the system.

.c.9. linux and tcp time, daytime

inetd under linux is known to crash if to many syn packets sends to
daytime (port 13) and/or time (port 37).

the solution is to install the proper patch.

.c.10. how to disable services

most unix systems disable a service after n sessions have been
open in a given time. well most systems have a reasonable default
(lets say 800 - 1000), but not some sunos systems that have the
default set to 48...

the solutions is to set the number to something reasonable.

.c.11. paragon os beta r1.4

if someone redirects an icmp (internet control message protocol) packet
to a paragon os beta r1.4 will the machine freeze up and must be
rebooted. an icmp redirect tells the system to override routing
tables. routers use this to tell the host that it is sending
to the wrong router.

the solution is to install the proper patch.

.c.12. novells netware ftp

novells netware ftp server is known to get short of memory if multiple
ftp sessions connects to it.

.c.13. icmp redirect attacks

gateways uses icmp redirect to tell the system to override routing
tables, that is telling the system to take a better way. to be able
to misuse icmp redirection we must know an existing connection
(well we could make one for ourself, but there is not much use for that).
if we have found a connection we can send a route that
loses it connectivity or we could send false messages to the host
if the connection we have found don't use cryptation.

ex: (false messages to send)

destination unreachable
time to live exceeded
parameter problem
packet too big

the effect of such messages is a reset of the connection.

the solution could be to turn icmp redirects off, not much proper use
of the service.

.c.14. broadcast storms

this is a very popular method in networks there all of the hosts are
acting as gateways.

there are many versions of the attack, but the basic method is to
send a lot of packets to all hosts in the network with a destination
that don't exist. each host will try to forward each packet so
the packets will bounce around for a long time. and if new packets
keep coming the network will soon be in trouble.

services that can be misused as tools in this kind of attack is for
example ping, finger and sendmail. but most services can be misused
in some way or another.

.c.15. email bombing and spamming

in a email bombing attack the attacker will repeatedly send identical
email messages to an address. the effect on the target is high bandwidth,
a hard disk with less space and so on... email spamming is about sending
mail to all (or rather many) of the users of a system. the point of
using spamming instead of bombing is that some users will try to
send a replay and if the address is false will the mail bounce back. in
that cause have one mail transformed to three mails. the effect on the
bandwidth is obvious.

there is no way to prevent email bombing or spamming. however have
a look at cert:s paper "email bombing and spamming".

.c.16. time and kerberos

if not the the source and target machine is closely aligned will the
ticket be rejected, that means that if not the protocol that set the
time is protected it will be possible to set a kerberos server of

.c.17. the dot dot bug

windows nt file sharing system is vulnerable to the under windows 95
famous dot dot bug (dot dot like ..). meaning that anyone can crash
the system. if someone sends a "dir .." to the workstation will a
stop messages appear on the screen on the windows nt computer. note that
it applies to version 3.50 and 3.51 for both workstation and server

the solution is to install the proper patch.

.c.18. sunos kernel panic

some sunos systems (running tis?) will get a kernel panic if a
getsockopt() is done after that a connection has been reset.

the solution could be to install sun patch 100804.

.c.19. hostile applets

a hostile applet is any applet that attempts to use your system
in an inappropriate manner. the problems in the java language
could be sorted in two main groups:

1) problems due to bugs.
2) problems due to features in the language.

in group one we have for example the java bytecode verifier bug, which
makes is possible for an applet to execute any command that the user
can execute. meaning that all the attack methods described in .d.x.
could be executed through an applet. the java bytecode verifier bug
was discovered in late march 1996 and no patch have yet been available
(correct me if i'am wrong!!!).

note that two other bugs could be found in group one, but they
are both fixed in netscape 2.01 and jdk 1.0.1.

group two are more interesting and one large problem found is the
fact that java can connect to the ports. meaning that all the methods
described in .c.x. can be performed by an applet. more information
and examples could be found at address:


if you need a high level of security you should use some sort of
firewall for protection against java. as a user you could have
java disable.

.c.20. virus

computer virus is written for the purpose of spreading and
destroying systems. virus is still the most common and famous
denial of service attack method.

it is a misunderstanding that virus writing is hard. if you know
assembly language and have source code for a couple of virus it
is easy. several automatic toolkits for virus construction could
also be found, for example:

* genvir.
* vcs (virus construction set).
* vcl (virus construction laboratory).
* ps-mpc (phalcon/skism - mass produced code generator).
* ivp (instant virus production kit).
* g2 (g squared).

ps-mpc and vcl is known to be the best and can help the novice programmer
to learn how to write virus.

an automatic tool called mte could also be found. mte will transform
virus to a polymorphic virus. the polymorphic engine of mte is well
known and should easily be catch by any scanner.

.c.21. anonymous ftp abuse

if an anonymous ftp archive have a writable area it could be misused
for a denial of service attack similar with with .d.3. that is we can
fill up the hard disk.

also can a host get temporarily unusable by massive numbers of
ftp requests.

for more information on how to protect an anonymous ftp site could
cert:s "anonymous ftp abuses" be a good start.

.c.22. syn flooding

both 2600 and phrack have posted information about the syn flooding attack.
2600 have also posted exploit code for the attack.

as we know the syn packet is used in the 3-way handshake. the syn flooding
attack is based on an incomplete handshake. that is the attacker host
will send a flood of syn packet but will not respond with an ack packet.
the tcp/ip stack will wait a certain amount of time before dropping
the connection, a syn flooding attack will therefore keep the syn_received
connection queue of the target machine filled.

the syn flooding attack is very hot and it is easy to find more information
about it, for example:

[.1.] http://www.eecs.nwu.edu/~jmyers/bugtraq/1354.html
article by christopher klaus, including a "solution".

[.2.] http://jya.com/floodd.txt
2600, summer, 1996, pp. 6-11. flood warning by jason fairlane

[.3.] http://www.fc.net/phrack/files/p48/p48-14.html
ip-spoofing demystified by daemon9 / route / infinity
for phrack magazine

.c.23. ping flooding

i haven't tested how big the impact of a ping flooding attack is, but
it might be quite big.

under unix we could try something like: ping -s host
to send 64 bytes packets.

if you have windows 95, click the start button, select run, then type
in: ping -t -l 256 xxx.xxx.xxx.xx. start about 15 sessions.

.c.24. crashing systems with ping from windows 95 machines

if someone can ping your machine from a windows 95 machine he or she might
reboot or freeze your machine. the attacker simply writes:

ping -l 65510 address.to.the.machine

and the machine will freeze or reboot.

works for kernel 2.0.7 up to version 2.0.20. and 2.1.1. for linux (crash).
aix4, osf, hpux 10.1, dunix 4.0 (crash).
osf/1, 3.2c, solaris 2.4 x86 (reboot).

.c.25. malicious use of subnet mask reply message

the subnet mask reply message is used under the reboot, but some
hosts are known to accept the message any time without any check.
if so all communication to or from the host us turned off, it's dead.

the host should not accept the message any time but under the reboot.

.c.26. flexlm

any host running flexlm can get the flexlm license manager daemon
on any network to shutdown using the flexlm lmdown command.

# lmdown -c /etc/licence.dat
lmdown - copyright © 1989, 1991 highland software, inc.

shutting down flexlm on nodes: xxx
are you sure? [y/n]: y
shut down node xxx

.c.27. booting with trivial ftp

to boot diskless workstations one often use trivial ftp with rarp or
bootp. if not protected an attacker can use tftp to boot the host.

.d. attacking from the inside

.d.1. kernel panic under solaris 2.3

solaris 2.3 will get a kernel panic if this
is executed:


$ndd /dev/udp udp_status

the solution is to install the proper patch.

.d.2. crashing the x-server

if stickybit is not set in /tmp then can the file /tmp/.x11-unix/x0
be removed and the x-server will crash.


$ rm /tmp/.x11-unix/x0

.d.3. filling up the hard disk

if your hard disk space is not limited by a quota or if you can use
/tmp then it`s possible for you to fill up the file system.


while : ;
mkdir .xxx
cd .xxx

.d.4. malicious use of eval

some older systems will crash if eval '\!\!' is executed in the


% eval '\!\!'

.d.5. malicious use of fork()

if someone executes this c++ program the result will result in a crash
on most systems.


#include <sys/types.h>
#include <unistd.h>
#include <iostream.h>

int x;

you can use any command you want, but uptime is nice
because it shows the workload.

to get a bigger and very ugly attack you should however replace uptime
(or fork them both) with sync. this is very bad.

if you are real mean you could also fork a child process for
every child process and we will get an exponential increase of

there is no good way to stop this attack and
similar attacks. a solution could be to place a limit
on time of execution and size of processes.

.d.6. creating files that is hard to remove

well all files can be removed, but here is some ideas:


$ cat > -xxx
$ ls
$ rm -xxx
rm: illegal option -- x
rm: illegal option -- x
rm: illegal option -- x
usage: rm [-firr] file ...


$ touch xxx!
$ rm xxx!
rm: remove xxx! (yes/no)? y
$ touch xxxxxxxxx!
$ rm xxxxxxxxx!
bash: !": event not found

(you see the size do count!)

other well know methods is files with odd characters or spaces
in the name.

these methods could be used in combination with ".d.3 filling up the
harddisk". if you do want to remove these files you must use some sort
of script or a graphical interface like openwindow:s file
manager. you can also try to use: rm ./<filename>. it should work for
the first example if you have a shell.

.d.7. directory name lookupcache

directory name lookupcache (dnlc) is used whenever a file is opened.
dnlc associates the name of the file to a vnode. but dnlc can only
operate on files with names that has less than n characters (for sunos 4.x
up to 14 character, for solaris 2.x up 30 characters). this means
that it's dead easy to launch a pretty discreet denial of service attack.

create lets say 20 directories (for a start) and put 10 empty files in
every directory. let every name have over 30 characters and execute a
script that makes a lot of ls -al on the directories.

if the impact is not big enough you should create more files or launch
more processes.

.d.8. csh attack

just start this under /bin/csh (after proper modification)
and the load level will get very high (that is 100% of the cpu time)
in a very short time.


|i /bin/csh
nodename : **************b

.d.9. creating files in /tmp

many programs creates files in /tmp, but are unable to deal with the problem
if the file already exist. in some cases this could be used for a
denial of service attack.

.d.10. using resolv_host_conf

some systems have a little security hole in the way they use the
resolv_host_conf variable. that is we can put things in it and
through ping access confidential data like /etc/shadow or
crash the system. most systems will crash if /proc/kcore is
read in the variable and access through ping.


$ export resolv_host_conf="/proc/kcore" ; ping asdf

.d.11. sun 4.x and background jobs

thanks to mr david honig <[email protected]> for the following:

" put the string "a&" in a file called "a" and perform "chmod +x a".
running "a" will quickly disable a sun 4.x machine, even disallowing
(counter to specs) root login as the kernel process table fills."

" the cute thing is the size of the
script, and how few keystrokes it takes to bring down a sun
as a regular user."

.d.12. crashing dg/ux with ulimit

ulimit is used to set a limit on the system resources available to the
shell. if ulimit 0 is called before /etc/passwd, under dg/ux, will the
passwd file be set to zero.

.d.13. nettune and hp-ux

/usr/contrib/bin/nettune is setuid root on hp-ux meaning
that any user can reset all icmp, ip and tcp kernel
parameters, for example the following parameters:

- arp_killcomplete
- arp_killincomplete
- arp_unicast
- arp_rebroadcast
- icmp_mask_agent
- ip_defaultttl
- ip_forwarding
- ip_intrqmax
- pmtu_defaulttime
- tcp_localsubnets
- tcp_receive
- tcp_send
- tcp_defaultttl
- tcp_keepstart
- tcp_keepfreq
- tcp_keepstop
- tcp_maxretrans
- tcp_urgent_data_ptr
- udp_cksum
- udp_defaultttl
- udp_newbcastenable
- udp_pmtu
- tcp_pmtu
- tcp_random_seq

the solution could be to set the proper permission on

#chmod u-s /sbin/mount_union

.d.14. solaris 2.x and nfs

if a process is writing over nfs and the user goes over the disk
quota will the process go into an infinite loop.

.d.15. system stability compromise via mount_union

by executing a sequence of mount_union commands any user
can cause a system reload on all freebsd version 2.x before

$ mkdir a
$ mkdir b
$ mount_union ~/a ~/b
$ mount_union -b ~/a ~/b

the solution could be to set the proper permission on

#chmod u-s /sbin/mount_union

.d.16. trap_mon causes kernel panic under sunos 4.1.x

executing the trap_mon instruction from user mode can cause
a kernel panic or a window underflow watch*** reset under
sunos 4.1.x, sun4c architecture.

.e. dumping core

.e.1. short comment

the core dumps things don't really belongs in this paper but i have
put them here anyway.

.e.2. malicious use of netscape

under netscape 1.1n this link will result in a segmentation fault and a
core dump.


<a name="http://xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xx x.
xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xx x.xxxxxx.xxx.xxx.
xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxxxxx.xxx .xxx.xxx.xxx.xxx.
xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxxxxx.xxx.xxx.xxx.xxx .xxx.xxx.xxx.xxx.

.e.3. core dumped under wuftpd

a core dumped could be created under wuftp with two different

(1) then pasv is given (user not logged in (ftp -n)). almost all
versions of bsd:s ftpd.
(2) more than 100 arguments is given with any executable
command. presents in all versions of bsd:sd ftpd.

.e.4. ld under solaris/x86

under solaris 2.4/x86 ld dumps core if given with the -s option.

.f. how do i protect a system against denial of service attacks?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~

.f.1. basic security protection

.f.1.1. introduction

you can not make your system totally secured against denial of service
attacks but for attacks from the outside you can do a lot. i put this
work list together and hope that it can be of some use.

.f.1.2. security patches

always install the proper security patches. as for patch numbers
i don't want to put them out, but that doesn't matter because you
anyway want to check that you have all security patches installed,
so get a list and check! also note that patches change over time and
that a solution suggested in security bulletins (i.e. cert) often
is somewhat temporary.

.f.1.3. port scanning

check which services you have. don't check with the manual
or some configuration file, instead scan the ports with sprobe
or some other port scanner. actual you should do this regualy to see
that anyone don't have installed a service that you don't want on
the system (could for example be service used for a pirate site).

disable every service that you don't need, could for example be rexd,
fingerd, systat, netstat, rusersd, sprayd, pop3, uucpd, echo, chargen,
tftp, exec, ufs, daytime, time... any combination of echo, time, daytime
and chargen is possible to get to loop. there is however no need
to turn discard off. the discard service will just read a packet
and discard it, so if you turn off it you will get more sensitive to
denial of service and not the opposite.

actual can services be found on many systems that can be used for
denial of service and brute force hacking without any logging. for
example stock rexec never logs anything. most popd:s also don't log

.f.1.4. check the outside attacks described in this paper

check that attacks described in this paper and look at the
solution. some attacks you should perform yourself to see if they
apply to your system, for example:

- freezing up x-windows.
- malicious use of telnet.
- how to disable services.
- sunos kernel panic.
- attacking with lynx clients.
- crashing systems with ping from windows 95 machines.

that is stress test your system with several services and look at
the effect.

note that solaris 2.4 and later have a limit on the number of icmp
error messages (1 per 500 ms i think) that can cause problems then
you test your system for some of the holes described in this paper.
but you can easy solve this problem by executing this line:

$ /usr/sbin/ndd -set /dev/ip ip_icmp_err_interval 0

.f.1.5. check the inside attacks described in this paper

check the inside attacks, although it is always possibly to crash
the system from the inside you don't want it to be to easy. also
have several of the attacks applications besides denial of service,
for example:

- crashing the x-server: if stickybit is not set in /tmp
a number of attacks to gain
access can be performed.

- using resolv_host_conf: could be used to expose
confidential data like

- core dumped under wuftpd: could be used to extract

if i don't have put out a solution i might have recommended son other paper.
if not i don't know of a paper with a solution i feel that i can recommend.
you should in these causes check with your company.

.f.1.6. extra security systems

also think about if you should install some extra security systems.
the basic that you always should install is a logdaemon and a wrapper.
a firewall could also be very good, but expensive. free tools that can
be found on the internet is for example:

type: name: url:

logdaemon netlog ftp://net.tamu.edu/pub/security/tamu
wrapper tcp wrappers ftp://cert.org/pub/tools/tcp_wrappers
firewall tis ftp://ftp.tis.com/pub/firewalls/toolkit

note that you should be very careful if building your own firewall with
tis or you might open up new and very bad security holes, but it is a very
good security packer if you have some basic knowledge.

it is also very good to replace services that you need, for example telnet,
rlogin, rsh or whatever, with a tool like ssh. ssh is free and can be
found at url:


the addresses i have put out are the central sites for distributing
and i don't think that you should use any other except for cert.

for a long list on free general security tools i recommend:
"faq: computer security frequently asked questions".

.f.1.7. monitoring security

also monitor security regular, for example through examining system log
files, history files... even in a system without any extra security systems
could several tools be found for monitoring, for example:

- uptime
- showmount
- ps
- netstat
- finger

(see the man text for more information).

.f.1.8. keeping up to date

it is very important to keep up to date with security problems. also
understand that then, for example cert, warns for something it has often
been dark-side public for sometime, so don't wait. the following resources
that helps you keeping up to date can for example be found on the internet:

- cert mailing list. send an e-mail to [email protected] to be placed
on the list.

- bugtraq mailing list. send an e-mail to [email protected].

- www-security mailing list. send an e-mail to
[email protected]

.f.1.9. read something bigger and better

let's start with papers on the internet. i am sorry to say that it is not
very many good free papers that can be found, but here is a small collection
and i am sorry if have have over looked a paper.

(1) the rainbow books is a long series of free books on computer security.
us citizens can get the books from:

infosec awareness office
national computer security center
9800 savage road
fort george g. meader, md 20755-600

we other just have to read the papers on the world wide web. every
paper can not however be found on the internet.

(2) "improving the security of your unix system" by curry is also very
nice if you need the very basic things. if you don't now anything about
computer security you can't find a better start.

(3) "the www security faq" by stein is although it deal with w3-security
the very best better on the internet about computer security.

(4) cert have aklso published several good papers, for example:

- anonymous ftp abuses.
- email bombing and spamming.
- spoofed/forged email.
- protecting yourself from password file attacks.

i think however that the last paper have overlooked several things.

(5) for a long list on papers i can recommend:
"faq: computer security frequently asked questions".

(6) also see section ".g. suggested reading"

you should also get some big good commercial book, but i don't want
to recommend any.

.f.2. monitoring performance

.f.2.1. introduction

there is several commands and services that can be used for
monitoring performance. and at least two good free programs can
be found on internet.

.f.2.2. commands and services

for more information read the man text.

netstat show network status.
nfsstat show nfs statistics.
sar system activity reporter.
vmstat report virtual memory statistics.
timex time a command, report process data and system
time time a simple command.
truss trace system calls and signals.
uptime show how long the system has been up.

note that if a public netstat server can be found you might be able
to use netstat from the outside. netstat can also give information
like tcp sequence numbers and much more.

.f.2.3. programs

proctool: proctool is a freely available tool for solaris that monitors
and controls processes.

top: top might be a more simple program than proctool, but is
good enough.

.f.2.4. accounting

to monitor performance you have to collect information over a long
period of time. all unix systems have some sort of accounting logs
to identify how much cpu time, memory each program uses. you should
check your manual to see how to set this up.

you could also invent your own account system by using crontab and
a script with the commands you want to run. let crontab run the script
every day and compare the information once a week. you could for
example let the script run the following commands:

- netstat
- iostat -d
- vmstat