SlideShare a Scribd company logo
1 of 33
How to Make a Honeypot
Stickier (SSH*)
lessons learned by Splunk Security Research
Honeypots Work
Agenda
● Introduction
● The data challenge
● Our first attempt
● Analysis methodology
● What we learned
● Our next steps
● How to get started
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.
Why Splunk Security Research Uses Honeypots
We lure would-be attackers to a faux system and then capture data regarding their
movements and attack techniques
We want to programmatically produce Splunk Enterprise Security Content
(ESCU)
Our goal is to 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
Just Connections vs Interaction
Files Dropped
Our Response
GIF of Attacker Here
Our Response
Change Cowrie to emulate a Ubuntu 14.04 instance running on AWS by:
Changing 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
Our Response
Change Cowrie to emulate a Ubuntu 14.04 instance running on AWS by:
Changing in /home/cowrie/cowrie/etc/userdb.txt
● Add new user names that failed authentication
● Exclude admin user, as it was creating lots of noise
Our Response
Change Cowrie to emulate a Ubuntu 14.04 Instance running on AWS by:
Changing in /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
Our Response
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: b
○ bin/dmesg
○ bin/mount
○ bin/lscpu
○ bin/df
○ usr/bin/lscpu
Greynoise Tags
The most common garbage that hits
your AWS instances besides Mirai
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 it in the public domain?
Bash One Liner
~/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 it in the 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 it in the 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
1. Some actors knew they were in Cowrie (or a Honeypot)
2. Spending lots of time in analysis and hard-to-piece-together searches (ESCU)
from Cowrie data
3. Not application-specific, which provided us with a limited view of what we
cared about
4. Analysis timing is key
Next Steps
Kernel Log APPlication (KLAPP)
● 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
How to get started
1. Download install Cowrie
2. Start an AWS EC2 Ubuntu 14.04 instance
3. Run easy_button.sh
wget -q
https://raw.githubusercontent.com/d1vious/splunk_cowrie/master/easy_button.sh
sudo ./easy_button.sh -s <splunk server url> -t <splunk HEC auth token>
Thank you
Questions
@d1vious

More Related Content

What's hot

Virtualization security
Virtualization securityVirtualization security
Virtualization securityAhmed Nour
 
Network Security and Firewall
Network Security and FirewallNetwork Security and Firewall
Network Security and FirewallShafeeqaFarsana
 
Cyber threats landscape and defense
Cyber threats landscape and defenseCyber threats landscape and defense
Cyber threats landscape and defensefantaghost
 
Cyber Security
Cyber SecurityCyber Security
Cyber SecurityRamiro Cid
 
Cloud computing and data security
Cloud computing and data securityCloud computing and data security
Cloud computing and data securityMohammed Fazuluddin
 
Cyber security
Cyber securityCyber security
Cyber securitymanoj duli
 
Firewall presentation
Firewall presentationFirewall presentation
Firewall presentationTayabaZahid
 
The Next Generation of Security Operations Centre (SOC)
The Next Generation of Security Operations Centre (SOC)The Next Generation of Security Operations Centre (SOC)
The Next Generation of Security Operations Centre (SOC)PECB
 
The Elastic Stack as a SIEM
The Elastic Stack as a SIEMThe Elastic Stack as a SIEM
The Elastic Stack as a SIEMJohn Hubbard
 
Network security
Network securityNetwork security
Network securityEstiak Khan
 
VAPT PRESENTATION full.pptx
VAPT PRESENTATION full.pptxVAPT PRESENTATION full.pptx
VAPT PRESENTATION full.pptxDARSHANBHAVSAR14
 
Cloud computing and Cloud security fundamentals
Cloud computing and Cloud security fundamentalsCloud computing and Cloud security fundamentals
Cloud computing and Cloud security fundamentalsViresh Suri
 
Data security in cloud computing
Data security in cloud computingData security in cloud computing
Data security in cloud computingPrince Chandu
 
Hacker tooltalk: Social Engineering Toolkit (SET)
Hacker tooltalk: Social Engineering Toolkit (SET)Hacker tooltalk: Social Engineering Toolkit (SET)
Hacker tooltalk: Social Engineering Toolkit (SET)Chris Hammond-Thrasher
 
Cybersecurity Fundamentals | Understanding Cybersecurity Basics | Cybersecuri...
Cybersecurity Fundamentals | Understanding Cybersecurity Basics | Cybersecuri...Cybersecurity Fundamentals | Understanding Cybersecurity Basics | Cybersecuri...
Cybersecurity Fundamentals | Understanding Cybersecurity Basics | Cybersecuri...Edureka!
 

What's hot (20)

Virtualization security
Virtualization securityVirtualization security
Virtualization security
 
Network Security and Firewall
Network Security and FirewallNetwork Security and Firewall
Network Security and Firewall
 
Cyber threats landscape and defense
Cyber threats landscape and defenseCyber threats landscape and defense
Cyber threats landscape and defense
 
Cyber Security
Cyber SecurityCyber Security
Cyber Security
 
Cloud computing and data security
Cloud computing and data securityCloud computing and data security
Cloud computing and data security
 
Cyber security
Cyber securityCyber security
Cyber security
 
Firewall presentation
Firewall presentationFirewall presentation
Firewall presentation
 
The Next Generation of Security Operations Centre (SOC)
The Next Generation of Security Operations Centre (SOC)The Next Generation of Security Operations Centre (SOC)
The Next Generation of Security Operations Centre (SOC)
 
The Elastic Stack as a SIEM
The Elastic Stack as a SIEMThe Elastic Stack as a SIEM
The Elastic Stack as a SIEM
 
DDoS ATTACKS
DDoS ATTACKSDDoS ATTACKS
DDoS ATTACKS
 
Cyber Security
Cyber SecurityCyber Security
Cyber Security
 
Network security
Network securityNetwork security
Network security
 
VAPT PRESENTATION full.pptx
VAPT PRESENTATION full.pptxVAPT PRESENTATION full.pptx
VAPT PRESENTATION full.pptx
 
Cloud computing and Cloud security fundamentals
Cloud computing and Cloud security fundamentalsCloud computing and Cloud security fundamentals
Cloud computing and Cloud security fundamentals
 
Data security in cloud computing
Data security in cloud computingData security in cloud computing
Data security in cloud computing
 
Ethical Hacking
Ethical HackingEthical Hacking
Ethical Hacking
 
Hacker tooltalk: Social Engineering Toolkit (SET)
Hacker tooltalk: Social Engineering Toolkit (SET)Hacker tooltalk: Social Engineering Toolkit (SET)
Hacker tooltalk: Social Engineering Toolkit (SET)
 
Cybersecurity Fundamentals | Understanding Cybersecurity Basics | Cybersecuri...
Cybersecurity Fundamentals | Understanding Cybersecurity Basics | Cybersecuri...Cybersecurity Fundamentals | Understanding Cybersecurity Basics | Cybersecuri...
Cybersecurity Fundamentals | Understanding Cybersecurity Basics | Cybersecuri...
 
MITRE ATT&CK Framework
MITRE ATT&CK FrameworkMITRE ATT&CK Framework
MITRE ATT&CK Framework
 
SIEM and SOC
SIEM and SOCSIEM and SOC
SIEM and SOC
 

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

How to Make a Honeypot Stickier (SSH*)
How to Make a Honeypot Stickier (SSH*)How to Make a Honeypot Stickier (SSH*)
How to Make a Honeypot Stickier (SSH*)Jose Hernandez
 
Reproducibility in artificial intelligence
Reproducibility in artificial intelligenceReproducibility in artificial intelligence
Reproducibility in artificial intelligenceCarlos Toxtli
 
Getting Started with Splunk Enterprise Hands-On Breakout Session
Getting Started with Splunk Enterprise Hands-On Breakout SessionGetting Started with Splunk Enterprise Hands-On Breakout Session
Getting Started with Splunk Enterprise Hands-On Breakout SessionSplunk
 
Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...
Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...
Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...sparkfabrik
 
100 Security Operation Center Tools.pdf
100 Security Operation Center Tools.pdf100 Security Operation Center Tools.pdf
100 Security Operation Center Tools.pdfMAHESHUMANATHGOPALAK
 
SOC-BlueTEam.pdf
SOC-BlueTEam.pdfSOC-BlueTEam.pdf
SOC-BlueTEam.pdfBeratAkit
 
100 Security Operation Center Tools EMERSON EDUARDO RODRIGUES
100 Security Operation Center Tools EMERSON EDUARDO RODRIGUES100 Security Operation Center Tools EMERSON EDUARDO RODRIGUES
100 Security Operation Center Tools EMERSON EDUARDO RODRIGUESEMERSON EDUARDO RODRIGUES
 
Managing-Splunk-with-Puppet 31-January-2022.pdf
Managing-Splunk-with-Puppet 31-January-2022.pdfManaging-Splunk-with-Puppet 31-January-2022.pdf
Managing-Splunk-with-Puppet 31-January-2022.pdfssusera181ef
 
Open erp on ubuntu
Open erp on ubuntuOpen erp on ubuntu
Open erp on ubuntuIker Coranti
 
A Survey of Container Security in 2016: A Security Update on Container Platforms
A Survey of Container Security in 2016: A Security Update on Container PlatformsA Survey of Container Security in 2016: A Security Update on Container Platforms
A Survey of Container Security in 2016: A Security Update on Container PlatformsSalman Baset
 
Sanger, upcoming Openstack for Bio-informaticians
Sanger, upcoming Openstack for Bio-informaticiansSanger, upcoming Openstack for Bio-informaticians
Sanger, upcoming Openstack for Bio-informaticiansPeter Clapham
 
SEED Labs – Linux Firewall Exploration Lab 1Linux Firewall.docx
SEED Labs – Linux Firewall Exploration Lab 1Linux Firewall.docxSEED Labs – Linux Firewall Exploration Lab 1Linux Firewall.docx
SEED Labs – Linux Firewall Exploration Lab 1Linux Firewall.docxjeffreye3
 

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

How to Make a Honeypot Stickier (SSH*)
How to Make a Honeypot Stickier (SSH*)How to Make a Honeypot Stickier (SSH*)
How to Make a Honeypot Stickier (SSH*)
 
Ug soar 22sep21
Ug soar 22sep21Ug soar 22sep21
Ug soar 22sep21
 
Osquery
OsqueryOsquery
Osquery
 
Security Onion
Security OnionSecurity Onion
Security Onion
 
Pentesting iOS Apps
Pentesting iOS AppsPentesting iOS Apps
Pentesting iOS Apps
 
Reproducibility in artificial intelligence
Reproducibility in artificial intelligenceReproducibility in artificial intelligence
Reproducibility in artificial intelligence
 
Getting Started with Splunk Enterprise Hands-On Breakout Session
Getting Started with Splunk Enterprise Hands-On Breakout SessionGetting Started with Splunk Enterprise Hands-On Breakout Session
Getting Started with Splunk Enterprise Hands-On Breakout Session
 
Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...
Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...
Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...
 
100 Security Operation Center Tools.pdf
100 Security Operation Center Tools.pdf100 Security Operation Center Tools.pdf
100 Security Operation Center Tools.pdf
 
SOC-BlueTEam.pdf
SOC-BlueTEam.pdfSOC-BlueTEam.pdf
SOC-BlueTEam.pdf
 
100 Security Operation Center Tools.pdf
100 Security Operation Center Tools.pdf100 Security Operation Center Tools.pdf
100 Security Operation Center Tools.pdf
 
100 Security Operation Center Tools EMERSON EDUARDO RODRIGUES
100 Security Operation Center Tools EMERSON EDUARDO RODRIGUES100 Security Operation Center Tools EMERSON EDUARDO RODRIGUES
100 Security Operation Center Tools EMERSON EDUARDO RODRIGUES
 
Scrapy
ScrapyScrapy
Scrapy
 
Managing-Splunk-with-Puppet 31-January-2022.pdf
Managing-Splunk-with-Puppet 31-January-2022.pdfManaging-Splunk-with-Puppet 31-January-2022.pdf
Managing-Splunk-with-Puppet 31-January-2022.pdf
 
Supply Chainsaw
Supply ChainsawSupply Chainsaw
Supply Chainsaw
 
Open erp on ubuntu
Open erp on ubuntuOpen erp on ubuntu
Open erp on ubuntu
 
A Survey of Container Security in 2016: A Security Update on Container Platforms
A Survey of Container Security in 2016: A Security Update on Container PlatformsA Survey of Container Security in 2016: A Security Update on Container Platforms
A Survey of Container Security in 2016: A Security Update on Container Platforms
 
Sanger, upcoming Openstack for Bio-informaticians
Sanger, upcoming Openstack for Bio-informaticiansSanger, upcoming Openstack for Bio-informaticians
Sanger, upcoming Openstack for Bio-informaticians
 
Flexible compute
Flexible computeFlexible compute
Flexible compute
 
SEED Labs – Linux Firewall Exploration Lab 1Linux Firewall.docx
SEED Labs – Linux Firewall Exploration Lab 1Linux Firewall.docxSEED Labs – Linux Firewall Exploration Lab 1Linux Firewall.docx
SEED Labs – Linux Firewall Exploration Lab 1Linux Firewall.docx
 

Recently uploaded

Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 

Recently uploaded (20)

Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 

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 ● Our first attempt ● Analysis methodology ● What we learned ● Our next steps ● How to get started
  • 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.
  • 6.
  • 7. Why Splunk Security Research Uses Honeypots We lure would-be attackers to a faux system and then capture data regarding their movements and attack techniques We want to programmatically produce Splunk Enterprise Security Content (ESCU) Our goal is to 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.
  • 10. Just Connections vs Interaction
  • 14. Our Response Change Cowrie to emulate a Ubuntu 14.04 instance running on AWS by: Changing 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
  • 15. Our Response Change Cowrie to emulate a Ubuntu 14.04 instance running on AWS by: Changing in /home/cowrie/cowrie/etc/userdb.txt ● Add new user names that failed authentication ● Exclude admin user, as it was creating lots of noise
  • 16. Our Response Change Cowrie to emulate a Ubuntu 14.04 Instance running on AWS by: Changing in /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
  • 17. Our Response 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: b ○ bin/dmesg ○ bin/mount ○ bin/lscpu ○ bin/df ○ usr/bin/lscpu
  • 18.
  • 19. Greynoise Tags The most common garbage that hits your AWS instances besides Mirai
  • 21. Analysis methodology 1. What rare files were dropped?
  • 22. Analysis methodology 1. What rare files were dropped? 2. Does VirusTotal flag them as bad? If not, can we find it in the public domain? Bash One Liner ~/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
  • 23. Analysis methodology 1. What rare files were dropped? 2. Does VirusTotal flag them as bad? If not, can we find it in the public domain? 3. Is it known by GreyNoise?
  • 24. Analysis methodology 1. What rare files were dropped? 2. Does VirusTotal flag them as bad? If not, can we find it in the public domain? 3. Is it known by GreyNoise? 4. Is there POC code out there exploit-db, metasploit modules?
  • 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? 5. Get IOCs -> Yara -> Set up a hunting rule in VirusTotal
  • 27. What we learned 1. Some actors knew they were in Cowrie (or a Honeypot) 2. Spending lots of time in analysis and hard-to-piece-together searches (ESCU) from Cowrie data 3. Not application-specific, which provided us with a limited view of what we cared about 4. Analysis timing is key
  • 28. Next Steps Kernel Log APPlication (KLAPP) ● 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
  • 30. 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
  • 32. How to get started 1. Download install Cowrie 2. Start an AWS EC2 Ubuntu 14.04 instance 3. Run easy_button.sh wget -q https://raw.githubusercontent.com/d1vious/splunk_cowrie/master/easy_button.sh sudo ./easy_button.sh -s <splunk server url> -t <splunk HEC auth token>

Editor's Notes

  1. How many of you believe honeypot do not work, or are ineffective as a defensive tool! Raise your hands! Now GET OUT YOUR WRONG!
  2. 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 scrammed 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!
  3. 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).
  4. Analysis of Practical Value of Threat intel, these are the parting thoughts Charl van der Walt and Sid Pillarisetty
  5. 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
  6. Inputs and connected, we saw a spike in interaction over all
  7. Which ones do you think is the before and after?
  8. We had great success with our changes, but before hand let me show you what what the attackers were doing
  9. 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
  10. Included new users like pi to the mix in order to see more targeted attacks, we discovered some novel bitcoin miners this way.
  11. It even emulates things like /procs, but it does not emulate /dev unfortunately
  12. It even emulates things like /procs, but it does not emulate /dev unfortunately
  13. It is not perfect but this is ours
  14. Should be a flow chart ideally or build up slides
  15. Should be a flow chart ideally or build up slides
  16. Should be a flow chart ideally or build up slides
  17. Should be a flow chart ideally or build up slides
  18. 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
  19. Addressed having specific commands mocked Shipping data Having it ready to be analysed strace,bro,lsof
  20. To me this was beautiful!
  21. 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: