L INUX HARDENING پروژه ی درس امنیت سیستم عامل استاد پهلوان هدی سادات محمدقلی رضا حمزه 1.

Slides:



Advertisements
Similar presentations
System Security Scanning and Discovery Chapter 14.
Advertisements

Unix Refresher This presentation is an amalgam of presentations by Mark Michael, Randy Marchany and Ed Skoudis. I have edited and added material. Dr. Stephen.
Chapter 21 Security. Computer Center, CS, NCTU 2 Firewall (1)  Using ipfw 1.Add these options in kernel configuration file and recompile the kernel 2.Edit.
Securing Network using Linux. Lesson Outline Setting up a secure system TCP Wrapper configuration Firewalls in Linux Authentication Systems –NIS –Kerberos.
Homework 5b: Samba. Computer Center, CS, NCTU 2 Network-based File Sharing (1)  NFS (UNIX-based) mountd is responsible for mount request nfsd and nfsiod.
Linux+ Guide to Linux Certification, Second Edition
Chapter 3 Unix Overview. Figure 3.1 Unix file system.
Voyager Server Security and Monitoring Best practices and tools.
A short two-part talk introducing: Basic Linux/Unix system administration (CentOS/RHEL5) General Computer/Network security … for the G53SEC module. Nick.
Network File System CIS 238. NFS (Network File System) The most commercially successful and widely available remote file system protocol Designed and.
UNIT - III. Installing Samba Windows uses Sever Message Block(SMB) to communicate with each other using sharing services like file and printer. Samba.
Linux System Administration LINUX SYSTEM ADMINISTRATION.
Va-scanCopyright 2002, Marchany Securing Solaris Servers Randy Marchany.
UNIX ™ /Linux Overview Unix/IP Preparation Course June 9, 2013 Lusaka, Zambia.
Partner Logo German Cancio – WP4-install LCFG HOW-TO - n° 1 WP4 hands-on workshop: EDG LCFGng exercises
SSH. Review 1-minute exercise: Find the open ports on you own VM [Good] nmap [Better] netstat -lpunt.
system hardening Act of modifying a system to make it more secure Protecting against internal and external threats Usually a balance between security.
EDG LCFGng: concepts Fabric Management Tutorial - n° 2 LCFG (Local ConFiGuration system)  LCFG is originally developed by the.
Network Services CSCI N321 – System and Network Administration Copyright © 2000, 2007 by Scott Orr and the Trustees of Indiana University.
2/19/2003 Lecture 3 Computer System Administration Lecture 3 Setup (continued)
COSC 4750 Customizing and maintenance. Installing software Redhat/Fedora (and linux in general) has a package installer, called rpm Many programs will.
A few Linux basics Network Monitoring & Management.
CIS 450 – Network Security Chapter 16 – Covering the Tracks.
Unix Operating Systems Module 7. Unix Operating System Versions Basic Information User and Group Settings File Permissions Local Firewall Local Security.
ITI-481: Unix Administration Meeting 3. Today’s Agenda Hands-on exercises with booting and software installation. Account Management Basic Network Configuration.
Introduction to Unix – CS 21
CERN Manual Installation of a UI – Oxford July - 1 LCG2 Administrator’s Course Oxford University, 19 th – 21 st July Developed.
CVS Client/Server CVS (GNU CVS) –Open source –Cross-platform Designed as a client/server application Remote access –Client cvs: uses rsh or ssh to establish.
Day 11 SAMBA NFS Logs Managing Users. SAMBA Implements the ability for a Linux machine to communicate with and act like a Windows file server. –Implements.
Linux Services Muhammad Amer. 2 xinetd Programs  In computer networking, xinetd, the eXtended InterNET Daemon, is an open-source super-server daemon.
Samba Server Configuration
Basic Router Configuration 1.1 Global configuration Cisco allows us to configure the router to support various protocols and interfaces. The router stores.
Linux Administration. Pre-Install Different distributions –Redhat, Caldera, mandrake, SuSE, FreeBSD Redhat Server Install –Check HCL –Significant issues.
Linux Security. See who's logged in 1) w (more information) 2) who (less information)
CIS 450 – Network Security Chapter 14 – Specific Exploits for UNIX.
1 Periodic Processes and the cron Daemon The cron daemon is where all timed events are initiated. The cron system is serviced by the cron daemon. What.
Chapter 3 & 6 Root Status and users File Ownership Every file has a owner and group –These give read,write, and execute priv’s to the owner, group, and.
Core System Services. INIT Daemon The init process is the patron of all processes. first process that gets started in any Linux/ UNIX -based system.
1 Linux Security. 2 Linux is not secure No computer system can ever be "completely secure". –make it increasingly difficult for someone to compromise.
1 LINUX SECURITY. 2 Outline Introduction Introduction - UNIX file permission - UNIX file permission - SUID / SGID - SUID / SGID - File attributes - File.
SSH Tricks Slide 1 SSH Tricks Matthew G. Marsh. SSH Tricks Slide 2 Overview  SSH –What is it –How does it work  Discussion of Network Topology –Tricks.
Phil Hurvitz Securing UNIX Servers with the Secure.
TCOM Information Assurance Management System Hacking.
1 Security. 2 Linux is not secure No computer system can ever be "completely secure". –make it increasingly difficult for someone to compromise your system.
XWN740 X-Windows Configuring and Using Remote Access (Chapter 13: Pages )‏
Securing Linux By Terrance Marcelle.
Securing the Linux Operating System Erik P. Friebolin.
Unix network Services. Configuring a network interface In Unix there are essentially two commands that are used to enable TCP/IP. ifconfig route.
CSC414 “Introduction to UNIX/ Linux” Lecture 6. Schedule 1. Introduction to Unix/ Linux 2. Kernel Structure and Device Drivers. 3. System and Storage.
Lecture 02 File and File system. Topics Describe the layout of a Linux file system Display and set paths Describe the most important files, including.
Unit – 5 FTP Server. FTP Introduction One of the oldest and most commonly used protocols The original specification for the File Transfer Protocol was.
Linux Security. I WILL DISCUSSING ABOUT … History of Linux Linux Distributions Linux Architecture Physical Security Operating System Security Network.
CACI Proprietary Information | Date 1 Upgrading to webMethods Product Suite Name: Semarria Rosemond Title: Systems Analyst, Lead Date: December 8,
PRESENTED BY ALI NASIR BITF13M040 AMMAR HAIDER BITF13M016 SHOIAB BAJWA BITF13M040 AKHTAR YOUNAS BITF13M019.
Getting Started with Linux
Lab 05 Firewalls.
Chapter 9 Router Configuration (Ospf, Rip) Webmin, usermin Team viewer
CompTIA Server+ Certification (Exam SK0-004)
LINUX ADMINISTRATION 1
Lab 1 introduction, debrief
Overview of Unix Jagdish S. Gangolly School of Business
IS3440 Linux Security Unit 6 Using Layered Security for Access Control
Network Services CSCI N321 – System and Network Administration
INSTALLING AND SETTING UP APACHE2 IN A LINUX ENVIRONMENT
Nessus Vulnerability Scanning
Network Services.
LINUX SYSTEM ADMINISTRATION
Remote Computing Services Cloud connection Distributed system
Periodic Processes Chapter 9.
Convergence IT Services Pvt. Ltd
Presentation transcript:

L INUX HARDENING پروژه ی درس امنیت سیستم عامل استاد پهلوان هدی سادات محمدقلی رضا حمزه 1

L INUX HARDENING چیست ؟ 2

L INUX HARDENING جایگاه آموزشی 3

4 LPI Course 1LPI Course 2LPI Course 3 Shell Scripting Course

L INUX HARDENING جایگاه اجرایی و عملیاتی 5

Pre InstallationInstallationPost Installation 6

L INUX HARDENING Check List 7

A RE YOU HIDING SENSITIVE FILES AND FOLDERS ? How to hide a file in Linux? $ mv FileName.FileName How do we find a hidden file in Linux? $ ls –a in command line Press Ctl+H in Xwindow Who must identify sensitive files? You should always check the list of hidden files on your system and keep them in a file. $ find / -name “.*” > /hidenfiles.txt 8 1

C HECK FOR S ECURITY ON K EY F ILES verify that /etc/passwd, /etc/shadow & /etc/group are all owned by 'root‘ verify that permissions on /etc/passwd & /etc/group are rw-r--r-- (644) verify that permissions on /etc/shadow are r (400) /etc/fstab: make sure the owner & group are set to root root and the permissions are set to 0644 (-rw-r--r--) 9 2

D EFAULT P ASSWORD P OLICY Ensure the default system password policy matches your organization password policy. These settings are stored in /etc/login.defs and should minimally contain settings for the following. For a complete list of options, see the online man page at: PASS_MAX_DAYS 90 PASS_MIN_DAYS 6 PASS_MIN_LEN 14 PASS_WARN_AGE 7 3

