SlideShare une entreprise Scribd logo
1  sur  63
Télécharger pour lire hors ligne
Presented by:

Andrew Morris
No Budget Threat Intelligence:
Tracking Malware Campaigns on the Cheap
tyvm
Thanks for being here at 10:00 am when
you’re all hungover
Andrew Morris
Security Consultant at Intrepidus/iSEC
part of NCC Group
Background in Offense
Twitter - @andrew___morris
Email - andrew@morris.guru
PGP - FFB1 47C1 326E A063
Github - andrew-morris
# ./whoami
Background - Background on threat intelligence, why you
should care, previous work
Infrastructure (TL;DR) - Sensor and management.
architecture, log management, cheap hosting
Discovery & Investigation - Analyzing sensor data, securing
malware samples, reverse engineering
Automation - Animus system, publishing reports, mass
scanning for infrastructure, publishing signatures
Defensive Thoughts - Hardening machines, leveraging data,
implementing firewall rules, sharing IOCs
Roadmap
• Background
• Infrastructure (TL;DR)
• Discovery & Investigation
• Automation
• Defensive Strategies
• Roadmap
• Quick threat intelligence primer
• Setting up *cheap* honeypot sensors
• Examining attacks being executed on the open Internet
• Managing and aggregating data
• Locating, analyzing, and reverse engineering malware
artifacts
• Emulating malware traffic
• Tracking DDOS targets
• Automating C2 discovery
• Reporting data
What are we
covering today?
Threat Intelligence
Threat == bad guys
Intelligence == predicting the future
Threat + Intelligence == studying bad guys to
predict what they will do (often to defend yourself)
the short version
• Study bad guys to develop IOCs
• Deploy agents on endpoints
• Alert on anomalous behavior
• Once is bad, but not that bad
• Twice is REALLY bad
• And more!
Conventional
Threat Intelligence
A/V is so 2005
but why tho
Threat intelligence is so 2015
• Today I’m discussing bad guys that target
the open Internet
• Not terribly smart
• SSH default creds, JMX console,
shellshock, MS08_067 on open Internet,
etc
Not talking about
these guys
Today, we’re mostly
talking about these
guys
• Background
• Infrastructure (TL;DR)
• Discovery & Investigation
• Automation
• Defensive Strategies
• Roadmap
Honeypots
tl;dr
• I set up lots of cheap honeypots
• Mostly Kippo
• Some Dionaea
• Empty Apache server
• Centrally manage/aggregate data
• MHN (managed honey network)
• Cheap hosting
• Cloud at Cost
• AWS free tier
Infrastructure
• I use lots of Kippo
• Medium-interaction SSH honeypot
• Logs bad guy terminal sessions for playback
• Can configure which credentials you want to allow
• Logs username, password, source IP address, SSH library
version, commands executed, etc
• Hooks fake wget command to download malware samples
• Unrelated- I wrote a Metasploit module which identifies Kippo
instances externally
Kippo
No budget architectural diagrams
• Managed Honey Network
• Developed by Threatstream
• Developer is awesome for answering all of my dumb ass
questions
• Open source
• Allows you to deploy honeypots easily
• Aggregate data
• API is awesome (but undocumented)
• Mnemosyne is also awesome
MHN
• Quick gotcha:
• MHN has deploy scripts
• Update them to have more stuff, add SSH public keys,
update system, install packages, change password, set
hostname
• MHN pulls from threatstream forks of popular Github repos by
default
• Consider forking your own repos
• Maintain “safe lists” to # grep -v later
MHN (cont’d)
No budget architectural diagrams
rsync over SSH using keys
See other talk for more
info
“Ballin on a Budget” at BSides Charleston for more info on infrastructure
• Background
• Infrastructure (TL;DR)
• Discovery & Investigation
• Automation
• Defensive Strategies
• Roadmap
• Grep Apache logs for the standard shellshock characters
() { :;};
• Discovered several groups that are still using shellshock to
propagate
Shellshock
• Bad guys attempt *lots* of passwords
• There’s a group in Hong Kong that I’ve seen over 100,000
authentication attempts per day from
103.41.124.0/24
• Usually automated scripts
• On successful login, the script will run “uname -a” and wget a
malware sample based on system version
SSH
SSH data
• Bad guys love using SFTP
• Kippo doesn’t include SFTP by default
• Someone wrote a patch for it
• Couple gotchas, but I implemented it in a fork on my Github
• https://github.com/andrew-morris/kippo
• Added SFTP patch, added option to disable fake jail, added some
more default creds, disabled wget port 80 restriction
SSH gotchas
Couple groups
love HFS
Couple groups
love HFS
• Google dork for these web servers
• intext:”httpfileserver”
• If you feel like grotesquely violating the law, most versions of HFS
are vulnerable to an RCE bug
• http://www.exploit-db.com/exploits/34668/
No budget tactics
• Talk in itself
• I’m not the best reverser so don’t listen to anything I say
• If you’re also bad at reversing:
• Malwr - malwr.com
• VirusTotal - virustotal.com
Reversing samples
• I was getting hit a lot by one particular IP address
• Once they guessed a good password, logged in a wgot a malware
sample
• Same web server they were grabbing from had directory traversal
enabled (which happens all the time)
• Found a bunch of Windows samples as well
Reversing samples
(cont’d)
• Passing tons of IP addresses over some custom binary protocol
over port 36000
Reversing samples
(cont’d)
• These IP addresses were DDOS targets
• The C2 was architected to pass IP addresses to all bots
• Bots receive IP addresses and start spraying traffic at them
Reversing samples
(cont’d)
#MalwareMustDie
Shoutout
• I stumbled across this…
Reversing samples
(cont’d)
• I stumbled across this…
Reversing samples
(cont’d)
• I realized the C2 was one of many C2s
• I fingerprinted the C2 network service and wrote a scanner
• Including an Nmap NSE script
• I also stared at Wireshark for what felt like an eternity and wrote a
script that connects to the C2, speaks the same custom binary
language as the C2, and logs all of the DDOS targets
Chuilang C2
Scanner
• Turns out it’s really hard to write a client for a server that you can’t
control, with no source code
• Had to cycle through a few different C2s since they’d go up and
down
• Like trying to learn Spanish by being in the same room as two
Spanish people as they speak to each other in Spanish
• Then they keep leaving the room and you have to find more
Spanish people
Chuilang C2
Scanner Gotchas
Chuilang C2
Scanner
• Background
• Infrastructure (TL;DR)
• Discovery & Investigation
• Automation
• Defensive Strategies
• Roadmap
Animus

Automated Threat Reporting System
• Github page that publishes sensor data daily
• https://github.com/animus-project
• Currently only publishes SSH threat reports
• Currently includes the following:
• Attacker IP addresses
• Credentials being attempted
• SSH library versions
Animus Threat
Reports
• Github actually trusts the client’s clock
• You can commit changes that happened “in the past” by changing
your system time
• ~*~*~*~ the more you know ~*~*~*~
unrelated fun fact
about Github
• Animus is constantly mass-scanning the Internet to locate
Chuilang C2s
• Once a C2 is located, it will connect to it and start logging DDOS
targets, maintained in real time
• Published an alpha NSE script for Chuilang C2s
• https://github.com/andrew-morris/chuilang-c2-detect
Animus Threat
Reports (con’d)
• Tweet to @threatbot on Twitter with one or more IP addresses
• He’ll tweet back if that IP address has ever conducted any attacks
that I’ve seen
• Tweet includes number of attacks we’ve seen from the host, the
date of the first attack, and the date of the most recent attack
• Threatbot also tweets daily statistics of how many attacks we’ve
seen and the IP address of today’s top attacker IP address
Threatbot
• Background
• Infrastructure (TL;DR)
• Discovery & Investigation
• Automation
• Defensive Strategies
• Roadmap
• Check for connections to (or block) known C2s
• Flag connections to known-malicious subnets
• Look for connections to malware distribution web servers
• Presence of files with md5s or yara signatures that match known
bad
Defensive
Strategies
• This is really easy
• Use SSH keys, disable password authentication
• If this is not possible for whatever reason, use strong passwords,
audit against the wordlists I provide with JTR
• Even load up the wordlists bad guys are using and blast your
network with Medusa/Hydra
Defending against
attacks on SSH
• Background
• Infrastructure (TL;DR)
• Discovery & Investigation
• Automation
• Defensive Strategies
• Roadmap
Recap
sensors > attacks > malware samples > ddos target leak > mass scan
• Total auth attempts:
• 6,279,676
• Total unique attacker IPs:
• 5,573
• Total unique passwords:
• 538,512
• Total unique C2s identified:
• 30
• Total unique malware samples:
• 27
• Total DDOS targets:
• 750 IPs belonging to over 40 organizations (in one month)
Stats (SSH)
• Build more signatures to identify different C2s
• Expand Threatbot’s capability
• Deploy more sensors
• Build automation for warning that a DDOS attack is coming
• Expand shellshock, heartbleed, other attack capabilities
• Build HFS web server watch script
• Improve mass scanning / dorking for HFS
• Automate signature generation
• Build more useful information into Animus threat reports
• SO MUCH MORE DATA TO COLLECT
Future plans
• Threatstream / Jason Trost
• Kippo developers
• HD Moore
• Brian Baskin
• Johnny Vestergaard
• @MalwareMustDie
• Rob Blody
• Shmoocon
• Linode abuse team
• Michel Oosterhof - Authored SFTP patches (and more)
Credit
Questions?
Andrew Morris
Twitter - @andrew___morris
Email - andrew@morris.guru
PGP Fingerprint - FFB1 47C1 326E A063
Github - https://github.com/andrew-morris
Gtalk - morr.drew
Thank you!

Contenu connexe

Tendances

Flaying the Blockchain Ledger for Fun, Profit, and Hip Hop
Flaying the Blockchain Ledger for Fun, Profit, and Hip HopFlaying the Blockchain Ledger for Fun, Profit, and Hip Hop
Flaying the Blockchain Ledger for Fun, Profit, and Hip HopAndrew Morris
 
The Background Noise of the Internet
The Background Noise of the InternetThe Background Noise of the Internet
The Background Noise of the InternetAndrew Morris
 
Defending Against 1,000,000 Cyber Attacks by Michael Banks
Defending Against 1,000,000 Cyber Attacks by Michael BanksDefending Against 1,000,000 Cyber Attacks by Michael Banks
Defending Against 1,000,000 Cyber Attacks by Michael BanksEC-Council
 
Infosecurity.be 2019: What are relevant open source security tools you should...
Infosecurity.be 2019: What are relevant open source security tools you should...Infosecurity.be 2019: What are relevant open source security tools you should...
Infosecurity.be 2019: What are relevant open source security tools you should...B.A.
 
Malware Analysis 101 - N00b to Ninja in 60 Minutes at CactusCon on April 4, 2014
Malware Analysis 101 - N00b to Ninja in 60 Minutes at CactusCon on April 4, 2014Malware Analysis 101 - N00b to Ninja in 60 Minutes at CactusCon on April 4, 2014
Malware Analysis 101 - N00b to Ninja in 60 Minutes at CactusCon on April 4, 2014grecsl
 
Hunting on the cheap
Hunting on the cheapHunting on the cheap
Hunting on the cheapAnjum Ahuja
 
ANALYZE'15 - Bulk Malware Analysis at Scale
ANALYZE'15 - Bulk Malware Analysis at ScaleANALYZE'15 - Bulk Malware Analysis at Scale
ANALYZE'15 - Bulk Malware Analysis at ScaleJohn Bambenek
 
Hack Attack! An Introduction to Penetration Testing
Hack Attack! An Introduction to Penetration TestingHack Attack! An Introduction to Penetration Testing
Hack Attack! An Introduction to Penetration TestingSteve Phillips
 
Security by Weston Hecker
Security by Weston HeckerSecurity by Weston Hecker
Security by Weston HeckerEC-Council
 
Web security for developers
Web security for developersWeb security for developers
Web security for developersSunny Neo
 
Lateral Movement: How attackers quietly traverse your Network
Lateral Movement: How attackers quietly traverse your NetworkLateral Movement: How attackers quietly traverse your Network
Lateral Movement: How attackers quietly traverse your NetworkEC-Council
 
Defcon Crypto Village - OPSEC Concerns in Using Crypto
Defcon Crypto Village - OPSEC Concerns in Using CryptoDefcon Crypto Village - OPSEC Concerns in Using Crypto
Defcon Crypto Village - OPSEC Concerns in Using CryptoJohn Bambenek
 
Identifying and Correlating Internet-wide Scan Traffic to Newsworthy Security...
Identifying and Correlating Internet-wide Scan Traffic to Newsworthy Security...Identifying and Correlating Internet-wide Scan Traffic to Newsworthy Security...
Identifying and Correlating Internet-wide Scan Traffic to Newsworthy Security...Andrew Morris
 
BSidesLV 2016 - Powershell - Hunting on the Endpoint - Gerritz
BSidesLV 2016 - Powershell - Hunting on the Endpoint - GerritzBSidesLV 2016 - Powershell - Hunting on the Endpoint - Gerritz
BSidesLV 2016 - Powershell - Hunting on the Endpoint - GerritzChristopher Gerritz
 
Honeycon2016-honeypot updates for public
Honeycon2016-honeypot updates for publicHoneycon2016-honeypot updates for public
Honeycon2016-honeypot updates for publicJulia Yu-Chin Cheng
 
BlueHat v17 || Wannacrypt + Smbv1.0 Vulnerability = One of the Most Damaging ...
BlueHat v17 || Wannacrypt + Smbv1.0 Vulnerability = One of the Most Damaging ...BlueHat v17 || Wannacrypt + Smbv1.0 Vulnerability = One of the Most Damaging ...
BlueHat v17 || Wannacrypt + Smbv1.0 Vulnerability = One of the Most Damaging ...BlueHat Security Conference
 
Operation Buhtrap - AVAR 2015
Operation Buhtrap - AVAR 2015Operation Buhtrap - AVAR 2015
Operation Buhtrap - AVAR 2015ESET
 
The Honeynet Project Introduction
The Honeynet Project IntroductionThe Honeynet Project Introduction
The Honeynet Project IntroductionJulia Yu-Chin Cheng
 
BlueHat v17 || A Lustrum of Malware Network Communication: Evolution and Insi...
BlueHat v17 || A Lustrum of Malware Network Communication: Evolution and Insi...BlueHat v17 || A Lustrum of Malware Network Communication: Evolution and Insi...
BlueHat v17 || A Lustrum of Malware Network Communication: Evolution and Insi...BlueHat Security Conference
 

Tendances (20)

Flaying the Blockchain Ledger for Fun, Profit, and Hip Hop
Flaying the Blockchain Ledger for Fun, Profit, and Hip HopFlaying the Blockchain Ledger for Fun, Profit, and Hip Hop
Flaying the Blockchain Ledger for Fun, Profit, and Hip Hop
 
The Background Noise of the Internet
The Background Noise of the InternetThe Background Noise of the Internet
The Background Noise of the Internet
 
Defending Against 1,000,000 Cyber Attacks by Michael Banks
Defending Against 1,000,000 Cyber Attacks by Michael BanksDefending Against 1,000,000 Cyber Attacks by Michael Banks
Defending Against 1,000,000 Cyber Attacks by Michael Banks
 
Infosecurity.be 2019: What are relevant open source security tools you should...
Infosecurity.be 2019: What are relevant open source security tools you should...Infosecurity.be 2019: What are relevant open source security tools you should...
Infosecurity.be 2019: What are relevant open source security tools you should...
 
Malware Analysis 101 - N00b to Ninja in 60 Minutes at CactusCon on April 4, 2014
Malware Analysis 101 - N00b to Ninja in 60 Minutes at CactusCon on April 4, 2014Malware Analysis 101 - N00b to Ninja in 60 Minutes at CactusCon on April 4, 2014
Malware Analysis 101 - N00b to Ninja in 60 Minutes at CactusCon on April 4, 2014
 
Hunting on the cheap
Hunting on the cheapHunting on the cheap
Hunting on the cheap
 
ANALYZE'15 - Bulk Malware Analysis at Scale
ANALYZE'15 - Bulk Malware Analysis at ScaleANALYZE'15 - Bulk Malware Analysis at Scale
ANALYZE'15 - Bulk Malware Analysis at Scale
 
Hack Attack! An Introduction to Penetration Testing
Hack Attack! An Introduction to Penetration TestingHack Attack! An Introduction to Penetration Testing
Hack Attack! An Introduction to Penetration Testing
 
Security by Weston Hecker
Security by Weston HeckerSecurity by Weston Hecker
Security by Weston Hecker
 
Web security for developers
Web security for developersWeb security for developers
Web security for developers
 
Lateral Movement: How attackers quietly traverse your Network
Lateral Movement: How attackers quietly traverse your NetworkLateral Movement: How attackers quietly traverse your Network
Lateral Movement: How attackers quietly traverse your Network
 
Defcon Crypto Village - OPSEC Concerns in Using Crypto
Defcon Crypto Village - OPSEC Concerns in Using CryptoDefcon Crypto Village - OPSEC Concerns in Using Crypto
Defcon Crypto Village - OPSEC Concerns in Using Crypto
 
Identifying and Correlating Internet-wide Scan Traffic to Newsworthy Security...
Identifying and Correlating Internet-wide Scan Traffic to Newsworthy Security...Identifying and Correlating Internet-wide Scan Traffic to Newsworthy Security...
Identifying and Correlating Internet-wide Scan Traffic to Newsworthy Security...
 
BSidesLV 2016 - Powershell - Hunting on the Endpoint - Gerritz
BSidesLV 2016 - Powershell - Hunting on the Endpoint - GerritzBSidesLV 2016 - Powershell - Hunting on the Endpoint - Gerritz
BSidesLV 2016 - Powershell - Hunting on the Endpoint - Gerritz
 
Honeycon2016-honeypot updates for public
Honeycon2016-honeypot updates for publicHoneycon2016-honeypot updates for public
Honeycon2016-honeypot updates for public
 
Malware cryptomining uploadv3
Malware cryptomining uploadv3Malware cryptomining uploadv3
Malware cryptomining uploadv3
 
BlueHat v17 || Wannacrypt + Smbv1.0 Vulnerability = One of the Most Damaging ...
BlueHat v17 || Wannacrypt + Smbv1.0 Vulnerability = One of the Most Damaging ...BlueHat v17 || Wannacrypt + Smbv1.0 Vulnerability = One of the Most Damaging ...
BlueHat v17 || Wannacrypt + Smbv1.0 Vulnerability = One of the Most Damaging ...
 
Operation Buhtrap - AVAR 2015
Operation Buhtrap - AVAR 2015Operation Buhtrap - AVAR 2015
Operation Buhtrap - AVAR 2015
 
The Honeynet Project Introduction
The Honeynet Project IntroductionThe Honeynet Project Introduction
The Honeynet Project Introduction
 
BlueHat v17 || A Lustrum of Malware Network Communication: Evolution and Insi...
BlueHat v17 || A Lustrum of Malware Network Communication: Evolution and Insi...BlueHat v17 || A Lustrum of Malware Network Communication: Evolution and Insi...
BlueHat v17 || A Lustrum of Malware Network Communication: Evolution and Insi...
 

Similaire à ShmooCon 2015: No Budget Threat Intelligence - Tracking Malware Campaigns on the Cheap

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
 
Inetsecurity.in Ethical Hacking presentation
Inetsecurity.in Ethical Hacking presentationInetsecurity.in Ethical Hacking presentation
Inetsecurity.in Ethical Hacking presentationJoshua Prince
 
OSINT for Attack and Defense
OSINT for Attack and DefenseOSINT for Attack and Defense
OSINT for Attack and DefenseAndrew McNicol
 
Distributed Sensor Data Contextualization for Threat Intelligence Analysis
Distributed Sensor Data Contextualization for Threat Intelligence AnalysisDistributed Sensor Data Contextualization for Threat Intelligence Analysis
Distributed Sensor Data Contextualization for Threat Intelligence AnalysisJason Trost
 
Malware analysis _ Threat Intelligence Morocco
Malware analysis _ Threat Intelligence MoroccoMalware analysis _ Threat Intelligence Morocco
Malware analysis _ Threat Intelligence MoroccoTouhami Kasbaoui
 
Python-Assisted Red-Teaming Operation
Python-Assisted Red-Teaming OperationPython-Assisted Red-Teaming Operation
Python-Assisted Red-Teaming OperationSatria Ady Pradana
 
H4CK1N6 - Web Application Security
H4CK1N6 - Web Application SecurityH4CK1N6 - Web Application Security
H4CK1N6 - Web Application SecurityOliver Hader
 
Ethical Hacking Redefined
Ethical Hacking RedefinedEthical Hacking Redefined
Ethical Hacking RedefinedPawan Patil
 
Crypto Miners in the Cloud
Crypto Miners in the CloudCrypto Miners in the Cloud
Crypto Miners in the CloudTeri Radichel
 
BlueHat v17 || Dyre to Trickbot: An Inside Look at TLS-Encrypted Command-And-...
BlueHat v17 || Dyre to Trickbot: An Inside Look at TLS-Encrypted Command-And-...BlueHat v17 || Dyre to Trickbot: An Inside Look at TLS-Encrypted Command-And-...
BlueHat v17 || Dyre to Trickbot: An Inside Look at TLS-Encrypted Command-And-...BlueHat Security Conference
 
The Web Application Hackers Toolchain
The Web Application Hackers ToolchainThe Web Application Hackers Toolchain
The Web Application Hackers Toolchainjasonhaddix
 
Red Team Apocalypse
Red Team ApocalypseRed Team Apocalypse
Red Team ApocalypseBeau Bullock
 
Honeypots for Active Defense
Honeypots for Active DefenseHoneypots for Active Defense
Honeypots for Active DefenseGreg Foss
 
2023 NCIT: Introduction to Intrusion Detection
2023 NCIT: Introduction to Intrusion Detection2023 NCIT: Introduction to Intrusion Detection
2023 NCIT: Introduction to Intrusion DetectionAPNIC
 
Using Canary Honeypots for Network Security Monitoring
Using Canary Honeypots for Network Security MonitoringUsing Canary Honeypots for Network Security Monitoring
Using Canary Honeypots for Network Security Monitoringchrissanders88
 
Automation Attacks At Scale
Automation Attacks At ScaleAutomation Attacks At Scale
Automation Attacks At ScaleMayank Dhiman
 
BlueHat v18 || The matrix has you - protecting linux using deception
BlueHat v18 || The matrix has you - protecting linux using deceptionBlueHat v18 || The matrix has you - protecting linux using deception
BlueHat v18 || The matrix has you - protecting linux using deceptionBlueHat Security Conference
 

Similaire à ShmooCon 2015: No Budget Threat Intelligence - Tracking Malware Campaigns on the Cheap (20)

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
 
Ethical hacking
Ethical hackingEthical hacking
Ethical hacking
 
Inetsecurity.in Ethical Hacking presentation
Inetsecurity.in Ethical Hacking presentationInetsecurity.in Ethical Hacking presentation
Inetsecurity.in Ethical Hacking presentation
 
OSINT for Attack and Defense
OSINT for Attack and DefenseOSINT for Attack and Defense
OSINT for Attack and Defense
 
Distributed Sensor Data Contextualization for Threat Intelligence Analysis
Distributed Sensor Data Contextualization for Threat Intelligence AnalysisDistributed Sensor Data Contextualization for Threat Intelligence Analysis
Distributed Sensor Data Contextualization for Threat Intelligence Analysis
 
Malware analysis _ Threat Intelligence Morocco
Malware analysis _ Threat Intelligence MoroccoMalware analysis _ Threat Intelligence Morocco
Malware analysis _ Threat Intelligence Morocco
 
Python-Assisted Red-Teaming Operation
Python-Assisted Red-Teaming OperationPython-Assisted Red-Teaming Operation
Python-Assisted Red-Teaming Operation
 
H4CK1N6 - Web Application Security
H4CK1N6 - Web Application SecurityH4CK1N6 - Web Application Security
H4CK1N6 - Web Application Security
 
Botnets Attacks.pptx
Botnets Attacks.pptxBotnets Attacks.pptx
Botnets Attacks.pptx
 
Ethical Hacking Redefined
Ethical Hacking RedefinedEthical Hacking Redefined
Ethical Hacking Redefined
 
Crypto Miners in the Cloud
Crypto Miners in the CloudCrypto Miners in the Cloud
Crypto Miners in the Cloud
 
Malware analysis
Malware analysisMalware analysis
Malware analysis
 
BlueHat v17 || Dyre to Trickbot: An Inside Look at TLS-Encrypted Command-And-...
BlueHat v17 || Dyre to Trickbot: An Inside Look at TLS-Encrypted Command-And-...BlueHat v17 || Dyre to Trickbot: An Inside Look at TLS-Encrypted Command-And-...
BlueHat v17 || Dyre to Trickbot: An Inside Look at TLS-Encrypted Command-And-...
 
The Web Application Hackers Toolchain
The Web Application Hackers ToolchainThe Web Application Hackers Toolchain
The Web Application Hackers Toolchain
 
Red Team Apocalypse
Red Team ApocalypseRed Team Apocalypse
Red Team Apocalypse
 
Honeypots for Active Defense
Honeypots for Active DefenseHoneypots for Active Defense
Honeypots for Active Defense
 
2023 NCIT: Introduction to Intrusion Detection
2023 NCIT: Introduction to Intrusion Detection2023 NCIT: Introduction to Intrusion Detection
2023 NCIT: Introduction to Intrusion Detection
 
Using Canary Honeypots for Network Security Monitoring
Using Canary Honeypots for Network Security MonitoringUsing Canary Honeypots for Network Security Monitoring
Using Canary Honeypots for Network Security Monitoring
 
Automation Attacks At Scale
Automation Attacks At ScaleAutomation Attacks At Scale
Automation Attacks At Scale
 
BlueHat v18 || The matrix has you - protecting linux using deception
BlueHat v18 || The matrix has you - protecting linux using deceptionBlueHat v18 || The matrix has you - protecting linux using deception
BlueHat v18 || The matrix has you - protecting linux using deception
 

Dernier

Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxolyaivanovalion
 
Carero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxCarero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxolyaivanovalion
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...amitlee9823
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% SecurePooja Nehwal
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Researchmichael115558
 
Smarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxSmarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxolyaivanovalion
 
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...amitlee9823
 
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...amitlee9823
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxolyaivanovalion
 
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...Delhi Call girls
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...amitlee9823
 
Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusTimothy Spann
 
ALSO dropshipping via API with DroFx.pptx
ALSO dropshipping via API with DroFx.pptxALSO dropshipping via API with DroFx.pptx
ALSO dropshipping via API with DroFx.pptxolyaivanovalion
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxolyaivanovalion
 
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...SUHANI PANDEY
 
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...amitlee9823
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 

Dernier (20)

Anomaly detection and data imputation within time series
Anomaly detection and data imputation within time seriesAnomaly detection and data imputation within time series
Anomaly detection and data imputation within time series
 
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptx
 
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts ServiceCall Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
 
Carero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxCarero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptx
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Research
 
Smarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxSmarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptx
 
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
 
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptx
 
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
 
Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and Milvus
 
ALSO dropshipping via API with DroFx.pptx
ALSO dropshipping via API with DroFx.pptxALSO dropshipping via API with DroFx.pptx
ALSO dropshipping via API with DroFx.pptx
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptx
 
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
 
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 

ShmooCon 2015: No Budget Threat Intelligence - Tracking Malware Campaigns on the Cheap

  • 1. Presented by:
 Andrew Morris No Budget Threat Intelligence: Tracking Malware Campaigns on the Cheap
  • 2. tyvm Thanks for being here at 10:00 am when you’re all hungover
  • 3. Andrew Morris Security Consultant at Intrepidus/iSEC part of NCC Group Background in Offense Twitter - @andrew___morris Email - andrew@morris.guru PGP - FFB1 47C1 326E A063 Github - andrew-morris # ./whoami
  • 4. Background - Background on threat intelligence, why you should care, previous work Infrastructure (TL;DR) - Sensor and management. architecture, log management, cheap hosting Discovery & Investigation - Analyzing sensor data, securing malware samples, reverse engineering Automation - Animus system, publishing reports, mass scanning for infrastructure, publishing signatures Defensive Thoughts - Hardening machines, leveraging data, implementing firewall rules, sharing IOCs Roadmap
  • 5. • Background • Infrastructure (TL;DR) • Discovery & Investigation • Automation • Defensive Strategies • Roadmap
  • 6. • Quick threat intelligence primer • Setting up *cheap* honeypot sensors • Examining attacks being executed on the open Internet • Managing and aggregating data • Locating, analyzing, and reverse engineering malware artifacts • Emulating malware traffic • Tracking DDOS targets • Automating C2 discovery • Reporting data What are we covering today?
  • 8. Threat == bad guys Intelligence == predicting the future Threat + Intelligence == studying bad guys to predict what they will do (often to defend yourself) the short version
  • 9. • Study bad guys to develop IOCs • Deploy agents on endpoints • Alert on anomalous behavior • Once is bad, but not that bad • Twice is REALLY bad • And more! Conventional Threat Intelligence
  • 10. A/V is so 2005 but why tho
  • 12. • Today I’m discussing bad guys that target the open Internet • Not terribly smart • SSH default creds, JMX console, shellshock, MS08_067 on open Internet, etc
  • 14. Today, we’re mostly talking about these guys
  • 15. • Background • Infrastructure (TL;DR) • Discovery & Investigation • Automation • Defensive Strategies • Roadmap
  • 17. • I set up lots of cheap honeypots • Mostly Kippo • Some Dionaea • Empty Apache server • Centrally manage/aggregate data • MHN (managed honey network) • Cheap hosting • Cloud at Cost • AWS free tier Infrastructure
  • 18. • I use lots of Kippo • Medium-interaction SSH honeypot • Logs bad guy terminal sessions for playback • Can configure which credentials you want to allow • Logs username, password, source IP address, SSH library version, commands executed, etc • Hooks fake wget command to download malware samples • Unrelated- I wrote a Metasploit module which identifies Kippo instances externally Kippo
  • 20. • Managed Honey Network • Developed by Threatstream • Developer is awesome for answering all of my dumb ass questions • Open source • Allows you to deploy honeypots easily • Aggregate data • API is awesome (but undocumented) • Mnemosyne is also awesome MHN
  • 21.
  • 22. • Quick gotcha: • MHN has deploy scripts • Update them to have more stuff, add SSH public keys, update system, install packages, change password, set hostname • MHN pulls from threatstream forks of popular Github repos by default • Consider forking your own repos • Maintain “safe lists” to # grep -v later MHN (cont’d)
  • 23. No budget architectural diagrams rsync over SSH using keys
  • 24. See other talk for more info “Ballin on a Budget” at BSides Charleston for more info on infrastructure
  • 25. • Background • Infrastructure (TL;DR) • Discovery & Investigation • Automation • Defensive Strategies • Roadmap
  • 26. • Grep Apache logs for the standard shellshock characters () { :;}; • Discovered several groups that are still using shellshock to propagate Shellshock
  • 27. • Bad guys attempt *lots* of passwords • There’s a group in Hong Kong that I’ve seen over 100,000 authentication attempts per day from 103.41.124.0/24 • Usually automated scripts • On successful login, the script will run “uname -a” and wget a malware sample based on system version SSH
  • 29.
  • 30. • Bad guys love using SFTP • Kippo doesn’t include SFTP by default • Someone wrote a patch for it • Couple gotchas, but I implemented it in a fork on my Github • https://github.com/andrew-morris/kippo • Added SFTP patch, added option to disable fake jail, added some more default creds, disabled wget port 80 restriction SSH gotchas
  • 33. • Google dork for these web servers • intext:”httpfileserver” • If you feel like grotesquely violating the law, most versions of HFS are vulnerable to an RCE bug • http://www.exploit-db.com/exploits/34668/ No budget tactics
  • 34. • Talk in itself • I’m not the best reverser so don’t listen to anything I say • If you’re also bad at reversing: • Malwr - malwr.com • VirusTotal - virustotal.com Reversing samples
  • 35. • I was getting hit a lot by one particular IP address • Once they guessed a good password, logged in a wgot a malware sample • Same web server they were grabbing from had directory traversal enabled (which happens all the time) • Found a bunch of Windows samples as well Reversing samples (cont’d)
  • 36. • Passing tons of IP addresses over some custom binary protocol over port 36000 Reversing samples (cont’d)
  • 37. • These IP addresses were DDOS targets • The C2 was architected to pass IP addresses to all bots • Bots receive IP addresses and start spraying traffic at them Reversing samples (cont’d)
  • 39. • I stumbled across this… Reversing samples (cont’d)
  • 40. • I stumbled across this… Reversing samples (cont’d)
  • 41. • I realized the C2 was one of many C2s • I fingerprinted the C2 network service and wrote a scanner • Including an Nmap NSE script • I also stared at Wireshark for what felt like an eternity and wrote a script that connects to the C2, speaks the same custom binary language as the C2, and logs all of the DDOS targets Chuilang C2 Scanner
  • 42. • Turns out it’s really hard to write a client for a server that you can’t control, with no source code • Had to cycle through a few different C2s since they’d go up and down • Like trying to learn Spanish by being in the same room as two Spanish people as they speak to each other in Spanish • Then they keep leaving the room and you have to find more Spanish people Chuilang C2 Scanner Gotchas
  • 44. • Background • Infrastructure (TL;DR) • Discovery & Investigation • Automation • Defensive Strategies • Roadmap
  • 46. • Github page that publishes sensor data daily • https://github.com/animus-project • Currently only publishes SSH threat reports • Currently includes the following: • Attacker IP addresses • Credentials being attempted • SSH library versions Animus Threat Reports
  • 47.
  • 48.
  • 49. • Github actually trusts the client’s clock • You can commit changes that happened “in the past” by changing your system time • ~*~*~*~ the more you know ~*~*~*~ unrelated fun fact about Github
  • 50. • Animus is constantly mass-scanning the Internet to locate Chuilang C2s • Once a C2 is located, it will connect to it and start logging DDOS targets, maintained in real time • Published an alpha NSE script for Chuilang C2s • https://github.com/andrew-morris/chuilang-c2-detect Animus Threat Reports (con’d)
  • 51. • Tweet to @threatbot on Twitter with one or more IP addresses • He’ll tweet back if that IP address has ever conducted any attacks that I’ve seen • Tweet includes number of attacks we’ve seen from the host, the date of the first attack, and the date of the most recent attack • Threatbot also tweets daily statistics of how many attacks we’ve seen and the IP address of today’s top attacker IP address Threatbot
  • 52.
  • 53.
  • 54. • Background • Infrastructure (TL;DR) • Discovery & Investigation • Automation • Defensive Strategies • Roadmap
  • 55. • Check for connections to (or block) known C2s • Flag connections to known-malicious subnets • Look for connections to malware distribution web servers • Presence of files with md5s or yara signatures that match known bad Defensive Strategies
  • 56. • This is really easy • Use SSH keys, disable password authentication • If this is not possible for whatever reason, use strong passwords, audit against the wordlists I provide with JTR • Even load up the wordlists bad guys are using and blast your network with Medusa/Hydra Defending against attacks on SSH
  • 57. • Background • Infrastructure (TL;DR) • Discovery & Investigation • Automation • Defensive Strategies • Roadmap
  • 58. Recap sensors > attacks > malware samples > ddos target leak > mass scan
  • 59. • Total auth attempts: • 6,279,676 • Total unique attacker IPs: • 5,573 • Total unique passwords: • 538,512 • Total unique C2s identified: • 30 • Total unique malware samples: • 27 • Total DDOS targets: • 750 IPs belonging to over 40 organizations (in one month) Stats (SSH)
  • 60. • Build more signatures to identify different C2s • Expand Threatbot’s capability • Deploy more sensors • Build automation for warning that a DDOS attack is coming • Expand shellshock, heartbleed, other attack capabilities • Build HFS web server watch script • Improve mass scanning / dorking for HFS • Automate signature generation • Build more useful information into Animus threat reports • SO MUCH MORE DATA TO COLLECT Future plans
  • 61. • Threatstream / Jason Trost • Kippo developers • HD Moore • Brian Baskin • Johnny Vestergaard • @MalwareMustDie • Rob Blody • Shmoocon • Linode abuse team • Michel Oosterhof - Authored SFTP patches (and more) Credit
  • 63. Andrew Morris Twitter - @andrew___morris Email - andrew@morris.guru PGP Fingerprint - FFB1 47C1 326E A063 Github - https://github.com/andrew-morris Gtalk - morr.drew Thank you!