SlideShare a Scribd company logo
© Black Hills Information Security | @BHInfoSecurity
OK Google, How do I
Red Team GSuite?
Mike Felch & Beau Bullock
Attacking Google Suite Customers
© Black Hills Information Security | @BHInfoSecurity
Who We Are
• Mike Felch - @ustayready
• Pentest / Red team at BHIS
• Involved w/ OWASP Orlando & BSides Orlando
• Host of Tradecraft Security Weekly
• Host of CoinSec Podcast
• Beau Bullock - @dafthack
•Pentest / Red team at BHIS
• Host of Tradecraft Security Weekly
• Host of CoinSec Podcast
• Avid OWA enthusiast
© Black Hills Information Security | @BHInfoSecurity
Disclaimer: We <3 Google
We broke up :( It’s complicated...
Relationship Status
© Black Hills Information Security | @BHInfoSecurity
What We’re Covering
1. Preparation: OPSEC or Die Trying
2. External: Crack the Perimeter
3. SE: Exploiting Trust
4. Persistence: Hide in Plain Sight
5. Internal: Collateral Damage
6. Demo: Real-world Attack
7. Defending: Triage the Breach
8. Questions / Comments
© Black Hills Information Security | @BHInfoSecurity
Preparation:
OPSEC or Die Trying
© Black Hills Information Security | @BHInfoSecurity
Preparation: Bad! :(
• Use your normal account for API keys
• Login to multiple accounts w/ the same IP
• Use the same browser w/ multiple sessions
How To Lose a Fight With Google SOC
© Black Hills Information Security | @BHInfoSecurity
Preparation: Good! :)
+ +
© Black Hills Information Security | @BHInfoSecurity
Preparation
• Prepaid Smartphone ✔
• Prepaid Credit Card ✔
• VPN Account ✔
• Clean Virtual Machine ✔
• New Google Identity ✔
• New Google API Keys ✔
• Don’t Cross-contaminate ✔
© Black Hills Information Security | @BHInfoSecurity
External:
Crack the Perimeter
© Black Hills Information Security | @BHInfoSecurity
Don’t move so quick!
• Don’t go straight to shell
• Phishing w/ malicious docs are old
• Why go External -> Internal -> External???
• Decide on an attack path
• Strategically target victims
Creds are King!
© Black Hills Information Security | @BHInfoSecurity
Password Spraying
• Determine naming convention
• Search LinkedIn for users
• Generate email lists
• Try one password at a time
• Spray all the accounts
• Rotate IP addresses regularly
• Just need one account to start
© Black Hills Information Security | @BHInfoSecurity
Demo:
AWS Lambda Spraying
© Black Hills Information Security | @BHInfoSecurity
SE:
Exploiting Trust
© Black Hills Information Security | @BHInfoSecurity
Google Group Ruse
• Create malicious group
• Change your display name
• Force add users
• Customize a message
• Don’t forget URLs...
© Black Hills Information Security | @BHInfoSecurity
Google Group Ruse
© Black Hills Information Security | @BHInfoSecurity
Google Hangout Ruse
• Remember this? ----------->
• This was an invite to chat in
Gmail
• Apparently this was too
much work for some users
© Black Hills Information Security | @BHInfoSecurity
Google Hangout Ruse
• Now the default Google Hangouts settings
allow direct chat without warning
• Simply knowing the email address is all
that’s needed
• Pop a message box open to the target
spoofing another person
• Say hi, send link, capture creds and/or
shell
© Black Hills Information Security | @BHInfoSecurity
Google Hangout Ruse
• You can modify your default settings to
enforce sending an invitation
• But even then, spoofed accounts look good
• To require invites:
• Hangouts.google.com, click hamburger menu
in top left, Settings, “Customize Invite
Settings”, switch all to “Can send you an
invitation”
• There doesn’t appear to be a global option
for locking down accounts across an org
© Black Hills Information Security | @BHInfoSecurity
Enumerate Open Accounts
• Accounts not requiring invites can be
enumerated easily
• Simply start a new chat with them via the
Gmail chat menu
• If the box that pops up says “Start a
conversation with <name>” then an invite is
required
© Black Hills Information Security | @BHInfoSecurity
Google Doc Ruse
• What if you could get Google to send a phishing link for you?
• Google Docs is perfect for this
• Create a Google Doc with clickbait name like “Critical Update Pending”
• Add content, then add a comment to the doc with your phishing link
• In the comment, type their email address prefixed with a + symbol
(i.e. +hacker@gmail.com) then check ‘Assign’
• Google will send the target an email from <random-
string>@docs.google.com
© Black Hills Information Security | @BHInfoSecurity
Google Doc Ruse
© Black Hills Information Security | @BHInfoSecurity
Google Doc Ruse
© Black Hills Information Security | @BHInfoSecurity
Google Calendar Ruse
• Needs to look legit
• Needs to trigger a response
• Needs to create urgency
• Needs to go undetected
• Needs to avoid red flags
Don’t email, inject event!
© Black Hills Information Security | @BHInfoSecurity
Calendar Event Injection
• Silently inject events into calendars
• Creates urgency via reminders
• Include link to phishing page
• Mass-exploitation w/o visibility
• Litter calendars for the future
• Remove traces by erasing the event
• Include GoToMeeting
• Don’t forget to record the meeting! :)
• How did we get here???
© Black Hills Information Security | @BHInfoSecurity
Calendar Event Injection
• Fun w/ the Google API
• Mark victims as ‘Accepted’
• Add comments for victims
• but.. they never receive an invite
• Bypasses setting for not auto-add
• Reported 10/9/2017
Google Isn’t Patching!
© Black Hills Information Security | @BHInfoSecurity
Personalized Phishing
© Black Hills Information Security | @BHInfoSecurity
Google 2FA Requirements
• SMS: Text Message
• TOTP: Google Authenticator
• Phone Prompt: Touch Phone
• U2F: Hardware Device
Username + Password + ...
Challenge Accepted!
© Black Hills Information Security | @BHInfoSecurity
Additional 2FA Points
• Might get asked for last location
• GeoIP it from IP during capture
• Immediately clear red alert bar
• Clear for one, clear for all
• Multiple failed phone prompts
• Disables phone prompt for few hours
• Automatically switches 2FA option
• May also contain attacker location/device
© Black Hills Information Security | @BHInfoSecurity
Quick CredSniper Intro
• Fetch the profile image
• Google Picasa API
• JavaScript XMLHttpRequest()
• Ask nicely for the password
• Behind the scenes, authenticate
• Is 2FA present?
• No? Redirect them to GDoc agenda
• Doh! 2FA is enabled
• Which type? Extract information
• Ask for 2FA Token nicely
• Login w/ Username + Password + Token
© Black Hills Information Security | @BHInfoSecurity
CredSniper for teh win
Real
Or
Fake?
© Black Hills Information Security | @BHInfoSecurity
CredSniper for teh win
Real
Or
Fake?
FakeReal
© Black Hills Information Security | @BHInfoSecurity
Persistence:
Hide in Plain Sight
© Black Hills Information Security | @BHInfoSecurity
Generate App Password
• Backdoor password for account
• Under ‘My Account’
• Click ‘Sign-in & Security’
• Select ‘App-Passwords’
• Combine w/ 2FA backdoor
• Login as normal after triage!
© Black Hills Information Security | @BHInfoSecurity
Backup Codes
• Download alternative 2FA tokens
• Rarely get re-generated after breach
• Most don’t know they even exist
• Great combined w/ app passwords!
© Black Hills Information Security | @BHInfoSecurity
Enroll New 2FA Device
• Tie 2FA to your own device
• Generate legit 2FA tokens
• Commonly gets inspected after breach
• Nice when undetected though...
© Black Hills Information Security | @BHInfoSecurity
Authorized API Backdoor
• Sign-up a new project on cloud.google.com
• Enable API access
• When creating API client, add full scopes
• Sign-in to victim account and authorize backdoor app!
SCOPES = '
https://www.googleapis.com/auth/calendar
https://mail.google.com/
https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/groups
https://www.googleapis.com/auth/admin.directory.user
'
© Black Hills Information Security | @BHInfoSecurity
Backdoor Android App
• Don’t Publish app in Play Store
• Login to victim account
• Browse to app in Play Store
• Install to victims mobile device
• Pop a shell!
• Pilfer, persist and pivot..
© Black Hills Information Security | @BHInfoSecurity
Demo:
Malicious Android App
© Black Hills Information Security | @BHInfoSecurity
Re-configure Account
• Add email rules to delete alerts
• no-reply@accounts.google.com
• Add recovery email/phone
• Create email forwarder
• Monitor for global SOC emails :)
• Add calendar events for others
• Delegate account to another victim
• Locked out? Recover account!
© Black Hills Information Security | @BHInfoSecurity
Internal:
Collateral Damage
© Black Hills Information Security | @BHInfoSecurity
Target Company Directory
• Create contacts group from directory
• Export all the contacts
• Tailor your target list..
• More technical, more access!
• Create a LinkedIn doppelganger
• Side note.. file transfers
don’t have [EXTERNAL] tags like email
© Black Hills Information Security | @BHInfoSecurity
Search Gdrive/Gmail
• Search for files with ‘password’
• Download a zip of them all!
• Any VPN documentation?
• What 3rd party sites do they use?
• Files with ‘confidential’ in the title
• Credit card keywords...
• AWS access_key/secret_access_key
• MailSniper supported!
© Black Hills Information Security | @BHInfoSecurity
Find Google Groups
• Go to groups.google.com
• Groups might not be listed
• You can still can search!
• Look for keywords:
• access_key
• password
• root
• ...etc
• Devs LOVE groups for cron
© Black Hills Information Security | @BHInfoSecurity
Eat the whole elephant
• https://takeout.google.com
• Export all Google data from an
account
• Includes:
• All G-Drive files, full search history,
Hangouts message data, all emails,
all calendar events, Voice history,
etc…
© Black Hills Information Security | @BHInfoSecurity
Pop Google Admin
• Manage All Users
• Manage All Domains
• Manage All Files
• Manage All SSO/Auth
• Manage All Devices
Game Over!
© Black Hills Information Security | @BHInfoSecurity
Defending:
Triage the Breach
© Black Hills Information Security | @BHInfoSecurity
Reset Accounts
• Log out of all sessions
• Change user password
• Generate new backup codes
• Capture IoC for threat hunting
• … anything else?
© Black Hills Information Security | @BHInfoSecurity
Look for Backdoors
• Remove app passwords
• Remove 2FA devices
• Remove authorized apps
• Remove email forwarders
• Remove email filters
• Remove bad recovery email/phone
• Remove bad Android apps
• Remove bad account delegations
© Black Hills Information Security | @BHInfoSecurity
Find Victims & Monitor
• Get familiar with Google Admin console
• https://github.com/jay0lee/GAM
• Search by IP address
• Don’t just change passwords
• Remove backdoors
• Look for rogue email forwards
• Generate a timeline
• Communicate better!
© Black Hills Information Security | @BHInfoSecurity
Finishing Up:
Questions for You
© Black Hills Information Security | @BHInfoSecurity
Question to GSuite Users
Does your BYOD policy give you the ability to test/audit security for
corporate email and files on personal devices? What about corporate
phones? Should it?
Are employees just trained on phishing/SE ‘red flags’ or are they taught
good user-behavior patterns?
How strong is your password policy or are you just trusting in Google?
© Black Hills Information Security | @BHInfoSecurity
Question to Google
• GSuite customers need a process that allows us to submit approval
requests for pentests engagements. Testing our configurations, users,
devices and data is important to us. Help us keep our engagements
transparent to you, above board, and without getting suspended for
alleged TOS violations.
Can you implement an engagement approval process?
© Black Hills Information Security | @BHInfoSecurity
Questions?
• Twitter
• Mike - @ustayready
• Beau - @dafthack
• BHIS - @BHInfoSecurity
• Black Hills Information Security
• http://www.blackhillsinfosec.com/
• MailSniper
• https://github.com/dafthack/MailSniper
• CredSniper
• https://github.com/ustayready/CredSniper
• CredKing
• https://github.com/ustayready/CredKing

More Related Content

What's hot

WAF Bypass Techniques - Using HTTP Standard and Web Servers’ Behaviour
WAF Bypass Techniques - Using HTTP Standard and Web Servers’ BehaviourWAF Bypass Techniques - Using HTTP Standard and Web Servers’ Behaviour
WAF Bypass Techniques - Using HTTP Standard and Web Servers’ Behaviour
Soroush Dalili
 
Red Team Methodology - A Naked Look
Red Team Methodology - A Naked LookRed Team Methodology - A Naked Look
Red Team Methodology - A Naked Look
Jason Lang
 
Building Better Backdoors with WMI - DerbyCon 2017
Building Better Backdoors with WMI - DerbyCon 2017Building Better Backdoors with WMI - DerbyCon 2017
Building Better Backdoors with WMI - DerbyCon 2017
Alexander Polce Leary
 
Advanced phishing for red team assessments
Advanced phishing for red team assessmentsAdvanced phishing for red team assessments
Advanced phishing for red team assessments
JEBARAJM
 
Same Origin Method Execution (BlackHat EU2014)
Same Origin Method Execution (BlackHat EU2014)Same Origin Method Execution (BlackHat EU2014)
Same Origin Method Execution (BlackHat EU2014)
Ben Hayak
 
A Hacker's perspective on AEM applications security
A Hacker's perspective on AEM applications securityA Hacker's perspective on AEM applications security
A Hacker's perspective on AEM applications security
Mikhail Egorov
 
Secure coding practices
Secure coding practicesSecure coding practices
Secure coding practices
Mohammed Danish Amber
 
DNS hijacking using cloud providers – No verification needed
DNS hijacking using cloud providers – No verification neededDNS hijacking using cloud providers – No verification needed
DNS hijacking using cloud providers – No verification needed
Frans Rosén
 
0wn-premises: Bypassing Microsoft Defender for Identity
0wn-premises: Bypassing Microsoft Defender for Identity0wn-premises: Bypassing Microsoft Defender for Identity
0wn-premises: Bypassing Microsoft Defender for Identity
Nikhil Mittal
 
Secure Coding - Web Application Security Vulnerabilities and Best Practices
Secure Coding - Web Application Security Vulnerabilities and Best PracticesSecure Coding - Web Application Security Vulnerabilities and Best Practices
Secure Coding - Web Application Security Vulnerabilities and Best PracticesWebsecurify
 
Hunting for security bugs in AEM webapps
Hunting for security bugs in AEM webappsHunting for security bugs in AEM webapps
Hunting for security bugs in AEM webapps
Mikhail Egorov
 
Pwning the Enterprise With PowerShell
Pwning the Enterprise With PowerShellPwning the Enterprise With PowerShell
Pwning the Enterprise With PowerShell
Beau Bullock
 
Kubernetes 101 for_penetration_testers_-_null_mumbai
Kubernetes 101 for_penetration_testers_-_null_mumbaiKubernetes 101 for_penetration_testers_-_null_mumbai
Kubernetes 101 for_penetration_testers_-_null_mumbai
n|u - The Open Security Community
 
Process injection - Malware style
Process injection - Malware styleProcess injection - Malware style
Process injection - Malware style
Sander Demeester
 
Vm escape: case study virtualbox bug hunting and exploitation - Muhammad Alif...
Vm escape: case study virtualbox bug hunting and exploitation - Muhammad Alif...Vm escape: case study virtualbox bug hunting and exploitation - Muhammad Alif...
Vm escape: case study virtualbox bug hunting and exploitation - Muhammad Alif...
idsecconf
 
Offzone | Another waf bypass
Offzone | Another waf bypassOffzone | Another waf bypass
Offzone | Another waf bypass
Дмитрий Бумов
 
Pwning mobile apps without root or jailbreak
Pwning mobile apps without root or jailbreakPwning mobile apps without root or jailbreak
Pwning mobile apps without root or jailbreak
Abraham Aranguren
 
The Secret Life of a Bug Bounty Hunter – Frans Rosén @ Security Fest 2016
The Secret Life of a Bug Bounty Hunter – Frans Rosén @ Security Fest 2016The Secret Life of a Bug Bounty Hunter – Frans Rosén @ Security Fest 2016
The Secret Life of a Bug Bounty Hunter – Frans Rosén @ Security Fest 2016
Frans Rosén
 
API Security Fundamentals
API Security FundamentalsAPI Security Fundamentals
API Security Fundamentals
José Haro Peralta
 
Securing AEM webapps by hacking them
Securing AEM webapps by hacking themSecuring AEM webapps by hacking them
Securing AEM webapps by hacking them
Mikhail Egorov
 

What's hot (20)

WAF Bypass Techniques - Using HTTP Standard and Web Servers’ Behaviour
WAF Bypass Techniques - Using HTTP Standard and Web Servers’ BehaviourWAF Bypass Techniques - Using HTTP Standard and Web Servers’ Behaviour
WAF Bypass Techniques - Using HTTP Standard and Web Servers’ Behaviour
 
Red Team Methodology - A Naked Look
Red Team Methodology - A Naked LookRed Team Methodology - A Naked Look
Red Team Methodology - A Naked Look
 
