SlideShare una empresa de Scribd logo
1 de 49
Mohammed Farragmfarrag@freebsd.orghttp://wiki.freebsd.org/MohammedFarrag
Security Types
Encryption and Decryption. Symmetric and Asymmetric. Security Topics
FreeBSD Security Categories
UFS: implement special filesystem flags on files. flags enforce the same behavior for all users. kernel is responsible for enforcing these controls, depending on your kernel securelevel. Filesystem Protections
UFS2:  use Access Control Lists producing fine-grained control over permissions. Different users can be given different sets of permissions without relying on traditional Unix groups.
Turn off the flag     Specifying 0 in place of a flag name will turn off all the flags on a file. It's an inelegant little shortcut, but it works. For example, chflags 0foo will turn off all the flags on the file foo.
Use –o option of ls command Example:  /var/log -rw------- 1 root wheel sappnd 1862 Sep 30 22:39 auth.log  -rw------- 1 root wheel sappnd 38374 Sep 30 22:45 cron -rw------- 1 root wheel nodump 3157 Sep 30 03:06 dmesg.today -rw-r--r-- 1 root wheel sappnd 28056 Sep 30 22:39 lastlog -rw-r--r-- 1 root wheel     -               0   Jun 4 21:57 lpd-errs  -rw-r----- 1 root wheel sappnd 2160 Sep 30 03:06 maillog -rw-r--r-- 1 root wheel sappnd 15547 Sep 30 22:47 messages  -rw-r----- 1 root mail sappnd 628 Sep 30 03:06 sendmail.st  -rw-r----- 1 root mail schg 3455 Sep 29 22:00 sendmail.st.0  -rw-r----- 1 root mail schg 5543 Jun 4 21:57 sendmail.st.1 View active flags on a file
schg, is derived from "system change," it is universally referred to as the "immutable" flag. When the system immutable flag is set on a file, nothing can modify any part of it. Its metadata (modification times, permissions, owner, group, and so on) cannot be changed, nor can its contents. It cannot be renamed, unlinked (i.e., deleted), or moved, either.  Only root can unset at zero kernel security level. System immutable flag (schg)
The user immutable flag is a kinder, gentler immutable flag that is not affected by the kernel securelevel.  Users can set and unset this on their own files and directories, just as root can.  Unlike the system immutable flag, this one can be unset at any time.  In order to be able to set this flag, you must be either the file's owner or root.  A user with write access via Unix groups or ACLs, for example, still cannot set this flag. User immutable flag (uchg)
Normally all files in a filesystem are backed up when the dump(8) program runs. The nodump flag tells the backup system not to include the given file in the dumps. To tell dump to honor the nodump flag, specify -h on the dump command line.  If you want files to be omitted from backups entirely (i.e., not even included on full dumps), then you need to specify -h 0 on the command line. Nodump flag (nodump)
The append-only flag prevents files from being modified, much like the immutable flag, with one exception: data can be appended at the end of the file. The archetypal use of the append-only flag is for logfiles on secured servers or perhaps for root's .history file to help catch unwary hackers (see "Candidates for append-only," later in this chapter). System append-only flag (sappnd)
The user append-only flag performs exactly as the system append-only flag described above. The only difference is that this flag can be unset by both the owner and root at any time, regardless of the kernel securelevel. User append-only flag (uappnd)
This flag is a little weaker than the schg flag. It simply prevents the deletion of a file. It is arguably most useful in its "user" version, uunlnk.  It does not prevent truncation of the file or modification of its contents, its permissions, or any other aspect. It merely prevents the file from being removed. Like other "system" flags, it can only be set by root, and it cannot be unset when the kernel security level is greater than 0.  This flag exists only in FreeBSD System no unlink flag (sunlnk)
This flag allows a user to indicate that a file may not be deleted, regardless of the actual Unix permissions on its parent directory. Normally, if a user has permissions (through user, group, or ACLs) on the parent directory, she can delete any file in the directory—even files she does not own. That's because, in Unix filesystems such as UFS, the permission for deleting a file is a function of modifying the directory, not the file itself. User no unlink flag (uunlnk)
Opaque flags are used on directories or files that are involved in unionfs mounts. Union mounts allow one directory or filesystem to be mounted over the top of another directory while retaining visibility into the underlying directory. Thus, when you look in the top-level directory, you see the union of the two directories. A file that exists in one place but not the other (XOR) will be visible. If there are files or directories of the same name in both places, the "uppermost" one is the one that is accessible. Opaque flag (opaque)
When a directory is marked opaque with the opaque flag, it only shows files that actually exist in its level. That is, it makes the union mount act like a regular mount; files in the corresponding directory of a lower layer will be invisible. Opaque flag (opaque) – cont’d
The find command understands flags if you give it the -flags argument.  For instance, this command finds all files that have the uunlnk flag set in user paco's home directory:     find /home/paco -flags +uunlnk -print.  File Flags Searching
/etc/fstab file  Tagging the superblock directly Enable ACLs
/etc/fstab Enable ACL Option for /home directory
Preferable. Can be used in two ways ,[object Object]
unmount idle filesystemwith the following steps
umount it.
  run tunefs -a /home.ACLs in the superblock
% setfacl -b book.pdf # Erase any existing ACLs # Add ahmed’s access % setfacl -m u:ahmed:rw book.pdf # Nobody else gets any permission at all setfacl -m o:: book.pdf Setting ACLs for Files File name User/Group/Others User/Group name Access Rights
getfacl book.pdf    #file:book.pdf    #owner:1001    #group:100    user::rw- user:ahmed:rw-    mask::rw-    other::--- Viewing ACLs for Files
We can modify the kernel security architecture using Sysctl’s. We have 5 levels of kernel security (-1 .. 3). Enable Kernel Security: ,[object Object]
   In the shell, sysctlkern.securelevel=2
 Secure the kernel permanently.
In /etc/sysctl.conf, sysctlkern.securelevel=2Kernel
chroot Jail User Process Control
The principles behind chroot are simple.    A process running in a chrooted environment sees a normal filesystem, but it in fact has a virtual root directory. The goal is to prevent the process from accessing files outside its sandbox.  chroot
If ntpd runs in a chrooted environment, for example, and an exploit is discovered that causes it to overwrite a file, files in the real filesystem should be protected. The daemon perceives a / directory and will write relative to that directory, but on the real filesystem, the directory is something like /var/ntpd, and the daemon cannot actually reach the real / directory.
Jails expand this model by virtualizing not only access to the file system, but also the set of users, the networking subsystem of the FreeBSD kernel and a few other things. FreeBSD Jail
A directory subtree -- the starting point from which a jail is entered. Once inside the jail, a process is not permitted to escape outside of this subtree.  A hostname -- the hostname which will be used within the jail. Jails are mainly used for hosting network services, therefore having a descriptive hostname for each jail can really help the system administrator. An IP address -- this will be assigned to the jail and cannot be changed in any way during the jail's life span.  A command -- the path name of an executable to run inside the jail.  Jail Characteristics
# setenv D /here/is/the/jail # mkdir -p $D  # cd /usr/src # make buildworld # make installworld DESTDIR=$D  # make distribution DESTDIR=$D  # mount -t devfsdevfs $D/dev  Creating Jails
Selecting a location for a jail is the best starting point. This is where the jail will physically reside within the file system of the jail's host.  A good choice can be /usr/jail/jailname, where jailname is the hostname identifying the jail.  # mkdir -p $D
The distribution target for make installs every needed configuration file. In simple words, it installs every installable file of /usr/src/etc/ to the /etc directory of the jail environment: $D/etc/.  make distribution DESTDIR=$D
Mounting the devfs file system inside a jail is not required.  It is very important to control access to devices from inside a jail, as improper settings could permit an attacker to do nasty things in the jail. Control over devfs(8) is managed through rulesets which are described in the devfs(8) and devfs.conf(5) manual pages. # mount -t devfsdevfs $D/dev
/etc/rc.conf since it will replicate the startup sequence of a real FreeBSD system. For a service jail, it depends on the service or application that will run within the jail. Jail Enabling
Jail Configuration
From Host System # /etc/rc.d/jail start www # /etc/rc.d/jail stop www The best way to shut down a jail is: ,[object Object]
 using the jexecutility from outside the jail.Jail Starting & Stopping
Among the many third-party utilities for jail administration, one of the most complete and useful is sysutils/jailutils. It is a set of small applications that contribute to jail management. Please refer to its web page for more information. Jail High-level administrative tools
Fighting Buffer Overflows Cryptography. Inherent Protection
The goal of W^X is to make a program crash if it attempts to write to an execute-only page or execute code on a write-only page. The kernel and the loader try to make sure that a program's instructions are always allocated on pages marked executable, and data (e.g., the program's stack and heap) is always allocated to pages that are writable but not executable
maxusers  make it 0 to turn control to physical RAM. Increasing Maximum Values. For example, kern.ipc.somaxconn. Network Buffering For example, net.inet.tcp.sendspace Optimizations (OS Tuning)

Más contenido relacionado

La actualidad más candente

Specifications pattern
Specifications patternSpecifications pattern
Specifications patternTung Nguyen
 
Entity Framework(Core)についての概要を学ぼう
Entity Framework(Core)についての概要を学ぼうEntity Framework(Core)についての概要を学ぼう
Entity Framework(Core)についての概要を学ぼうTomomitsuKusaba
 
WASM(WebAssembly)入門 ペアリング演算やってみた
WASM(WebAssembly)入門 ペアリング演算やってみたWASM(WebAssembly)入門 ペアリング演算やってみた
WASM(WebAssembly)入門 ペアリング演算やってみたMITSUNARI Shigeo
 
JWTを使った簡易SSOで徐々にシステムをリニューアルしている話
JWTを使った簡易SSOで徐々にシステムをリニューアルしている話JWTを使った簡易SSOで徐々にシステムをリニューアルしている話
JWTを使った簡易SSOで徐々にシステムをリニューアルしている話Kazuyoshi Tsuchiya
 
Git flowの活用事例
Git flowの活用事例Git flowの活用事例
Git flowの活用事例Hirohito Kato
 
Operating system NachOS
Operating system NachOSOperating system NachOS
Operating system NachOSPrasannPatel4
 
Go静的解析ハンズオン
Go静的解析ハンズオンGo静的解析ハンズオン
Go静的解析ハンズオンTakuya Ueda
 
深さ・幅優先探索の仕組み・特徴・応用
深さ・幅優先探索の仕組み・特徴・応用深さ・幅優先探索の仕組み・特徴・応用
深さ・幅優先探索の仕組み・特徴・応用Sho Kamura
 
「Frama-Cによるソースコード検証」 (mzp)
「Frama-Cによるソースコード検証」 (mzp)「Frama-Cによるソースコード検証」 (mzp)
「Frama-Cによるソースコード検証」 (mzp)Hiroki Mizuno
 
FINAL FANTASY Record Keeper の作り方
FINAL FANTASY Record Keeper の作り方FINAL FANTASY Record Keeper の作り方
FINAL FANTASY Record Keeper の作り方dena_study
 
すごいConstたのしく使おう!
すごいConstたのしく使おう!すごいConstたのしく使おう!
すごいConstたのしく使おう!Akihiro Nishimura
 
Bonnes et mauvaises pratiques du daily meeting
Bonnes et mauvaises pratiques du daily meetingBonnes et mauvaises pratiques du daily meeting
Bonnes et mauvaises pratiques du daily meetingCéline Stauder
 
Hack言語に賭けたチームの話
Hack言語に賭けたチームの話Hack言語に賭けたチームの話
Hack言語に賭けたチームの話Yuji Otani
 
The Shift Left Path and OWASP
The Shift Left Path and OWASPThe Shift Left Path and OWASP
The Shift Left Path and OWASPRiotaro OKADA
 
PFIセミナー 2013/02/28 「プログラミング言語の今」
PFIセミナー 2013/02/28 「プログラミング言語の今」PFIセミナー 2013/02/28 「プログラミング言語の今」
PFIセミナー 2013/02/28 「プログラミング言語の今」Preferred Networks
 
FlutterをRenderObjectまで理解する
FlutterをRenderObjectまで理解するFlutterをRenderObjectまで理解する
FlutterをRenderObjectまで理解するKeisukeKiriyama
 
Qt Design Patterns
Qt Design PatternsQt Design Patterns
Qt Design PatternsYnon Perek
 
Schema on read with runtime fields
Schema on read with runtime fieldsSchema on read with runtime fields
Schema on read with runtime fieldsElasticsearch
 
関数プログラミング入門
関数プログラミング入門関数プログラミング入門
関数プログラミング入門Hideyuki Tanaka
 
Maaret_Pyhäjärvi_Talk - Testing Assembly 2022.pdf
Maaret_Pyhäjärvi_Talk - Testing Assembly 2022.pdfMaaret_Pyhäjärvi_Talk - Testing Assembly 2022.pdf
Maaret_Pyhäjärvi_Talk - Testing Assembly 2022.pdfFiSTB
 

La actualidad más candente (20)

Specifications pattern
Specifications patternSpecifications pattern
Specifications pattern
 
Entity Framework(Core)についての概要を学ぼう
Entity Framework(Core)についての概要を学ぼうEntity Framework(Core)についての概要を学ぼう
Entity Framework(Core)についての概要を学ぼう
 
WASM(WebAssembly)入門 ペアリング演算やってみた
WASM(WebAssembly)入門 ペアリング演算やってみたWASM(WebAssembly)入門 ペアリング演算やってみた
WASM(WebAssembly)入門 ペアリング演算やってみた
 
JWTを使った簡易SSOで徐々にシステムをリニューアルしている話
JWTを使った簡易SSOで徐々にシステムをリニューアルしている話JWTを使った簡易SSOで徐々にシステムをリニューアルしている話
JWTを使った簡易SSOで徐々にシステムをリニューアルしている話
 
Git flowの活用事例
Git flowの活用事例Git flowの活用事例
Git flowの活用事例
 
Operating system NachOS
Operating system NachOSOperating system NachOS
Operating system NachOS
 
Go静的解析ハンズオン
Go静的解析ハンズオンGo静的解析ハンズオン
Go静的解析ハンズオン
 
深さ・幅優先探索の仕組み・特徴・応用
深さ・幅優先探索の仕組み・特徴・応用深さ・幅優先探索の仕組み・特徴・応用
深さ・幅優先探索の仕組み・特徴・応用
 
「Frama-Cによるソースコード検証」 (mzp)
「Frama-Cによるソースコード検証」 (mzp)「Frama-Cによるソースコード検証」 (mzp)
「Frama-Cによるソースコード検証」 (mzp)
 
FINAL FANTASY Record Keeper の作り方
FINAL FANTASY Record Keeper の作り方FINAL FANTASY Record Keeper の作り方
FINAL FANTASY Record Keeper の作り方
 
すごいConstたのしく使おう!
すごいConstたのしく使おう!すごいConstたのしく使おう!
すごいConstたのしく使おう!
 
Bonnes et mauvaises pratiques du daily meeting
Bonnes et mauvaises pratiques du daily meetingBonnes et mauvaises pratiques du daily meeting
Bonnes et mauvaises pratiques du daily meeting
 
Hack言語に賭けたチームの話
Hack言語に賭けたチームの話Hack言語に賭けたチームの話
Hack言語に賭けたチームの話
 
