SlideShare una empresa de Scribd logo
1 de 18
Descargar para leer sin conexión
G. Geshev
Open Fest 2010
20 - 21 November
Sofia, Bulgaria
GRSECURITY/PAX
Theoretical & Practical Application
About GRSECURITY (Greater Security)
▪ Back in the days.. 2000/2001
▪ Port of the Owl project to Linux 2.4.1
▪ Set of Kernel Patches Enhancing System Security
▪ Memory Corruption Bugs Exploitation Mitigation,
▪ Role-Based Access Control System,
▪ Filesystem Security Enhancements,
▪ Enhanced chroot(),
▪ Kernel Auditing, etc.
Components (most of ‘em)
▪ PaX (NX not to be confused with W^X (OBSD), ASLR),
▪ paxctl (user-space PaX flags control utility)
▪ pspax, scanelf, dumpelf (pax-utils)
▪ paxtest (buffer overflow protection test suite)
▪ Role-Based Access Control (RBAC) System,
▪ gradm (RBAC Administration Console)
▪ Enhanced chroot(),
▪ Miscellaneous Features (Improved Filesystem Security), etc
I n v o l v e m e n t
▪ The PaX Developers –
pageexec@freemail.hu
▪ Brad Spengler (not Brad Spender) -
spender@grsecurity.net
▪ Zbyniu Krzystolik
▪ Michael Dalton
Detection
▪ Enhanced Kernel Auditing
(GRKERNSEC_AUDIT_GROUP, GRKERNSEC_AUDIT_GID)
▪ Exec logging (GRKERNSEC_EXECLOG)
▪ Resource logging
(GRKERNSEC_RESLOG, GRKERNSEC_FORKFAIL)
▪ Log execs within chroot (GRKERNSEC_CHROOT_EXECLOG)
▪ Ptrace logging (GRKERNSEC_AUDIT_PTRACE)
▪ Chdir logging (GRKERNSEC_AUDIT_CHDIR)
Detection (cont.)
▪ Mount / Umount logging (GRKERNSEC_AUDIT_MOUNT)
▪ Signal logging (GRKERNSEC_SIGNAL)
▪ Fork failure logging (GRKERNSEC_FORKFAIL)
▪ Time change logging (GRKERNSEC_TIME)
▪ /proc/<pid>/ipaddr support
(GRKERNSEC_PROC_IPADDR)
▪ Denied RWX mmap/mprotect logging
(GRKERNSEC_RWXMAP_LOG)
Detection (cont.)
▪ ELF text relocations logging (GRKERNSEC_AUDIT_TEXTREL)
▪ Logging Options -
▪ Seconds in between log messages (min)
(GRKERNSEC_FLOODTIME)
▪ Number of messages in a burst (max)
(GRKERNSEC_FLOODBURST)
Prevention
▪ Executable Protections –
▪ Deter ptrace-based process snooping
(GRKERNSEC_HARDEN_PTRACE)
▪ Trusted Path Execution
(GRKERNSEC_TPE, GRKERNSEC_TPE_ALL,
GRKERNSEC_TPE_GID, GRKERNSEC_TPE_INVERT)
Prevention (cont.)
▪ Network Protections –
▪ Larger entropy pools (GRKERNSEC_RANDNET)
▪ TCP/UDP blackhole (GRKERNSEC_BLACKHOLE)
▪ Socket restrictions
(GRKERNSEC_SOCKET, GRKERNSEC_SOCKET_ALL,
GRKERNSEC_SOCKET_ALL_GID, GRKERNSEC_SOCKET_CLIENT,
GRKERNSEC_SOCKET_CLIENT_GID,
GRKERNSEC_SOCKET_SERVER,
GRKERNSEC_SOCKET_SERVER_GID)
Prevention (cont.)
▪ Address Space Protection -
▪ Remove addresses from /proc/<pid>/[smaps|maps|stat]
(GRKERNSEC_PROC_MEMMAP)
▪ Deny writing to /dev/kmem, /dev/mem, and /dev/port
(GRKERNSEC_KMEM)
▪ Deter exploit bruteforcing (GRKERNSEC_BRUTE)
▪ Harden module auto-loading (GRKERNSEC_MODHARDEN)
▪ Hide kernel symbols (GRKERNSEC_HIDESYM)
▪ Hide kernel processes (GRKERNSEC_ACL_HIDEKERN)
Prevention (cont.)
▪ Maximum tries before password lockout
(GRKERNSEC_ACL_MAXTRIES,GRKERNSEC_ACL_TIMEOUT)
▪ Filesystem Protections -
▪ Proc restrictions (GRKERNSEC_PROC,
GRKERNSEC_PROC_USER, GRKERNSEC_PROC_USERGROUP,
GRKERNSEC_PROC_ADD)
▪ Linking restrictions (GRKERNSEC_LINK)
▪ FIFO restrictions (GRKERNSEC_FIFO)
▪ Runtime read-only mount protection (GRKERNSEC_ROFS)
▪
Prevention (cont.)
▪ Chroot jail restrictions -
(GRKERNSEC_CHROOT, GRKERNSEC_CHROOT_MOUNT,
GRKERNSEC_CHROOT_DOUBLE, GRKERNSEC_CHROOT_PIVOT,
GRKERNSEC_CHROOT_CHDIR, GRKERNSEC_CHROOT_CHMOD,
GRKERNSEC_CHROOT_FCHDIR, GRKERNSEC_CHROOT_MKNOD,
GRKERNSEC_CHROOT_SYSCTL)
▪
Prevention (cont.)
Address Space Modification Protection
▪ NOEXEC (least privilege enforcement)
▪ PAGEEXEC, SEGMEXEC
▪ MPROTECT
▪ KERNEXEC
▪ Address Space Layout Randomization
▪ RANDUSTACK (delta_stack)
▪ RANDEXEC (delta_exec)
▪ RANDMMAP (delta_mmap)
▪ RANDKSTACK
▪ PAX_PAGEEXEC Paging based non-executable pages
▪ NX bit support - alpha, ppc, parisc, sparc, sparc64, amd64, ia64
▪ PAX_SEGMEXEC Segmentation based non-executable pages
▪ Duplicating every executable page in the lower half of the
address space into the upper half.
▪ Code Segment
▪ Data Segment
Address Space Layout Randomization
▪ User space stack delta_stack (24 bits)
▪ Kernel space stack delta_exec (24 bits)
▪ Mmap-managed heap delta_mmap (16 bits)
▪ Executable image (16 bits)
▪ Brk-managed heap (12 bits)
▪ Library images
Refs
http://www.phrack.org/issues.html?issue=66&id=2#article
http://www.phrack.org/issues.html?issue=52&id=6#article
http://www.grsecurity.net/~spender/
http://pax.grsecurity.net/
http://www.gentoo.org/proj/en/hardened/
https://xorl.wordpress.com/category/grsecurity/
apropos();
Questions?
exit();
Thank you for attending this lecture.
Feedback –
mailto: root@fsck-labs.exploits-bg.com

Más contenido relacionado

La actualidad más candente

Centralized Logging with syslog
Centralized Logging with syslogCentralized Logging with syslog
Centralized Logging with syslogamiable_indian
 
Object Storage with Gluster
Object Storage with GlusterObject Storage with Gluster
Object Storage with GlusterGluster.org
 
cache2k, Java Caching, Turbo Charged, FOSDEM 2015
cache2k, Java Caching, Turbo Charged, FOSDEM 2015cache2k, Java Caching, Turbo Charged, FOSDEM 2015
cache2k, Java Caching, Turbo Charged, FOSDEM 2015cruftex
 
JCache / JSR107 shortcomings
JCache / JSR107  shortcomingsJCache / JSR107  shortcomings
JCache / JSR107 shortcomingscruftex
 
Vagrant勉強会 チュートリアル編
Vagrant勉強会 チュートリアル編Vagrant勉強会 チュートリアル編
Vagrant勉強会 チュートリアル編Yasuyuki Sugai
 
Osis18_Cloud : DeepTorrent Stockage distribué perenne basé sur Bittorrent
Osis18_Cloud : DeepTorrent Stockage distribué perenne basé sur BittorrentOsis18_Cloud : DeepTorrent Stockage distribué perenne basé sur Bittorrent
Osis18_Cloud : DeepTorrent Stockage distribué perenne basé sur BittorrentPôle Systematic Paris-Region
 
От sysV к systemd
От sysV к systemdОт sysV к systemd
От sysV к systemdDenis Kovalev
 
App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...
App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...
App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...Cyber Security Alliance
 
20171101 taco scargo luminous is out, what's in it for you
20171101 taco scargo   luminous is out, what's in it for you20171101 taco scargo   luminous is out, what's in it for you
20171101 taco scargo luminous is out, what's in it for youTaco Scargo
 
Nsq.io on Node.js and Shell
Nsq.io on Node.js and ShellNsq.io on Node.js and Shell
Nsq.io on Node.js and ShellLuis Faustino
 
Bare-metal and Virtual Provisioning with Razor
Bare-metal and Virtual Provisioning with RazorBare-metal and Virtual Provisioning with Razor
Bare-metal and Virtual Provisioning with RazorKristian Reese
 
A little systemtap
A little systemtapA little systemtap
A little systemtapyang bingwu
 
Nach os network
Nach os networkNach os network
Nach os networknaniix21_3
 
Nach os network
Nach os networkNach os network
Nach os networknaniix21_3
 

La actualidad más candente (20)

Centralized Logging with syslog
Centralized Logging with syslogCentralized Logging with syslog
Centralized Logging with syslog
 
Object Storage with Gluster
Object Storage with GlusterObject Storage with Gluster
Object Storage with Gluster
 
Haproxy - zastosowania
Haproxy - zastosowaniaHaproxy - zastosowania
Haproxy - zastosowania
 
Puppet
PuppetPuppet
Puppet
 
cache2k, Java Caching, Turbo Charged, FOSDEM 2015
cache2k, Java Caching, Turbo Charged, FOSDEM 2015cache2k, Java Caching, Turbo Charged, FOSDEM 2015
cache2k, Java Caching, Turbo Charged, FOSDEM 2015
 
JCache / JSR107 shortcomings
JCache / JSR107  shortcomingsJCache / JSR107  shortcomings
JCache / JSR107 shortcomings
 
Vagrant勉強会 チュートリアル編
Vagrant勉強会 チュートリアル編Vagrant勉強会 チュートリアル編
Vagrant勉強会 チュートリアル編
 
Osis18_Cloud : DeepTorrent Stockage distribué perenne basé sur Bittorrent
Osis18_Cloud : DeepTorrent Stockage distribué perenne basé sur BittorrentOsis18_Cloud : DeepTorrent Stockage distribué perenne basé sur Bittorrent
Osis18_Cloud : DeepTorrent Stockage distribué perenne basé sur Bittorrent
 
Dns centos
Dns centosDns centos
Dns centos
 
От sysV к systemd
От sysV к systemdОт sysV к systemd
От sysV к systemd
 
App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...
App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...
App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...
 
20171101 taco scargo luminous is out, what's in it for you
20171101 taco scargo   luminous is out, what's in it for you20171101 taco scargo   luminous is out, what's in it for you
20171101 taco scargo luminous is out, what's in it for you
 
Nsq.io on Node.js and Shell
Nsq.io on Node.js and ShellNsq.io on Node.js and Shell
Nsq.io on Node.js and Shell
 
Bare-metal and Virtual Provisioning with Razor
Bare-metal and Virtual Provisioning with RazorBare-metal and Virtual Provisioning with Razor
Bare-metal and Virtual Provisioning with Razor
 
Openssl
OpensslOpenssl
Openssl
 
A little systemtap
A little systemtapA little systemtap
A little systemtap
 
Squid Server
Squid ServerSquid Server
Squid Server
 
Nodejs Intro
Nodejs IntroNodejs Intro
Nodejs Intro
 
Nach os network
Nach os networkNach os network
Nach os network
 
Nach os network
Nach os networkNach os network
Nach os network
 

Destacado

Recoleccion de Informacion con Google (OWASP Argentina)
Recoleccion de Informacion con Google (OWASP Argentina)Recoleccion de Informacion con Google (OWASP Argentina)
Recoleccion de Informacion con Google (OWASP Argentina)Maximiliano Soler
 
Информациско безбедносна проценка на веб апликации (изучување на случај)
Информациско безбедносна проценка на веб апликации (изучување на случај)Информациско безбедносна проценка на веб апликации (изучување на случај)
Информациско безбедносна проценка на веб апликации (изучување на случај)Zero Science Lab
 
grsecurity and PaX
grsecurity and PaXgrsecurity and PaX
grsecurity and PaXKernel TLV
 
Information Gathering With Google
Information Gathering With GoogleInformation Gathering With Google
Information Gathering With GoogleZero Science Lab
 
CloudFlare vs Incapsula: Round 2
CloudFlare vs Incapsula: Round 2CloudFlare vs Incapsula: Round 2
CloudFlare vs Incapsula: Round 2Zero Science Lab
 
CloudFlare vs Incapsula vs ModSecurity
CloudFlare vs Incapsula vs ModSecurityCloudFlare vs Incapsula vs ModSecurity
CloudFlare vs Incapsula vs ModSecurityZero Science Lab
 

Destacado (7)

OWASP Bulgaria
OWASP BulgariaOWASP Bulgaria
OWASP Bulgaria
 
Recoleccion de Informacion con Google (OWASP Argentina)
Recoleccion de Informacion con Google (OWASP Argentina)Recoleccion de Informacion con Google (OWASP Argentina)
Recoleccion de Informacion con Google (OWASP Argentina)
 
Информациско безбедносна проценка на веб апликации (изучување на случај)
Информациско безбедносна проценка на веб апликации (изучување на случај)Информациско безбедносна проценка на веб апликации (изучување на случај)
Информациско безбедносна проценка на веб апликации (изучување на случај)
 
grsecurity and PaX
grsecurity and PaXgrsecurity and PaX
grsecurity and PaX
 
Information Gathering With Google
Information Gathering With GoogleInformation Gathering With Google
Information Gathering With Google
 
CloudFlare vs Incapsula: Round 2
CloudFlare vs Incapsula: Round 2CloudFlare vs Incapsula: Round 2
CloudFlare vs Incapsula: Round 2
 
CloudFlare vs Incapsula vs ModSecurity
CloudFlare vs Incapsula vs ModSecurityCloudFlare vs Incapsula vs ModSecurity
CloudFlare vs Incapsula vs ModSecurity
 

Similar a Grsecurity - Theoretical and Practical Application

CONFidence 2017: Escaping the (sand)box: The promises and pitfalls of modern ...
CONFidence 2017: Escaping the (sand)box: The promises and pitfalls of modern ...CONFidence 2017: Escaping the (sand)box: The promises and pitfalls of modern ...
CONFidence 2017: Escaping the (sand)box: The promises and pitfalls of modern ...PROIDEA
 
Linux seccomp(2) vs OpenBSD pledge(2)
Linux seccomp(2) vs OpenBSD pledge(2)Linux seccomp(2) vs OpenBSD pledge(2)
Linux seccomp(2) vs OpenBSD pledge(2)Giovanni Bechis
 
Shall we play a game
Shall we play a gameShall we play a game
Shall we play a gamejackpot201
 
Secure .NET programming
Secure .NET programmingSecure .NET programming
Secure .NET programmingAnte Gulam
 
We shall play a game....
We shall play a game....We shall play a game....
We shall play a game....Sadia Textile
 
Docker Security in Production Overview
Docker Security in Production OverviewDocker Security in Production Overview
Docker Security in Production OverviewDelve Labs
 
Centralized + Unified Logging
Centralized + Unified LoggingCentralized + Unified Logging
Centralized + Unified LoggingGabor Kozma
 
Hardening Linux and introducing Securix Linux
Hardening Linux and introducing Securix LinuxHardening Linux and introducing Securix Linux
Hardening Linux and introducing Securix LinuxSecurity Session
 
Linux Security APIs and the Chromium Sandbox
Linux Security APIs and the Chromium SandboxLinux Security APIs and the Chromium Sandbox
Linux Security APIs and the Chromium SandboxPatricia Aas
 
Docker Container: isolation and security
Docker Container: isolation and securityDocker Container: isolation and security
Docker Container: isolation and security宇 傅
 
zkStudyClub: Zero-Knowledge Proofs Security, in Practice [JP Aumasson, Taurus]
zkStudyClub: Zero-Knowledge Proofs Security, in Practice [JP Aumasson, Taurus]zkStudyClub: Zero-Knowledge Proofs Security, in Practice [JP Aumasson, Taurus]
zkStudyClub: Zero-Knowledge Proofs Security, in Practice [JP Aumasson, Taurus]Alex Pruden
 
An Introduction to User Space Filesystem Development
An Introduction to User Space Filesystem DevelopmentAn Introduction to User Space Filesystem Development
An Introduction to User Space Filesystem DevelopmentMatt Turner
 
Capturing NIC and Kernel TX and RX Timestamps for Packets in Go
Capturing NIC and Kernel TX and RX Timestamps for Packets in GoCapturing NIC and Kernel TX and RX Timestamps for Packets in Go
Capturing NIC and Kernel TX and RX Timestamps for Packets in GoScyllaDB
 
Introduction to FPGA acceleration
Introduction to FPGA accelerationIntroduction to FPGA acceleration
Introduction to FPGA accelerationMarco77328
 
Bastion jump hosts with Teleport
Bastion jump hosts with TeleportBastion jump hosts with Teleport
Bastion jump hosts with TeleportFaelix Ltd
 
