440 likes | 518 Views
Linux Security Overview. Pattara Kiatisevi Research Assistant Network Technology Laboratory (NTL) National Electronics and Computer Technology Center (NECTEC) ott@nectec.or.th Jan 16, 2000. About this presentation. Based on various freely available documents
E N D
Linux Security Overview Pattara Kiatisevi Research Assistant Network Technology Laboratory (NTL) National Electronics and Computer Technology Center (NECTEC) ott@nectec.or.th Jan 16, 2000
About this presentation • Based on various freely available documents • Linux System Administrator Security Guide (http://www.securityportal.com/lasg) • Linux Security HOWTO • Linux Firewall HOWTO • Provide “Overview” of Linux Security
Introduction • Why we need security? • Example of intrusions • Make your system out of service • Make your system do undesignated jobs • Delete/Modify/Steal your data • Hacker vs. Cracker
Level of Security • Physical Security • Host Security • Network Security
Security Policy • First thing to do! • List your resources and users • Specify rights and appropriate use policy (AUP) for each user • Make it clear, easy to understand • Site Security Handbook, RFC 2196
Physical Security • Only authorized user/admin have physical access to the system • Never leave root console unattended, use lock screen software • Set BIOS password • Disable drive A:, CD-ROM at BIOS if necessary • Never note the password at the monitor/console! • Check if there is unintentional reboot
Host Security • User Account Security • Give user only what the need • Longer than 8 characters password is mandatory • Never allow telnet, consider SSH instead • No new account with blank password • Delete account when staff resigns • Use “root” only when necessary • Only staff can use “su” to become root
Service Security • Open only necessary services • File & File System Security • Make sure you understand all about UNIX permission stuff • Beware of SUID, SGID file, make a regular check of your system files • Backup regularly
Password and Encryption • Consider One-Time-Password if telnet is allowed • Crack your own users’ password regularly • Use Shadow Password, if you still don’t! • Consider using this stuff if it helps • PGP to encrypt mails, files (S/MIME maybe another alternative for E-mail) • Web Server with SSL/TLS • SSH
Kernel Security • regularly check kernel security notes • basic security options in kernel • Drop source routed frames • Syn Cookies • Source Address Verification (/proc/sys/net/ipv4/conf/all/rp_filter = 1)
Network Security • Packet Sniffer • Check if it’s running in your machine! • Check if it’s running in your network • Use Switch instead of Hub • Use One-Time-Password or Secure Shell • Restrict Network Service to only legitimate users • TCP Wrapper, filter rules • Consider using Firewall
Linux Physical Access • Computer BIOS • Disable a: • Disable Serial ports • LILO • delay = 0 • restricted • passwd = • chattr +i /etc/lilo.conf
Authentication • PAM • Pluggable Authentication Modules • PAM Smartcart module • Password • Use MD5 • Shadow Password • Crack it regularly • Password Storage
File & File System Security • SUID, SGID • find / -perm +4000 • find / -perm +2000 • Secure File Deletion • wipe • Access Control List on Linux • POSIX ACL for Linux, http://major.rithus.co.at/acl • The Linux Trustees Project, http://www.braysystems.com/linux/trustees.html
System Files • /etc/passwd • /etc/shadow • /etc/groups • /etc/gshadow • /etc/login.defs • /etc/shells • /etc/securetty
Encrypting Services/Data • PGP (Pretty Good Privacy), http://www.pgp.com/, http://www.pgpi.com/ • GnuPG (Gnu Privacy Guard) • PGP4PINE • S/MIME
Encrypting your harddrive • CFS (Cryptographic Filesystem), http://www.cryptography.org/ • TCFS, http://tcfs.dia.unisa.it/ • PPDD, http://linux01.gwdg.de/~alatham • StegFS, http://ban.joh.cam.ac.thk/~adm36/StegFS/ • Best Crypt, http://www.jetico.com/
Network Encryption • IPSec • SSL/TLS, http://www2.psy.uq.edu.au/~ftp/Crypto/, http://www.openssl.org/ • Source of random data
Network Security • PPP Security • PAP, CHAP • TCP/IP Security • TCP/IP is robust but no real provisions for security • Don’t use hostname-based authentication • IPSec • IPv6 • HUNT, http://www.cri.cz/kra/
Basic Config Files and Utilities • /etc/inetd.conf • /etc/services • TCP Wrapper • /etc/hosts.deny, /etc/hosts.allow • Useful commands • ps aux • netstat • lsof
Network-based Authentication • NIS/NIS+ • NIS/NIS+ Howto • Can VPN replace NIS/NIS+? • Kerboros, http://web.mit.edu/kerberos/www
Certificate Authorities Software for Linux • OpenCA, http://www.openca.org/, based on OpenSSL, http://www.openssl.org/ • pyCA, http://sites.inka.de/ms/python/pyca/
Internet Server Software • Chroot them? • Keep them up to date • Filter their ports appropriately
DHCP • Firewall to filter DHCP traffic both incoming/outgoing
SMTP • Sendmail • Former security nightmare for admin • Keep it up to date! • If only send out, run in queue mode “sendmail -q1h” • /etc/mail/* • access • domaintable • virtusertable • Postfix • Sendmail Pro, Qmail, Zmailer, Dmail, nullmailer
POP/IMAP Server • Consider use them with SSL • STunnel
Virus • Does UNIX have Virus? • Virus Scanner & Cleaner Software • McAfee (Shareware) • Dr.Solomon (commercial) • AntiVir/X (free for noncommercial) • InterScan Viruswall • Scan incoming E-mails for Viral • AMaViS (Use with McAfee and Sendmail or Postfix)
WWW Server • Apache (http://www.apache.org) • Controlling Access (.htaccess) • Apache with SSL • Apache-SSL • Apache with mod_ssl • Red Hat Secure Server (Apache + RSA Cryptographic modules, USA and Canada only) • Roxen (from Sweden), SSL 40/128 bit support • AOL, Zeus, Webfs, Flash Web Server
Accessing your Web Server • FTP • replace Wu-FPD with ProFTPD ? • Samba, http://www.samba.org/ • Frontpage Access, http://www.rtr.com/ • Rear Site, http://listes.cru.fr/rs/fd • Fast Webpage Exchanger, http://www.enjoy.ne.jp/~gm/program/iwe_en.html
Proxy/Cache Server • Squid • Good ACL support in configuration file already • is it legal to keep log files?? • SquidGuard: External program to handle ACL, filtering, redirection • SOCKS
Telnet • Are you still using Telnet? • TCP-Wrapper, One-Time-Password, SSH might help
Secure Shell (SSH) • Server • SSH 1, 2 • OpenSSH • LSH • Client • SSH • SecureCRT, Fsecure • PuTTy, Mindterm, TeraTerm
X Window System • Firewall port 6000-6010 • SSH, http://csociety.ecn.purdue.edu/~sigos/projects/ssh/forwarding
Firewalling • Linux supports firewalling • IP Filtering • IP Masquerade • Port forwarding • Quality of Service • IPFWADM (Linux 2.0.x) • IPCHAINS (Linux 2.2.x)
IPCHAINS • Powerful packet filter for Linux • A lot of tools to help generating IPCHAINS script • pmfirewall • fwconfig • FCT • kfirewall • a lot more ..
Other firewall software • TIS • IPF • SINUS • Phoenix Adaptive Firewall (commercial, ICSA Certified), http://www.progressive-systems.com/products/phoenix/
Virtual Private Networks • IPSec (Free S/WAN Project for Linux), http://www.freeswan.org/) • PPTP, http://www.moretonbay.com/vpn/pptp.html) • SSH (with many helper scripts & GUI) • Virtual Tunnel (VTUN), http://vtun.netpedia.net/ • Zebedee, http://www.winton.org/uk/zebedee/ • Stunnel, SSL-based, http://mike.daewoo.com/pl/computer/stunnel/
Administrative tools • Local Tools • super, super, runas • WWW-based Tools • Webmin • Linuxconf • COAS • Remote • VNC, http://www.uk.research.att.com/vnc/
Limiting and Monitoring Users • PAM • Bash Startup script (with ulimit command) • Quota • ttysnoop (legal problems, be warned!!), http://uscan.cjb.net/ • UserIPAcct, http://zaheer.grid9.net/useripacct
Log Files • General Logs Security • Append only mode: chattr +a <filename> • Immutable: chattr +i <filename> • More secure systems than syslog • syslog-ng • secure-syslog • Msyslogd
Intrusion Detection • Baselines • Audits • Tripwire (not free anymore) • AIDE, http://www.cs.tut.fi/~rammer/aide.html • L5, ftp://avian.org/src/hacks • Gog&Magog, http://www.multimania.com/cparisel/gog • ViperDB, http://www.resentment.org/projects/viperdb • Sxid, ftp://marcus.seva.net/pub/sxid
Nannie, ftp://tools.tradeservices.com/pub/nannie • confcollect, http://www.skagelund.com/confcollect • Pikt, http://pikt.uchicago.edu/pikt • Linux Intrusion Detection System, http://www.soaring-bird.com.cn/oss_proj/lids/ • Scanning • COPS, Tiger (obsolete) • Strobe, nmap (port scanner), http://www.insecure.org/nmap/ • Nessus, http://www.nessus.org/ • Satan, Saint, http://www.wwdsi.com/saint
Sniffer • tcpdump • sniffit, http://sniffit.rug.ac.be/~coder/sniffit/sniffit.html • Ethereal, http://etheral.zing.org/ • SPY (commercial) • AnitiSniff, http://www.l0pht.com/antisniff/
Read More • LASG, http://www.securityportal.com/lasg • Linux Security, Firewall, VPN, IP-CHAINS HOWTO • CERT • http://www.rootshell.com/ • http://www.securityportal.com/