30
Metasploit- able Honeypots Wouter Katz Research questions Introduction Approach Results Conclusions References Research Project 2: Metasploit-able Honeypots Wouter Katz [email protected] University of Amsterdam July 4th 2013 Wouter Katz Metasploit-able Honeypots

Research Project 2: Metasploit-able Honeypots · 2018-07-19 · Metasploit-able Honeypots Wouter Katz Research questions Introduction Approach Results Conclusions References Why is

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Research Project 2: Metasploit-able Honeypots · 2018-07-19 · Metasploit-able Honeypots Wouter Katz Research questions Introduction Approach Results Conclusions References Why is

Metasploit-able

Honeypots

Wouter Katz

Researchquestions

Introduction

Approach

Results

Conclusions

References

Research Project 2: Metasploit-able Honeypots

Wouter [email protected]

University of Amsterdam

July 4th 2013

Wouter Katz Metasploit-able Honeypots

Page 2: Research Project 2: Metasploit-able Honeypots · 2018-07-19 · Metasploit-able Honeypots Wouter Katz Research questions Introduction Approach Results Conclusions References Why is

Metasploit-able

Honeypots

Wouter Katz

Researchquestions

Introduction

Approach

Results

Conclusions

References

Research questions

How feasible is an automated method to detect specificexploits on a honeypot by monitoring network traffic ofexploits?

• What setup is needed in order to have exploits successfullycomplete their exploit against a honeypot?

• What is the best method to process network trafficto/from the honeypot to extract and match a uniquesignature from exploit traffic?

• How successful are these methods?

Wouter Katz Metasploit-able Honeypots

Page 3: Research Project 2: Metasploit-able Honeypots · 2018-07-19 · Metasploit-able Honeypots Wouter Katz Research questions Introduction Approach Results Conclusions References Why is

Metasploit-able

Honeypots

Wouter Katz

Researchquestions

Introduction

Approach

Results

Conclusions

References

Research questions summarized

Protocol independent

Wouter Katz Metasploit-able Honeypots

Page 4: Research Project 2: Metasploit-able Honeypots · 2018-07-19 · Metasploit-able Honeypots Wouter Katz Research questions Introduction Approach Results Conclusions References Why is

Metasploit-able

Honeypots

Wouter Katz

Researchquestions

Introduction

Approach

Results

Conclusions

References

Introduction

Wouter Katz Metasploit-able Honeypots

Page 5: Research Project 2: Metasploit-able Honeypots · 2018-07-19 · Metasploit-able Honeypots Wouter Katz Research questions Introduction Approach Results Conclusions References Why is

Metasploit-able

Honeypots

Wouter Katz

Researchquestions

Introduction

Approach

Results

Conclusions

References

Introduction

Wouter Katz Metasploit-able Honeypots

Page 6: Research Project 2: Metasploit-able Honeypots · 2018-07-19 · Metasploit-able Honeypots Wouter Katz Research questions Introduction Approach Results Conclusions References Why is

Metasploit-able

Honeypots

Wouter Katz

Researchquestions

Introduction

Approach

Results

Conclusions

References

Introduction

Wouter Katz Metasploit-able Honeypots

Page 7: Research Project 2: Metasploit-able Honeypots · 2018-07-19 · Metasploit-able Honeypots Wouter Katz Research questions Introduction Approach Results Conclusions References Why is

Metasploit-able

Honeypots

Wouter Katz

Researchquestions

Introduction

Approach

Results

Conclusions

References

Introduction

Wouter Katz Metasploit-able Honeypots

Page 8: Research Project 2: Metasploit-able Honeypots · 2018-07-19 · Metasploit-able Honeypots Wouter Katz Research questions Introduction Approach Results Conclusions References Why is

Metasploit-able

Honeypots

Wouter Katz

Researchquestions

Introduction

Approach

Results

Conclusions

References

Introduction

Wouter Katz Metasploit-able Honeypots

Page 9: Research Project 2: Metasploit-able Honeypots · 2018-07-19 · Metasploit-able Honeypots Wouter Katz Research questions Introduction Approach Results Conclusions References Why is