Golden Gate - How to start such a project?
Golden Gate  - How to start such a project?Golden Gate  - How to start such a project?
Golden Gate - How to start such a project?Trivadis
 

Similar a Grsecurity - Theoretical and Practical Application (20)

CONFidence 2017: Escaping the (sand)box: The promises and pitfalls of modern ...
CONFidence 2017: Escaping the (sand)box: The promises and pitfalls of modern ...CONFidence 2017: Escaping the (sand)box: The promises and pitfalls of modern ...
CONFidence 2017: Escaping the (sand)box: The promises and pitfalls of modern ...
 
Linux seccomp(2) vs OpenBSD pledge(2)
Linux seccomp(2) vs OpenBSD pledge(2)Linux seccomp(2) vs OpenBSD pledge(2)
Linux seccomp(2) vs OpenBSD pledge(2)
 
0507 057 01 98 * Adana Klima Servisleri
0507 057 01 98 * Adana Klima Servisleri0507 057 01 98 * Adana Klima Servisleri
0507 057 01 98 * Adana Klima Servisleri
 
Shall we play a game
Shall we play a gameShall we play a game
Shall we play a game
 
Shall we play a game?
Shall we play a game?Shall we play a game?
Shall we play a game?
 
Secure .NET programming
Secure .NET programmingSecure .NET programming
Secure .NET programming
 
We shall play a game....
We shall play a game....We shall play a game....
We shall play a game....
 
Cirrostratus
CirrostratusCirrostratus
Cirrostratus
 
Docker Security in Production Overview
Docker Security in Production OverviewDocker Security in Production Overview
Docker Security in Production Overview
 
Centralized + Unified Logging
Centralized + Unified LoggingCentralized + Unified Logging
Centralized + Unified Logging
 
Hardening Linux and introducing Securix Linux
Hardening Linux and introducing Securix LinuxHardening Linux and introducing Securix Linux
Hardening Linux and introducing Securix Linux
 
Linux Security APIs and the Chromium Sandbox
Linux Security APIs and the Chromium SandboxLinux Security APIs and the Chromium Sandbox
Linux Security APIs and the Chromium Sandbox
 
Docker Container: isolation and security
Docker Container: isolation and securityDocker Container: isolation and security
Docker Container: isolation and security
 
Hacking the swisscom modem
Hacking the swisscom modemHacking the swisscom modem
Hacking the swisscom modem
 
zkStudyClub: Zero-Knowledge Proofs Security, in Practice [JP Aumasson, Taurus]
zkStudyClub: Zero-Knowledge Proofs Security, in Practice [JP Aumasson, Taurus]zkStudyClub: Zero-Knowledge Proofs Security, in Practice [JP Aumasson, Taurus]
zkStudyClub: Zero-Knowledge Proofs Security, in Practice [JP Aumasson, Taurus]
 
An Introduction to User Space Filesystem Development
An Introduction to User Space Filesystem DevelopmentAn Introduction to User Space Filesystem Development
An Introduction to User Space Filesystem Development
 
Capturing NIC and Kernel TX and RX Timestamps for Packets in Go
Capturing NIC and Kernel TX and RX Timestamps for Packets in GoCapturing NIC and Kernel TX and RX Timestamps for Packets in Go
Capturing NIC and Kernel TX and RX Timestamps for Packets in Go
 
Introduction to FPGA acceleration
Introduction to FPGA accelerationIntroduction to FPGA acceleration
Introduction to FPGA acceleration
 
Bastion jump hosts with Teleport
Bastion jump hosts with TeleportBastion jump hosts with Teleport
Bastion jump hosts with Teleport
 
Golden Gate - How to start such a project?
Golden Gate  - How to start such a project?Golden Gate  - How to start such a project?
Golden Gate - How to start such a project?
 

Más de Zero Science Lab

Broadcast Signal Intrusion - Hacking Radio Stations
Broadcast Signal Intrusion - Hacking Radio StationsBroadcast Signal Intrusion - Hacking Radio Stations
Broadcast Signal Intrusion - Hacking Radio StationsZero Science Lab
 
Безбедност: МК сајбер простор и инфраструктура - Отстранување на национална с...
Безбедност: МК сајбер простор и инфраструктура - Отстранување на национална с...Безбедност: МК сајбер простор и инфраструктура - Отстранување на национална с...
Безбедност: МК сајбер простор и инфраструктура - Отстранување на национална с...Zero Science Lab
 
