SlideShare a Scribd company logo
C:> telnet Host.Intrusion.Detection...like.a.boss 
HELO Confraria de Segurança de Informação 
PRESENTATION FROM: André Lima 
RCPT TO: Confraria@Forum.Picoas 
WHEN 26 Nov 2014 
DATA 
Boa noite a todos! 
. 
QUIT 
by André Lima, 
Associate CISSP / ISO27001 / CCNA Security 
@0x4ndr3 
al@integrity.pt 
https://www.linkedin.com/in/aflima
$whois andrelima 
• Consultant at Integrity S.A. 
• Associate Certified Information Systems Security Professional 
(CISSP) 
• ISO 27001 LA 
• CCNA Security 
• CCNP Route 
• Engenharia Informática @ ISEL 
0x4ndr3 
al@integrity.pt 
https://www.linkedin.com/in/aflima
$cat agenda.txt 
• Context 
• Intro to Samhain 
• Stealth – how it works 
• Stealth – installation details 
• Demo 
• Precautions 
• Conclusions 
• References 
• Questions
$patch -p1 < ../backdoor.c 
• Writing files 
– Patching 
– Adding backdoor user 
– Crontab 
– Altering logs 
– Rootkits 
– Backdoor service 
– Trojaned binaries 
... Limits? your imagination!
But also... 
• Multi-admins environment
$samhain -h 
• Open-source multiplatform application for POSIX systems (Unix, 
Linux, Cygwin/Windows) 
• Supports client-server model: configuration + database files 
• Provides file integrity checking and log file monitoring/analysis, as 
well as rootkit detection, port monitoring, and detection of rogue 
SUID executables, etc 
http://www.la-samhna.de/samhain/
• File signatures 
$samhain -h 
– Inode + timestamps + owner and group permissions + number of 
hardlinks + etc 
• File system SUID/GUID Binaries 
• Detecting kernel rootkits 
• Checking for open ports 
• Log file validation 
• User ID (Linux Audit Daemon) 
• ... 
• Stealth mode!
$samhain –h | grep ‘Stealth Mode’ 
• What does it mean? 
– obfuscating strings on binaries + logfile + database (XML 
DB) 
– configuration can be steganographically hidden in a 
postscript image file 
– renaming the HIDS binary (and auxiliary applications) 
– Not enabled by default but advised: delete man pages 
folder!
$samhain –h | grep ‘Stealth Mode’
$samhain –h | grep “Stealth Mode”
$samhain –h | grep “Stealth Mode”
env X='() { :; }; echo "VULNERABLE DEMO"' bash -c id
Take some precautions!
echo $Precautions 
Document the stealth name!
echo $Precautions 
$ history -c
echo $Precautions
echo $Precautions
echo $Precautions
echo $Conclusions 
• Be organized 
– Know your assets 
• What users are supposed to be on a specific server 
• What ports must be on 
• What files (config / executables) must not be altered 
– Document your stealth configurations 
• Be very specific about what you’re monitoring 
(minimize false positives)
echo $references 
• Samhain documentation 
– http://www.la-samhna.de/samhain/s_documentation.html
$read Questions

More Related Content

PPTX
Find the Hacker
PPTX
How to Secure Containers
PDF
Implementing Active Security with Sysdig Falco - Docker Meetup Barcelona
PPTX
Backup using rsync
PDF
Instant DevOps
PDF
Custom Rules & Broken Tools
PPTX
Kali Linux - Falconer
PPTX
Unix_basics
Find the Hacker
How to Secure Containers
Implementing Active Security with Sysdig Falco - Docker Meetup Barcelona
Backup using rsync
Instant DevOps
Custom Rules & Broken Tools
Kali Linux - Falconer
Unix_basics

What's hot (20)

PPTX
New microsoft power point presentation
PDF
Getting Started with PureScript
PDF
Bz backtrack.usage
PDF
PuppetConf 2016: Avoiding Toxic Technical Debt Derivatives – R. Tyler Croy, C...
PPTX
Mainframe Hacking - Derbycon 5.0
PDF
Terraform 9
PDF
Demystifying Docker Networking Devoxx MA 2017
PPTX
Laverna vs etherpad
PDF
Docker Security - Secure Container Deployment on Linux
ODP
"Containers do not contain"
KEY
Cis222 9
ODP
Libssh2 at FSCONS 2009
PPTX
2014 Security Onion Conference
PDF
320.1-Cryptography
PDF
Nix for Python developers
PPTX
Dock ir incident response in a containerized, immutable, continually deploy...
PDF
XFLTReat: a new dimension in tunnelling
PDF
Implementing Active Security with Sysdig Falco - Barcelona Software Crafters
PPTX
Reinventing anon email
PPTX
Inside Sqale's Backend at Sapporo Ruby Kaigi 2012
New microsoft power point presentation
Getting Started with PureScript
Bz backtrack.usage
PuppetConf 2016: Avoiding Toxic Technical Debt Derivatives – R. Tyler Croy, C...
Mainframe Hacking - Derbycon 5.0
Terraform 9
Demystifying Docker Networking Devoxx MA 2017
Laverna vs etherpad
Docker Security - Secure Container Deployment on Linux
"Containers do not contain"
Cis222 9
Libssh2 at FSCONS 2009
2014 Security Onion Conference
320.1-Cryptography
Nix for Python developers
Dock ir incident response in a containerized, immutable, continually deploy...
XFLTReat: a new dimension in tunnelling
Implementing Active Security with Sysdig Falco - Barcelona Software Crafters
Reinventing anon email
Inside Sqale's Backend at Sapporo Ruby Kaigi 2012
Ad

Viewers also liked (16)

PDF
CandH Card-PROOF
PDF
Stanford University
PDF
For everything
DOCX
Dog healt terminado
PPT
Tema 1. TIC
PDF
Pee pe. lei estadual nº 15.533 de 23.6.2015
DOCX
Lauro gallegos eje 2_actividad 2
DOC
RICHARD ADAMS RESUME
DOCX
Sky aangan plots
DOCX
Inmuno trabajo
PDF
Software Project Documentation - An Essence of Software Development
PDF
Conexiones para Riego de Aluminio
PPT
Collection development by Muhammad Tufail Khan & Aneela Zahid
PPTX
Sindhi society and culture
DOCX
Ssomnath Sarkar - Dy Manager adminstration - 10.5 Years
PDF
HYMER_Nova_2010_I.pdf
CandH Card-PROOF
Stanford University
For everything
Dog healt terminado
Tema 1. TIC
Pee pe. lei estadual nº 15.533 de 23.6.2015
Lauro gallegos eje 2_actividad 2
RICHARD ADAMS RESUME
Sky aangan plots
Inmuno trabajo
Software Project Documentation - An Essence of Software Development
Conexiones para Riego de Aluminio
Collection development by Muhammad Tufail Khan & Aneela Zahid
Sindhi society and culture
Ssomnath Sarkar - Dy Manager adminstration - 10.5 Years
HYMER_Nova_2010_I.pdf
Ad

Similar to Host Intrusion Detection like a Boss (20)

PDF
CRYPTOGRAPHY AND CYBER SECURITY LAB EXPERIMENTS
PDF
How Many Linux Security Layers Are Enough?
PDF
Rtfm_ Red Team Field Manual ( PDFDrive ).pdf
PPT
Threats, Vulnerabilities & Security measures in Linux
PDF
Linux Hardening - nullhyd
PPTX
Tcpdump hunter
PPTX
Security Walls in Linux Environment: Practice, Experience, and Results
PPTX
Recommended Software and Modifications for Server Security
PDF
Ubuntu Server CLI cheat sheet 2024 v6 PDF
PDF
Ubuntu Server CLI cheat sheet 2024 v6.pdf
PDF
The Linux Audit Framework
PDF
linux_Commads
PDF
CentOS Linux Server Hardening
PDF
Jana treek 4
PDF
KCC_Final.pdf
PDF
Ceh v5 module 18 linux hacking
PPTX
Linux for Security Professionals (Tips and Tricks) - Init 6 10/2012
PDF
Unixtoolbox
PDF
unixtoolbox.pdf
PDF
Unixtoolbox
CRYPTOGRAPHY AND CYBER SECURITY LAB EXPERIMENTS
How Many Linux Security Layers Are Enough?
Rtfm_ Red Team Field Manual ( PDFDrive ).pdf
Threats, Vulnerabilities & Security measures in Linux
Linux Hardening - nullhyd
Tcpdump hunter
Security Walls in Linux Environment: Practice, Experience, and Results
Recommended Software and Modifications for Server Security
Ubuntu Server CLI cheat sheet 2024 v6 PDF
Ubuntu Server CLI cheat sheet 2024 v6.pdf
The Linux Audit Framework
linux_Commads
CentOS Linux Server Hardening
Jana treek 4
KCC_Final.pdf
Ceh v5 module 18 linux hacking
Linux for Security Professionals (Tips and Tricks) - Init 6 10/2012
Unixtoolbox
unixtoolbox.pdf
Unixtoolbox

