dealing with linux malware - cisofy · dealing with linux malware rootkits, backdoors, and more......

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

Upload: doantruc

Post on 21-Sep-2018

226 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Dealing with Linux Malware - CISOfy · Dealing with Linux Malware Rootkits, Backdoors, and More... Utrecht, 19 March 2016 Michael Boelen michael.boelen@cisofy.com

Dealing withLinux Malware

Rootkits, Backdoors, and More...

Utrecht, 19 March 2016

Michael [email protected]

Page 2: Dealing with Linux Malware - CISOfy · Dealing with Linux Malware Rootkits, Backdoors, and More... Utrecht, 19 March 2016 Michael Boelen michael.boelen@cisofy.com

Agenda

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

2

Page 3: Dealing with Linux Malware - CISOfy · Dealing with Linux Malware Rootkits, Backdoors, and More... Utrecht, 19 March 2016 Michael Boelen michael.boelen@cisofy.com

Interactive

● Ask● Share● Presentation

3

Page 4: Dealing with Linux Malware - CISOfy · Dealing with Linux Malware Rootkits, Backdoors, and More... Utrecht, 19 March 2016 Michael Boelen michael.boelen@cisofy.com

Michael Boelen

● Security Tools○ Rootkit Hunter (malware scan)

○ Lynis (security audit)

● 150+ blog posts

● Founder of CISOfy

4

Page 5: Dealing with Linux Malware - CISOfy · Dealing with Linux Malware Rootkits, Backdoors, and More... Utrecht, 19 March 2016 Michael Boelen michael.boelen@cisofy.com

How do “they” get in

Page 6: Dealing with Linux Malware - CISOfy · Dealing with Linux Malware Rootkits, Backdoors, and More... Utrecht, 19 March 2016 Michael Boelen michael.boelen@cisofy.com

Intrusions

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

6

Page 7: Dealing with Linux Malware - CISOfy · Dealing with Linux Malware Rootkits, Backdoors, and More... Utrecht, 19 March 2016 Michael Boelen michael.boelen@cisofy.com

Why?

Page 8: Dealing with Linux Malware - CISOfy · Dealing with Linux Malware Rootkits, Backdoors, and More... Utrecht, 19 March 2016 Michael Boelen michael.boelen@cisofy.com

Why?

● Spam● Botnet

8

Page 9: Dealing with Linux Malware - CISOfy · Dealing with Linux Malware Rootkits, Backdoors, and More... Utrecht, 19 March 2016 Michael Boelen michael.boelen@cisofy.com

9

Page 10: Dealing with Linux Malware - CISOfy · Dealing with Linux Malware Rootkits, Backdoors, and More... Utrecht, 19 March 2016 Michael Boelen michael.boelen@cisofy.com

Types

Page 11: Dealing with Linux Malware - CISOfy · Dealing with Linux Malware Rootkits, Backdoors, and More... Utrecht, 19 March 2016 Michael Boelen michael.boelen@cisofy.com

● Virus● Worm● Backdoor● Dropper● Rootkit

Types

11

Page 12: Dealing with Linux Malware - CISOfy · Dealing with Linux Malware Rootkits, Backdoors, and More... Utrecht, 19 March 2016 Michael Boelen michael.boelen@cisofy.com

Rootkits 101

Page 13: Dealing with Linux Malware - CISOfy · Dealing with Linux Malware Rootkits, Backdoors, and More... Utrecht, 19 March 2016 Michael Boelen michael.boelen@cisofy.com

Rootkits

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

13

Page 14: Dealing with Linux Malware - CISOfy · Dealing with Linux Malware Rootkits, Backdoors, and More... Utrecht, 19 March 2016 Michael Boelen michael.boelen@cisofy.com

Rootkits

● Stealth● Persistence● Backdoor

14

Page 15: Dealing with Linux Malware - CISOfy · Dealing with Linux Malware Rootkits, Backdoors, and More... Utrecht, 19 March 2016 Michael Boelen michael.boelen@cisofy.com

How to be the best rootkit?

Page 16: Dealing with Linux Malware - CISOfy · Dealing with Linux Malware Rootkits, Backdoors, and More... Utrecht, 19 March 2016 Michael Boelen michael.boelen@cisofy.com

Hiding ★

In plain sight!

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

16

Page 17: Dealing with Linux Malware - CISOfy · Dealing with Linux Malware Rootkits, Backdoors, and More... Utrecht, 19 March 2016 Michael Boelen michael.boelen@cisofy.com

Hiding ★★

Slightly advanced

● Rename processes● Delete file from disk● Backdoor binaries

17

Page 18: Dealing with Linux Malware - CISOfy · Dealing with Linux Malware Rootkits, Backdoors, and More... Utrecht, 19 March 2016 Michael Boelen michael.boelen@cisofy.com

Hiding ★★★

Advanced

● Kernel modules● Change system calls● Hidden passwords

18

Page 19: Dealing with Linux Malware - CISOfy · Dealing with Linux Malware Rootkits, Backdoors, and More... Utrecht, 19 March 2016 Michael Boelen michael.boelen@cisofy.com

Demo

Page 20: Dealing with Linux Malware - CISOfy · Dealing with Linux Malware Rootkits, Backdoors, and More... Utrecht, 19 March 2016 Michael Boelen michael.boelen@cisofy.com

Demo

20

Page 21: Dealing with Linux Malware - CISOfy · Dealing with Linux Malware Rootkits, Backdoors, and More... Utrecht, 19 March 2016 Michael Boelen michael.boelen@cisofy.com

Demo

21

Page 22: Dealing with Linux Malware - CISOfy · Dealing with Linux Malware Rootkits, Backdoors, and More... Utrecht, 19 March 2016 Michael Boelen michael.boelen@cisofy.com

Rootkit Hunter

Detect theundetectable!

22

Page 23: Dealing with Linux Malware - CISOfy · Dealing with Linux Malware Rootkits, Backdoors, and More... Utrecht, 19 March 2016 Michael Boelen michael.boelen@cisofy.com
Page 24: Dealing with Linux Malware - CISOfy · Dealing with Linux Malware Rootkits, Backdoors, and More... Utrecht, 19 March 2016 Michael Boelen michael.boelen@cisofy.com

Challenges

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

24

Page 25: Dealing with Linux Malware - CISOfy · Dealing with Linux Malware Rootkits, Backdoors, and More... Utrecht, 19 March 2016 Michael Boelen michael.boelen@cisofy.com

Continuous Game

25

Page 26: Dealing with Linux Malware - CISOfy · Dealing with Linux Malware Rootkits, Backdoors, and More... Utrecht, 19 March 2016 Michael Boelen michael.boelen@cisofy.com

Defense

Page 27: Dealing with Linux Malware - CISOfy · Dealing with Linux Malware Rootkits, Backdoors, and More... Utrecht, 19 March 2016 Michael Boelen michael.boelen@cisofy.com

Defenses

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

27

Page 28: Dealing with Linux Malware - CISOfy · Dealing with Linux Malware Rootkits, Backdoors, and More... Utrecht, 19 March 2016 Michael Boelen michael.boelen@cisofy.com

Scanning » Scanners

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

28

Page 29: Dealing with Linux Malware - CISOfy · Dealing with Linux Malware Rootkits, Backdoors, and More... Utrecht, 19 March 2016 Michael Boelen michael.boelen@cisofy.com

Scanning » File Integrity

● Changes● Powerful detection● Noise

AIDE / Samhain

29

Page 30: Dealing with Linux Malware - CISOfy · Dealing with Linux Malware Rootkits, Backdoors, and More... Utrecht, 19 March 2016 Michael Boelen michael.boelen@cisofy.com

System Hardening » Lynis

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

30

Page 31: Dealing with Linux Malware - CISOfy · Dealing with Linux Malware Rootkits, Backdoors, and More... Utrecht, 19 March 2016 Michael Boelen michael.boelen@cisofy.com

Conclusions

Page 32: Dealing with Linux Malware - CISOfy · Dealing with Linux Malware Rootkits, Backdoors, and More... Utrecht, 19 March 2016 Michael Boelen michael.boelen@cisofy.com

Conclusions

● Challenge: rootkits are hard to detect

● Prevent: system hardening

● Detect: recognize quickly, and act

32

Page 33: Dealing with Linux Malware - CISOfy · Dealing with Linux Malware Rootkits, Backdoors, and More... Utrecht, 19 March 2016 Michael Boelen michael.boelen@cisofy.com

You finished this presentation

Success!

Page 34: Dealing with Linux Malware - CISOfy · Dealing with Linux Malware Rootkits, Backdoors, and More... Utrecht, 19 March 2016 Michael Boelen michael.boelen@cisofy.com

More Linux security?

Presentationsmichaelboelen.com/presentations/

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

34

Page 35: Dealing with Linux Malware - CISOfy · Dealing with Linux Malware Rootkits, Backdoors, and More... Utrecht, 19 March 2016 Michael Boelen michael.boelen@cisofy.com

35