Building Better Backdoors with WMI - DerbyCon 2017
Building Better Backdoors with WMI - DerbyCon 2017Building Better Backdoors with WMI - DerbyCon 2017
Building Better Backdoors with WMI - DerbyCon 2017
 
Advanced phishing for red team assessments
Advanced phishing for red team assessmentsAdvanced phishing for red team assessments
Advanced phishing for red team assessments
 
Same Origin Method Execution (BlackHat EU2014)
Same Origin Method Execution (BlackHat EU2014)Same Origin Method Execution (BlackHat EU2014)
Same Origin Method Execution (BlackHat EU2014)
 
A Hacker's perspective on AEM applications security
A Hacker's perspective on AEM applications securityA Hacker's perspective on AEM applications security
A Hacker's perspective on AEM applications security
 
Secure coding practices
Secure coding practicesSecure coding practices
Secure coding practices
 
DNS hijacking using cloud providers – No verification needed
DNS hijacking using cloud providers – No verification neededDNS hijacking using cloud providers – No verification needed
DNS hijacking using cloud providers – No verification needed
 
0wn-premises: Bypassing Microsoft Defender for Identity
0wn-premises: Bypassing Microsoft Defender for Identity0wn-premises: Bypassing Microsoft Defender for Identity
0wn-premises: Bypassing Microsoft Defender for Identity
 
Secure Coding - Web Application Security Vulnerabilities and Best Practices
Secure Coding - Web Application Security Vulnerabilities and Best PracticesSecure Coding - Web Application Security Vulnerabilities and Best Practices
Secure Coding - Web Application Security Vulnerabilities and Best Practices
 
Hunting for security bugs in AEM webapps
Hunting for security bugs in AEM webappsHunting for security bugs in AEM webapps
Hunting for security bugs in AEM webapps
 
Pwning the Enterprise With PowerShell
Pwning the Enterprise With PowerShellPwning the Enterprise With PowerShell
Pwning the Enterprise With PowerShell
 
Kubernetes 101 for_penetration_testers_-_null_mumbai
Kubernetes 101 for_penetration_testers_-_null_mumbaiKubernetes 101 for_penetration_testers_-_null_mumbai
Kubernetes 101 for_penetration_testers_-_null_mumbai
 
Process injection - Malware style
Process injection - Malware styleProcess injection - Malware style
Process injection - Malware style
 
Vm escape: case study virtualbox bug hunting and exploitation - Muhammad Alif...
Vm escape: case study virtualbox bug hunting and exploitation - Muhammad Alif...Vm escape: case study virtualbox bug hunting and exploitation - Muhammad Alif...
Vm escape: case study virtualbox bug hunting and exploitation - Muhammad Alif...
 
Offzone | Another waf bypass
Offzone | Another waf bypassOffzone | Another waf bypass
Offzone | Another waf bypass
 
Pwning mobile apps without root or jailbreak
Pwning mobile apps without root or jailbreakPwning mobile apps without root or jailbreak
Pwning mobile apps without root or jailbreak
 
The Secret Life of a Bug Bounty Hunter – Frans Rosén @ Security Fest 2016
The Secret Life of a Bug Bounty Hunter – Frans Rosén @ Security Fest 2016The Secret Life of a Bug Bounty Hunter – Frans Rosén @ Security Fest 2016
The Secret Life of a Bug Bounty Hunter – Frans Rosén @ Security Fest 2016
 
API Security Fundamentals
API Security FundamentalsAPI Security Fundamentals
API Security Fundamentals
 
Securing AEM webapps by hacking them
Securing AEM webapps by hacking themSecuring AEM webapps by hacking them
Securing AEM webapps by hacking them
 

Similar to OK Google, How Do I Red Team GSuite?

Red Team Apocalypse (RVAsec Edition)
Red Team Apocalypse (RVAsec Edition)Red Team Apocalypse (RVAsec Edition)
Red Team Apocalypse (RVAsec Edition)
Beau Bullock
 
Weaponizing Corporate Intel: This Time, It's Personal!
Weaponizing Corporate Intel: This Time, It's Personal!Weaponizing Corporate Intel: This Time, It's Personal!
Weaponizing Corporate Intel: This Time, It's Personal!
Beau Bullock
 
A Google Event You Won't Forget
A Google Event You Won't ForgetA Google Event You Won't Forget
A Google Event You Won't Forget
Beau Bullock
 
Red Team Apocalypse
Red Team ApocalypseRed Team Apocalypse
Red Team Apocalypse
Beau Bullock
 
Covert Attack Mystery Box: A few novel techniques for exploiting Microsoft “f...
Covert Attack Mystery Box: A few novel techniques for exploiting Microsoft “f...Covert Attack Mystery Box: A few novel techniques for exploiting Microsoft “f...
Covert Attack Mystery Box: A few novel techniques for exploiting Microsoft “f...
Beau Bullock
 
Getting Started in Pentesting the Cloud: Azure
Getting Started in Pentesting the Cloud: AzureGetting Started in Pentesting the Cloud: Azure
Getting Started in Pentesting the Cloud: Azure
Beau Bullock
 
Android attacks
Android attacksAndroid attacks
Android attacks
Blueinfy Solutions
 
Mobile code mining for discovery and exploits nullcongoa2013
Mobile code mining for discovery and exploits nullcongoa2013Mobile code mining for discovery and exploits nullcongoa2013
Mobile code mining for discovery and exploits nullcongoa2013
Blueinfy Solutions
 
Lessons Learned from the Top Four Cyber Security Breaches & How Your Company ...
Lessons Learned from the Top Four Cyber Security Breaches & How Your Company ...Lessons Learned from the Top Four Cyber Security Breaches & How Your Company ...
Lessons Learned from the Top Four Cyber Security Breaches & How Your Company ...
BizLibrary
 
