SlideShare a Scribd company logo
How to Make a Honeypot
Stickier (SSH*)
lessons learned by Splunk Security Research
Honeypots Work
Agenda
● Introduction
● The data challenge
● First experiment
● Analysis methodology
● Next steps - KLAPP
whoami
● Former Prolexic/Akamai Architect
● Co-founded Zenedge, which was acquired by Oracle
● Long time Splunker, recently returned to do research
The Data Challenge
● Discover and characterize techniques used in the
exploitation of “vulnerability X” in the wild.
● Determine what’s *actually* targeting our environment.
● Gives us attacker context
Threat Intel does NOT address the data
challenge
Why Splunk Security Research Uses Honeypots
1. Lure would-be attackers to a faux system and then capture data regarding
their movements and attack techniques
2. Programmatically produce Splunk Enterprise Security Content (ESCU)
3. Cover relevant attacks happening in the wild (especially those without POC
exploit code)
Our Goals
● Collect downloads, payloads, connections, and behaviors
● Emulate and manipulate common system parameters
● Ensure that our system was easy to deploy/distribute/build
● Include (plus) sane logging, ideally populating Splunk
We selected Cowrie, a fork of Kippo.
Before and After
Countries
Just Connections vs Interaction
Files Dropped
How to Make a Honeypot Stickier (SSH*)
Our Response
GIF of Attacker Here
Change Cowrie to emulate a Ubuntu 14.04 instance running on AWS by updating
the configurations in /home/cowrie/cowrie/etc/cowrie.cfg
● hostname: defaults to svr04, which is a dead giveaway of the fact that this is a
Cowrie instance. You will want to change this
● interactive_timeout: defaults to 180, increase it to 300 to make sure we do not
disconnect potential attackers from a bad connection early
● kernel_version: critical that this is an update reflecting the kernel you want to
emulate. In our case, the default kernel installed with Ubuntu 14.04 is 3.13.0-
158-generic
● kernel_build_string: same as above. Each OS is slightly different. In our case,
it was ##208-Ubuntu SMP Fri Aug 24 17:07:38 UTC 2018
● version - SSH banner version to display for a connecting client. Make sure this
matches your OS’s. In our case, for a default install this is is: SSH-2.0-
OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.10
Change Cowrie to emulate a Ubuntu 14.04
instance running on AWS
/home/cowrie/cowrie/etc/userdb.txt
● Add new user names that failed
authentication
● Exclude admin user, as it was creating
lots of noise
Change Cowrie to emulate a Ubuntu 14.04 Instance running on AWS by:
Updating /home/cowrie/cowrie/share/cowrie/fs.pickle
● Update file system to match whom you want to emulate
● Cowrie ships with a great tool for this
~/cowrie/bin/createfs -l /. -o
~/cowrie/share/cowrie/ubuntu14.04.pickle -p
Change Cowrie to emulate a Ubuntu 14.04 Instance running on AWS by:
Changing in /home/cowrie/cowrie/share/cowrie/txtcmds
● Update common commands prebuilt outputs
● We saw attackers commonly use:
○ bin/dmesg
○ bin/mount
○ bin/lscpu
○ bin/df
○ usr/bin/lscpu
How to Make a Honeypot Stickier (SSH*)
Analysis Methodology
Analysis methodology
1. What rare files were dropped?
Analysis methodology
1. What rare files were dropped?
2. Does VirusTotal flag them as bad? If not can we find in public domain?
~/virustotal$ hashes=$(ls /home/Cowrie/Cowrie/var/lib/Cowrie/downloads/ |
grep -v tmp | grep -v .sh | grep -v Evlon);
for h in $hashes; do python vt_driver.py file-report $h | jq;
sleep 25;
done
Use VT CLI tool (from Github)
List downloaded hashes
Filter out the crud
Slow down VT rate limits 4/rpm
Analysis methodology
1. What rare files were dropped?
2. Does VirusTotal flag them as bad? If not can we find in public domain?
3. Is it known by GreyNoise?
Analysis methodology
1. What rare files were dropped?
2. Does VirusTotal flag them as bad? If not can we find in public domain?
3. Is it known by GreyNoise?
4. Is there POC code out there exploit-db, metasploit modules?
Analysis methodology
1. What rare files were dropped?
2. Does VirusTotal flag them as bad? If not can we find in public domain?
3. Is it known by GreyNoise?
4. Is there POC code out there exploit-db, metasploit modules?
5. Get IOCs -> Yara -> Set up a hunting rule in VirusTotal
What We Learned
What we learned
● Some actors knew they were in Cowrie
● Analysis timing is key
● Not Application-specific
Kernel Log APPlication (KLAPP)
Real Operating System not emulating one, better at supporting attacks
Sysdig used to capture level kernel information from the operating system
Falco used as an early alert system when a honeypot has been tampered with
Application collected logs from the vulnerable application being monitored
S3 bucket Sync tool to offload sysdig binary files, as well as application and
system logs to S3
Diagram here
Sysdig chisel’s FTW
Give me all system logs $> sysdig -c spy_logs -r <sysdig capture file>.gz2
Show me TCP connections sorted $> sysdig -c topconns -r <sysdig capture file>.gz2
Show me HTTP events $> sysdig -c httplog -r <sysdig capture file>.gz2
Show opened shells $> sysdig -c list_login_shells -r <sysdig capture file>.gz2
Give me all traffic for port $> sysdig -c spy_port 22 -r <sysdig capture file>.gz2
Falco’s early warning
DEMO
Key Takeaways
1. High interaction honeypots provides the best data
2. Honeypot data can be as valuable as Threat Intel
3. If you are going to mimic an environment it pays off to make
modifications
4. Infrastructure as code makes it very easy to operate large
scale honeypot deployments
5. Analysis timing of honeypot data is critical
How to get started
git clone https://github.com/d1vious/klapp-example.git
Thank you
Questions
@d1vious

More Related Content

PPTX
How to Make a Honeypot Stickier (SSH*)
PPTX
Intro to NSM with Security Onion - AusCERT
PDF
Continuous Kernel Integration
PDF
Security Onion: peeling back the layers of your network in minutes
PPTX
2014 Security Onion Conference
PPTX
Burp suite
ODP
2600 av evasion_deuce
How to Make a Honeypot Stickier (SSH*)
Intro to NSM with Security Onion - AusCERT
Continuous Kernel Integration
Security Onion: peeling back the layers of your network in minutes
2014 Security Onion Conference
Burp suite
2600 av evasion_deuce

What's hot (20)

PPTX
BackTrack5 - Linux
PPTX
Security Onion Conference - 2015
PPT
Backtrack os 5
PDF
About linux-english
PPTX
Security Onion
PDF
What is OpenStack DefCore, Altanta Conference
PDF
Nagios nrpe
PDF
Suricata
PDF
Malwarem armed with PowerShell
PDF
2014 02 comForte SecurTape product
PDF
Introduction to Snort Rule Writing
PDF
Di shen pacsec_final
PDF
Openstack trystack
PPTX
Nsa and vpn
PPTX
Kali Linux - Falconer
PDF
iCrOSS 2013_Pentest
PDF
Real-Time Static Malware Analysis using NepenthesFE
PPTX
Cloud stack monitoring with zenoss
BackTrack5 - Linux
Security Onion Conference - 2015
Backtrack os 5
About linux-english
Security Onion
What is OpenStack DefCore, Altanta Conference
Nagios nrpe
Suricata
Malwarem armed with PowerShell
2014 02 comForte SecurTape product
Introduction to Snort Rule Writing
Di shen pacsec_final
Openstack trystack
Nsa and vpn
Kali Linux - Falconer
iCrOSS 2013_Pentest
Real-Time Static Malware Analysis using NepenthesFE
Cloud stack monitoring with zenoss
Ad

Similar to How to Make a Honeypot Stickier (SSH*) (20)

PDF
"A rootkits writer’s guide to defense" - Michal Purzynski
PDF
BSidesDelhi 2018: Active Defense using Honeypots Public
PPTX
Devoops: DoJ Annual Cybersecurity Training Symposium Edition 2015
PPT
Anton Chuvakin on Discovering That Your Linux Box is Hacked
PPTX
OMFW 2012: Analyzing Linux Kernel Rootkits with Volatlity
DOC
Days of the Honeynet: Attacks, Tools, Incidents
PPTX
BSides_Charm2015_Info sec hunters_gathers
PDF
Threat Con 2021: What's Hitting my Honeypots
PDF
44CON London 2015 - 15-Minute Linux Incident Response Live Analysis
PPTX
Like bees to a honeypot - A journey through Honeypots
PDF
Linux security quick reference guide
PDF
[CONFidence 2016] Leszek Miś - Honey(pot) flavored hunt for cyber enemy
PPTX
Hunting for APT in network logs workshop presentation
PPT
Intro To Hacking
PDF
Intrusion Techniques
PPT
Anton Chuvakin on Honeypots
PPT
Security & ethical hacking
PPTX
Fun with exploits old and new
PDF
IBCAST 2021: Observations and lessons learned from the APNIC Community Honeyn...
PPTX
The Hacking Game - Think Like a Hacker Meetup 12072023.pptx
"A rootkits writer’s guide to defense" - Michal Purzynski
BSidesDelhi 2018: Active Defense using Honeypots Public
Devoops: DoJ Annual Cybersecurity Training Symposium Edition 2015
Anton Chuvakin on Discovering That Your Linux Box is Hacked
OMFW 2012: Analyzing Linux Kernel Rootkits with Volatlity
Days of the Honeynet: Attacks, Tools, Incidents
BSides_Charm2015_Info sec hunters_gathers
Threat Con 2021: What's Hitting my Honeypots
44CON London 2015 - 15-Minute Linux Incident Response Live Analysis
Like bees to a honeypot - A journey through Honeypots
Linux security quick reference guide
[CONFidence 2016] Leszek Miś - Honey(pot) flavored hunt for cyber enemy
Hunting for APT in network logs workshop presentation
Intro To Hacking
Intrusion Techniques
Anton Chuvakin on Honeypots
Security & ethical hacking
Fun with exploits old and new
IBCAST 2021: Observations and lessons learned from the APNIC Community Honeyn...
The Hacking Game - Think Like a Hacker Meetup 12072023.pptx
Ad

Recently uploaded (20)

PPTX
MYSQL Presentation for SQL database connectivity
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
KodekX | Application Modernization Development
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Encapsulation theory and applications.pdf
PPTX
A Presentation on Artificial Intelligence
MYSQL Presentation for SQL database connectivity
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Dropbox Q2 2025 Financial Results & Investor Presentation
Mobile App Security Testing_ A Comprehensive Guide.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Diabetes mellitus diagnosis method based random forest with bat algorithm
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
NewMind AI Weekly Chronicles - August'25 Week I
Building Integrated photovoltaic BIPV_UPV.pdf
KodekX | Application Modernization Development
Per capita expenditure prediction using model stacking based on satellite ima...
Network Security Unit 5.pdf for BCA BBA.
CIFDAQ's Market Insight: SEC Turns Pro Crypto
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Review of recent advances in non-invasive hemoglobin estimation
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Encapsulation theory and applications.pdf
A Presentation on Artificial Intelligence