The Shift Left Path and OWASP
The Shift Left Path and OWASPThe Shift Left Path and OWASP
The Shift Left Path and OWASP
 
PFIセミナー 2013/02/28 「プログラミング言語の今」
PFIセミナー 2013/02/28 「プログラミング言語の今」PFIセミナー 2013/02/28 「プログラミング言語の今」
PFIセミナー 2013/02/28 「プログラミング言語の今」
 
FlutterをRenderObjectまで理解する
FlutterをRenderObjectまで理解するFlutterをRenderObjectまで理解する
FlutterをRenderObjectまで理解する
 
Qt Design Patterns
Qt Design PatternsQt Design Patterns
Qt Design Patterns
 
Schema on read with runtime fields
Schema on read with runtime fieldsSchema on read with runtime fields
Schema on read with runtime fields
 
関数プログラミング入門
関数プログラミング入門関数プログラミング入門
関数プログラミング入門
 
Maaret_Pyhäjärvi_Talk - Testing Assembly 2022.pdf
Maaret_Pyhäjärvi_Talk - Testing Assembly 2022.pdfMaaret_Pyhäjärvi_Talk - Testing Assembly 2022.pdf
Maaret_Pyhäjärvi_Talk - Testing Assembly 2022.pdf
 

Destacado

Denial of Service Mitigation Tactics in FreeBSD
Denial of Service Mitigation Tactics in FreeBSDDenial of Service Mitigation Tactics in FreeBSD
Denial of Service Mitigation Tactics in FreeBSDSteven Kreuzer
 
Rewriting the Rules for DDoS Protection in 2015
Rewriting the Rules for DDoS Protection in 2015Rewriting the Rules for DDoS Protection in 2015
Rewriting the Rules for DDoS Protection in 2015Stephanie Weagle
 
FreeBSD and Drivers
FreeBSD and DriversFreeBSD and Drivers
FreeBSD and DriversKernel TLV
 
02) dr. cabrera sã­ndrome de hiperfunciã³n hipofisiaria
02) dr. cabrera   sã­ndrome de hiperfunciã³n hipofisiaria02) dr. cabrera   sã­ndrome de hiperfunciã³n hipofisiaria
02) dr. cabrera sã­ndrome de hiperfunciã³n hipofisiariaAnchi Hsu XD
 
Un arbre Tempovision
Un arbre TempovisionUn arbre Tempovision
Un arbre TempovisionSAMSAV
 
How to improve your teaching using emerging technology
How to improve your teaching using emerging technologyHow to improve your teaching using emerging technology
How to improve your teaching using emerging technologyMike Pascoe
 
Claro De Luna Beethoven
Claro De Luna   BeethovenClaro De Luna   Beethoven
Claro De Luna BeethovenJulio Mendoza
 
Blackout Task Force Highlights SCADA System Woes
Blackout Task Force Highlights SCADA System WoesBlackout Task Force Highlights SCADA System Woes
Blackout Task Force Highlights SCADA System WoesARC Advisory Group
 
Copia de el rio guadalquivir
Copia de el rio guadalquivirCopia de el rio guadalquivir
Copia de el rio guadalquivirmjluquino
 
Manual de kicad
Manual de kicadManual de kicad
Manual de kicadULEAM
 
Software para Agencias de Colocación
Software para Agencias de ColocaciónSoftware para Agencias de Colocación
Software para Agencias de Colocacióniformalia
 
SAS Customer Decision Hub: migliora l’engagement con i tuoi clienti analizzan...
SAS Customer Decision Hub: migliora l’engagement con i tuoi clienti analizzan...SAS Customer Decision Hub: migliora l’engagement con i tuoi clienti analizzan...
SAS Customer Decision Hub: migliora l’engagement con i tuoi clienti analizzan...SAS Italy
 
Semana 8 comercio
Semana 8 comercioSemana 8 comercio
Semana 8 comercioalmacecilia
 

Destacado (20)

Denial of Service Mitigation Tactics in FreeBSD
Denial of Service Mitigation Tactics in FreeBSDDenial of Service Mitigation Tactics in FreeBSD
Denial of Service Mitigation Tactics in FreeBSD
 
Rewriting the Rules for DDoS Protection in 2015
Rewriting the Rules for DDoS Protection in 2015Rewriting the Rules for DDoS Protection in 2015
Rewriting the Rules for DDoS Protection in 2015
 
FreeBSD and Drivers
FreeBSD and DriversFreeBSD and Drivers
FreeBSD and Drivers
 
02) dr. cabrera sã­ndrome de hiperfunciã³n hipofisiaria
02) dr. cabrera   sã­ndrome de hiperfunciã³n hipofisiaria02) dr. cabrera   sã­ndrome de hiperfunciã³n hipofisiaria
02) dr. cabrera sã­ndrome de hiperfunciã³n hipofisiaria
 
Un arbre Tempovision
Un arbre TempovisionUn arbre Tempovision
Un arbre Tempovision
 
Pvprod v7 20111125
Pvprod v7 20111125Pvprod v7 20111125
Pvprod v7 20111125
 
