SlideShare ist ein Scribd-Unternehmen logo
1 von 70
Downloaden Sie, um offline zu lesen
Offensive Security
with Metasploit
15 October 2015
TX DIR Telecommunications Forum
1
James Lee
@egyp7
Metasploit Developer
Community Manager
# whoami
2
I Think Like an Attacker
What is Metasploit?
A tool for
● Reconnaissance
● Exploitation
● Post-exploitation
A Data Clearinghouse
A framework for improving and automating all
of the above
A Brief History of
Exploitation
Golden Era (up to mid-late 1990s)
Silver Era (mid-late 1990s to mid 2000s)
Modern Era (late 2000s to now)
Golden Era
Centralized Computing
Universities, Research Orgs
Golden Era Exploitation
Credentials
Configuration errors
Silver Era (mid 1990s)
Practical portable systems
Rise of WiFi
Much greater use of technical mitigation
Silver Era Exploitation
Credentials
The rise of client-sides
The rise of web exploitation
The Age of Worms
Email Worms
ILOVEYOU
Sircam
Sobig
MyDoom
Server-side Worms
ms00-078 IIS, solaris sadmin
ms01-033 IIS
(big list of vectors)
ms02-039 SQLServer
ms03-026 dcom
ms04-011 lsass
ms05-039
ms08-067
Sadmind
Code Red
Nimda
Slammer
Blaster
Sasser
Zotob
Conficker
The web is the Internet
Ubiquitous mobile computing
Secure Development Lifecycle (SDLC)
Modern Era
An exploit converts
illegitimate access into
legitimate access
If exploits are getting
harder, where do we go?
What do they all have in
common?
Hint:
Authenticated Code
Execution by Design
Back to Golden Era Exploitation
Credentials
Configuration errors
Modern Era Exploitation
Credentials
Configuration errors
Credentials
Windows authentication
NTLM hashes stored in SAM
Logons handled by LSASS.exe
● Cached for Single Sign On
Mimikatz
In-memory Windows password stealer
● Plaintext password extraction
● Meterpreter extension
Mimikatz in action
Core
Private
Public
Realm
Blank Username
SNMP Community
NTLM Hash
SMB Domain
Postgres DB
Username
Password
SSH Key
Non-replayable Hash
Oracle SID
SMB Authentication
Auth request; host:BOB
SMB Authentication
Auth request; host:BOB
Challenge
user:bob, bob’s hash encrypted with Challenge
SMB Authentication
Auth request; host:BOB
Challenge
SMB Authentication
Auth request; host:BOB
Challenge
Login successful
user:bob, bob’s hash encrypted with Challenge
windows/smb/smb_relay
SMB Relay
Auth request; host:BOB
SMB Relay
Auth
request;
host:BO
B
Auth request; host:BOB
SMB Relay
Auth request; host:BOB
Challenge
Auth
request;
host:BO
B
SMB Relay
Auth request; host:BOB
Challenge
Auth
request;
host:BO
B
Challenge
SMB Relay
Auth request; host:BOB
Challenge
user:bob, bob’s hash encrypted with
Challenge
Auth
request;
host:BO
B
Challenge
SMB Relay
Auth request; host:BOB
Challenge
user:bob, bob’s hash encrypted with
Challenge
Auth
request;
host:BO
B
Challenge
user:bob, bob’s
hash
encrypted
with
Challenge
SMB Relay
Auth request; host:BOB
Challenge
user:bob, bob’s hash encrypted with
Challenge
Login
successful
Auth
request;
host:BO
B
Challenge
user:bob, bob’s
hash
encrypted
with
Challenge
SMB Relay
Auth request; host:BOB
Challenge
user:bob, bob’s hash encrypted with
Challenge
Login
successful
Auth
request;
host:BO
B
Challenge
user:bob, bob’s
hash
encrypted
with
Challenge
Login Failed go away
exploit/windows/smb/smb_relay
An exploit converts
illegitimate access into
legitimate access
Post Exploitation
The Ps
Presence
Persistence
Pivoting
Presence
Presence: Processes
Persistence
Pivoting
Pivoting
Two* methods in Metasploit
● Route
● Portfwd
* Mostly
Exploit
Payload
Reverse Payload
A tougher scenario
Exploit
Payload
Bind Payload
A tougher scenario
Exploit
Payload
How do I deal with this?
SMB Relay
Disable WPAD
Block outbound SMB
Enforce SMB 2.x only
Require signing
Windows Authentication
Don’t give users Local Admin
LAPS - Local Administrator Password Solution
Password Theft
KB2871997
● Disables digest auth
● LSASS still has NTLM hashes
Don’t log into everything as DA
Pivoting
Segmentation
Egress filters
Audit logons
Questions?
@egyp7
egypt@metasploit.com

Weitere ähnliche Inhalte

Andere mochten auch

Lateral Movement - Phreaknik 2016
Lateral Movement - Phreaknik 2016Lateral Movement - Phreaknik 2016
Lateral Movement - Phreaknik 2016
Xavier Ashe
 
Post Exploitation Using Meterpreter
Post Exploitation Using MeterpreterPost Exploitation Using Meterpreter
Post Exploitation Using Meterpreter
Shubham Mittal
 

Andere mochten auch (20)

Metasploit for Penetration Testing: Beginner Class
Metasploit for Penetration Testing: Beginner ClassMetasploit for Penetration Testing: Beginner Class
Metasploit for Penetration Testing: Beginner Class
 
MAITAINING ACCESS
MAITAINING ACCESSMAITAINING ACCESS
MAITAINING ACCESS
 
Backtrak guide
Backtrak guideBacktrak guide
Backtrak guide
 
Lateral Movement by Default
Lateral Movement by DefaultLateral Movement by Default
Lateral Movement by Default
 
[English] BackBox Linux and Metasploit: A practical demonstration of the Shel...
[English] BackBox Linux and Metasploit: A practical demonstration of the Shel...[English] BackBox Linux and Metasploit: A practical demonstration of the Shel...
[English] BackBox Linux and Metasploit: A practical demonstration of the Shel...
 
mimikatz @ phdays
mimikatz @ phdaysmimikatz @ phdays
mimikatz @ phdays
 
CyberLab CCEH Session - 19 Penetration Testing
CyberLab CCEH Session - 19 Penetration TestingCyberLab CCEH Session - 19 Penetration Testing
CyberLab CCEH Session - 19 Penetration Testing
 
Lateral Movement - Phreaknik 2016
Lateral Movement - Phreaknik 2016Lateral Movement - Phreaknik 2016
Lateral Movement - Phreaknik 2016
 
Post Exploitation Using Meterpreter
Post Exploitation Using MeterpreterPost Exploitation Using Meterpreter
Post Exploitation Using Meterpreter
 
mimikatz @ asfws
mimikatz @ asfwsmimikatz @ asfws
mimikatz @ asfws
 
Shellcode mastering
Shellcode masteringShellcode mastering
Shellcode mastering
 
Exploitation
ExploitationExploitation
Exploitation
 
Reverse engineering - Shellcodes techniques
Reverse engineering - Shellcodes techniquesReverse engineering - Shellcodes techniques
Reverse engineering - Shellcodes techniques
 
Golden ticket, pass the ticket mi tm kerberos attacks explained
Golden ticket, pass the ticket mi tm   kerberos attacks explainedGolden ticket, pass the ticket mi tm   kerberos attacks explained
Golden ticket, pass the ticket mi tm kerberos attacks explained
 
HIPAA & HITECH Made Easy for Behavioral Health Professionals -- Marlene Maheu
HIPAA & HITECH Made Easy for Behavioral Health Professionals -- Marlene MaheuHIPAA & HITECH Made Easy for Behavioral Health Professionals -- Marlene Maheu
HIPAA & HITECH Made Easy for Behavioral Health Professionals -- Marlene Maheu
 
OFFENSIVE: Exploiting DNS servers changes BlackHat Asia 2014
OFFENSIVE: Exploiting DNS servers changes BlackHat Asia 2014OFFENSIVE: Exploiting DNS servers changes BlackHat Asia 2014
OFFENSIVE: Exploiting DNS servers changes BlackHat Asia 2014
 
HIPAA HITECH training 7-9-12
HIPAA HITECH training 7-9-12HIPAA HITECH training 7-9-12
HIPAA HITECH training 7-9-12
 
HIPAA
HIPAAHIPAA
HIPAA
 
Ceh v5 module 22 penetration testing
Ceh v5 module 22 penetration testingCeh v5 module 22 penetration testing
Ceh v5 module 22 penetration testing
 
One Shellcode to Rule Them All: Cross-Platform Exploitation
One Shellcode to Rule Them All: Cross-Platform ExploitationOne Shellcode to Rule Them All: Cross-Platform Exploitation
One Shellcode to Rule Them All: Cross-Platform Exploitation
 

Ähnlich wie Offensive Security with Metasploit

Ähnlich wie Offensive Security with Metasploit (20)

Web Application Security
Web Application SecurityWeb Application Security
Web Application Security
 
Securing your web infrastructure
Securing your web infrastructureSecuring your web infrastructure
Securing your web infrastructure
 
Dirty Little Secrets They Didn't Teach You In Pentest Class v2
Dirty Little Secrets They Didn't Teach You In Pentest Class v2Dirty Little Secrets They Didn't Teach You In Pentest Class v2
Dirty Little Secrets They Didn't Teach You In Pentest Class v2
 
Dirty Little Secrets They Didn't Teach You In Pentest Class v2
Dirty Little Secrets They Didn't Teach You In Pentest Class v2Dirty Little Secrets They Didn't Teach You In Pentest Class v2
Dirty Little Secrets They Didn't Teach You In Pentest Class v2
 
Atelier Technique CISCO ACSS 2018
Atelier Technique CISCO ACSS 2018Atelier Technique CISCO ACSS 2018
Atelier Technique CISCO ACSS 2018
 
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Joker...
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Joker...Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Joker...
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Joker...
 
Lock That Sh*t Down! Auth Security Patterns for Apps, APIs, and Infra - Devne...
Lock That Sh*t Down! Auth Security Patterns for Apps, APIs, and Infra - Devne...Lock That Sh*t Down! Auth Security Patterns for Apps, APIs, and Infra - Devne...
Lock That Sh*t Down! Auth Security Patterns for Apps, APIs, and Infra - Devne...
 
It's a Dangerous World: From OS Through Application, Securing Your MongoDB In...
It's a Dangerous World: From OS Through Application, Securing Your MongoDB In...It's a Dangerous World: From OS Through Application, Securing Your MongoDB In...
It's a Dangerous World: From OS Through Application, Securing Your MongoDB In...
 
NPTs
NPTsNPTs
NPTs
 
ZKorum: Building the Next Generation eAgora powered by SSI
ZKorum: Building the Next Generation eAgora powered by SSIZKorum: Building the Next Generation eAgora powered by SSI
ZKorum: Building the Next Generation eAgora powered by SSI
 
[Webinar] DDoS Pentester Reveals: How Hackers Find Your Website’s Weak Points...
[Webinar] DDoS Pentester Reveals: How Hackers Find Your Website’s Weak Points...[Webinar] DDoS Pentester Reveals: How Hackers Find Your Website’s Weak Points...
[Webinar] DDoS Pentester Reveals: How Hackers Find Your Website’s Weak Points...
 
No more ARP : Another MiTm Attacks
No more ARP : Another MiTm AttacksNo more ARP : Another MiTm Attacks
No more ARP : Another MiTm Attacks
 
Security Vulnerabilities: How to Defend Against Them
Security Vulnerabilities: How to Defend Against ThemSecurity Vulnerabilities: How to Defend Against Them
Security Vulnerabilities: How to Defend Against Them
 
Reducing Your Attack Surface & Your Role in Cloud Workload Protection
Reducing Your Attack Surface & Your Role in Cloud Workload ProtectionReducing Your Attack Surface & Your Role in Cloud Workload Protection
Reducing Your Attack Surface & Your Role in Cloud Workload Protection
 
RSA 2015 Bitcoin's Future Threats: Expert's Roundtable based on 150 Case Studies
RSA 2015 Bitcoin's Future Threats: Expert's Roundtable based on 150 Case StudiesRSA 2015 Bitcoin's Future Threats: Expert's Roundtable based on 150 Case Studies
RSA 2015 Bitcoin's Future Threats: Expert's Roundtable based on 150 Case Studies
 
Lock That Sh*t Down! Auth Security Patterns for Apps, APIs, and Infra
Lock That Sh*t Down! Auth Security Patterns for Apps, APIs, and InfraLock That Sh*t Down! Auth Security Patterns for Apps, APIs, and Infra
Lock That Sh*t Down! Auth Security Patterns for Apps, APIs, and Infra
 
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Sprin...
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Sprin...Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Sprin...
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Sprin...
 
La Revolución de la Ciberseguridad!
La Revolución de la Ciberseguridad!La Revolución de la Ciberseguridad!
La Revolución de la Ciberseguridad!
 
MSP360 Cybersecurity Master Class part 2
MSP360 Cybersecurity Master Class part 2MSP360 Cybersecurity Master Class part 2
MSP360 Cybersecurity Master Class part 2
 
CrowdSec A-Round Fundraising Deck
CrowdSec A-Round Fundraising DeckCrowdSec A-Round Fundraising Deck
CrowdSec A-Round Fundraising Deck
 

Mehr von egypt (10)

Privilege Escalation with Metasploit
Privilege Escalation with MetasploitPrivilege Escalation with Metasploit
Privilege Escalation with Metasploit
 
The State of the Metasploit Framework.pdf
The State of the Metasploit Framework.pdfThe State of the Metasploit Framework.pdf
The State of the Metasploit Framework.pdf
 
New Shiny in the Metasploit Framework
New Shiny in the Metasploit FrameworkNew Shiny in the Metasploit Framework
New Shiny in the Metasploit Framework
 
Open Source, Security, and Open Source Security.pdf
Open Source, Security, and Open Source Security.pdfOpen Source, Security, and Open Source Security.pdf
Open Source, Security, and Open Source Security.pdf
 
Authenticated Code Execution by Design.pptx
Authenticated Code Execution by Design.pptxAuthenticated Code Execution by Design.pptx
Authenticated Code Execution by Design.pptx
 
One-Liners to Rule Them All
One-Liners to Rule Them AllOne-Liners to Rule Them All
One-Liners to Rule Them All
 
Shiny
ShinyShiny
Shiny
 
State of the Framework Address: Recent Developments in the Metasploit Framework
State of the Framework Address: Recent Developments in the Metasploit FrameworkState of the Framework Address: Recent Developments in the Metasploit Framework
State of the Framework Address: Recent Developments in the Metasploit Framework
 
Unmanned Aerial Vehicles: Exploit Automation with the Metasploit Framework
Unmanned Aerial Vehicles: Exploit Automation with the Metasploit FrameworkUnmanned Aerial Vehicles: Exploit Automation with the Metasploit Framework
Unmanned Aerial Vehicles: Exploit Automation with the Metasploit Framework
 
Using Guided Missiles in Drive-bys: Automatic Browser Fingerprinting and Expl...
Using Guided Missiles in Drive-bys: Automatic Browser Fingerprinting and Expl...Using Guided Missiles in Drive-bys: Automatic Browser Fingerprinting and Expl...
Using Guided Missiles in Drive-bys: Automatic Browser Fingerprinting and Expl...
 

Offensive Security with Metasploit