How to Make a Honeypot Stickier (SSH*)

  • 1. How to Make a Honeypot Stickier (SSH*) lessons learned by Splunk Security Research
  • 3. Agenda ● Introduction ● The data challenge ● First experiment ● Analysis methodology ● Next steps - KLAPP
  • 4. whoami ● Former Prolexic/Akamai Architect ● Co-founded Zenedge, which was acquired by Oracle ● Long time Splunker, recently returned to do research
  • 5. The Data Challenge ● Discover and characterize techniques used in the exploitation of “vulnerability X” in the wild. ● Determine what’s *actually* targeting our environment. ● Gives us attacker context
  • 6. Threat Intel does NOT address the data challenge
  • 7. Why Splunk Security Research Uses Honeypots 1. Lure would-be attackers to a faux system and then capture data regarding their movements and attack techniques 2. Programmatically produce Splunk Enterprise Security Content (ESCU) 3. Cover relevant attacks happening in the wild (especially those without POC exploit code)
  • 8. Our Goals ● Collect downloads, payloads, connections, and behaviors ● Emulate and manipulate common system parameters ● Ensure that our system was easy to deploy/distribute/build ● Include (plus) sane logging, ideally populating Splunk We selected Cowrie, a fork of Kippo.
  • 11. Just Connections vs Interaction
  • 16. Change Cowrie to emulate a Ubuntu 14.04 instance running on AWS by updating the configurations in /home/cowrie/cowrie/etc/cowrie.cfg ● hostname: defaults to svr04, which is a dead giveaway of the fact that this is a Cowrie instance. You will want to change this ● interactive_timeout: defaults to 180, increase it to 300 to make sure we do not disconnect potential attackers from a bad connection early ● kernel_version: critical that this is an update reflecting the kernel you want to emulate. In our case, the default kernel installed with Ubuntu 14.04 is 3.13.0- 158-generic ● kernel_build_string: same as above. Each OS is slightly different. In our case, it was ##208-Ubuntu SMP Fri Aug 24 17:07:38 UTC 2018 ● version - SSH banner version to display for a connecting client. Make sure this matches your OS’s. In our case, for a default install this is is: SSH-2.0- OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.10
  • 17. Change Cowrie to emulate a Ubuntu 14.04 instance running on AWS /home/cowrie/cowrie/etc/userdb.txt ● Add new user names that failed authentication ● Exclude admin user, as it was creating lots of noise
  • 18. Change Cowrie to emulate a Ubuntu 14.04 Instance running on AWS by: Updating /home/cowrie/cowrie/share/cowrie/fs.pickle ● Update file system to match whom you want to emulate ● Cowrie ships with a great tool for this ~/cowrie/bin/createfs -l /. -o ~/cowrie/share/cowrie/ubuntu14.04.pickle -p
  • 19. Change Cowrie to emulate a Ubuntu 14.04 Instance running on AWS by: Changing in /home/cowrie/cowrie/share/cowrie/txtcmds ● Update common commands prebuilt outputs ● We saw attackers commonly use: ○ bin/dmesg ○ bin/mount ○ bin/lscpu ○ bin/df ○ usr/bin/lscpu
  • 22. Analysis methodology 1. What rare files were dropped?
  • 23. Analysis methodology 1. What rare files were dropped? 2. Does VirusTotal flag them as bad? If not can we find in public domain? ~/virustotal$ hashes=$(ls /home/Cowrie/Cowrie/var/lib/Cowrie/downloads/ | grep -v tmp | grep -v .sh | grep -v Evlon); for h in $hashes; do python vt_driver.py file-report $h | jq; sleep 25; done Use VT CLI tool (from Github) List downloaded hashes Filter out the crud Slow down VT rate limits 4/rpm
  • 24. Analysis methodology 1. What rare files were dropped? 2. Does VirusTotal flag them as bad? If not can we find in public domain? 3. Is it known by GreyNoise?
  • 25. Analysis methodology 1. What rare files were dropped? 2. Does VirusTotal flag them as bad? If not can we find in public domain? 3. Is it known by GreyNoise? 4. Is there POC code out there exploit-db, metasploit modules?
  • 26. Analysis methodology 1. What rare files were dropped? 2. Does VirusTotal flag them as bad? If not can we find in public domain? 3. Is it known by GreyNoise? 4. Is there POC code out there exploit-db, metasploit modules? 5. Get IOCs -> Yara -> Set up a hunting rule in VirusTotal
  • 28. What we learned ● Some actors knew they were in Cowrie ● Analysis timing is key ● Not Application-specific
  • 29. Kernel Log APPlication (KLAPP) Real Operating System not emulating one, better at supporting attacks Sysdig used to capture level kernel information from the operating system Falco used as an early alert system when a honeypot has been tampered with Application collected logs from the vulnerable application being monitored S3 bucket Sync tool to offload sysdig binary files, as well as application and system logs to S3
  • 31. Sysdig chisel’s FTW Give me all system logs $> sysdig -c spy_logs -r <sysdig capture file>.gz2 Show me TCP connections sorted $> sysdig -c topconns -r <sysdig capture file>.gz2 Show me HTTP events $> sysdig -c httplog -r <sysdig capture file>.gz2 Show opened shells $> sysdig -c list_login_shells -r <sysdig capture file>.gz2 Give me all traffic for port $> sysdig -c spy_port 22 -r <sysdig capture file>.gz2
  • 33. DEMO
  • 34. Key Takeaways 1. High interaction honeypots provides the best data 2. Honeypot data can be as valuable as Threat Intel 3. If you are going to mimic an environment it pays off to make modifications 4. Infrastructure as code makes it very easy to operate large scale honeypot deployments 5. Analysis timing of honeypot data is critical
  • 35. How to get started git clone https://github.com/d1vious/klapp-example.git