Google Case Sudy: Becoming Unphishable: Towards Simpler, Stronger Authenticaton
Google Case Sudy: Becoming Unphishable: Towards Simpler, Stronger AuthenticatonGoogle Case Sudy: Becoming Unphishable: Towards Simpler, Stronger Authenticaton
Google Case Sudy: Becoming Unphishable: Towards Simpler, Stronger Authenticaton
FIDO Alliance
 
What Does a Full Featured Security Strategy Look Like?
What Does a Full Featured Security Strategy Look Like?What Does a Full Featured Security Strategy Look Like?
What Does a Full Featured Security Strategy Look Like?
Precisely
 
Seven Simple Steps to Online Security
Seven Simple Steps to Online SecuritySeven Simple Steps to Online Security
Seven Simple Steps to Online Security
Conn Ó Muíneacháin
 
Harbin clinic iot-mobile-no-vid
Harbin clinic iot-mobile-no-vidHarbin clinic iot-mobile-no-vid
Harbin clinic iot-mobile-no-vid
Ernest Staats
 
Android secure coding
Android secure codingAndroid secure coding
Android secure coding
Blueinfy Solutions
 
How to manage your client's data responsibly
How to manage your client's data responsiblyHow to manage your client's data responsibly
How to manage your client's data responsibly
Gabor Szathmari
 
iOS Application Security Testing
iOS Application Security TestingiOS Application Security Testing
iOS Application Security Testing
Blueinfy Solutions
 
Security and Privacy Brown Bag
Security and Privacy Brown BagSecurity and Privacy Brown Bag
Security and Privacy Brown Bag501 Commons
 
The Shifting Landscape of PoS MalwareOutput
The Shifting Landscape of PoS MalwareOutputThe Shifting Landscape of PoS MalwareOutput
The Shifting Landscape of PoS MalwareOutput
Silas Cutler
 
Google Case Study: Becoming Unphishable
Google Case Study: Becoming UnphishableGoogle Case Study: Becoming Unphishable
Google Case Study: Becoming Unphishable
FIDO Alliance
 
Webinar - Compliance with the Microsoft Cloud- 2017-04-19
Webinar - Compliance with the Microsoft Cloud- 2017-04-19Webinar - Compliance with the Microsoft Cloud- 2017-04-19
Webinar - Compliance with the Microsoft Cloud- 2017-04-19
TechSoup
 

Similar to OK Google, How Do I Red Team GSuite? (20)

Red Team Apocalypse (RVAsec Edition)
Red Team Apocalypse (RVAsec Edition)Red Team Apocalypse (RVAsec Edition)
Red Team Apocalypse (RVAsec Edition)
 
Weaponizing Corporate Intel: This Time, It's Personal!
Weaponizing Corporate Intel: This Time, It's Personal!Weaponizing Corporate Intel: This Time, It's Personal!
Weaponizing Corporate Intel: This Time, It's Personal!
 
A Google Event You Won't Forget
A Google Event You Won't ForgetA Google Event You Won't Forget
A Google Event You Won't Forget
 
Red Team Apocalypse
Red Team ApocalypseRed Team Apocalypse
Red Team Apocalypse
 
Covert Attack Mystery Box: A few novel techniques for exploiting Microsoft “f...
Covert Attack Mystery Box: A few novel techniques for exploiting Microsoft “f...Covert Attack Mystery Box: A few novel techniques for exploiting Microsoft “f...
Covert Attack Mystery Box: A few novel techniques for exploiting Microsoft “f...
 
Getting Started in Pentesting the Cloud: Azure
Getting Started in Pentesting the Cloud: AzureGetting Started in Pentesting the Cloud: Azure
Getting Started in Pentesting the Cloud: Azure
 
Android attacks
Android attacksAndroid attacks
Android attacks
 
Mobile code mining for discovery and exploits nullcongoa2013
Mobile code mining for discovery and exploits nullcongoa2013Mobile code mining for discovery and exploits nullcongoa2013
Mobile code mining for discovery and exploits nullcongoa2013
 
Lessons Learned from the Top Four Cyber Security Breaches & How Your Company ...
Lessons Learned from the Top Four Cyber Security Breaches & How Your Company ...Lessons Learned from the Top Four Cyber Security Breaches & How Your Company ...
Lessons Learned from the Top Four Cyber Security Breaches & How Your Company ...
 
Google Case Sudy: Becoming Unphishable: Towards Simpler, Stronger Authenticaton
Google Case Sudy: Becoming Unphishable: Towards Simpler, Stronger AuthenticatonGoogle Case Sudy: Becoming Unphishable: Towards Simpler, Stronger Authenticaton
Google Case Sudy: Becoming Unphishable: Towards Simpler, Stronger Authenticaton
 
What Does a Full Featured Security Strategy Look Like?
What Does a Full Featured Security Strategy Look Like?What Does a Full Featured Security Strategy Look Like?
What Does a Full Featured Security Strategy Look Like?
 
Seven Simple Steps to Online Security
Seven Simple Steps to Online SecuritySeven Simple Steps to Online Security
Seven Simple Steps to Online Security
 
Harbin clinic iot-mobile-no-vid
Harbin clinic iot-mobile-no-vidHarbin clinic iot-mobile-no-vid
Harbin clinic iot-mobile-no-vid
 
Android secure coding
Android secure codingAndroid secure coding
Android secure coding
 
How to manage your client's data responsibly
How to manage your client's data responsiblyHow to manage your client's data responsibly
How to manage your client's data responsibly
 
iOS Application Security Testing
iOS Application Security TestingiOS Application Security Testing
iOS Application Security Testing
 
Security and Privacy Brown Bag
Security and Privacy Brown BagSecurity and Privacy Brown Bag
Security and Privacy Brown Bag
 
The Shifting Landscape of PoS MalwareOutput
The Shifting Landscape of PoS MalwareOutputThe Shifting Landscape of PoS MalwareOutput
The Shifting Landscape of PoS MalwareOutput
 
Google Case Study: Becoming Unphishable
Google Case Study: Becoming UnphishableGoogle Case Study: Becoming Unphishable
Google Case Study: Becoming Unphishable
 
Webinar - Compliance with the Microsoft Cloud- 2017-04-19
Webinar - Compliance with the Microsoft Cloud- 2017-04-19Webinar - Compliance with the Microsoft Cloud- 2017-04-19
Webinar - Compliance with the Microsoft Cloud- 2017-04-19
 

More from Beau Bullock

Getting Started in Blockchain Security and Smart Contract Auditing
Getting Started in Blockchain Security and Smart Contract AuditingGetting Started in Blockchain Security and Smart Contract Auditing
Getting Started in Blockchain Security and Smart Contract Auditing
Beau Bullock
 
Travelocalypse: It's Dangerous Business, Hacker, Going Out Your Front Door
Travelocalypse: It's Dangerous Business, Hacker, Going Out Your Front DoorTravelocalypse: It's Dangerous Business, Hacker, Going Out Your Front Door
Travelocalypse: It's Dangerous Business, Hacker, Going Out Your Front Door
Beau Bullock
 
Red Team Apocalypse - BSides Peru (En español)
Red Team Apocalypse - BSides Peru (En español)Red Team Apocalypse - BSides Peru (En español)
Red Team Apocalypse - BSides Peru (En español)
Beau Bullock
 
A Look Into Emerging Security Issues Within Cryptocurrency Ecosystems
A Look Into Emerging Security Issues Within Cryptocurrency EcosystemsA Look Into Emerging Security Issues Within Cryptocurrency Ecosystems
A Look Into Emerging Security Issues Within Cryptocurrency Ecosystems
Beau Bullock
 
How to Build Your Own Physical Pentesting Go-bag
How to Build Your Own Physical Pentesting Go-bagHow to Build Your Own Physical Pentesting Go-bag
How to Build Your Own Physical Pentesting Go-bag
Beau Bullock
 
Pentest Apocalypse - SANSFIRE 2016 Edition
Pentest Apocalypse - SANSFIRE 2016 EditionPentest Apocalypse - SANSFIRE 2016 Edition
Pentest Apocalypse - SANSFIRE 2016 Edition
Beau Bullock
 
Fade from Whitehat... to Black
Fade from Whitehat... to BlackFade from Whitehat... to Black
Fade from Whitehat... to Black
Beau Bullock
 
Beyond the Pentest: How C2, Internal Pivoting, and Data Exfiltration Show Tru...
Beyond the Pentest: How C2, Internal Pivoting, and Data Exfiltration Show Tru...Beyond the Pentest: How C2, Internal Pivoting, and Data Exfiltration Show Tru...
Beyond the Pentest: How C2, Internal Pivoting, and Data Exfiltration Show Tru...
Beau Bullock
 
Pentest Apocalypse
Pentest ApocalypsePentest Apocalypse
Pentest Apocalypse
Beau Bullock
 

More from Beau Bullock (9)

Getting Started in Blockchain Security and Smart Contract Auditing
Getting Started in Blockchain Security and Smart Contract AuditingGetting Started in Blockchain Security and Smart Contract Auditing
Getting Started in Blockchain Security and Smart Contract Auditing
 
Travelocalypse: It's Dangerous Business, Hacker, Going Out Your Front Door
Travelocalypse: It's Dangerous Business, Hacker, Going Out Your Front DoorTravelocalypse: It's Dangerous Business, Hacker, Going Out Your Front Door
Travelocalypse: It's Dangerous Business, Hacker, Going Out Your Front Door
 
Red Team Apocalypse - BSides Peru (En español)
Red Team Apocalypse - BSides Peru (En español)Red Team Apocalypse - BSides Peru (En español)
Red Team Apocalypse - BSides Peru (En español)
 
A Look Into Emerging Security Issues Within Cryptocurrency Ecosystems
A Look Into Emerging Security Issues Within Cryptocurrency EcosystemsA Look Into Emerging Security Issues Within Cryptocurrency Ecosystems
A Look Into Emerging Security Issues Within Cryptocurrency Ecosystems
 
How to Build Your Own Physical Pentesting Go-bag
How to Build Your Own Physical Pentesting Go-bagHow to Build Your Own Physical Pentesting Go-bag
How to Build Your Own Physical Pentesting Go-bag
 
Pentest Apocalypse - SANSFIRE 2016 Edition
Pentest Apocalypse - SANSFIRE 2016 EditionPentest Apocalypse - SANSFIRE 2016 Edition
Pentest Apocalypse - SANSFIRE 2016 Edition
 
Fade from Whitehat... to Black
Fade from Whitehat... to BlackFade from Whitehat... to Black
Fade from Whitehat... to Black
 
Beyond the Pentest: How C2, Internal Pivoting, and Data Exfiltration Show Tru...
Beyond the Pentest: How C2, Internal Pivoting, and Data Exfiltration Show Tru...Beyond the Pentest: How C2, Internal Pivoting, and Data Exfiltration Show Tru...
Beyond the Pentest: How C2, Internal Pivoting, and Data Exfiltration Show Tru...
 
Pentest Apocalypse
Pentest ApocalypsePentest Apocalypse
Pentest Apocalypse
 

Recently uploaded

Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.
ViralQR
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 

Recently uploaded (20)

Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 

