SlideShare a Scribd company logo
Linux Security Tanner Lovelace 15-March-2000
Outline What do we mean by security? What do we want to accomplish with our security Types of security What do you do if you get cracked? Summary Questions
What is Security? “A computer is secure if you can depend on it and its software to behave as you expect.” --  Practical Unix & Internet Security , p.6.
A different definition... Security is being able to keep your system safe from misuse by unauthorized users...
Outline What do we mean by security? What do we want to accomplish with our security Types of security What do you do if you get cracked? Summary Questions
Initial Questions What level of threat do you have to protect against? What risks should you take? How vulnerable is your system as a result of those decisions
More Questions... What are you protecting? Why are you protecting it? What value does it have? How long would it take to retrieve/recreate any lost data? How secure is secure enough?
Outline What do we mean by security? What do we want to accomplish with our security Types of security What do you do if you get cracked? Summary Questions
Three Aspects of Security Physical Security System Security Network Security
Physical Security Home systems Keep your doors locked. :-) Locked cabinets, cables, etc… Laptops Never leave your laptop unattended If you’re worried consider a small travel alarm
Physical Access Security BIOS Passwords Boot loader passwords Screensaver passwords xlock, vlock, etc...
System Security Backups, backups, backups Choosing good passwords Correct file permissions Don’t have too many users Don’t log in as root!
Backups If something is critical there should be more than one copy of it somewhere. Many different ways to make backups Floppy disk Zip disk Tape CD-R
What’s your password? Passwords should not be easy to guess Names (especially your own), places, pets are bad Word combinations or acronyms are much better Ex. misc*NSA Short is bad, longer is better Make use of the fact that passwords are case sensitive gooD*paSSWord  !=  Good*Password
Keeping Your Password Safe Make sure your passwords are not easily accessible. Never leave an unencrypted password anywhere Never give your password to anyone Use shadow passwords Never send your password over the network unencrypted Use ssh instead of telnet or rsh/rlogin
File Permissions Set UID bit can let a program run as the user who owns it. This can be  bad news  if a program is owned by root and doesn’t need to run as root. Some programs legitimately need this (i.e. X, sendmail) Check permissions regularly on suspicious and note when something changes.
How do I check if a file is SUID root? How do you check if something is SUID root? % ls –l <filename> -rw s r-xr-x  root  <filename> How to you change something to be  not  suid root? % chmod u-s <filename> How do you check all your files? % find / -perm +u+s -uid 0 -print
Users If someone never uses your machine, don’t give them an account. Unless there is a need, don’t setup a guest account. This is one of the most common ways of gaining unauthorized access. Always make sure there is at least one normal user account and use that for everything you do.
Never Log in as Root! Repeat after me... Never log in as root! Never log in as root! Never log in as root! If you need to do something that requires root privileges use the  su  command If you just need to do one thing, use: su –c <command>
Network Security Network security is the hardest thing to get right and the easiest thing to exploit. Guidelines Only run the minimum network services you need Set up some network filters
Services A network service is a program that runs all the time and responds to requests from the network. Sendmail, Apache, Finger, Talk, POP, Telnet, Ftp, ... Identify which services you need to run and turn everything else off i.e. a local home machine doesn’t need to run a POP e-mail server Some don’t run all the time, but are started by a “superserver” called inetd.
Inetd Inetd listens on many different ports and when it hears a connection it starts up the appropriate service. Keeps memory requirements low because services only run when needed. Makes it easy to turn off services Just comment them out in /etc/inetd.conf.
inetd.conf ftp  stream  tcp  nowait  root  /usr/sbin/tcpd  in.ftpd -l -a telnet stream  tcp  nowait  root  /usr/sbin/tcpd  in.telnetd #shell  stream  tcp  nowait  root  /usr/sbin/tcpd  in.rshd #login  stream  tcp  nowait  root  /usr/sbin/tcpd  in.rlogind #exec  stream  tcp  nowait  root  /usr/sbin/tcpd  in.rexecd #comsat dgram  udp  wait  root  /usr/sbin/tcpd  in.comsat #talk  dgram  udp  wait  root  /usr/sbin/tcpd  in.talkd #ntalk  dgram  udp  wait  root  /usr/sbin/tcpd  in.ntalkd #dtalk  stream  tcp  waut  nobody  /usr/sbin/tcpd  in.dtalkd #pop-2  stream  tcp  nowait  root  /usr/sbin/tcpd ipop2d #pop-3  stream  tcp  nowait  root  /usr/sbin/tcpd  ipop3d #imap  stream  tcp  nowait  root  /usr/sbin/tcpd  imapd
Standalone services Apache Sendmail Linuxconf NFS Consult your documentation on how to turn these services off.
Setting up Network Filters IPChains Allows you to specify what kind of packets you want to accept and what kind you want to reject. Examples You probably don’t want someone remotely accessing your NFS ports. You probably don’t want to accept packets that claim to be from your local network that come from a remote port. Finding the right combination of rules can be hard.
Lokkit Written by Alan Cox Helps configure correct firewall rules http://www.linux.org.uk/apps/lokkit.shtml
Outline What do we mean by security? What do we want to accomplish with our security Types of security What do you do if you get cracked? Summary Questions
If you discover you’re in the process of being cracked right now! Unplug your network/modem connection  immediately Make backups of your system logs Use to discover what the intruder did Check your /etc/passwd file for an account, besides root, with a uid of 0. If you can afford to... Reformat your drive and reinstall the OS. Don’t reconnect your network until you are sure the intruder can’t get back in.
If you discover that you were cracked Unplug your network/modem connection  Make backups of your system logs Use to discover what the intruder did Check your /etc/passwd file for an account, besides root, with a uid of 0. If you can afford to... Reformat your drive and reinstall the OS. Don’t reconnect your network until you are sure the intruder can’t get back in. Hmm... I think I have a sense of deja vu... :-)
Outline What do we mean by security? What do we want to accomplish with our security Types of security What do you do if you get cracked? Summary Questions
Summary of Good Security Practices Good security is mostly common sense. If you don’t use something, don’t run it. Always make sure your system has all the latest updates. Don’t be afraid to ask questions and consult references.
Outline What do we mean by security? What do we want to accomplish with our security Types of security What do you do if you get cracked? Summary Questions
Enough References to get started... Garfinkel, Simson & Gene Spafford,  Practical Unix and Internet Security , 1996, O’Reilly & Associates, Inc. “ Linux Security HOWTO” ( http://www.linuxdoc.org/HOWTO/Security-HOWTO.html ) Lokkit ( http://www.linux.org.uk/apps/lokkit.shtml ) or ( ftp://ftp.linux.org.uk/pub/linux/alan/Lokkit/ ) Many others… (see your favorite search engine)

More Related Content

What's hot (20)

PPTX
Public Key Cryptosystems and RSA
Chris Theisen
 
PPT
introduction to cryptography
Priyamvada Singh
 
PPT
Cryptography
Suhepi Saputri
 
PPTX
Introduction to SSH & PGP
Sarang Ananda Rao
 
PDF
Network security cs9 10
Infinity Tech Solutions
 
PPT
Network Security & Cryptography
Dr. Himanshu Gupta
 
PDF
Ssh that wonderful thing
Marc Cluet
 
PPT
Java Asymmetric
phanleson
 
PDF
Asymmetric Cryptography
UTD Computer Security Group
 
PDF
Introduction to and survey of TLS Security
Aaron Zauner
 
PDF
Строим ханипот и выявляем DDoS-атаки
Positive Hack Days
 
PPTX
Network security Encryption
Joel Briza
 
PPTX
Secret key cryptography
Prabhat Goel
 
PPT
What is Encryption
Israel Marcus
 
PDF
Cryptography Attacks and Applications
UTD Computer Security Group
 
PPT
Kleptography
Erfan Mallick
 
PPT
Rsa and diffie hellman algorithms
daxesh chauhan
 
PPTX
Hybrid encryption
ranjit banshpal
 
PDF
Ch12 Encryption
phanleson
 
Public Key Cryptosystems and RSA
Chris Theisen
 
introduction to cryptography
Priyamvada Singh
 
Cryptography
Suhepi Saputri
 
Introduction to SSH & PGP
Sarang Ananda Rao
 
Network security cs9 10
Infinity Tech Solutions
 
Network Security & Cryptography
Dr. Himanshu Gupta
 
Ssh that wonderful thing
Marc Cluet
 
Java Asymmetric
phanleson
 
Asymmetric Cryptography
UTD Computer Security Group
 
Introduction to and survey of TLS Security
Aaron Zauner
 
Строим ханипот и выявляем DDoS-атаки
Positive Hack Days
 
Network security Encryption
Joel Briza
 
Secret key cryptography
Prabhat Goel
 
What is Encryption
Israel Marcus
 
Cryptography Attacks and Applications
UTD Computer Security Group
 
Kleptography
Erfan Mallick
 
Rsa and diffie hellman algorithms
daxesh chauhan
 
Hybrid encryption
ranjit banshpal
 
Ch12 Encryption
phanleson
 

Viewers also liked (15)

PDF
Linux Solutions Presentation Eng 2016
Linux Solutions
 
PPT
Linux red hat overview and installation
devenderbhati
 
PPT
Linux Firewall - NullCon Chennai Presentation
Vinoth Sivasubramanan
 
PDF
Security of Linux containers in the cloud
Dobrica Pavlinušić
 
PPTX
Linux security introduction
Mohamed Gad
 
PPT
Firewall(linux)
Santosh Khadsare
 
PPTX
Presentation for RHCE in linux
Kuldeep Tiwari
 
PPTX
Kali Linux - Falconer - ISS 2014
TGodfrey
 
PPTX
Kali Linux - Falconer
Tony Godfrey
 
PPT
Basic Linux Security
pankaj009
 
PPTX
Linux Security Overview
Kernel TLV
 
ODP
Introduction To Linux Security
Michael Boman
 
PDF
Linux Security, from Concept to Tooling
Michael Boelen
 
PPT
Security and Linux Security
Rizky Ariestiyansyah
 
PDF
Ten Things To Get You Through The Tough Times In Sales
Abhishek Shah
 
Linux Solutions Presentation Eng 2016
Linux Solutions
 
Linux red hat overview and installation
devenderbhati
 
Linux Firewall - NullCon Chennai Presentation
Vinoth Sivasubramanan
 
Security of Linux containers in the cloud
Dobrica Pavlinušić
 
Linux security introduction
Mohamed Gad
 
Firewall(linux)
Santosh Khadsare
 
Presentation for RHCE in linux
Kuldeep Tiwari
 
Kali Linux - Falconer - ISS 2014
TGodfrey
 
Kali Linux - Falconer
Tony Godfrey
 
Basic Linux Security
pankaj009
 
Linux Security Overview
Kernel TLV
 
Introduction To Linux Security
Michael Boman
 
Linux Security, from Concept to Tooling
Michael Boelen
 
Security and Linux Security
Rizky Ariestiyansyah
 
Ten Things To Get You Through The Tough Times In Sales
Abhishek Shah
 
Ad

Similar to Old Linux Security Talk (20)

PDF
7 unixsecurity
richarddxd
 
PDF
Linux security quick reference guide
Craig Cannon
 
PPT
Ch11 system administration
Raja Waseem Akhtar
 
PPT
Threats, Vulnerabilities & Security measures in Linux
Amitesh Bharti
 
PPT
Event - Internet Thailand - Total Security Perimeters
Somyos U.
 
PPT
Introduction To Unix
CTIN
 
PDF
Linux advanced privilege escalation
Jameel Nabbo
 
PPT
Linux Security
nayakslideshare
 
PDF
Your First Guide to "secure Linux"
Toshiharu Harada, Ph.D
 
PDF
James Jara Portfolio 2014 - InfoSec White Paper- Part 5
James Jara
 
PPT
Host security
Nguyen Tam
 
PPT
Host security
Nguyen Tam
 
PPT
Linux security-fosster-09
Dr. Jayaraj Poroor
 
PDF
Don't Get Hacked on Hostile WiFi
Mackenzie Morgan
 
PPTX
10 Tips for AIX Security
HelpSystems
 
PDF
Linux Security best Practices with Fedora
Uditha Bandara Wijerathna
 
PPT
Unix Security
replay21
 
PDF
EMSC1515104 Shehansuhail
Mohomed Shehan
 
PPT
The Top 10/20 Internet Security Vulnerabilities – A Primer
amiable_indian
 
7 unixsecurity
richarddxd
 
Linux security quick reference guide
Craig Cannon
 
Ch11 system administration
Raja Waseem Akhtar
 
Threats, Vulnerabilities & Security measures in Linux
Amitesh Bharti
 
Event - Internet Thailand - Total Security Perimeters
Somyos U.
 
Introduction To Unix
CTIN
 
Linux advanced privilege escalation
Jameel Nabbo
 
Linux Security
nayakslideshare
 
Your First Guide to "secure Linux"
Toshiharu Harada, Ph.D
 
James Jara Portfolio 2014 - InfoSec White Paper- Part 5
James Jara
 
Host security
Nguyen Tam
 
Host security
Nguyen Tam
 
Linux security-fosster-09
Dr. Jayaraj Poroor
 
Don't Get Hacked on Hostile WiFi
Mackenzie Morgan
 
10 Tips for AIX Security
HelpSystems
 
Linux Security best Practices with Fedora
Uditha Bandara Wijerathna
 
Unix Security
replay21
 
EMSC1515104 Shehansuhail
Mohomed Shehan
 
The Top 10/20 Internet Security Vulnerabilities – A Primer
amiable_indian
 
Ad

Recently uploaded (20)

PDF
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
PPT
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
PDF
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PPTX
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit
 
PDF
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
PDF
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
PDF
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
PDF
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit
 
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 

Old Linux Security Talk

  • 1. Linux Security Tanner Lovelace 15-March-2000
  • 2. Outline What do we mean by security? What do we want to accomplish with our security Types of security What do you do if you get cracked? Summary Questions
  • 3. What is Security? “A computer is secure if you can depend on it and its software to behave as you expect.” -- Practical Unix & Internet Security , p.6.
  • 4. A different definition... Security is being able to keep your system safe from misuse by unauthorized users...
  • 5. Outline What do we mean by security? What do we want to accomplish with our security Types of security What do you do if you get cracked? Summary Questions
  • 6. Initial Questions What level of threat do you have to protect against? What risks should you take? How vulnerable is your system as a result of those decisions
  • 7. More Questions... What are you protecting? Why are you protecting it? What value does it have? How long would it take to retrieve/recreate any lost data? How secure is secure enough?
  • 8. Outline What do we mean by security? What do we want to accomplish with our security Types of security What do you do if you get cracked? Summary Questions
  • 9. Three Aspects of Security Physical Security System Security Network Security
  • 10. Physical Security Home systems Keep your doors locked. :-) Locked cabinets, cables, etc… Laptops Never leave your laptop unattended If you’re worried consider a small travel alarm
  • 11. Physical Access Security BIOS Passwords Boot loader passwords Screensaver passwords xlock, vlock, etc...
  • 12. System Security Backups, backups, backups Choosing good passwords Correct file permissions Don’t have too many users Don’t log in as root!
  • 13. Backups If something is critical there should be more than one copy of it somewhere. Many different ways to make backups Floppy disk Zip disk Tape CD-R
  • 14. What’s your password? Passwords should not be easy to guess Names (especially your own), places, pets are bad Word combinations or acronyms are much better Ex. misc*NSA Short is bad, longer is better Make use of the fact that passwords are case sensitive gooD*paSSWord != Good*Password
  • 15. Keeping Your Password Safe Make sure your passwords are not easily accessible. Never leave an unencrypted password anywhere Never give your password to anyone Use shadow passwords Never send your password over the network unencrypted Use ssh instead of telnet or rsh/rlogin
  • 16. File Permissions Set UID bit can let a program run as the user who owns it. This can be bad news if a program is owned by root and doesn’t need to run as root. Some programs legitimately need this (i.e. X, sendmail) Check permissions regularly on suspicious and note when something changes.
  • 17. How do I check if a file is SUID root? How do you check if something is SUID root? % ls –l <filename> -rw s r-xr-x root <filename> How to you change something to be not suid root? % chmod u-s <filename> How do you check all your files? % find / -perm +u+s -uid 0 -print
  • 18. Users If someone never uses your machine, don’t give them an account. Unless there is a need, don’t setup a guest account. This is one of the most common ways of gaining unauthorized access. Always make sure there is at least one normal user account and use that for everything you do.
  • 19. Never Log in as Root! Repeat after me... Never log in as root! Never log in as root! Never log in as root! If you need to do something that requires root privileges use the su command If you just need to do one thing, use: su –c <command>
  • 20. Network Security Network security is the hardest thing to get right and the easiest thing to exploit. Guidelines Only run the minimum network services you need Set up some network filters
  • 21. Services A network service is a program that runs all the time and responds to requests from the network. Sendmail, Apache, Finger, Talk, POP, Telnet, Ftp, ... Identify which services you need to run and turn everything else off i.e. a local home machine doesn’t need to run a POP e-mail server Some don’t run all the time, but are started by a “superserver” called inetd.
  • 22. Inetd Inetd listens on many different ports and when it hears a connection it starts up the appropriate service. Keeps memory requirements low because services only run when needed. Makes it easy to turn off services Just comment them out in /etc/inetd.conf.
  • 23. inetd.conf ftp stream tcp nowait root /usr/sbin/tcpd in.ftpd -l -a telnet stream tcp nowait root /usr/sbin/tcpd in.telnetd #shell stream tcp nowait root /usr/sbin/tcpd in.rshd #login stream tcp nowait root /usr/sbin/tcpd in.rlogind #exec stream tcp nowait root /usr/sbin/tcpd in.rexecd #comsat dgram udp wait root /usr/sbin/tcpd in.comsat #talk dgram udp wait root /usr/sbin/tcpd in.talkd #ntalk dgram udp wait root /usr/sbin/tcpd in.ntalkd #dtalk stream tcp waut nobody /usr/sbin/tcpd in.dtalkd #pop-2 stream tcp nowait root /usr/sbin/tcpd ipop2d #pop-3 stream tcp nowait root /usr/sbin/tcpd ipop3d #imap stream tcp nowait root /usr/sbin/tcpd imapd
  • 24. Standalone services Apache Sendmail Linuxconf NFS Consult your documentation on how to turn these services off.
  • 25. Setting up Network Filters IPChains Allows you to specify what kind of packets you want to accept and what kind you want to reject. Examples You probably don’t want someone remotely accessing your NFS ports. You probably don’t want to accept packets that claim to be from your local network that come from a remote port. Finding the right combination of rules can be hard.
  • 26. Lokkit Written by Alan Cox Helps configure correct firewall rules http://www.linux.org.uk/apps/lokkit.shtml
  • 27. Outline What do we mean by security? What do we want to accomplish with our security Types of security What do you do if you get cracked? Summary Questions
  • 28. If you discover you’re in the process of being cracked right now! Unplug your network/modem connection immediately Make backups of your system logs Use to discover what the intruder did Check your /etc/passwd file for an account, besides root, with a uid of 0. If you can afford to... Reformat your drive and reinstall the OS. Don’t reconnect your network until you are sure the intruder can’t get back in.
  • 29. If you discover that you were cracked Unplug your network/modem connection Make backups of your system logs Use to discover what the intruder did Check your /etc/passwd file for an account, besides root, with a uid of 0. If you can afford to... Reformat your drive and reinstall the OS. Don’t reconnect your network until you are sure the intruder can’t get back in. Hmm... I think I have a sense of deja vu... :-)
  • 30. Outline What do we mean by security? What do we want to accomplish with our security Types of security What do you do if you get cracked? Summary Questions
  • 31. Summary of Good Security Practices Good security is mostly common sense. If you don’t use something, don’t run it. Always make sure your system has all the latest updates. Don’t be afraid to ask questions and consult references.
  • 32. Outline What do we mean by security? What do we want to accomplish with our security Types of security What do you do if you get cracked? Summary Questions
  • 33. Enough References to get started... Garfinkel, Simson & Gene Spafford, Practical Unix and Internet Security , 1996, O’Reilly & Associates, Inc. “ Linux Security HOWTO” ( http://www.linuxdoc.org/HOWTO/Security-HOWTO.html ) Lokkit ( http://www.linux.org.uk/apps/lokkit.shtml ) or ( ftp://ftp.linux.org.uk/pub/linux/alan/Lokkit/ ) Many others… (see your favorite search engine)

Editor's Notes

  • #2: Note that since security is such a broad topic that there are some issues that I will only briefly touch on tonight. Feel free to look them up from the references or ask questions if you want to.