X INETD AND INETD. CONF If running the older /etc/inetd.conf file, be sure to disable unnecessary services by removing them (or commenting them out) from the inetd.conf file. For example, to remove telnet access, remove the following line: telnet stream tcp nowait root /usr/sbin/telnetd telnetd -a 11 4

S YSTEM P ATCHES Most Linux systems work with either rpm (RedHat Package Manager, also used by Mandrake and Suse), apt/dpkg (Debian Package Manager), or YUM (Yellowdog Linux Manager). You can update specific software individually using these commands, or use your vendor's updating tools. 12 5

D O YOU HAVE DELETED A FILE SHARING SOFTWARE ? NFS : Network File System SMB : Server Message Block 13 6

O NLY ALLOW ROOT TO ACCESS CRON & A T The cron daemon is used to schedule processes. The crontab command is used to create personal crontab entries for users or the root account. To enhance security of the cron scheduler, you can establish the cron.deny and cron.allow files to control use of the crontab. The following commands will establish root as the only user with permission to add cron jobs. # cd /etc/ # /bin/rm -f cron.deny at.deny # echo root >cron.allow # echo root >at.allow # /bin/chown root:root cron.allow at.allow # /bin/chmod 400 cron.allow at.allow 14 7

D ISABLING U NNECESSARY S ERVICES Hardening systems by eliminating unnecessary services can enhance security and improve overall system performance. To begin, you first need to know which services are running on your system. Since services run in various ways, there are several places to check. # setup # ps –ax : will list all currently running processes # netstat –a : will list all open ports # chkconfig –list : will show the current startup status of all processes known by chkconfig 15 8

D ISABLING U NNECESSARY S ERVICES To stop the running service : # service stop sshd To stop the service at startup time, use the chkconfig command or remove the startup script. To use chkconfig: # /sbin/chkconfig –levels 2345 sshd off Some services may need to be removed from /etc/inetd.conf or /etc/xinetd.d. This is detailed in the Xinetd section of this documentXinetd 16 8

R EMOTE A CCESS AND SSH B ASIC S ETTINGS Some folks also suggest running ssh on an alternate port, although others consider this to be ‘security through obscurity’. Regardless of your opinion, it’s very easy to change the port that ssh runs on by simply changing the “Port” setting in the sshd_config file, then stopping and restarting ssh. Running ssh on an alternate port will help you avoid port scanners that are looking for open port 22 and the scripted brute-force attempts on this port. Telnet is not recommended for remote access. Secure Shell (SSH) provides encrypted telnet-like access and is considered a secure alternative to telnet. However, older versions of SSH have vulnerabilities and should not be used. To disable SSH version 1 and enhance the overall security of SSH, consider making the following changes to your sshd_config file: 17 9

R EMOTE A CCESS AND SSH B ASIC S ETTINGS Protocol 2 PermitRootLogin no PermitEmptyPasswords no Banner /etc/issue IgnoreRhosts yes RhostsAuthentication no RhostsRSAAuthentication no HostbasedAuthentication no LoginGraceTime 1m(or less – default is 2 minutes) SyslogFacility AUTH(provides logging under syslog AUTH) AllowUser [list of users allowed access] DenyUser [list of system accounts and others not allowed] MaxStartups 10 (or less – use 1/3 the total number of remote users) Note: MaxStartups refers to the max number of simultaneous unauthenticated connections. This setting can be helpful against a brute-force script that performs forking. 18 9

W ARNING B ANNERS If your policy requires a warning banner, you can easily create one by copying the appropriate banner message to the following files. /etc/motd /etc/issue /etc/issue.net 19 10

W ARNING B ANNERS CharacterDescription \d Insert the current date. \o Insert the domain name of the system. \r Insert the release number of the kernel, e.g., \s Insert the system name, the name of the operating system. \t Insert the current time. \u Insert the number of current users logged in. \v Insert the version of the OS. \n Insert the node name of the machine, also known as the hostname. \m Insert the architecture identifier of the machine, e.g., i686