Recently uploaded (20)

PDF
Web App vs Mobile App What Should You Build First.pdf
PPTX
1. Introduction to Computer Programming.pptx
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
A comparative study of natural language inference in Swahili using monolingua...
PPTX
The various Industrial Revolutions .pptx
PPTX
Modernising the Digital Integration Hub
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
OMC Textile Division Presentation 2021.pptx
PPTX
Chapter 5: Probability Theory and Statistics
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PPTX
Tartificialntelligence_presentation.pptx
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Architecture types and enterprise applications.pdf
PDF
Hybrid model detection and classification of lung cancer
PPTX
TLE Review Electricity (Electricity).pptx
PPTX
O2C Customer Invoices to Receipt V15A.pptx
PDF
STKI Israel Market Study 2025 version august
PPTX
observCloud-Native Containerability and monitoring.pptx
Web App vs Mobile App What Should You Build First.pdf
1. Introduction to Computer Programming.pptx
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
Assigned Numbers - 2025 - Bluetooth® Document
A comparative study of natural language inference in Swahili using monolingua...
The various Industrial Revolutions .pptx
Modernising the Digital Integration Hub
Programs and apps: productivity, graphics, security and other tools
OMC Textile Division Presentation 2021.pptx
Chapter 5: Probability Theory and Statistics
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
Tartificialntelligence_presentation.pptx
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Architecture types and enterprise applications.pdf
Hybrid model detection and classification of lung cancer
TLE Review Electricity (Electricity).pptx
O2C Customer Invoices to Receipt V15A.pptx
STKI Israel Market Study 2025 version august
observCloud-Native Containerability and monitoring.pptx

Host Intrusion Detection like a Boss

  • 1. C:> telnet Host.Intrusion.Detection...like.a.boss HELO Confraria de Segurança de Informação PRESENTATION FROM: André Lima RCPT TO: Confraria@Forum.Picoas WHEN 26 Nov 2014 DATA Boa noite a todos! . QUIT by André Lima, Associate CISSP / ISO27001 / CCNA Security @0x4ndr3 al@integrity.pt https://www.linkedin.com/in/aflima
  • 2. $whois andrelima • Consultant at Integrity S.A. • Associate Certified Information Systems Security Professional (CISSP) • ISO 27001 LA • CCNA Security • CCNP Route • Engenharia Informática @ ISEL 0x4ndr3 al@integrity.pt https://www.linkedin.com/in/aflima
  • 3. $cat agenda.txt • Context • Intro to Samhain • Stealth – how it works • Stealth – installation details • Demo • Precautions • Conclusions • References • Questions
  • 4. $patch -p1 < ../backdoor.c • Writing files – Patching – Adding backdoor user – Crontab – Altering logs – Rootkits – Backdoor service – Trojaned binaries ... Limits? your imagination!
  • 5. But also... • Multi-admins environment
  • 6. $samhain -h • Open-source multiplatform application for POSIX systems (Unix, Linux, Cygwin/Windows) • Supports client-server model: configuration + database files • Provides file integrity checking and log file monitoring/analysis, as well as rootkit detection, port monitoring, and detection of rogue SUID executables, etc http://www.la-samhna.de/samhain/
  • 7. • File signatures $samhain -h – Inode + timestamps + owner and group permissions + number of hardlinks + etc • File system SUID/GUID Binaries • Detecting kernel rootkits • Checking for open ports • Log file validation • User ID (Linux Audit Daemon) • ... • Stealth mode!
  • 8. $samhain –h | grep ‘Stealth Mode’ • What does it mean? – obfuscating strings on binaries + logfile + database (XML DB) – configuration can be steganographically hidden in a postscript image file – renaming the HIDS binary (and auxiliary applications) – Not enabled by default but advised: delete man pages folder!
  • 9. $samhain –h | grep ‘Stealth Mode’
  • 10. $samhain –h | grep “Stealth Mode”
  • 11. $samhain –h | grep “Stealth Mode”
  • 12. env X='() { :; }; echo "VULNERABLE DEMO"' bash -c id
  • 14. echo $Precautions Document the stealth name!
  • 15. echo $Precautions $ history -c
  • 19. echo $Conclusions • Be organized – Know your assets • What users are supposed to be on a specific server • What ports must be on • What files (config / executables) must not be altered – Document your stealth configurations • Be very specific about what you’re monitoring (minimize false positives)
  • 20. echo $references • Samhain documentation – http://www.la-samhna.de/samhain/s_documentation.html