35
Dealing with Linux Malware Rootkits, Backdoors, and More... Utrecht, 19 March 2016 Michael Boelen [email protected]

Dealing with Linux Malware

Embed Size (px)

Citation preview

Page 1: Dealing with Linux Malware

Dealing withLinux Malware

Rootkits, Backdoors, and More...

Utrecht, 19 March 2016

Michael [email protected]

Page 2: Dealing with Linux Malware

Agenda

Today1. How do “they” get in2. Why?3. Malware types4. In-depth: rootkits5. Defenses

2

Page 3: Dealing with Linux Malware

Interactive

● Ask● Share● Presentation

3

Page 4: Dealing with Linux Malware

Michael Boelen

● Security Tools○ Rootkit Hunter (malware scan)

○ Lynis (security audit)

● 150+ blog posts

● Founder of CISOfy

4

Page 5: Dealing with Linux Malware

How do “they” get in

Page 6: Dealing with Linux Malware

Intrusions

● Simple passwords● Vulnerabilities● Weak configurations● Clicking on attachments● Open infected programs

6

Page 7: Dealing with Linux Malware

Why?

Page 8: Dealing with Linux Malware

Why?

● Spam● Botnet

8

Page 9: Dealing with Linux Malware

9

Page 10: Dealing with Linux Malware

Types

Page 11: Dealing with Linux Malware

● Virus● Worm● Backdoor● Dropper● Rootkit

Types

11

Page 12: Dealing with Linux Malware

Rootkits 101

Page 13: Dealing with Linux Malware

Rootkits

● (become | stay) root● (software) kit

13

Page 14: Dealing with Linux Malware

Rootkits

● Stealth● Persistence● Backdoor

14

Page 15: Dealing with Linux Malware

How to be the best rootkit?

Page 16: Dealing with Linux Malware

Hiding ★

In plain sight!

/etc/sysconfig/…/tmp/mysql.sock/bin/audiocnf

16

Page 17: Dealing with Linux Malware

Hiding ★★

Slightly advanced

● Rename processes● Delete file from disk● Backdoor binaries

17

Page 18: Dealing with Linux Malware

Hiding ★★★

Advanced

● Kernel modules● Change system calls● Hidden passwords

18

Page 19: Dealing with Linux Malware

Demo

Page 20: Dealing with Linux Malware

Demo

20

Page 21: Dealing with Linux Malware

Demo

21

Page 22: Dealing with Linux Malware

Rootkit Hunter

Detect theundetectable!

22

Page 23: Dealing with Linux Malware
Page 24: Dealing with Linux Malware

Challenges

● We can’t trust anything● Even ourselves● No guarantees

24

Page 25: Dealing with Linux Malware

Continuous Game

25

Page 26: Dealing with Linux Malware

Defense

Page 27: Dealing with Linux Malware

Defenses

At least● Perform security scans● Protect your data● System hardening

27

Page 28: Dealing with Linux Malware

Scanning » Scanners

● Viruses → ClamAV● Backdoors → LMD● Rootkits → Chkrootkit / rkhunter

28

Page 29: Dealing with Linux Malware

Scanning » File Integrity

● Changes● Powerful detection● Noise

AIDE / Samhain

29

Page 30: Dealing with Linux Malware

System Hardening » Lynis

● Linux / UNIX● Open source● Shell● Health scan

30

Page 31: Dealing with Linux Malware

Conclusions

Page 32: Dealing with Linux Malware

Conclusions

● Challenge: rootkits are hard to detect

● Prevent: system hardening

● Detect: recognize quickly, and act

32

Page 33: Dealing with Linux Malware

You finished this presentation

Success!

Page 34: Dealing with Linux Malware

More Linux security?

Presentationsmichaelboelen.com/presentations/

Follow● Blog Linux Audit (linux-audit.com)● Twitter @mboelen

34

Page 35: Dealing with Linux Malware

35