How to improve your teaching using emerging technology
How to improve your teaching using emerging technologyHow to improve your teaching using emerging technology
How to improve your teaching using emerging technology
 
INTERNET
INTERNETINTERNET
INTERNET
 
Alimentos funcionales
Alimentos funcionalesAlimentos funcionales
Alimentos funcionales
 
Claro De Luna Beethoven
Claro De Luna   BeethovenClaro De Luna   Beethoven
Claro De Luna Beethoven
 
Deweis Bast 070509
Deweis Bast 070509Deweis Bast 070509
Deweis Bast 070509
 
Blackout Task Force Highlights SCADA System Woes
Blackout Task Force Highlights SCADA System WoesBlackout Task Force Highlights SCADA System Woes
Blackout Task Force Highlights SCADA System Woes
 
Copia de el rio guadalquivir
Copia de el rio guadalquivirCopia de el rio guadalquivir
Copia de el rio guadalquivir
 
Earth's Biomes
Earth's BiomesEarth's Biomes
Earth's Biomes
 
Manual de kicad
Manual de kicadManual de kicad
Manual de kicad
 
zootropo
 zootropo zootropo
zootropo
 
Software para Agencias de Colocación
Software para Agencias de ColocaciónSoftware para Agencias de Colocación
Software para Agencias de Colocación
 
Ecografía 3D
Ecografía 3DEcografía 3D
Ecografía 3D
 
SAS Customer Decision Hub: migliora l’engagement con i tuoi clienti analizzan...
SAS Customer Decision Hub: migliora l’engagement con i tuoi clienti analizzan...SAS Customer Decision Hub: migliora l’engagement con i tuoi clienti analizzan...
SAS Customer Decision Hub: migliora l’engagement con i tuoi clienti analizzan...
 
Semana 8 comercio
Semana 8 comercioSemana 8 comercio
Semana 8 comercio
 

Similar a Lecture 4 FreeBSD Security + FreeBSD Jails + MAC Security Framework

Unix Security
Unix SecurityUnix Security
Unix Securityreplay21
 
Root file system for embedded systems
Root file system for embedded systemsRoot file system for embedded systems
Root file system for embedded systemsalok pal
 
Chroot Protection and Breaking
Chroot Protection and BreakingChroot Protection and Breaking
Chroot Protection and BreakingAnton Chuvakin
 
1 CMPS 12M Data Structures Lab Lab Assignment 1 .docx
 1 CMPS 12M Data Structures Lab Lab Assignment 1  .docx 1 CMPS 12M Data Structures Lab Lab Assignment 1  .docx
1 CMPS 12M Data Structures Lab Lab Assignment 1 .docxjoyjonna282
 
1 CMPS 12M Data Structures Lab Lab Assignment 1 .docx
1 CMPS 12M Data Structures Lab Lab Assignment 1  .docx1 CMPS 12M Data Structures Lab Lab Assignment 1  .docx
1 CMPS 12M Data Structures Lab Lab Assignment 1 .docxtarifarmarie
 
1 CMPS 12M Data Structures Lab Lab Assignment 1 .docx
1 CMPS 12M Data Structures Lab Lab Assignment 1 .docx1 CMPS 12M Data Structures Lab Lab Assignment 1 .docx
1 CMPS 12M Data Structures Lab Lab Assignment 1 .docxtarifarmarie
 
A character device typically transfers data to and from a user appli.pdf
A character device typically transfers data to and from a user appli.pdfA character device typically transfers data to and from a user appli.pdf
A character device typically transfers data to and from a user appli.pdfaptind
 
A character device typically transfers data to and from a user appli.pdf
A character device typically transfers data to and from a user appli.pdfA character device typically transfers data to and from a user appli.pdf
A character device typically transfers data to and from a user appli.pdfaptind
 
7 unixsecurity
7 unixsecurity7 unixsecurity
7 unixsecurityricharddxd
 

Similar a Lecture 4 FreeBSD Security + FreeBSD Jails + MAC Security Framework (20)

Unix Security
Unix SecurityUnix Security
Unix Security
 
Solaris basics
Solaris basicsSolaris basics
Solaris basics
 
Ch12 system administration
Ch12 system administration Ch12 system administration
Ch12 system administration
 
Tutorial 2
Tutorial 2Tutorial 2
Tutorial 2
 
Root file system for embedded systems
Root file system for embedded systemsRoot file system for embedded systems
Root file system for embedded systems
 
Chroot Protection and Breaking
Chroot Protection and BreakingChroot Protection and Breaking
Chroot Protection and Breaking
 
Linux security
Linux securityLinux security
Linux security
 
Unix Administration
Unix AdministrationUnix Administration
Unix Administration
 
1 CMPS 12M Data Structures Lab Lab Assignment 1 .docx
 1 CMPS 12M Data Structures Lab Lab Assignment 1  .docx 1 CMPS 12M Data Structures Lab Lab Assignment 1  .docx
1 CMPS 12M Data Structures Lab Lab Assignment 1 .docx
 
1 CMPS 12M Data Structures Lab Lab Assignment 1 .docx
1 CMPS 12M Data Structures Lab Lab Assignment 1  .docx1 CMPS 12M Data Structures Lab Lab Assignment 1  .docx
1 CMPS 12M Data Structures Lab Lab Assignment 1 .docx
 
CIT173_Ch15_Mnstr_23.pdf
CIT173_Ch15_Mnstr_23.pdfCIT173_Ch15_Mnstr_23.pdf
CIT173_Ch15_Mnstr_23.pdf
 
Restricting unix users
Restricting unix usersRestricting unix users
Restricting unix users
 
1 CMPS 12M Data Structures Lab Lab Assignment 1 .docx
1 CMPS 12M Data Structures Lab Lab Assignment 1 .docx1 CMPS 12M Data Structures Lab Lab Assignment 1 .docx
1 CMPS 12M Data Structures Lab Lab Assignment 1 .docx
 
Linux filesystemhierarchy
Linux filesystemhierarchyLinux filesystemhierarchy
Linux filesystemhierarchy
 
Host security
Host securityHost security
Host security
 
Host security
Host securityHost security
Host security
 
A character device typically transfers data to and from a user appli.pdf
A character device typically transfers data to and from a user appli.pdfA character device typically transfers data to and from a user appli.pdf
A character device typically transfers data to and from a user appli.pdf
 
A character device typically transfers data to and from a user appli.pdf
A character device typically transfers data to and from a user appli.pdfA character device typically transfers data to and from a user appli.pdf
A character device typically transfers data to and from a user appli.pdf
 
File system discovery
File system discovery File system discovery
File system discovery
 
7 unixsecurity
7 unixsecurity7 unixsecurity
7 unixsecurity
 

Más de Mohammed Farrag

Resume for Mohamed Farag
Resume for Mohamed FaragResume for Mohamed Farag
Resume for Mohamed FaragMohammed Farrag
 
Mum Article Recognition for Mohamed Farag
Mum Article Recognition for Mohamed FaragMum Article Recognition for Mohamed Farag
Mum Article Recognition for Mohamed FaragMohammed Farrag
 
Artificial Intelligence Programming in Art by Mohamed Farag
Artificial Intelligence Programming in Art by Mohamed FaragArtificial Intelligence Programming in Art by Mohamed Farag
Artificial Intelligence Programming in Art by Mohamed FaragMohammed Farrag
 
The practices, challenges and opportunities of board composition and leadersh...
The practices, challenges and opportunities of board composition and leadersh...The practices, challenges and opportunities of board composition and leadersh...
The practices, challenges and opportunities of board composition and leadersh...Mohammed Farrag
 
Confirmation letter info tech 2013(1)
Confirmation letter info tech 2013(1)Confirmation letter info tech 2013(1)
Confirmation letter info tech 2013(1)Mohammed Farrag
 
Lecture 6 Kernel Debugging + Ports Development
Lecture 6 Kernel Debugging + Ports DevelopmentLecture 6 Kernel Debugging + Ports Development
Lecture 6 Kernel Debugging + Ports DevelopmentMohammed Farrag
 
Lecture 5 Kernel Development
Lecture 5 Kernel DevelopmentLecture 5 Kernel Development
Lecture 5 Kernel DevelopmentMohammed Farrag
 
FreeBSD Jail Complete Example
FreeBSD Jail Complete ExampleFreeBSD Jail Complete Example
FreeBSD Jail Complete ExampleMohammed Farrag
 
Lecture 3 Perl & FreeBSD administration
Lecture 3 Perl & FreeBSD administrationLecture 3 Perl & FreeBSD administration
Lecture 3 Perl & FreeBSD administrationMohammed Farrag
 
Lecture2 process structure and programming
Lecture2   process structure and programmingLecture2   process structure and programming
Lecture2 process structure and programmingMohammed Farrag
 

Más de Mohammed Farrag (17)

Resume for Mohamed Farag
Resume for Mohamed FaragResume for Mohamed Farag
Resume for Mohamed Farag
 
Mum Article Recognition for Mohamed Farag
Mum Article Recognition for Mohamed FaragMum Article Recognition for Mohamed Farag
Mum Article Recognition for Mohamed Farag
 
Create 2015 Event
Create 2015 EventCreate 2015 Event
Create 2015 Event
 
Artificial Intelligence Programming in Art by Mohamed Farag
Artificial Intelligence Programming in Art by Mohamed FaragArtificial Intelligence Programming in Art by Mohamed Farag
Artificial Intelligence Programming in Art by Mohamed Farag
 
The practices, challenges and opportunities of board composition and leadersh...
The practices, challenges and opportunities of board composition and leadersh...The practices, challenges and opportunities of board composition and leadersh...
The practices, challenges and opportunities of board composition and leadersh...
 
Confirmation letter info tech 2013(1)
Confirmation letter info tech 2013(1)Confirmation letter info tech 2013(1)
Confirmation letter info tech 2013(1)
 
[ArabBSD] Unix Basics
[ArabBSD] Unix Basics[ArabBSD] Unix Basics
[ArabBSD] Unix Basics
 
Google APPs and APIs
Google APPs and APIsGoogle APPs and APIs
Google APPs and APIs
 
Lecture 6 Kernel Debugging + Ports Development
Lecture 6 Kernel Debugging + Ports DevelopmentLecture 6 Kernel Debugging + Ports Development
Lecture 6 Kernel Debugging + Ports Development
 
Lecture 5 Kernel Development
Lecture 5 Kernel DevelopmentLecture 5 Kernel Development
Lecture 5 Kernel Development
 
FreeBSD Jail Complete Example
FreeBSD Jail Complete ExampleFreeBSD Jail Complete Example
FreeBSD Jail Complete Example
 
FreeBSD Handbook
FreeBSD HandbookFreeBSD Handbook
FreeBSD Handbook
 
Lecture 3 Perl & FreeBSD administration
Lecture 3 Perl & FreeBSD administrationLecture 3 Perl & FreeBSD administration
Lecture 3 Perl & FreeBSD administration
 
Lecture2 process structure and programming
Lecture2   process structure and programmingLecture2   process structure and programming
Lecture2 process structure and programming
 
Lecture1 Introduction
Lecture1  IntroductionLecture1  Introduction
Lecture1 Introduction
 
Master resume
Master resumeMaster resume
Master resume
 
Mohammed Farrag Resume
Mohammed Farrag ResumeMohammed Farrag Resume
Mohammed Farrag Resume
 

Último

POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...anjaliyadav012327
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 

Último (20)

POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 

Lecture 4 FreeBSD Security + FreeBSD Jails + MAC Security Framework

  • 3. Encryption and Decryption. Symmetric and Asymmetric. Security Topics
  • 5. UFS: implement special filesystem flags on files. flags enforce the same behavior for all users. kernel is responsible for enforcing these controls, depending on your kernel securelevel. Filesystem Protections
  • 6. UFS2: use Access Control Lists producing fine-grained control over permissions. Different users can be given different sets of permissions without relying on traditional Unix groups.
  • 7. Turn off the flag Specifying 0 in place of a flag name will turn off all the flags on a file. It's an inelegant little shortcut, but it works. For example, chflags 0foo will turn off all the flags on the file foo.
  • 8. Use –o option of ls command Example: /var/log -rw------- 1 root wheel sappnd 1862 Sep 30 22:39 auth.log -rw------- 1 root wheel sappnd 38374 Sep 30 22:45 cron -rw------- 1 root wheel nodump 3157 Sep 30 03:06 dmesg.today -rw-r--r-- 1 root wheel sappnd 28056 Sep 30 22:39 lastlog -rw-r--r-- 1 root wheel - 0 Jun 4 21:57 lpd-errs -rw-r----- 1 root wheel sappnd 2160 Sep 30 03:06 maillog -rw-r--r-- 1 root wheel sappnd 15547 Sep 30 22:47 messages -rw-r----- 1 root mail sappnd 628 Sep 30 03:06 sendmail.st -rw-r----- 1 root mail schg 3455 Sep 29 22:00 sendmail.st.0 -rw-r----- 1 root mail schg 5543 Jun 4 21:57 sendmail.st.1 View active flags on a file
  • 9. schg, is derived from "system change," it is universally referred to as the "immutable" flag. When the system immutable flag is set on a file, nothing can modify any part of it. Its metadata (modification times, permissions, owner, group, and so on) cannot be changed, nor can its contents. It cannot be renamed, unlinked (i.e., deleted), or moved, either. Only root can unset at zero kernel security level. System immutable flag (schg)
  • 10. The user immutable flag is a kinder, gentler immutable flag that is not affected by the kernel securelevel. Users can set and unset this on their own files and directories, just as root can. Unlike the system immutable flag, this one can be unset at any time. In order to be able to set this flag, you must be either the file's owner or root. A user with write access via Unix groups or ACLs, for example, still cannot set this flag. User immutable flag (uchg)
  • 11. Normally all files in a filesystem are backed up when the dump(8) program runs. The nodump flag tells the backup system not to include the given file in the dumps. To tell dump to honor the nodump flag, specify -h on the dump command line. If you want files to be omitted from backups entirely (i.e., not even included on full dumps), then you need to specify -h 0 on the command line. Nodump flag (nodump)
  • 12. The append-only flag prevents files from being modified, much like the immutable flag, with one exception: data can be appended at the end of the file. The archetypal use of the append-only flag is for logfiles on secured servers or perhaps for root's .history file to help catch unwary hackers (see "Candidates for append-only," later in this chapter). System append-only flag (sappnd)
  • 13. The user append-only flag performs exactly as the system append-only flag described above. The only difference is that this flag can be unset by both the owner and root at any time, regardless of the kernel securelevel. User append-only flag (uappnd)
  • 14. This flag is a little weaker than the schg flag. It simply prevents the deletion of a file. It is arguably most useful in its "user" version, uunlnk. It does not prevent truncation of the file or modification of its contents, its permissions, or any other aspect. It merely prevents the file from being removed. Like other "system" flags, it can only be set by root, and it cannot be unset when the kernel security level is greater than 0. This flag exists only in FreeBSD System no unlink flag (sunlnk)
  • 15. This flag allows a user to indicate that a file may not be deleted, regardless of the actual Unix permissions on its parent directory. Normally, if a user has permissions (through user, group, or ACLs) on the parent directory, she can delete any file in the directory—even files she does not own. That's because, in Unix filesystems such as UFS, the permission for deleting a file is a function of modifying the directory, not the file itself. User no unlink flag (uunlnk)
  • 16. Opaque flags are used on directories or files that are involved in unionfs mounts. Union mounts allow one directory or filesystem to be mounted over the top of another directory while retaining visibility into the underlying directory. Thus, when you look in the top-level directory, you see the union of the two directories. A file that exists in one place but not the other (XOR) will be visible. If there are files or directories of the same name in both places, the "uppermost" one is the one that is accessible. Opaque flag (opaque)
  • 17. When a directory is marked opaque with the opaque flag, it only shows files that actually exist in its level. That is, it makes the union mount act like a regular mount; files in the corresponding directory of a lower layer will be invisible. Opaque flag (opaque) – cont’d
  • 18. The find command understands flags if you give it the -flags argument. For instance, this command finds all files that have the uunlnk flag set in user paco's home directory: find /home/paco -flags +uunlnk -print. File Flags Searching
  • 19. /etc/fstab file Tagging the superblock directly Enable ACLs
  • 20. /etc/fstab Enable ACL Option for /home directory
  • 21.
  • 22. unmount idle filesystemwith the following steps
  • 24. run tunefs -a /home.ACLs in the superblock
  • 25. % setfacl -b book.pdf # Erase any existing ACLs # Add ahmed’s access % setfacl -m u:ahmed:rw book.pdf # Nobody else gets any permission at all setfacl -m o:: book.pdf Setting ACLs for Files File name User/Group/Others User/Group name Access Rights
  • 26. getfacl book.pdf #file:book.pdf #owner:1001 #group:100 user::rw- user:ahmed:rw- mask::rw- other::--- Viewing ACLs for Files
  • 27.
  • 28. In the shell, sysctlkern.securelevel=2
  • 29. Secure the kernel permanently.
  • 31.
  • 32. chroot Jail User Process Control
  • 33. The principles behind chroot are simple. A process running in a chrooted environment sees a normal filesystem, but it in fact has a virtual root directory. The goal is to prevent the process from accessing files outside its sandbox. chroot
  • 34. If ntpd runs in a chrooted environment, for example, and an exploit is discovered that causes it to overwrite a file, files in the real filesystem should be protected. The daemon perceives a / directory and will write relative to that directory, but on the real filesystem, the directory is something like /var/ntpd, and the daemon cannot actually reach the real / directory.
  • 35. Jails expand this model by virtualizing not only access to the file system, but also the set of users, the networking subsystem of the FreeBSD kernel and a few other things. FreeBSD Jail
  • 36. A directory subtree -- the starting point from which a jail is entered. Once inside the jail, a process is not permitted to escape outside of this subtree. A hostname -- the hostname which will be used within the jail. Jails are mainly used for hosting network services, therefore having a descriptive hostname for each jail can really help the system administrator. An IP address -- this will be assigned to the jail and cannot be changed in any way during the jail's life span. A command -- the path name of an executable to run inside the jail. Jail Characteristics
  • 37. # setenv D /here/is/the/jail # mkdir -p $D # cd /usr/src # make buildworld # make installworld DESTDIR=$D # make distribution DESTDIR=$D # mount -t devfsdevfs $D/dev Creating Jails
  • 38. Selecting a location for a jail is the best starting point. This is where the jail will physically reside within the file system of the jail's host. A good choice can be /usr/jail/jailname, where jailname is the hostname identifying the jail. # mkdir -p $D
  • 39. The distribution target for make installs every needed configuration file. In simple words, it installs every installable file of /usr/src/etc/ to the /etc directory of the jail environment: $D/etc/. make distribution DESTDIR=$D
  • 40. Mounting the devfs file system inside a jail is not required. It is very important to control access to devices from inside a jail, as improper settings could permit an attacker to do nasty things in the jail. Control over devfs(8) is managed through rulesets which are described in the devfs(8) and devfs.conf(5) manual pages. # mount -t devfsdevfs $D/dev
  • 41. /etc/rc.conf since it will replicate the startup sequence of a real FreeBSD system. For a service jail, it depends on the service or application that will run within the jail. Jail Enabling
  • 43.
  • 44. using the jexecutility from outside the jail.Jail Starting & Stopping
  • 45. Among the many third-party utilities for jail administration, one of the most complete and useful is sysutils/jailutils. It is a set of small applications that contribute to jail management. Please refer to its web page for more information. Jail High-level administrative tools
  • 46. Fighting Buffer Overflows Cryptography. Inherent Protection
  • 47. The goal of W^X is to make a program crash if it attempts to write to an execute-only page or execute code on a write-only page. The kernel and the loader try to make sure that a program's instructions are always allocated on pages marked executable, and data (e.g., the program's stack and heap) is always allocated to pages that are writable but not executable
  • 48. maxusers make it 0 to turn control to physical RAM. Increasing Maximum Values. For example, kern.ipc.somaxconn. Network Buffering For example, net.inet.tcp.sendspace Optimizations (OS Tuning)
  • 49.
  • 50. Safety Liveness. … System Security Requirements
  • 52.
  • 53. desribes how to apply the policy Mechanism
  • 54.
  • 55. Decision Making.
  • 57. Snort. Snorby. Intrusion Detection Common Ports