Metasploit-able

Honeypots

Wouter Katz

Researchquestions

Introduction

Approach

Results

Conclusions

References

Introduction

Wouter Katz Metasploit-able Honeypots

Page 10: Research Project 2: Metasploit-able Honeypots · 2018-07-19 · Metasploit-able Honeypots Wouter Katz Research questions Introduction Approach Results Conclusions References Why is

Metasploit-able

Honeypots

Wouter Katz

Researchquestions

Introduction

Approach

Results

Conclusions

References

Why is this needed?

• A lot of the honeypot software contain outdatedvulnerabilities

• Analysis of what happened requires manual analysis

• Having signatures for the most-used penetration testingtool allows for valuable insight in attackers’ activities

What we want is to automatically detect modern exploits andshow which exploits were detected.

Wouter Katz Metasploit-able Honeypots

Page 11: Research Project 2: Metasploit-able Honeypots · 2018-07-19 · Metasploit-able Honeypots Wouter Katz Research questions Introduction Approach Results Conclusions References Why is

Metasploit-able

Honeypots

Wouter Katz

Researchquestions

Introduction

Approach

Results

Conclusions

References

Exploits used within Metasploit

Within Metasploit, exploits targeting FTP server software werechosen as a test set for the research:

• Large number of exploits (37)

• FTP is plain-text protocol, makes development easier

• Simple commands/responses

Wouter Katz Metasploit-able Honeypots

Page 12: Research Project 2: Metasploit-able Honeypots · 2018-07-19 · Metasploit-able Honeypots Wouter Katz Research questions Introduction Approach Results Conclusions References Why is

Metasploit-able

Honeypots

Wouter Katz

Researchquestions

Introduction

Approach

Results

Conclusions

References

Testing environment

Wouter Katz Metasploit-able Honeypots

Page 13: Research Project 2: Metasploit-able Honeypots · 2018-07-19 · Metasploit-able Honeypots Wouter Katz Research questions Introduction Approach Results Conclusions References Why is

Metasploit-able

Honeypots

Wouter Katz

Researchquestions

Introduction

Approach

Results

Conclusions

References

Process

Wouter Katz Metasploit-able Honeypots

Page 14: Research Project 2: Metasploit-able Honeypots · 2018-07-19 · Metasploit-able Honeypots Wouter Katz Research questions Introduction Approach Results Conclusions References Why is

Metasploit-able

Honeypots

Wouter Katz

Researchquestions

Introduction

Approach

Results

Conclusions

References

Python honeypot script

• Small database with 30 vulnerable FTP banners for all 37exploits

• Implemented responses to most used FTP commands

• Saves all traffic

• Detect ”suspicious” traffic

Wouter Katz Metasploit-able Honeypots

Page 15: Research Project 2: Metasploit-able Honeypots · 2018-07-19 · Metasploit-able Honeypots Wouter Katz Research questions Introduction Approach Results Conclusions References Why is

Metasploit-able

Honeypots

Wouter Katz

Researchquestions

Introduction

Approach

Results

Conclusions

References

Detect suspicious traffic

Wouter Katz Metasploit-able Honeypots

Page 16: Research Project 2: Metasploit-able Honeypots · 2018-07-19 · Metasploit-able Honeypots Wouter Katz Research questions Introduction Approach Results Conclusions References Why is

Metasploit-able

Honeypots

Wouter Katz

Researchquestions

Introduction

Approach

Results

Conclusions

References

Extract signatures from suspicious traffic

• Collect multiple suspicious flows for the same exploit,different payload

• Find the longest string shared by all suspicious flows usingthe Longest Common Substring (LCS) algorithm

• The resulting string will be used as signature

• This method depends on static parts in the exploit,regardless of the payload

Wouter Katz Metasploit-able Honeypots

Page 17: Research Project 2: Metasploit-able Honeypots · 2018-07-19 · Metasploit-able Honeypots Wouter Katz Research questions Introduction Approach Results Conclusions References Why is

Metasploit-able

Honeypots

Wouter Katz

Researchquestions

Introduction

Approach

Results

Conclusions

References

Extract signatures from suspicious traffic

Flow 1: ffeeddccacbefafabcdefbafcbaedfeafFlow 2: aabcbeafffeeddccafbdeaabcdefbcffeaFlow 3: feabcdefbfeacceafeabceffaecbeafabcaedd

The string ”ffeeddcc” is the longest common substring in thefirst 2 flows, but it does not occur in the 3rd flow.

Wouter Katz Metasploit-able Honeypots

Page 18: Research Project 2: Metasploit-able Honeypots · 2018-07-19 · Metasploit-able Honeypots Wouter Katz Research questions Introduction Approach Results Conclusions References Why is

Metasploit-able

Honeypots

Wouter Katz

Researchquestions

Introduction

Approach

Results

Conclusions

References

Extract signatures from suspicious traffic

Flow 1: ffeeddccacbefafabcdefbafcbaedfeafFlow 2: aabcbeafffeeddccafbdeaabcdeffcffeaFlow 3: feabcdefafeacceafeabceffaecbeafabcaedd

The string ”abcdef” is the longest common substring occurringin all flows. This will be the signature.

Wouter Katz Metasploit-able Honeypots

Page 19: Research Project 2: Metasploit-able Honeypots · 2018-07-19 · Metasploit-able Honeypots Wouter Katz Research questions Introduction Approach Results Conclusions References Why is

Metasploit-able

Honeypots

Wouter Katz

Researchquestions

Introduction

Approach

Results

Conclusions

References

Extract signatures from suspicious traffic

LCS found ”good” signatures for 20 exploits from theirsuspicious traffic flows. The rest either had no signature, or atoo generic signature (e.g. ”USER”).

Solution: for the remaining exploits, run LCS on all other flows.Resulted in 12 ”good” signatures for the remaining 17 exploits.

Wouter Katz Metasploit-able Honeypots

Page 20: Research Project 2: Metasploit-able Honeypots · 2018-07-19 · Metasploit-able Honeypots Wouter Katz Research questions Introduction Approach Results Conclusions References Why is

Metasploit-able

Honeypots

Wouter Katz

Researchquestions

Introduction

Approach

Results

Conclusions

References

Matching signatures against traffic

With the signatures, we should be able to detect exploits:

• Check each incoming flow in the honeypot for knownsignatures

• If a signature is found, print out the matching exploit

Wouter Katz Metasploit-able Honeypots

Page 21: Research Project 2: Metasploit-able Honeypots · 2018-07-19 · Metasploit-able Honeypots Wouter Katz Research questions Introduction Approach Results Conclusions References Why is

Metasploit-able

Honeypots

Wouter Katz

Researchquestions

Introduction

Approach

Results

Conclusions

References

Matching signatures against traffic

Problem: some exploits share the same signature, causing falsepositives.Easy solution: only check for signatures of exploits belongingto the current FTP banner.

Wouter Katz Metasploit-able Honeypots

Page 22: Research Project 2: Metasploit-able Honeypots · 2018-07-19 · Metasploit-able Honeypots Wouter Katz Research questions Introduction Approach Results Conclusions References Why is

Metasploit-able

Honeypots

Wouter Katz

Researchquestions

Introduction

Approach

Results

Conclusions

References

Results

In total found signatures for 32 out of 37 exploits (86%). Testhow good these signatures detect exploits by firing all exploitsagainst the FTP honeypot script, with every possible payload.

Wouter Katz Metasploit-able Honeypots

Page 23: Research Project 2: Metasploit-able Honeypots · 2018-07-19 · Metasploit-able Honeypots Wouter Katz Research questions Introduction Approach Results Conclusions References Why is

Metasploit-able

Honeypots

Wouter Katz

Researchquestions

Introduction

Approach

Results

Conclusions

References

Results

Average detection rate of 89.95%

Wouter Katz Metasploit-able Honeypots

Page 24: Research Project 2: Metasploit-able Honeypots · 2018-07-19 · Metasploit-able Honeypots Wouter Katz Research questions Introduction Approach Results Conclusions References Why is

Metasploit-able

Honeypots

Wouter Katz

Researchquestions

Introduction

Approach

Results

Conclusions

References

Answering the research questions

How feasible is an automated method to detect specificexploits on a honeypot by monitoring network traffic ofexploits?

• What setup is needed in order to have exploits successfullycomplete their exploit against a honeypot?

• What is the best method to process network trafficto/from the honeypot to extract and match a uniquesignature from exploit traffic?

• How successful are these methods?

Wouter Katz Metasploit-able Honeypots

Page 25: Research Project 2: Metasploit-able Honeypots · 2018-07-19 · Metasploit-able Honeypots Wouter Katz Research questions Introduction Approach Results Conclusions References Why is

Metasploit-able

Honeypots

Wouter Katz

Researchquestions

Introduction

Approach

Results

Conclusions

References

Answering the research questions

What setup is needed in order to have exploits successfullycomplete their exploit against a honeypot?

Many of the exploits check FTP banner and correct FTPresponses. In order to allow exploits to complete successfully,we need to emulate both the banner and the correct responses.

Wouter Katz Metasploit-able Honeypots

Page 26: Research Project 2: Metasploit-able Honeypots · 2018-07-19 · Metasploit-able Honeypots Wouter Katz Research questions Introduction Approach Results Conclusions References Why is

Metasploit-able

Honeypots

Wouter Katz

Researchquestions

Introduction

Approach

Results

Conclusions

References

Answering the research questions

What is the best method to process network traffic to/from thehoneypot to extract and match a unique signature from exploittraffic?

In this research, a granular method of storing and processingnetwork traffic was used. Extract signatures using the LCSalgorithm, match traffic against signatures on-the-fly provedvery effective.

Wouter Katz Metasploit-able Honeypots

Page 27: Research Project 2: Metasploit-able Honeypots · 2018-07-19 · Metasploit-able Honeypots Wouter Katz Research questions Introduction Approach Results Conclusions References Why is

Metasploit-able

Honeypots

Wouter Katz

Researchquestions

Introduction

Approach

Results

Conclusions

References

Answering the research questions

How successful are these methods?

Not all exploits yielded a signature, but for the exploits thatdid, most signatures have a high detection rate.

Wouter Katz Metasploit-able Honeypots

Page 28: Research Project 2: Metasploit-able Honeypots · 2018-07-19 · Metasploit-able Honeypots Wouter Katz Research questions Introduction Approach Results Conclusions References Why is

Metasploit-able

Honeypots

Wouter Katz

Researchquestions

Introduction

Approach

Results

Conclusions

References

Answering the research questions

How feasible is an automated method to detect specificexploits on a honeypot by monitoring network traffic ofexploits?

The methods presented work very well. Easily portable to otherprotocols/exploits. Can work standalone or as part of existinghoneypot software.

Wouter Katz Metasploit-able Honeypots

Page 29: Research Project 2: Metasploit-able Honeypots · 2018-07-19 · Metasploit-able Honeypots Wouter Katz Research questions Introduction Approach Results Conclusions References Why is

Metasploit-able

Honeypots

Wouter Katz

Researchquestions

Introduction

Approach

Results

Conclusions

References

Questions

Questions?

Wouter Katz Metasploit-able Honeypots

Page 30: Research Project 2: Metasploit-able Honeypots · 2018-07-19 · Metasploit-able Honeypots Wouter Katz Research questions Introduction Approach Results Conclusions References Why is

Metasploit-able

Honeypots

Wouter Katz

Researchquestions

Introduction

Approach

Results

Conclusions

References

References

Anley, Chris, Heasman, John, Lindner, Felix, & Richarte,Gerardo. 2011.The shellcoder’s handbook: discovering and exploitingsecurity holes.Wiley.

Baumann, Reto, & Plattner, Christian. 2002.White Paper: Honeypots.

Wouter Katz Metasploit-able Honeypots