Editor's Notes

  • #2: How many of you believe honeypot do not work, or are ineffective as a defensive tool! Raise your hands! Now GET OUT YOUR WRONG!
  • #3: Like many of you I am sure I have had my phone number for many year's and at this point in time would not change it. I had a bad spam problem, constantly getting calls, decided to fight back. Here is a recording from one of my battles with telemarketers. Here you see a perfect example of a human being tricked by one, this is prove that honeypots work!
  • #6: Threat intel does not tell me two key things, what does exploitation of vulnerabilities X looks like on the wild, and what’s really targeting me (signal versus noise).
  • #7: Analysis of Practical Value of Threat intel, these are the parting thoughts Charl van der Walt and Sid Pillarisetty
  • #8: Find badness to study it for our customers (explain purpose of research team at Splunk) We also produce ESCU which is basically (our content packs) that detect malware behavior
  • #12: Inputs and connected, we saw a spike in interaction over all
  • #13: Which ones do you think is the before and after?
  • #16: We had great success with our changes, but before hand let me show you what what the attackers were doing
  • #17: Configuration ◦ Changing hostname - defaults to svr04, a dead give away this is a Cowrie instance, you want to change this ◦ interactive_timeout - defaults to 180, I increase it to 300 to make sure we do not disconnect potential attackers from a bad connection early. ◦ kernel_version - critical that this is update to reflect the kernel you want to emulate, in our case the default one installed with Ubuntu 14.04 is 3.13.0-158-generic ◦ kernel_build_string - same as above, each OS is slightly different, in our case ##208-Ubuntu SMP Fri Aug 24 17:07:38 UTC 2018 ◦ version - SSH banner version to display for a connecting client, make sure this matches your OS’s, in our case for a default install is: SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.10
  • #19: It even emulates things like /procs, but it does not emulate /dev unfortunately
  • #20: It even emulates things like /procs, but it does not emulate /dev unfortunately
  • #23: It is not perfect but this is ours
  • #25: Should be a flow chart ideally or build up slides
  • #26: Should be a flow chart ideally or build up slides
  • #27: Should be a flow chart ideally or build up slides
  • #28: Should be a flow chart ideally or build up slides
  • #30: Lets eliminate anything that is emulation of a platform Lets collect everything in a preset data set we know what to expect (binaries)/logs Deploy an application on top with logging Analysis timing is key and hence have an early warning system
  • #31: Addressed having specific commands mocked Shipping data Having it ready to be analysed strace,bro,lsof
  • #33: To me this was beautiful!
  • #36: Addressed having specific commands mocked Shipping data Having it ready to be analysed strace,bro,lsof
  • #37: So lets recap we know that in many ways honeypots > threat intel It is easy to deploy a honeypot not extremely valuable without some modification Here is a tool that will automatically: