Red Hat NETSCAPE MANAGEMENT SYSTEM 6.2 - COMMAND-LINE Installationsanleitung

Stöbern Sie online oder laden Sie Installationsanleitung nach Komponenten von Sicherheitsgeräten Red Hat NETSCAPE MANAGEMENT SYSTEM 6.2 - COMMAND-LINE herunter. Red Hat NETSCAPE MANAGEMENT SYSTEM 6.2 - COMMAND-LINE Installation guide Benutzerhandbuch

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 82
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 0
Security Quick−Start HOWTO for Red Hat Linux
Hal Burgiss
v. 1.2, 2002−07−21
Revision History
Revision v. 1.2 2002−07−21 Revised by: hb
A few small additions, and fix the usual broken links.
Revision v. 1.1 2002−02−06 Revised by: hb
A few fixes, some additions and many touch−ups from the original.
Revision v. 1.0 2001−11−07 Revised by: hb
Initial Release.
This document is a an overview of the basic steps required to secure a Linux installation from intrusion. It is
intended to be an introduction. This is a Red Hat specific version of this document.
Seitenansicht 0
1 2 3 4 5 6 ... 81 82

Inhaltsverzeichnis

Seite 1 - Hal Burgiss

Security Quick−Start HOWTO for Red Hat LinuxHal Burgiss [email protected]. 1.2, 2002−07−21Revision HistoryRevision v. 1.2 2002−07−21 Revised by: h

Seite 2 - Table of Contents

3. Step 1: Which services do we really need?In this section we will see which services are running on our freshly installed system, decide which we r

Seite 3

*:telnet *:* LISTEN 988/inetd *:finger *:* LISTEN 988/inetd *:sunrpc *:*

Seite 4 - 1. Introduction

There may be individual situations where it is desirable to make exceptions to the conclusions reached above.See below.3.2. The Danger Zone (or r00t

Seite 5 - 1.3. Copyright

below). Also, where xinetd is used, it can control those services as well. chkconfig can tell us what servicesthe system is configured to run, but

Seite 6 - 1.5. Disclaimer

To view only the ones that are "on": # chkconfig −−list | grep "\bon\b" | lessThe first column is the service name, and the remain

Seite 7 - 1.7. Feedback

# the running INETD process, edit this file, then send the# INETD process a SIGHUP signal.## Version: @(#)/etc/inetd.conf 3.10 05/27/93## Aut

Seite 8 - 2. Foreword

Check your logs for errors, and run netstat again to verify all went well.A quicker way of getting the same information, using grep: $ grep −v &apos

Seite 9 - 2.2. Before We Start

/etc/xinetd.d/rlogin: disable = no /etc/xinetd.d/rsh: disable = no /etc/xinetd.d/telnet: disable = no /etc/xinetd.d/wu−ftpd: disable = noAt

Seite 10 - 3.1. System Audit

3.4. ExceptionsAbove we used the criteria of turning off all unnecessary services. Sometimes that is not so obvious. Andsometimes what may be requir

Seite 11

3.5. Summary and Conclusions for Step 1In this section we learned how to identify which services are running on our system, and were given sometips o

Seite 12 - 3.3. Stopping Services

Table of Contents1. Introduction...

Seite 13 - 3.3.1. Stopping Init Services

4. Step 2: UpdatingOK, this section should be comparatively short, simple and straightforward compared to the above, but noless important.The very fi

Seite 14 - 3.3.2. Inetd

are updated according to what Red Hat has made available since the initial release. At least as long as RedHat is still supporting the release a

Seite 15 - 3.3.2. Inetd 12

5. Step 3: Firewalls and Setting Access PoliciesSo what is a "firewall"? It's a vague term that can mean anything that acts as a prote

Seite 16 - 3.3.3. Xinetd

generating a very basic set of firewall rules (see below). This may be adequate, but it is still recommended toknow the proper syntax and how the

Seite 17 - 3.3.4. When All Else Fails

# ipchains.sh## An example of a simple ipchains configuration. ## This script allows ALL outbound traffic, and denies # ALL inbound connection attempt

Seite 18 - 3.4. Exceptions

# request is blocked, ie we won't respond to someone else's pings,# but can still ping out. $IPCHAINS −A input −p icmp −−icmp−type echo−re

Seite 19

−d <IP address> [port]: This rule only applies to the destination address as specified.Also, it may include port or port range. −l : Any packe

Seite 20 - 4. Step 2: Updating

#!/bin/sh## iptables.sh## An example of a simple iptables configuration. ## This script allows ALL outbound traffic, and denies # ALL inbound connecti

Seite 21 - 4. Step 2: Updating 18

$IPTABLES −A INPUT −m state −−state ESTABLISHED,RELATED −j ACCEPT$IPTABLES −A INPUT −m state −−state NEW −i ! $WAN_IFACE −j ACCEPT$IPTABLES −A INPUT −

Seite 22 - 5.1. Strategy

/etc/sysconfig/ipchains.As mentioned, this is a fairly minimalist set of rules, and possibly a sufficient starting point. An example/etc/sysconfig/ip

Seite 23 - 5.2.1. ipchains

Table of Contents7. General Tips...

Seite 24 - 5.2.1. ipchains 21

/etc/hosts.allow, where specific services are listed, along with the specific host addresses allowed toaccess these services. While hostnames can be

Seite 25

to only our sshd daemon from any host associated with .myworkplace.com. Note the leading "." in thisexample. And then also, the single ho

Seite 26 - 5.2.2. iptables

connections from 192.168.1.0, our LAN. For xinetd's purposes, this denotes any IP address beginningwith "192.168.1". Note that the sy

Seite 27 - 5.2.2. iptables 24

using a web proxy like "squid" (http://www.squid−cache.org/), every time we browse to a web site, we wouldactually be connecting to our lo

Seite 28

editor. If using xdm (or variants such as gdm, kdm, etc), this option would be specified in/etc/X11/xdm/Xservers (or comparable) as :0 local /usr/

Seite 29 - 5.3. Tcpwrappers (libwrap)

As always, anytime you make system changes, backup the configuration file first, restart the appropriatedaemon afterward, and then check the appropr

Seite 30

5.8. LoggingLinux does a lot of logging. Usually to more than one file. It is not always obvious what to make of all theseentries −− good, bad or ind

Seite 31 - 5.3.1. xinetd

http://freshmeat.net/projects/fwlogwatch/ by Boris Wesslowski, is a similar idea, but supports morelog formats. • 5.9. Where to StartLet's take

Seite 32 - 5.5. Proxies

implemented any of the above steps yet, now is a good time to take a break, go back to the top, and have at it.The most important steps are the ones

Seite 33 - 5.6. Individual Applications

6. Intrusion DetectionThis section will deal with how to get early warning, how to be alerted after the fact, and how to clean upfrom intrusion attem

Seite 34

1. Introduction1.1. Why me?Who should be reading this document and why should the average Linux user care about security? Those newto Linux, or unfam

Seite 35 - 5.7. Verifying

The first thing an intruder typically does is install a "rootkit". There are many prepackaged rootkits availableon the Internet. The rootk

Seite 36 - 5.8. Logging

end. Remember though such changes may not be "visible" to any system tools. Sometimes the intruder is not so smart and forgets about root&a

Seite 37 - 5.9. Where to Start

The steps to take, in this order:Pull the plug and disconnect the machine. You may be unwittingly participating in criminal activity,and doing to oth

Seite 38

7. General TipsThis section will quickly address some general concepts for maintaining a more secure and reliable system ornetwork. Let's emphas

Seite 39 - 6. Intrusion Detection

/etc/security/*, including /etc/security/limits.conf, where again various sanelimits can be imposed. An in depth look at PAM is beyond the scope of t

Seite 40 - # chattr −i /bin/ps

Even if it is just one LAN box to another. If you find you need to run a particular service, and it is for just you, or maybe a relatively smallnumbe

Seite 41

8. Appendix8.1. Servers, Ports, and PacketsLet's take a quick, non−technical look at some networking concepts, and how they can potentially impa

Seite 42

computer will open a connection to a "port" on another computer, and thus be able to exchange data via theconnection that has been establi

Seite 43 - 7. General Tips

One more point on ports: ports are only accessible if there is something listening on that port. No one canforce a port open if there is no service

Seite 44 - root: hal@bigcat

69 − tftp, or Trivial File Transfer Protocol. Extremely insecure. LAN only, if really, really needed. 79 − Finger, used to provide information about

Seite 45

not the case, further reading is strongly recommended. The principles that will guide us in our quest are:There is no magic bullet. There is no one

Seite 46 - 8. Appendix

513 − login, actually rlogin, aka Remote Login. No relation to the standard /bin/login that we use every timewe log in. Sounds dangerous, and is. Hi

Seite 47

6000 − X11 TCP port for remote connections. Low to moderate risk, but again, this should be LAN only.Actually, this can include ports 6000−6009 sinc

Seite 48 - 8.2. Common Ports

$ netstat −tuaActive Internet connections (servers and established)Proto Recv−Q Send−Q Local Address Foreign Address Statetcp

Seite 49

tcp 0 1 169.254.179.139:1175 64.152.100.93:119 SYN_SENT tcp 0 1 169.254.179.139:1173 64.152.100.93:119 SYN_SENT

Seite 50

Looking at /etc/services, we can tell that port 37 is a "time" service, which is a time server. 6000 isX11, and 80 is the standard port fo

Seite 51 - 8.3. Netstat Tutorial

tcp 6648 0 127.0.0.1:1162 127.0.0.1:8000 CLOSE_WAIT tcp 553 0 127.0.0.1:1164 127.0.0.1:8000 CLOSE_W

Seite 52

# netstat −tapActive Internet connections (servers and established) Local Address Foreign Address State PID/Program name *:prin

Seite 53

958 ? S 0:46 \_ named −u named 959 ? S 0:47 \_ named −u named 960 ? S 0:00 \_ named −u named 9

Seite 54

USER PID ACCESS COMMAND 631/tcp root 1315 f... cupsdSee the man pages for fuser and lsof command

Seite 55

If all else fails, and you can't find a process owner for an open port, suspect that it may be an RPC (RemoteProcedure Call) service of some kin

Seite 56

This document is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; withouteven the implied warranty of MERCHANTABILITY or FIT

Seite 57

even kernel version, and thus get even more information. "Worms", on the other hand, are automated andscan blindly, generally just looking

Seite 58

really try very hard. Just scan, look, try, move on if unsuccessful. There is always more IPs to be scanned. Ifyour firewall is effectively bouncing

Seite 59 - 8.4. Attacks and Threats

network. In this case, the attacker will look the system over for weaknesses. And possibly make many different kindsof attempts, until he finds a cra

Seite 60 - 8.4.3. Worms and Zombies

8.4.9. VirusesAnd now something not to worry about. Viruses seem to be primarily a Microsoft problem. For variousreasons, viruses are not a signific

Seite 61 - 8.4.6. Targeted Attacks

Securing Red Hat:http://tldp.org/LDP/solrhe/Securing−Optimizing−Linux−RH−Edition−v1.3/index.htmlTools for creating custom ipchains and iptables firew

Seite 62 - 8.4.8. Brute Force

Linux Security.com: http://www.linuxsecurity.com/docs/Linux Newbie: http://www.linuxnewbie.org/nhf/intel/security/index.htmlThe comp.os.linux.security

Seite 63 - 8.5. Links

There are a great many types of files, but I'm going to stretch it here, and class them into two really broadfamilies: Text files are just that.

Seite 64

o Enter insertion mode opening a new line BELOW current line.O Enter insertion mode opening a new line ABOVE current line.h move cursor left

Seite 65 - 8.6. Editing Text Files

pico −w file_2_editPico is so user friendly, no further instructions are needed. It _should_ be obvious (look at the bottom of thescreen for commands)

Seite 66

22/tcp open ssh 25/tcp open smtp 37/tcp open time 53/tc

Seite 67

small additions and clarifications.Version 1.1: Various corrections, amplifications and numerous mostly small additions. Too many to list. Ohyea, lea

Seite 68 - 8.7. nmap

This is more than just "interesting" ports −− it is everything. We picked up a couple of new ones in theprocess too. We've seen these

Seite 69

A brief note on UDP: nmap can not accurately determine the status of these ports if they are "filtered". Youprobably will get a false−posi

Seite 70

[ −e /proc/sys/net/ipv4/conf/all/log_martians ] &&\ echo 1 > /proc/sys/net/ipv4/conf/all/log_martians[ −e /proc/sys/net/ipv4/icmp_echo_igno

Seite 71 - 8.8. Sysctl Options

net.ipv4.ip_dynaddr = 1# end of example8.9. Secure AlternativesThis section will give a brief run down on secure alternatives to potentially insecure

Seite 72 - 8.8. Sysctl Options 69

## Set the location of ipchains (default).IPCHAINS=/sbin/ipchains# Local Interfaces## This is the WAN interface, that is our link to the outside world

Seite 73 - 8.9. Secure Alternatives

## Let's start clean and flush all chains to an empty state.$IPCHAINS −F # Set the default policies of the built−in chains. If no match for any

Seite 74 - 8.9. Secure Alternatives 71

## Trusted hosts/nets## This is our trusted host list. These have access to everything.for i in $TRUSTED; do $IPCHAINS −A input −s $i −j ACCEPTdone# P

Seite 75 - 8.9. Secure Alternatives 72

## ICMP (ping)## ICMP rules, allow the bare essential types of ICMP only. Ping# request is blocked, ie we won't respond to someone else's pi

Seite 76 - 8.9. Secure Alternatives 73

# Set a list of public server port numbers here...not too many!# These will be open to the world, so use caution. The example is# sshd, and HTTP (www)

Seite 77 - 8.10.2. iptables II

# already set, so all is not lost here.[ −z "$WAN_IP" ] && echo "$WAN_IFACE not configured, aborting." && exit 1WA

Seite 78 - 8.10.2. iptables II 75

2. ForewordBefore getting into specifics, let's try to briefly answer some questions about why we need to be concernedabout security in the firs

Seite 79 - 8.10.2. iptables II 76

−−dport $i −j ACCEPT $IPTABLES −t nat −A PREROUTING −p tcp −d $WAN_IP −−dport $i \ −j DNAT −−to $FORWARD_HOST:$i done## Open, but Restricte

Seite 80 - 8.10.2. iptables II 77

$IPTABLES −A DEFAULT −m state −−state NEW −i ! $WAN_IFACE −j ACCEPT# Enable logging for anything that gets this far.$IPTABLES −A DEFAULT −j LOG −m lim

Seite 81 - 8.10.3. Summary

8.10.4. iptables mini−meJust to demonstrate how succinctly iptables can be configured in a minimalist situation, the below is from theNetfilter team&

Seite 82 - 8.10.4. iptables mini−me

2.1. The Optimum ConfigurationIdeally, we would want one computer as a dedicated firewall and router. This would be a bare bonesinstallation, with no

Kommentare zu diesen Handbüchern

Keine Kommentare