Пенетрациско тестирање на биометриски систем за контрола на пристап - Кратка ...
Пенетрациско тестирање на биометриски систем за контрола на пристап - Кратка ...Пенетрациско тестирање на биометриски систем за контрола на пристап - Кратка ...
Пенетрациско тестирање на биометриски систем за контрола на пристап - Кратка ...Zero Science Lab
 
Digital Signage Systems - The Modern Hacker's Outreach
Digital Signage Systems - The Modern Hacker's OutreachDigital Signage Systems - The Modern Hacker's Outreach
Digital Signage Systems - The Modern Hacker's OutreachZero Science Lab
 
I Own Your Building (Management System)
I Own Your Building (Management System)I Own Your Building (Management System)
I Own Your Building (Management System)Zero Science Lab
 
Анализа на оддалечена експлоатациjа во Linux кернел
Анализа на оддалечена експлоатациjа во Linux кернелАнализа на оддалечена експлоатациjа во Linux кернел
Анализа на оддалечена експлоатациjа во Linux кернелZero Science Lab
 
Изучување на случај: Иницијална безбедносна анализа на изворен код кај систем...
Изучување на случај: Иницијална безбедносна анализа на изворен код кај систем...Изучување на случај: Иницијална безбедносна анализа на изворен код кај систем...
Изучување на случај: Иницијална безбедносна анализа на изворен код кај систем...Zero Science Lab
 
Exploitation and distribution of setuid and setgid binaries on Linux systems
Exploitation and distribution of setuid and setgid binaries on Linux systemsExploitation and distribution of setuid and setgid binaries on Linux systems
Exploitation and distribution of setuid and setgid binaries on Linux systemsZero Science Lab
 
Web Vulnerabilities And Exploitation - Compromising The Web
Web Vulnerabilities And Exploitation - Compromising The WebWeb Vulnerabilities And Exploitation - Compromising The Web
Web Vulnerabilities And Exploitation - Compromising The WebZero Science Lab
 
Преоптоварување на баферот и безбедносни механизми на меморијата PPT
Преоптоварување на баферот и безбедносни механизми на меморијата PPTПреоптоварување на баферот и безбедносни механизми на меморијата PPT
Преоптоварување на баферот и безбедносни механизми на меморијата PPTZero Science Lab
 
Преоптоварување на баферот и безбедносни механизми на меморијата
Преоптоварување на баферот и безбедносни механизми на меморијатаПреоптоварување на баферот и безбедносни механизми на меморијата
Преоптоварување на баферот и безбедносни механизми на меморијатаZero Science Lab
 
Vulnerability Discovery (MK)
Vulnerability Discovery (MK)Vulnerability Discovery (MK)
Vulnerability Discovery (MK)Zero Science Lab
 
The Metasploit Framework (MK)
The Metasploit Framework (MK)The Metasploit Framework (MK)
The Metasploit Framework (MK)Zero Science Lab
 
IDS - Intrusion Detection Systems (MK)
IDS - Intrusion Detection Systems (MK)IDS - Intrusion Detection Systems (MK)
IDS - Intrusion Detection Systems (MK)Zero Science Lab
 

Más de Zero Science Lab (15)

Broadcast Signal Intrusion - Hacking Radio Stations
Broadcast Signal Intrusion - Hacking Radio StationsBroadcast Signal Intrusion - Hacking Radio Stations
Broadcast Signal Intrusion - Hacking Radio Stations
 
Безбедност: МК сајбер простор и инфраструктура - Отстранување на национална с...
Безбедност: МК сајбер простор и инфраструктура - Отстранување на национална с...Безбедност: МК сајбер простор и инфраструктура - Отстранување на национална с...
Безбедност: МК сајбер простор и инфраструктура - Отстранување на национална с...
 
Пенетрациско тестирање на биометриски систем за контрола на пристап - Кратка ...
Пенетрациско тестирање на биометриски систем за контрола на пристап - Кратка ...Пенетрациско тестирање на биометриски систем за контрола на пристап - Кратка ...
Пенетрациско тестирање на биометриски систем за контрола на пристап - Кратка ...
 
Digital Signage Systems - The Modern Hacker's Outreach
Digital Signage Systems - The Modern Hacker's OutreachDigital Signage Systems - The Modern Hacker's Outreach
Digital Signage Systems - The Modern Hacker's Outreach
 
I Own Your Building (Management System)
I Own Your Building (Management System)I Own Your Building (Management System)
I Own Your Building (Management System)
 
Анализа на оддалечена експлоатациjа во Linux кернел
Анализа на оддалечена експлоатациjа во Linux кернелАнализа на оддалечена експлоатациjа во Linux кернел
Анализа на оддалечена експлоатациjа во Linux кернел
 
Изучување на случај: Иницијална безбедносна анализа на изворен код кај систем...
Изучување на случај: Иницијална безбедносна анализа на изворен код кај систем...Изучување на случај: Иницијална безбедносна анализа на изворен код кај систем...
Изучување на случај: Иницијална безбедносна анализа на изворен код кај систем...
 
Exploitation and distribution of setuid and setgid binaries on Linux systems
Exploitation and distribution of setuid and setgid binaries on Linux systemsExploitation and distribution of setuid and setgid binaries on Linux systems
Exploitation and distribution of setuid and setgid binaries on Linux systems
 
Web Vulnerabilities And Exploitation - Compromising The Web
Web Vulnerabilities And Exploitation - Compromising The WebWeb Vulnerabilities And Exploitation - Compromising The Web
Web Vulnerabilities And Exploitation - Compromising The Web
 
Преоптоварување на баферот и безбедносни механизми на меморијата PPT
Преоптоварување на баферот и безбедносни механизми на меморијата PPTПреоптоварување на баферот и безбедносни механизми на меморијата PPT
Преоптоварување на баферот и безбедносни механизми на меморијата PPT
 
Преоптоварување на баферот и безбедносни механизми на меморијата
Преоптоварување на баферот и безбедносни механизми на меморијатаПреоптоварување на баферот и безбедносни механизми на меморијата
Преоптоварување на баферот и безбедносни механизми на меморијата
 
Vulnerability Discovery (MK)
Vulnerability Discovery (MK)Vulnerability Discovery (MK)
Vulnerability Discovery (MK)
 
M3t4splo1t
M3t4splo1tM3t4splo1t
M3t4splo1t
 
The Metasploit Framework (MK)
The Metasploit Framework (MK)The Metasploit Framework (MK)
The Metasploit Framework (MK)
 
IDS - Intrusion Detection Systems (MK)
IDS - Intrusion Detection Systems (MK)IDS - Intrusion Detection Systems (MK)
IDS - Intrusion Detection Systems (MK)
 

Grsecurity - Theoretical and Practical Application

  • 1. G. Geshev Open Fest 2010 20 - 21 November Sofia, Bulgaria GRSECURITY/PAX Theoretical & Practical Application
  • 2. About GRSECURITY (Greater Security) ▪ Back in the days.. 2000/2001 ▪ Port of the Owl project to Linux 2.4.1 ▪ Set of Kernel Patches Enhancing System Security ▪ Memory Corruption Bugs Exploitation Mitigation, ▪ Role-Based Access Control System, ▪ Filesystem Security Enhancements, ▪ Enhanced chroot(), ▪ Kernel Auditing, etc.
  • 3. Components (most of ‘em) ▪ PaX (NX not to be confused with W^X (OBSD), ASLR), ▪ paxctl (user-space PaX flags control utility) ▪ pspax, scanelf, dumpelf (pax-utils) ▪ paxtest (buffer overflow protection test suite) ▪ Role-Based Access Control (RBAC) System, ▪ gradm (RBAC Administration Console) ▪ Enhanced chroot(), ▪ Miscellaneous Features (Improved Filesystem Security), etc
  • 4. I n v o l v e m e n t ▪ The PaX Developers – pageexec@freemail.hu ▪ Brad Spengler (not Brad Spender) - spender@grsecurity.net ▪ Zbyniu Krzystolik ▪ Michael Dalton
  • 5. Detection ▪ Enhanced Kernel Auditing (GRKERNSEC_AUDIT_GROUP, GRKERNSEC_AUDIT_GID) ▪ Exec logging (GRKERNSEC_EXECLOG) ▪ Resource logging (GRKERNSEC_RESLOG, GRKERNSEC_FORKFAIL) ▪ Log execs within chroot (GRKERNSEC_CHROOT_EXECLOG) ▪ Ptrace logging (GRKERNSEC_AUDIT_PTRACE) ▪ Chdir logging (GRKERNSEC_AUDIT_CHDIR)
  • 6. Detection (cont.) ▪ Mount / Umount logging (GRKERNSEC_AUDIT_MOUNT) ▪ Signal logging (GRKERNSEC_SIGNAL) ▪ Fork failure logging (GRKERNSEC_FORKFAIL) ▪ Time change logging (GRKERNSEC_TIME) ▪ /proc/<pid>/ipaddr support (GRKERNSEC_PROC_IPADDR) ▪ Denied RWX mmap/mprotect logging (GRKERNSEC_RWXMAP_LOG)
  • 7. Detection (cont.) ▪ ELF text relocations logging (GRKERNSEC_AUDIT_TEXTREL) ▪ Logging Options - ▪ Seconds in between log messages (min) (GRKERNSEC_FLOODTIME) ▪ Number of messages in a burst (max) (GRKERNSEC_FLOODBURST)
  • 8. Prevention ▪ Executable Protections – ▪ Deter ptrace-based process snooping (GRKERNSEC_HARDEN_PTRACE) ▪ Trusted Path Execution (GRKERNSEC_TPE, GRKERNSEC_TPE_ALL, GRKERNSEC_TPE_GID, GRKERNSEC_TPE_INVERT)
  • 9. Prevention (cont.) ▪ Network Protections – ▪ Larger entropy pools (GRKERNSEC_RANDNET) ▪ TCP/UDP blackhole (GRKERNSEC_BLACKHOLE) ▪ Socket restrictions (GRKERNSEC_SOCKET, GRKERNSEC_SOCKET_ALL, GRKERNSEC_SOCKET_ALL_GID, GRKERNSEC_SOCKET_CLIENT, GRKERNSEC_SOCKET_CLIENT_GID, GRKERNSEC_SOCKET_SERVER, GRKERNSEC_SOCKET_SERVER_GID)
  • 10. Prevention (cont.) ▪ Address Space Protection - ▪ Remove addresses from /proc/<pid>/[smaps|maps|stat] (GRKERNSEC_PROC_MEMMAP) ▪ Deny writing to /dev/kmem, /dev/mem, and /dev/port (GRKERNSEC_KMEM) ▪ Deter exploit bruteforcing (GRKERNSEC_BRUTE) ▪ Harden module auto-loading (GRKERNSEC_MODHARDEN) ▪ Hide kernel symbols (GRKERNSEC_HIDESYM) ▪ Hide kernel processes (GRKERNSEC_ACL_HIDEKERN)
  • 11. Prevention (cont.) ▪ Maximum tries before password lockout (GRKERNSEC_ACL_MAXTRIES,GRKERNSEC_ACL_TIMEOUT) ▪ Filesystem Protections - ▪ Proc restrictions (GRKERNSEC_PROC, GRKERNSEC_PROC_USER, GRKERNSEC_PROC_USERGROUP, GRKERNSEC_PROC_ADD) ▪ Linking restrictions (GRKERNSEC_LINK) ▪ FIFO restrictions (GRKERNSEC_FIFO) ▪ Runtime read-only mount protection (GRKERNSEC_ROFS) ▪
  • 12. Prevention (cont.) ▪ Chroot jail restrictions - (GRKERNSEC_CHROOT, GRKERNSEC_CHROOT_MOUNT, GRKERNSEC_CHROOT_DOUBLE, GRKERNSEC_CHROOT_PIVOT, GRKERNSEC_CHROOT_CHDIR, GRKERNSEC_CHROOT_CHMOD, GRKERNSEC_CHROOT_FCHDIR, GRKERNSEC_CHROOT_MKNOD, GRKERNSEC_CHROOT_SYSCTL) ▪
  • 13. Prevention (cont.) Address Space Modification Protection ▪ NOEXEC (least privilege enforcement) ▪ PAGEEXEC, SEGMEXEC ▪ MPROTECT ▪ KERNEXEC ▪ Address Space Layout Randomization ▪ RANDUSTACK (delta_stack) ▪ RANDEXEC (delta_exec) ▪ RANDMMAP (delta_mmap) ▪ RANDKSTACK
  • 14. ▪ PAX_PAGEEXEC Paging based non-executable pages ▪ NX bit support - alpha, ppc, parisc, sparc, sparc64, amd64, ia64 ▪ PAX_SEGMEXEC Segmentation based non-executable pages ▪ Duplicating every executable page in the lower half of the address space into the upper half. ▪ Code Segment ▪ Data Segment
  • 15. Address Space Layout Randomization ▪ User space stack delta_stack (24 bits) ▪ Kernel space stack delta_exec (24 bits) ▪ Mmap-managed heap delta_mmap (16 bits) ▪ Executable image (16 bits) ▪ Brk-managed heap (12 bits) ▪ Library images
  • 18. exit(); Thank you for attending this lecture. Feedback – mailto: root@fsck-labs.exploits-bg.com