OK Google, How Do I Red Team GSuite?

  • 1. © Black Hills Information Security | @BHInfoSecurity OK Google, How do I Red Team GSuite? Mike Felch & Beau Bullock Attacking Google Suite Customers
  • 2. © Black Hills Information Security | @BHInfoSecurity Who We Are • Mike Felch - @ustayready • Pentest / Red team at BHIS • Involved w/ OWASP Orlando & BSides Orlando • Host of Tradecraft Security Weekly • Host of CoinSec Podcast • Beau Bullock - @dafthack •Pentest / Red team at BHIS • Host of Tradecraft Security Weekly • Host of CoinSec Podcast • Avid OWA enthusiast
  • 3. © Black Hills Information Security | @BHInfoSecurity Disclaimer: We <3 Google We broke up :( It’s complicated... Relationship Status
  • 4. © Black Hills Information Security | @BHInfoSecurity What We’re Covering 1. Preparation: OPSEC or Die Trying 2. External: Crack the Perimeter 3. SE: Exploiting Trust 4. Persistence: Hide in Plain Sight 5. Internal: Collateral Damage 6. Demo: Real-world Attack 7. Defending: Triage the Breach 8. Questions / Comments
  • 5. © Black Hills Information Security | @BHInfoSecurity Preparation: OPSEC or Die Trying
  • 6. © Black Hills Information Security | @BHInfoSecurity Preparation: Bad! :( • Use your normal account for API keys • Login to multiple accounts w/ the same IP • Use the same browser w/ multiple sessions How To Lose a Fight With Google SOC
  • 7. © Black Hills Information Security | @BHInfoSecurity Preparation: Good! :) + +
  • 8. © Black Hills Information Security | @BHInfoSecurity Preparation • Prepaid Smartphone ✔ • Prepaid Credit Card ✔ • VPN Account ✔ • Clean Virtual Machine ✔ • New Google Identity ✔ • New Google API Keys ✔ • Don’t Cross-contaminate ✔
  • 9. © Black Hills Information Security | @BHInfoSecurity External: Crack the Perimeter
  • 10. © Black Hills Information Security | @BHInfoSecurity Don’t move so quick! • Don’t go straight to shell • Phishing w/ malicious docs are old • Why go External -> Internal -> External??? • Decide on an attack path • Strategically target victims Creds are King!
  • 11. © Black Hills Information Security | @BHInfoSecurity Password Spraying • Determine naming convention • Search LinkedIn for users • Generate email lists • Try one password at a time • Spray all the accounts • Rotate IP addresses regularly • Just need one account to start
  • 12. © Black Hills Information Security | @BHInfoSecurity Demo: AWS Lambda Spraying
  • 13. © Black Hills Information Security | @BHInfoSecurity SE: Exploiting Trust
  • 14. © Black Hills Information Security | @BHInfoSecurity Google Group Ruse • Create malicious group • Change your display name • Force add users • Customize a message • Don’t forget URLs...
  • 15. © Black Hills Information Security | @BHInfoSecurity Google Group Ruse
  • 16. © Black Hills Information Security | @BHInfoSecurity Google Hangout Ruse • Remember this? -----------> • This was an invite to chat in Gmail • Apparently this was too much work for some users
  • 17. © Black Hills Information Security | @BHInfoSecurity Google Hangout Ruse • Now the default Google Hangouts settings allow direct chat without warning • Simply knowing the email address is all that’s needed • Pop a message box open to the target spoofing another person • Say hi, send link, capture creds and/or shell
  • 18. © Black Hills Information Security | @BHInfoSecurity Google Hangout Ruse • You can modify your default settings to enforce sending an invitation • But even then, spoofed accounts look good • To require invites: • Hangouts.google.com, click hamburger menu in top left, Settings, “Customize Invite Settings”, switch all to “Can send you an invitation” • There doesn’t appear to be a global option for locking down accounts across an org
  • 19. © Black Hills Information Security | @BHInfoSecurity Enumerate Open Accounts • Accounts not requiring invites can be enumerated easily • Simply start a new chat with them via the Gmail chat menu • If the box that pops up says “Start a conversation with <name>” then an invite is required
  • 20. © Black Hills Information Security | @BHInfoSecurity Google Doc Ruse • What if you could get Google to send a phishing link for you? • Google Docs is perfect for this • Create a Google Doc with clickbait name like “Critical Update Pending” • Add content, then add a comment to the doc with your phishing link • In the comment, type their email address prefixed with a + symbol (i.e. +hacker@gmail.com) then check ‘Assign’ • Google will send the target an email from <random- string>@docs.google.com
  • 21. © Black Hills Information Security | @BHInfoSecurity Google Doc Ruse
  • 22. © Black Hills Information Security | @BHInfoSecurity Google Doc Ruse
  • 23. © Black Hills Information Security | @BHInfoSecurity Google Calendar Ruse • Needs to look legit • Needs to trigger a response • Needs to create urgency • Needs to go undetected • Needs to avoid red flags Don’t email, inject event!
  • 24. © Black Hills Information Security | @BHInfoSecurity Calendar Event Injection • Silently inject events into calendars • Creates urgency via reminders • Include link to phishing page • Mass-exploitation w/o visibility • Litter calendars for the future • Remove traces by erasing the event • Include GoToMeeting • Don’t forget to record the meeting! :) • How did we get here???
  • 25. © Black Hills Information Security | @BHInfoSecurity Calendar Event Injection • Fun w/ the Google API • Mark victims as ‘Accepted’ • Add comments for victims • but.. they never receive an invite • Bypasses setting for not auto-add • Reported 10/9/2017 Google Isn’t Patching!
  • 26. © Black Hills Information Security | @BHInfoSecurity Personalized Phishing
  • 27. © Black Hills Information Security | @BHInfoSecurity Google 2FA Requirements • SMS: Text Message • TOTP: Google Authenticator • Phone Prompt: Touch Phone • U2F: Hardware Device Username + Password + ... Challenge Accepted!
  • 28. © Black Hills Information Security | @BHInfoSecurity Additional 2FA Points • Might get asked for last location • GeoIP it from IP during capture • Immediately clear red alert bar • Clear for one, clear for all • Multiple failed phone prompts • Disables phone prompt for few hours • Automatically switches 2FA option • May also contain attacker location/device
  • 29. © Black Hills Information Security | @BHInfoSecurity Quick CredSniper Intro • Fetch the profile image • Google Picasa API • JavaScript XMLHttpRequest() • Ask nicely for the password • Behind the scenes, authenticate • Is 2FA present? • No? Redirect them to GDoc agenda • Doh! 2FA is enabled • Which type? Extract information • Ask for 2FA Token nicely • Login w/ Username + Password + Token
  • 30. © Black Hills Information Security | @BHInfoSecurity CredSniper for teh win Real Or Fake?
  • 31. © Black Hills Information Security | @BHInfoSecurity CredSniper for teh win Real Or Fake? FakeReal
  • 32. © Black Hills Information Security | @BHInfoSecurity Persistence: Hide in Plain Sight
  • 33. © Black Hills Information Security | @BHInfoSecurity Generate App Password • Backdoor password for account • Under ‘My Account’ • Click ‘Sign-in & Security’ • Select ‘App-Passwords’ • Combine w/ 2FA backdoor • Login as normal after triage!
  • 34. © Black Hills Information Security | @BHInfoSecurity Backup Codes • Download alternative 2FA tokens • Rarely get re-generated after breach • Most don’t know they even exist • Great combined w/ app passwords!
  • 35. © Black Hills Information Security | @BHInfoSecurity Enroll New 2FA Device • Tie 2FA to your own device • Generate legit 2FA tokens • Commonly gets inspected after breach • Nice when undetected though...
  • 36. © Black Hills Information Security | @BHInfoSecurity Authorized API Backdoor • Sign-up a new project on cloud.google.com • Enable API access • When creating API client, add full scopes • Sign-in to victim account and authorize backdoor app! SCOPES = ' https://www.googleapis.com/auth/calendar https://mail.google.com/ https://www.googleapis.com/auth/drive https://www.googleapis.com/auth/groups https://www.googleapis.com/auth/admin.directory.user '
  • 37. © Black Hills Information Security | @BHInfoSecurity Backdoor Android App • Don’t Publish app in Play Store • Login to victim account • Browse to app in Play Store • Install to victims mobile device • Pop a shell! • Pilfer, persist and pivot..
  • 38. © Black Hills Information Security | @BHInfoSecurity Demo: Malicious Android App
  • 39. © Black Hills Information Security | @BHInfoSecurity Re-configure Account • Add email rules to delete alerts • no-reply@accounts.google.com • Add recovery email/phone • Create email forwarder • Monitor for global SOC emails :) • Add calendar events for others • Delegate account to another victim • Locked out? Recover account!
  • 40. © Black Hills Information Security | @BHInfoSecurity Internal: Collateral Damage
  • 41. © Black Hills Information Security | @BHInfoSecurity Target Company Directory • Create contacts group from directory • Export all the contacts • Tailor your target list.. • More technical, more access! • Create a LinkedIn doppelganger • Side note.. file transfers don’t have [EXTERNAL] tags like email
  • 42. © Black Hills Information Security | @BHInfoSecurity Search Gdrive/Gmail • Search for files with ‘password’ • Download a zip of them all! • Any VPN documentation? • What 3rd party sites do they use? • Files with ‘confidential’ in the title • Credit card keywords... • AWS access_key/secret_access_key • MailSniper supported!
  • 43. © Black Hills Information Security | @BHInfoSecurity Find Google Groups • Go to groups.google.com • Groups might not be listed • You can still can search! • Look for keywords: • access_key • password • root • ...etc • Devs LOVE groups for cron
  • 44. © Black Hills Information Security | @BHInfoSecurity Eat the whole elephant • https://takeout.google.com • Export all Google data from an account • Includes: • All G-Drive files, full search history, Hangouts message data, all emails, all calendar events, Voice history, etc…
  • 45. © Black Hills Information Security | @BHInfoSecurity Pop Google Admin • Manage All Users • Manage All Domains • Manage All Files • Manage All SSO/Auth • Manage All Devices Game Over!
  • 46. © Black Hills Information Security | @BHInfoSecurity Defending: Triage the Breach
  • 47. © Black Hills Information Security | @BHInfoSecurity Reset Accounts • Log out of all sessions • Change user password • Generate new backup codes • Capture IoC for threat hunting • … anything else?
  • 48. © Black Hills Information Security | @BHInfoSecurity Look for Backdoors • Remove app passwords • Remove 2FA devices • Remove authorized apps • Remove email forwarders • Remove email filters • Remove bad recovery email/phone • Remove bad Android apps • Remove bad account delegations
  • 49. © Black Hills Information Security | @BHInfoSecurity Find Victims & Monitor • Get familiar with Google Admin console • https://github.com/jay0lee/GAM • Search by IP address • Don’t just change passwords • Remove backdoors • Look for rogue email forwards • Generate a timeline • Communicate better!
  • 50. © Black Hills Information Security | @BHInfoSecurity Finishing Up: Questions for You
  • 51. © Black Hills Information Security | @BHInfoSecurity Question to GSuite Users Does your BYOD policy give you the ability to test/audit security for corporate email and files on personal devices? What about corporate phones? Should it? Are employees just trained on phishing/SE ‘red flags’ or are they taught good user-behavior patterns? How strong is your password policy or are you just trusting in Google?
  • 52. © Black Hills Information Security | @BHInfoSecurity Question to Google • GSuite customers need a process that allows us to submit approval requests for pentests engagements. Testing our configurations, users, devices and data is important to us. Help us keep our engagements transparent to you, above board, and without getting suspended for alleged TOS violations. Can you implement an engagement approval process?
  • 53. © Black Hills Information Security | @BHInfoSecurity Questions? • Twitter • Mike - @ustayready • Beau - @dafthack • BHIS - @BHInfoSecurity • Black Hills Information Security • http://www.blackhillsinfosec.com/ • MailSniper • https://github.com/dafthack/MailSniper • CredSniper • https://github.com/ustayready/CredSniper • CredKing • https://github.com/ustayready/CredKing