SlideShare a Scribd company logo
0-day up your sleeve
AT TA C K I N G M A C O S E N V I R O N M E N T S
Whoami?
Wojciech Reguła
Head of Mobile Security at
• Focused on iOS/macOS #appsec
• Blogger – h8ps:/
/wojciechregula.blog
• iOS Security Suite Creator
• macOS environments security
Agenda
1. Introduction
2. Macs in corporate environments
3. Setting up a C2 with Mythic
4. Initial access
5. Persistence
6. Data collection & Lateral movement
7. Hardening macOS environments
8. Conclusion
🙋‍ Raise your hand if:
There is at least one Mac
in your company
🙋‍ Raise your hand if:
This Mac has access to your
company’s resources like other
Windows machines
Why did I decide to make this talk?
1. Macs are geHng more common in corporate environments (developers,
UX, designers, managers, etc.)
2. SoNware houses / IT companies have large % of Macs in their
environments
3. Macs are not symmetrically secured comparing them to Windows
machines…
What are the problems?
☠ Old, vulnerable macOS versions everywhere
⚙ MacOS system firewall disabled (default configura<on)
🤔 An<malware? Do Macs have viruses?
👩💻‍‍ Standard users working on admin accounts
🗒 Lack of applica<on whitelis<ng
🖥 In mid-size companies Macs are not even enrolled in MDMs…
Macs in corporate environments
Mac is directly bound to the AD
Macs in corporate environments
Mac has NoMAD installed that handles Kerberos
Macs in corporate environments
Mac uses SSO, there is no AD
ADFS SSO
NON-SSO
Desktop and other TCC-protected directories
Target for this talk
ü Great red teaming framework with macOS support
ü Created by Cody Thomas @its_a_feature_
ü Open source - hMps:/
/github.com/its-a-feature/Mythic
ü Extensive docs - hMps:/
/docs.mythic-c2.net/
h0ps:/
/vimeo.com/751596706
Initial access - problems
1. According to Apple all
the soNware downloaded
directly with your browser
must be notarized
Initial access - problems
2. NotarizaZon will check if the soNware doesn’t contain malicious
components
Initial access - problems
3. If you don’t notarize your
app macOS will block it.
Ini=al access – solu=ons for the problems
1. We can create a legit pkg file,
notarize it and risk our cer<ficate
to be revoked by Apple
Initial access – solutions for the problems
2. We can convince user to right click and open the app. It’s a popular
technique used by malware
Initial access – solutions for the problems
3. We can bypass the GateKeeper using a 0-day
Initial access – solutions for the problems
4. Use Microsoft Office Macro.
Ini=al access with a MicrosoA Word Macro
Ini=al access with a MicrosoA Word Macro
Initial access with a Microsoft Word Macro
• Madhav Bhab shared a cool technique to escape the Word’s sandbox.
However, it requires users to reboot their Macs.
…but we have our own 0-days 😈
Presenting :
macOS sandbox escape vulnerability
h0ps:/
/vimeo.com/751596839
Persistence
Typical macOS persistence techniques:
• Launch Agents
• Launch Daemons
• Login Items
• Cron Jobs
• Login/Logout Hooks
• Authorization Plugins
• … and tons of others -> https://theevilbit.github.io/beyond/
h0ps:/
/vimeo.com/751596910
h0ps:/
/vimeo.com/751597017
Persistence – macOS Ventura update
ADFS SSO
NON-SSO
Desktop and other TCC-protected directories
Target for this talk
Data Collection
We’re interested in:
• VPN credenZals
• AD credenZals (NoMAD)
• Signal messages
• Browser cookies
• Keychain entries
• AWS / other cloud keys
• Desktop/Documents files
Data Collec=on - OpenVPN
Data Collection - OpenVPN
Data Collec=on – OpenVPN
• You can use my universal app Keylogger
• https://gist.github.com/r3ggi/26f38e6439d96474491432621f2237c0
Data Collec=on - OpenVPN
ADFS SSO
NON-SSO
Desktop and other TCC-protected directories
Target for this talk
Data Collection – AD Credentials (NoMAD)
• NoMAD saves your AD credenZals in MacOS Keychain.
• The Keychain has a flaw that allows geHng entries from it without any
prompt / root access / user’s password
• hbps:/
/wojciechregula.blog/post/stealing-macos-apps-keychain-entries/
Data Collection – AD Credentials (NoMAD)
• I open-sourced a NoMADCredenZalsStealer tool as a part of my
#macOSRedTeamingTricks series
• hbps:/
/github.com/r3ggi/NoMADCredenZalsStealer/
ADFS SSO
NON-SSO
Desktop and other TCC-protected directories
Target for this talk
Data Collection –
Signal messages
ADFS SSO
NON-SSO
Desktop and other TCC-protected directories
Target for this talk
Data Collection – Firefox saved passwords
• Firefox stores saved logins & passwords in an encrypted form
• If master password is not set (default configuraZon) the saved
credenZals can be dumped without root
• hbps:/
/github.com/unode/firefox_decrypt
h0ps:/
/vimeo.com/751597088
ADFS SSO
NON-SSO
Desktop and other TCC-protected directories
Target for this talk
Data Collection – flat files and problems with TCC
Transparency, Consent and Control (TCC)
h0ps:/
/vimeo.com/751597122
Data Collec=on – flat files and problems with TCC
• Accessing Desktop/Documents/Microphone and other sensitive
resources will spawn a prompt
• But there are tons of TCC bypasses
• Black Hat Talk: 20+ Ways to Bypass Your macOS Privacy Mechanisms
• We can abuse other apps installed on the device and use their TCC
permissions.
Data Collec=on – flat files and problems with TCC
…we have our own vulnerabilities #2 😈
Presenting :
a TCC bypass
Data Collec=on – flat files and problems with TCC
https://vimeo.com/751597193
Data Collection & Lateral Movement
• Another good news for red teamers – cloud credenZals are stored in ~
• Home directory isn’t TCC-protected!
~/.ssh ~/.aws ~/.azure ~/.config/gcloud
ADFS SSO
NON-SSO
Desktop and other TCC-protected directories
Target for this talk
Hardening macOS environments
At least:
1. Enroll your company’s Macs to MDM (eg. JAMF, Intune)
2. Keep them updated
3. Enforce security policies (SIP, Firewall, GateKeeper, Filevault etc)
4. Disable Office macros (if possible in your organization)
5. Install an anti-malware solution
6. Monitor your Macs
h"ps://www.securing.pl/en/service/infrastructure-security-tes7ng/mac-
environments-tes7ng/
Summing up
Wojciech Reguła
Head of Mobile Security at SecuRing
@_r3ggi wojciech-regula
Thank you!

More Related Content

PPTX
Secure coding guidelines
PPTX
C10k and beyond - Uri Shamay, Akamai
PDF
Kernel security Concepts
PDF
Derbycon 2019 - I simulate therefore i catch: enhancing detection engineering...
PPTX
Process scheduling in Light weight weight and Heavy weight processes.
PPT
Digital signature schemes
PPTX
Metasploit framework in Network Security
Secure coding guidelines
C10k and beyond - Uri Shamay, Akamai
Kernel security Concepts
Derbycon 2019 - I simulate therefore i catch: enhancing detection engineering...
Process scheduling in Light weight weight and Heavy weight processes.
Digital signature schemes
Metasploit framework in Network Security

What's hot (20)

PPTX
Going Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 Edition
PDF
DEFCON Safe Mode - Red Team Village - Emulating Evil Corp and WastedLocker
PDF
ReCertifying Active Directory
PDF
OWASP Top Ten in Practice
PDF
Racing The Web - Hackfest 2016
PPTX
Hash Function
PPT
Open HFT libraries in @Java
PDF
Windows attacks - AT is the new black
PDF
Monitoring at Facebook - Ran Leibman, Facebook - DevOpsDays Tel Aviv 2015
PPTX
Cyber Threat Hunting Workshop
PDF
Random testing
PPTX
Windows Event Analysis - Correlation for Investigation
PPTX
Multi threaded programming
PPTX
OWASP Risk Rating Methodology.pptx
PDF
Windows Incident Response is hard, but doesn't have to be
PDF
EuroBSDcon 2017 System Performance Analysis Methodologies
PPTX
Remote Method Invocation
PPTX
Metasploit framwork
PPT
Cipher techniques
Going Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 Edition
DEFCON Safe Mode - Red Team Village - Emulating Evil Corp and WastedLocker
ReCertifying Active Directory
OWASP Top Ten in Practice
Racing The Web - Hackfest 2016
Hash Function
Open HFT libraries in @Java
Windows attacks - AT is the new black
Monitoring at Facebook - Ran Leibman, Facebook - DevOpsDays Tel Aviv 2015
Cyber Threat Hunting Workshop
Random testing
Windows Event Analysis - Correlation for Investigation
Multi threaded programming
OWASP Risk Rating Methodology.pptx
Windows Incident Response is hard, but doesn't have to be
EuroBSDcon 2017 System Performance Analysis Methodologies
Remote Method Invocation
Metasploit framwork
Cipher techniques
Ad

Similar to 0-Day Up Your Sleeve - Attacking macOS Environments (20)

PDF
Exploiting Directory Permissions on macOS
PDF
macOS Vulnerabilities Hiding in Plain Sight
PDF
Exploring the Labyrinth: Deep dive into the Lazarus Group's foray into macOS
PDF
Csaba fitzl - Mount(ain) of Bugs
PDF
20+ ways to bypass your mac os privacy mechanisms
PDF
20+ Ways to Bypass Your macOS Privacy Mechanisms
PPTX
DevOops Redux Ken Johnson Chris Gates - AppSec USA 2016
PDF
Hacking Exposed: The Mac Attack
PDF
Hacking Exposed: The Mac Attack
PDF
Mitigating Exploits Using Apple's Endpoint Security
PDF
The Final Chapter - Unlimited Ways to Bypass Your macOS Privacy Mechanisms
PPT
Os x security basics for keeping your mac safe final
PDF
Kalnai_Jirkal-vb-2016-malicious-osx-cocktail
PDF
Virus Bulletin 2016: A Malicious OS X Cocktail Served from a Tainted Bottle
ODP
How to protect your mac (mac os)
PDF
Mac security - a pragmatic guide
PDF
DEF CON 27 - workshop - RICHARD GOLD - mind the gap
PDF
20+ Ways To Bypass Your Macos Privacy Mechanisms
PDF
201104 Best Practices For Keeping Your Home Network Secure
PDF
NSA Best Practices Datasheets
Exploiting Directory Permissions on macOS
macOS Vulnerabilities Hiding in Plain Sight
Exploring the Labyrinth: Deep dive into the Lazarus Group's foray into macOS
Csaba fitzl - Mount(ain) of Bugs
20+ ways to bypass your mac os privacy mechanisms
20+ Ways to Bypass Your macOS Privacy Mechanisms
DevOops Redux Ken Johnson Chris Gates - AppSec USA 2016
Hacking Exposed: The Mac Attack
Hacking Exposed: The Mac Attack
Mitigating Exploits Using Apple's Endpoint Security
The Final Chapter - Unlimited Ways to Bypass Your macOS Privacy Mechanisms
Os x security basics for keeping your mac safe final
Kalnai_Jirkal-vb-2016-malicious-osx-cocktail
Virus Bulletin 2016: A Malicious OS X Cocktail Served from a Tainted Bottle
How to protect your mac (mac os)
Mac security - a pragmatic guide
DEF CON 27 - workshop - RICHARD GOLD - mind the gap
20+ Ways To Bypass Your Macos Privacy Mechanisms
201104 Best Practices For Keeping Your Home Network Secure
NSA Best Practices Datasheets
Ad

More from SecuRing (20)

PDF
Developer in a digital crosshair, 2023 edition - 4Developers
PDF
Developer in a digital crosshair, 2022 edition - Oh My H@ck!
PDF
Developer in a digital crosshair, 2022 edition - No cON Name
PPTX
Is persistency on serverless even possible?!
PDF
What happens on your Mac, stays on Apple’s iCloud?!
PDF
Developer in a digital crosshair, 2022 edition
PDF
How secure are webinar platforms?
PDF
Serverless security: attack & defense
PDF
Abusing & Securing XPC in macOS apps
PDF
WebApps vs Blockchain dApps (SmartContracts): tools, vulns and standards
PDF
WebApps vs Blockchain dApps (SmartContracts): tools, vulns and standards
PDF
Let's get evil - threat modeling at scale
PDF
Attacking AWS: the full cyber kill chain
PDF
Web Apps vs Blockchain dApps (Smart Contracts): tools, vulns and standards
PDF
Budowanie i hakowanie nowoczesnych aplikacji iOS
PDF
We need t go deeper - Testing inception apps.
PDF
Building & Hacking Modern iOS Apps
PDF
Artificial Intelligence – a buzzword, new era of IT or new threats?
PDF
Building&Hacking modern iOS apps
PDF
Czy S w PSD2 znaczy Secure?
Developer in a digital crosshair, 2023 edition - 4Developers
Developer in a digital crosshair, 2022 edition - Oh My H@ck!
Developer in a digital crosshair, 2022 edition - No cON Name
Is persistency on serverless even possible?!
What happens on your Mac, stays on Apple’s iCloud?!
Developer in a digital crosshair, 2022 edition
How secure are webinar platforms?
Serverless security: attack & defense
Abusing & Securing XPC in macOS apps
WebApps vs Blockchain dApps (SmartContracts): tools, vulns and standards
WebApps vs Blockchain dApps (SmartContracts): tools, vulns and standards
Let's get evil - threat modeling at scale
Attacking AWS: the full cyber kill chain
Web Apps vs Blockchain dApps (Smart Contracts): tools, vulns and standards
Budowanie i hakowanie nowoczesnych aplikacji iOS
We need t go deeper - Testing inception apps.
Building & Hacking Modern iOS Apps
Artificial Intelligence – a buzzword, new era of IT or new threats?
Building&Hacking modern iOS apps
Czy S w PSD2 znaczy Secure?

Recently uploaded (20)

PPT
Teaching material agriculture food technology
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Approach and Philosophy of On baking technology
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Electronic commerce courselecture one. Pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
Cloud computing and distributed systems.
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Machine learning based COVID-19 study performance prediction
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Teaching material agriculture food technology
MIND Revenue Release Quarter 2 2025 Press Release
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Programs and apps: productivity, graphics, security and other tools
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
20250228 LYD VKU AI Blended-Learning.pptx
Approach and Philosophy of On baking technology
Dropbox Q2 2025 Financial Results & Investor Presentation
Per capita expenditure prediction using model stacking based on satellite ima...
sap open course for s4hana steps from ECC to s4
Electronic commerce courselecture one. Pdf
Understanding_Digital_Forensics_Presentation.pptx
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
The AUB Centre for AI in Media Proposal.docx
Cloud computing and distributed systems.
Building Integrated photovoltaic BIPV_UPV.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Mobile App Security Testing_ A Comprehensive Guide.pdf
Machine learning based COVID-19 study performance prediction
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx

0-Day Up Your Sleeve - Attacking macOS Environments