SlideShare a Scribd company logo

Ready player 2 Multiplayer Red Teaming Against macOS

READY PLAYER 2
MULTIPLAYER RED TEAMING
AGAINST MACOS
BSIDES SEATTLE 2019
CODY THOMAS
• Senior Operator at SpecterOps
• Previously:
• Adversary Emulation Engineer at MITRE
• Mac/Linux ATT&CK
• APT3 Emulation Plan
• Twitter: @its_a_feature_
• GitHub: github.com/its-a-feature/
2
MACOS OPERATIONS
What’s the current landscape?
3
CURRENT MACOS OPERATIONS
Malware seen in the wild:
• WindTail
• Signed macOS application
• FairyTale:
• Signed macOS application
• Calisto
• Unsigned macOS application
• AppleJeus
• Signed macOS application
• EvilEgg and LamePyre
• Utilize EggShell and Empire
Red Teaming FOSS Frameworks:
• Empire
• Python-based agent
• Single User Terminal Application
• RESTful Interface
• EggShell
• Python-based agent
• Single User Terminal Application
• Evil OSX
• Python-based agent
• Some GUI components
4
https://objective-see.com/downloads/MacMalware_2018.pdf
https://github.com/EmpireProject/Empire
https://github.com/neoneggplant/EggShell
https://github.com/Marten4n6/EvilOSX
OPERATIONAL PROBLEMS
● Want to emulate adversaries, but:
○ Current FOSS capabilities don’t match up
○ More easily caught as “Red Team”
○ Signing macOS applications is not easy
● Want to operate in a team, but:
○ Need proper collaboration and sharing
○ Screen sharing isn’t scalable
5
BRIDGING THE GAP
How can we get operations closer to the real
thing?
6
JAVASCRIPT FOR AUTOMATION (JXA)
● Scriptable execution:
○ Most of the lower-level Objective C APIs exposed in a JS way
○ Kind of like if PowerShell stopped at version 1 or 2
● According to Apple:
“In OS X 10.10, JavaScript became a peer to AppleScript in OS X.”
● Still isn’t a signed macOS Application though
○ Hard to emulate as a consultant across multiple customers
● Very limited threading capabilities
7https://developer.apple.com/library/archive/documentation/LanguagesUtilities/Conceptual/MacAutomationScriptingGuide/index.html
● Does osascript normally run?
○ AppleScript has been around since 1993
○ Mainly used by Admins and power users
● How does JXA perform actions?
○ Apple Events for IPC (causes popups in 10.14)
○ Objective C API calls
● Signing?
○ Not a problem – Live off the land
○ osascript is an Apple signed binary
○ Can execute entirely in memory
8
DEFENSIVE CONSIDERATIONS
NOW IT’S TIME TO OP
You’ve been tasked to operate
against macOS, now what?
9
10
INTRODUCING
It’s not a bug, it’s a feature
WHAT IS APFELL?
● Collaborative, post-exploitation framework with a web front-end
● Apfell server runs on MacOS/Linux (needs python3.6+)
● Apfell agents can be any operating system
○ JXA payload for macOS
○ @xorrior already released a Chrome extension payload
○ Payloads can be scripted or dynamically compiled
● Any number of c2 profiles running at a time
11
DEMO TIME!
Let’s operate
12
Demo videos:
● https://youtu.be/9yjNzYtOyHE
● https://youtu.be/FJf9oQkBG0g
● https://youtu.be/_V7PrbDHfY8
● https://youtu.be/Hgn-RUa9feo
● https://youtu.be/4mABpw20KMQ
● https://youtu.be/KypCqWSQGwE
A FRAMEWORK SHOULD BE:
1. Informative
• Track data, environment, operation, OPSEC concerns
• Easy to understand user interface
• Purple in nature - helping both Red and Blue teams
2. Collaborative
• Every operator has their own customized front-end
• Can share detailed information easily and quickly
3. Extensible
• Easily add/share commands, C2 profiles, payloads
• Support multiple operating systems
• You shouldn’t have to re-roll a UI for every new payload
13
INFORMATIVE: FOR RED TEAMERS
● Operators
● Commands
○ OPSEC (Artifacts, Transforms)
● Payload Types
○ Creation, loading modules, execution help
● Operational Data Model
○ Let’s use all the data we collect/generate in operations
● Task-Response grouping
○ not just data-dump console
● Searching tasks and responses across an operation
14
INFORMATIVE: FOR BLUE TEAMERS
● Commands mapped to MITRE ATT&CK
○ Regex matching for more granularity
○ Exports to ATT&CK Navigator
○ Auto populates based on the command
● Host/Network artifact tracking per task
○ Helpful for deconfliction and reporting
○ Auto populated while operating
○ Agents can report updates or new artifacts
○ Soon include exportability of artifacts to Splunk/SIEMs
15
COLLABORATIVE
● Web-based GUI
○ No client dependencies besides a modern browser
○ Each operator has their own profile and login
● Users assigned to operations
○ Multiple operations ongoing concurrently
○ Individual tasks sharable amongst team members
● Operators can comment on tasks
○ Seen by all members in that operation
16
EXTENSIBLE
● You can create/add any number of payload types across all
OSes
○ JXA, Python, C#, Go, etc
○ Can be scripts or compiled
● You can create/add any number of commands for a payload
○ Command templating
● You can create/add/run any number of C2 profiles at a time
○ They run as sub-processes
○ Only bound ports need to be unique
17
18
APFELL
Enough words, let’s see Apfell
PAYLOAD TYPES
• Add / Edit
Payload types
• Can be wrappers
for full payloads
• Macro
• MSBuild
• DyLib
19
COMMANDS
• View Code
• Provide operator
help
• Edit code
• Add/edit/remove
parameters
20
COMMAND TRANSFORMS / ATT&CK /
ARTIFACTS
• Transform
commands
• Provide ATT&CK
Mappings
• Indicate
host/network
artifacts
21
COMMAND AND CONTROL
PROFILES
22
C2 PROFILE PARAMETERS
• Specify parameters that will be stamped into an agent during creation
• “key” value is stamped out with user’s value in agent code
23
PAYLOAD CREATION - UI
• Pick C2 profile, payload type, and initial commands
• Stamp all pieces together
24
PAYLOAD CONFIGURATION
• All payloads
registered in the
database
• See configuration
and comparison to
server state at any
time
25
CALLBACK VIEW
• Familiar table of
callbacks like most
tools
• Detailed task data
grouped by task
(not time)
• Add/track optional
comments per task
26
SHARING SINGULAR TASKS
• Click task number
on almost any page
to view JUST that
one task and its
output
• Easy to share URL
amongst team
members:
/tasks/task#
• Only viewable by
users assigned to
that operation
27
TASK VIEW
• View all tasks at
once across all
callbacks
• Click to expand
and see output
28
SEARCH VIEW
• Search all task
output or task
parameters for key
words/phrases
• Searches across
all callbacks in an
operation
• Faster and more
targeted than just 29
ATT&CK
× Transform
commands
× Provide ATT&CK
Mappings
× Indicate
host/network
artifacts
30
APPLY ATT&CK WITH REGEX
• Match all tasks where the parameters fit regex: .*id
• Check matches and their current ATT&CK mappings
31
BASIC ARTIFACT TRACKING
• Define formats for artifacts based on commands and command
parameters
32
COMMAND TRANSFORMS
• Toggle transforms on/off locally
• Can optionally persist settings
globally for all operators
• Test outputs of each transform:
33
UPLOADING / DOWNLOAD
34
• View all uploads/downloads and file paths across an operation
• Real-time updates for in-progress downloads
SCREEN CAPTURES
35
• View screen
captures by
callback or
across an
entire
operation
COMMAND COMPLETION
36
• Auto populate available
commands based on the
associated payload type for
the callback
• Can use L/R arrow keys to
cycle through choices
COMMAND PARAMETERS
37
• If a command
has registered
parameters and
you don’t type
any on the
command line
• Pop-up dialog
to fill in
parameters
APFELL AGENTS
What does an agent look like?
38
PAYLOAD DESIGN
CONSIDERATIONS
39
● Modular
○ All commands are stand-alone
○ Main payload is just management engine
○ C2 is abstracted away
■ Creates plug-and-play C2 functionality
○ Stamp in commands at creation
■ And load more in later
● Inspiration
○ Malware samples: PlugX, Flame, CozyDuke, etc
PAYLOAD DESIGN
CONSIDERATIONS
40
● OS Agnostic
○ Apfell is a framework for collaborative operations
○ Payloads can be created for any OS – scripted or compiled
● OPSEC aware
○ Ideally agents track their footprint on host and report back
○ Artifact tracking with real-time data in responses
GOING FORWARD
What’s next for Apfell?
41
FUTURE UPDATES – SHORT TERM
● More encryption
○ Currently just HTTPS
● More payload types across multiple operating systems
○ Python, Mach-O, C#, ELF, Go
● More built-in commands
○ Keylogging, Process Injection, Proxy Pivots
42
FUTURE UPDATES – MEDIUM TERM
● More customizable C2 profiles included by default
○ Control GET/POST requests
● More C2 profiles that don’t require external comms
○ SMB, SSH
● More Artifact Tracking / Defensive Guidance
○ Better tracking of operational artifacts
○ Inclusion of defensive measures for commands
43
FUTURE UPDATES – LONG TERM
● Create scriptable Python API for greater control
○ Registerable within the UI – no need for RESTful scripting
● Server speed improvements
○ Automated builds
● More UI Upgrades
○ Attackers think in graphs, not lists
● Community driven updates
○ Please contribute! ☺
44
45
THANKS!Any questions?
• Twitter: @its_a_feature_
• GitHub: github.com/its-a-feature/
• https://its-a-feature.github.io
• Blog series on creating Apfell
• macOS AD discovery (Orchard)
It’s not a bug, it’s a feature
1 of 45

Ready player 2 Multiplayer Red Teaming Against macOS

Download to read offline

BSides Seattle 2019 talk about operating against macOS devices with a new open source tool called Apfell

Recommended

How MITRE ATT&CK helps security operations by
How MITRE ATT&CK helps security operationsHow MITRE ATT&CK helps security operations
How MITRE ATT&CK helps security operationsSergey Soldatov
4.6K views39 slides
Hunting for Privilege Escalation in Windows Environment by
Hunting for Privilege Escalation in Windows EnvironmentHunting for Privilege Escalation in Windows Environment
Hunting for Privilege Escalation in Windows EnvironmentTeymur Kheirkhabarov
12K views99 slides
PowerShell for Cyber Warriors - Bsides Knoxville 2016 by
PowerShell for Cyber Warriors - Bsides Knoxville 2016PowerShell for Cyber Warriors - Bsides Knoxville 2016
PowerShell for Cyber Warriors - Bsides Knoxville 2016Russel Van Tuyl
3.9K views88 slides
Windows Threat Hunting by
Windows Threat HuntingWindows Threat Hunting
Windows Threat HuntingGIBIN JOHN
1.4K views17 slides
ReCertifying Active Directory by
ReCertifying Active DirectoryReCertifying Active Directory
ReCertifying Active DirectoryWill Schroeder
1.8K views37 slides
Hunting for Credentials Dumping in Windows Environment by
Hunting for Credentials Dumping in Windows EnvironmentHunting for Credentials Dumping in Windows Environment
Hunting for Credentials Dumping in Windows EnvironmentTeymur Kheirkhabarov
15.4K views61 slides
Catch Me If You Can: PowerShell Red vs Blue by
Catch Me If You Can: PowerShell Red vs BlueCatch Me If You Can: PowerShell Red vs Blue
Catch Me If You Can: PowerShell Red vs BlueWill Schroeder
7.8K views39 slides
A Threat Hunter Himself by
A Threat Hunter HimselfA Threat Hunter Himself
A Threat Hunter HimselfTeymur Kheirkhabarov
1.2K views31 slides

More Related Content

What's hot

A Threat Hunter Himself by
A Threat Hunter HimselfA Threat Hunter Himself
A Threat Hunter HimselfSergey Soldatov
6.3K views31 slides
PowerShell for Practical Purple Teaming by
PowerShell for Practical Purple TeamingPowerShell for Practical Purple Teaming
PowerShell for Practical Purple TeamingNikhil Mittal
5.3K views46 slides
Purple Team Exercise Framework Workshop #PTEF by
Purple Team Exercise Framework Workshop #PTEFPurple Team Exercise Framework Workshop #PTEF
Purple Team Exercise Framework Workshop #PTEFJorge Orchilles
2.7K views60 slides
Windows Operating System Archaeology by
Windows Operating System ArchaeologyWindows Operating System Archaeology
Windows Operating System Archaeologyenigma0x3
13.8K views47 slides
PHDays 2018 Threat Hunting Hands-On Lab by
PHDays 2018 Threat Hunting Hands-On LabPHDays 2018 Threat Hunting Hands-On Lab
PHDays 2018 Threat Hunting Hands-On LabTeymur Kheirkhabarov
7.7K views116 slides
Threat Hunting by
Threat HuntingThreat Hunting
Threat HuntingSplunk
4.3K views122 slides
Hunting Lateral Movement in Windows Infrastructure by
Hunting Lateral Movement in Windows InfrastructureHunting Lateral Movement in Windows Infrastructure
Hunting Lateral Movement in Windows InfrastructureSergey Soldatov
9.1K views52 slides
Threat Hunting Playbook.pdf by
Threat Hunting Playbook.pdfThreat Hunting Playbook.pdf
Threat Hunting Playbook.pdflaibaarsyila
117 views31 slides
Here Be Dragons: The Unexplored Land of Active Directory ACLs by
Here Be Dragons: The Unexplored Land of Active Directory ACLsHere Be Dragons: The Unexplored Land of Active Directory ACLs
Here Be Dragons: The Unexplored Land of Active Directory ACLsAndy Robbins
6.2K views47 slides
PowerShell for Penetration Testers by
PowerShell for Penetration TestersPowerShell for Penetration Testers
PowerShell for Penetration TestersNikhil Mittal
36.2K views119 slides
Using IOCs to Design and Control Threat Activities During a Red Team Engagement by
Using IOCs to Design and Control Threat Activities During a Red Team EngagementUsing IOCs to Design and Control Threat Activities During a Red Team Engagement
Using IOCs to Design and Control Threat Activities During a Red Team EngagementJoe Vest
1.4K views24 slides
OWASP AppSecCali 2015 - Marshalling Pickles by
OWASP AppSecCali 2015 - Marshalling PicklesOWASP AppSecCali 2015 - Marshalling Pickles
OWASP AppSecCali 2015 - Marshalling PicklesChristopher Frohoff
132.8K views84 slides
Netcat 101 by-mahesh-beema by
Netcat 101 by-mahesh-beemaNetcat 101 by-mahesh-beema
Netcat 101 by-mahesh-beemaRaghunath G
1.1K views11 slides
Windows Privilege Escalation by
Windows Privilege EscalationWindows Privilege Escalation
Windows Privilege EscalationRiyaz Walikar
15.2K views47 slides
Pentest with Metasploit by
Pentest with MetasploitPentest with Metasploit
Pentest with MetasploitM.Syarifudin, ST, OSCP, OSWP
23.7K views36 slides
Introduction to red team operations by
Introduction to red team operationsIntroduction to red team operations
Introduction to red team operationsSunny Neo
1.3K views66 slides
I hunt sys admins 2.0 by
I hunt sys admins 2.0I hunt sys admins 2.0
I hunt sys admins 2.0Will Schroeder
12.4K views51 slides
FIRST CTI Symposium: Turning intelligence into action with MITRE ATT&CK™ by
FIRST CTI Symposium: Turning intelligence into action with MITRE ATT&CK™FIRST CTI Symposium: Turning intelligence into action with MITRE ATT&CK™
FIRST CTI Symposium: Turning intelligence into action with MITRE ATT&CK™Katie Nickels
9K views34 slides
Six Degrees of Domain Admin - BloodHound at DEF CON 24 by
Six Degrees of Domain Admin - BloodHound at DEF CON 24Six Degrees of Domain Admin - BloodHound at DEF CON 24
Six Degrees of Domain Admin - BloodHound at DEF CON 24Andy Robbins
17.1K views32 slides
Privilege escalation from 1 to 0 Workshop by
Privilege escalation from 1 to 0 Workshop Privilege escalation from 1 to 0 Workshop
Privilege escalation from 1 to 0 Workshop Hossam .M Hamed
1.1K views60 slides

What's hot (20)

PowerShell for Practical Purple Teaming by Nikhil Mittal
PowerShell for Practical Purple TeamingPowerShell for Practical Purple Teaming
PowerShell for Practical Purple Teaming
Nikhil Mittal5.3K views
Purple Team Exercise Framework Workshop #PTEF by Jorge Orchilles
Purple Team Exercise Framework Workshop #PTEFPurple Team Exercise Framework Workshop #PTEF
Purple Team Exercise Framework Workshop #PTEF
Jorge Orchilles2.7K views
Windows Operating System Archaeology by enigma0x3
Windows Operating System ArchaeologyWindows Operating System Archaeology
Windows Operating System Archaeology
enigma0x313.8K views
Threat Hunting by Splunk
Threat HuntingThreat Hunting
Threat Hunting
Splunk4.3K views
Hunting Lateral Movement in Windows Infrastructure by Sergey Soldatov
Hunting Lateral Movement in Windows InfrastructureHunting Lateral Movement in Windows Infrastructure
Hunting Lateral Movement in Windows Infrastructure
Sergey Soldatov9.1K views
Threat Hunting Playbook.pdf by laibaarsyila
Threat Hunting Playbook.pdfThreat Hunting Playbook.pdf
Threat Hunting Playbook.pdf
laibaarsyila117 views
Here Be Dragons: The Unexplored Land of Active Directory ACLs by Andy Robbins
Here Be Dragons: The Unexplored Land of Active Directory ACLsHere Be Dragons: The Unexplored Land of Active Directory ACLs
Here Be Dragons: The Unexplored Land of Active Directory ACLs
Andy Robbins6.2K views
PowerShell for Penetration Testers by Nikhil Mittal
PowerShell for Penetration TestersPowerShell for Penetration Testers
PowerShell for Penetration Testers
Nikhil Mittal36.2K views
Using IOCs to Design and Control Threat Activities During a Red Team Engagement by Joe Vest
Using IOCs to Design and Control Threat Activities During a Red Team EngagementUsing IOCs to Design and Control Threat Activities During a Red Team Engagement
Using IOCs to Design and Control Threat Activities During a Red Team Engagement
Joe Vest1.4K views
OWASP AppSecCali 2015 - Marshalling Pickles by Christopher Frohoff
OWASP AppSecCali 2015 - Marshalling PicklesOWASP AppSecCali 2015 - Marshalling Pickles
OWASP AppSecCali 2015 - Marshalling Pickles
Christopher Frohoff132.8K views
Netcat 101 by-mahesh-beema by Raghunath G
Netcat 101 by-mahesh-beemaNetcat 101 by-mahesh-beema
Netcat 101 by-mahesh-beema
Raghunath G1.1K views
Windows Privilege Escalation by Riyaz Walikar
Windows Privilege EscalationWindows Privilege Escalation
Windows Privilege Escalation
Riyaz Walikar15.2K views
Introduction to red team operations by Sunny Neo
Introduction to red team operationsIntroduction to red team operations
Introduction to red team operations
Sunny Neo1.3K views
FIRST CTI Symposium: Turning intelligence into action with MITRE ATT&CK™ by Katie Nickels
FIRST CTI Symposium: Turning intelligence into action with MITRE ATT&CK™FIRST CTI Symposium: Turning intelligence into action with MITRE ATT&CK™
FIRST CTI Symposium: Turning intelligence into action with MITRE ATT&CK™
Katie Nickels9K views
Six Degrees of Domain Admin - BloodHound at DEF CON 24 by Andy Robbins
Six Degrees of Domain Admin - BloodHound at DEF CON 24Six Degrees of Domain Admin - BloodHound at DEF CON 24
Six Degrees of Domain Admin - BloodHound at DEF CON 24
Andy Robbins17.1K views
Privilege escalation from 1 to 0 Workshop by Hossam .M Hamed
Privilege escalation from 1 to 0 Workshop Privilege escalation from 1 to 0 Workshop
Privilege escalation from 1 to 0 Workshop
Hossam .M Hamed1.1K views

Similar to Ready player 2 Multiplayer Red Teaming Against macOS

Free the Functions with Fn project! by
Free the Functions with Fn project!Free the Functions with Fn project!
Free the Functions with Fn project!J On The Beach
161 views49 slides
Kubernetes 101 by
Kubernetes 101Kubernetes 101
Kubernetes 101Stanislav Pogrebnyak
150 views33 slides
Meetup 2020 - Back to the Basics part 101 : IaC by
Meetup 2020 - Back to the Basics part 101 : IaCMeetup 2020 - Back to the Basics part 101 : IaC
Meetup 2020 - Back to the Basics part 101 : IaCDamienCarpy
127 views33 slides
introduction to micro services by
introduction to micro servicesintroduction to micro services
introduction to micro servicesSpyros Lambrinidis
1.1K views32 slides
Apache Airflow in the Cloud: Programmatically orchestrating workloads with Py... by
Apache Airflow in the Cloud: Programmatically orchestrating workloads with Py...Apache Airflow in the Cloud: Programmatically orchestrating workloads with Py...
Apache Airflow in the Cloud: Programmatically orchestrating workloads with Py...Kaxil Naik
2.9K views77 slides
Docker in production service discovery with consul - road to opscon 2015 by
Docker in production  service discovery with consul - road to opscon 2015Docker in production  service discovery with consul - road to opscon 2015
Docker in production service discovery with consul - road to opscon 2015Giovanni Toraldo
2.5K views42 slides
Rhel8 Beta - Halifax RHUG by
Rhel8 Beta - Halifax RHUGRhel8 Beta - Halifax RHUG
Rhel8 Beta - Halifax RHUGNicole Maselli
1.1K views28 slides
OSDC 2018 | Three years running containers with Kubernetes in Production by T... by
OSDC 2018 | Three years running containers with Kubernetes in Production by T...OSDC 2018 | Three years running containers with Kubernetes in Production by T...
OSDC 2018 | Three years running containers with Kubernetes in Production by T...NETWAYS
246 views58 slides
Angular2 - A story from the trenches by
Angular2 - A story from the trenchesAngular2 - A story from the trenches
Angular2 - A story from the trenchesJohannes Rudolph
367 views19 slides
Azure functions: from a function to a whole application in 60 minutes by
Azure functions: from a function to a whole application in 60 minutesAzure functions: from a function to a whole application in 60 minutes
Azure functions: from a function to a whole application in 60 minutesAlessandro Melchiori
121 views19 slides
Electron JS | Build cross-platform desktop applications with web technologies by
Electron JS | Build cross-platform desktop applications with web technologiesElectron JS | Build cross-platform desktop applications with web technologies
Electron JS | Build cross-platform desktop applications with web technologiesBethmi Gunasekara
2.5K views49 slides
AWS ElasticBeanstalk and Docker by
AWS ElasticBeanstalk and Docker AWS ElasticBeanstalk and Docker
AWS ElasticBeanstalk and Docker kloia
675 views24 slides
OpenDataPlane Testing in Travis by
OpenDataPlane Testing in TravisOpenDataPlane Testing in Travis
OpenDataPlane Testing in TravisDmitry Baryshkov
64 views15 slides
LCU14 310- Cisco ODP v2 by
LCU14 310- Cisco ODP v2LCU14 310- Cisco ODP v2
LCU14 310- Cisco ODP v2Linaro
4K views20 slides
What's New in OpenLDAP by
What's New in OpenLDAPWhat's New in OpenLDAP
What's New in OpenLDAPLDAPCon
2.7K views39 slides
Tranquilizer by
TranquilizerTranquilizer
TranquilizerAlbert DeFusco
62 views19 slides
CBDW2014- Intro to CommandBox; The ColdFusion CLI, Package Manager, and REPL ... by
CBDW2014- Intro to CommandBox; The ColdFusion CLI, Package Manager, and REPL ...CBDW2014- Intro to CommandBox; The ColdFusion CLI, Package Manager, and REPL ...
CBDW2014- Intro to CommandBox; The ColdFusion CLI, Package Manager, and REPL ...Ortus Solutions, Corp
687 views39 slides
Gitlab ci-cd by
Gitlab ci-cdGitlab ci-cd
Gitlab ci-cdDan MAGIER
3.4K views27 slides
Instant developer onboarding with self contained repositories by
Instant developer onboarding with self contained repositoriesInstant developer onboarding with self contained repositories
Instant developer onboarding with self contained repositoriesYshay Yaacobi
158 views53 slides
Kubernetes Forum Seoul 2019: Re-architecting Data Platform with Kubernetes by
Kubernetes Forum Seoul 2019: Re-architecting Data Platform with KubernetesKubernetes Forum Seoul 2019: Re-architecting Data Platform with Kubernetes
Kubernetes Forum Seoul 2019: Re-architecting Data Platform with KubernetesSeungYong Oh
905 views30 slides

Similar to Ready player 2 Multiplayer Red Teaming Against macOS (20)

Free the Functions with Fn project! by J On The Beach
Free the Functions with Fn project!Free the Functions with Fn project!
Free the Functions with Fn project!
J On The Beach161 views
Meetup 2020 - Back to the Basics part 101 : IaC by DamienCarpy
Meetup 2020 - Back to the Basics part 101 : IaCMeetup 2020 - Back to the Basics part 101 : IaC
Meetup 2020 - Back to the Basics part 101 : IaC
DamienCarpy127 views
Apache Airflow in the Cloud: Programmatically orchestrating workloads with Py... by Kaxil Naik
Apache Airflow in the Cloud: Programmatically orchestrating workloads with Py...Apache Airflow in the Cloud: Programmatically orchestrating workloads with Py...
Apache Airflow in the Cloud: Programmatically orchestrating workloads with Py...
Kaxil Naik2.9K views
Docker in production service discovery with consul - road to opscon 2015 by Giovanni Toraldo
Docker in production  service discovery with consul - road to opscon 2015Docker in production  service discovery with consul - road to opscon 2015
Docker in production service discovery with consul - road to opscon 2015
Giovanni Toraldo2.5K views
Rhel8 Beta - Halifax RHUG by Nicole Maselli
Rhel8 Beta - Halifax RHUGRhel8 Beta - Halifax RHUG
Rhel8 Beta - Halifax RHUG
Nicole Maselli1.1K views
OSDC 2018 | Three years running containers with Kubernetes in Production by T... by NETWAYS
OSDC 2018 | Three years running containers with Kubernetes in Production by T...OSDC 2018 | Three years running containers with Kubernetes in Production by T...
OSDC 2018 | Three years running containers with Kubernetes in Production by T...
NETWAYS246 views
Angular2 - A story from the trenches by Johannes Rudolph
Angular2 - A story from the trenchesAngular2 - A story from the trenches
Angular2 - A story from the trenches
Johannes Rudolph367 views
Azure functions: from a function to a whole application in 60 minutes by Alessandro Melchiori
Azure functions: from a function to a whole application in 60 minutesAzure functions: from a function to a whole application in 60 minutes
Azure functions: from a function to a whole application in 60 minutes
Electron JS | Build cross-platform desktop applications with web technologies by Bethmi Gunasekara
Electron JS | Build cross-platform desktop applications with web technologiesElectron JS | Build cross-platform desktop applications with web technologies
Electron JS | Build cross-platform desktop applications with web technologies
Bethmi Gunasekara2.5K views
AWS ElasticBeanstalk and Docker by kloia
AWS ElasticBeanstalk and Docker AWS ElasticBeanstalk and Docker
AWS ElasticBeanstalk and Docker
kloia675 views
LCU14 310- Cisco ODP v2 by Linaro
LCU14 310- Cisco ODP v2LCU14 310- Cisco ODP v2
LCU14 310- Cisco ODP v2
Linaro4K views
What's New in OpenLDAP by LDAPCon
What's New in OpenLDAPWhat's New in OpenLDAP
What's New in OpenLDAP
LDAPCon2.7K views
CBDW2014- Intro to CommandBox; The ColdFusion CLI, Package Manager, and REPL ... by Ortus Solutions, Corp
CBDW2014- Intro to CommandBox; The ColdFusion CLI, Package Manager, and REPL ...CBDW2014- Intro to CommandBox; The ColdFusion CLI, Package Manager, and REPL ...
CBDW2014- Intro to CommandBox; The ColdFusion CLI, Package Manager, and REPL ...
Gitlab ci-cd by Dan MAGIER
Gitlab ci-cdGitlab ci-cd
Gitlab ci-cd
Dan MAGIER3.4K views
Instant developer onboarding with self contained repositories by Yshay Yaacobi
Instant developer onboarding with self contained repositoriesInstant developer onboarding with self contained repositories
Instant developer onboarding with self contained repositories
Yshay Yaacobi158 views
Kubernetes Forum Seoul 2019: Re-architecting Data Platform with Kubernetes by SeungYong Oh
Kubernetes Forum Seoul 2019: Re-architecting Data Platform with KubernetesKubernetes Forum Seoul 2019: Re-architecting Data Platform with Kubernetes
Kubernetes Forum Seoul 2019: Re-architecting Data Platform with Kubernetes
SeungYong Oh905 views

Recently uploaded

Chat GPTs by
Chat GPTsChat GPTs
Chat GPTsGene Leybzon
23 views36 slides
Supercharging your Python Development Environment with VS Code and Dev Contai... by
Supercharging your Python Development Environment with VS Code and Dev Contai...Supercharging your Python Development Environment with VS Code and Dev Contai...
Supercharging your Python Development Environment with VS Code and Dev Contai...Dawn Wages
13 views51 slides
How To Make Your Plans Suck Less — Maarten Dalmijn at the 57th Hands-on Agile... by
How To Make Your Plans Suck Less — Maarten Dalmijn at the 57th Hands-on Agile...How To Make Your Plans Suck Less — Maarten Dalmijn at the 57th Hands-on Agile...
How To Make Your Plans Suck Less — Maarten Dalmijn at the 57th Hands-on Agile...Stefan Wolpers
53 views38 slides
Level-up Your Cloud Visibility Into AWS With ThousandEyes by
Level-up Your Cloud Visibility Into AWS With ThousandEyesLevel-up Your Cloud Visibility Into AWS With ThousandEyes
Level-up Your Cloud Visibility Into AWS With ThousandEyesThousandEyes
26 views36 slides
Field Service Booster- A Solution to Optimize the Capabilities Of Salesforce ... by
Field Service Booster- A Solution to Optimize the Capabilities Of Salesforce ...Field Service Booster- A Solution to Optimize the Capabilities Of Salesforce ...
Field Service Booster- A Solution to Optimize the Capabilities Of Salesforce ...Grazitti Interactive
22 views9 slides
POS Software in Bangladesh.pdf by
POS Software in Bangladesh.pdfPOS Software in Bangladesh.pdf
POS Software in Bangladesh.pdfSEOServiceProviderBa
6 views1 slide
Hire a Salesforce Consultant for Success and Expert Guidance by
Hire a Salesforce Consultant for Success and Expert GuidanceHire a Salesforce Consultant for Success and Expert Guidance
Hire a Salesforce Consultant for Success and Expert GuidanceeShopSync Software
5 views6 slides
Sage 100 vs. Sage Intacct webinar slide deck by
Sage 100 vs. Sage Intacct webinar slide deckSage 100 vs. Sage Intacct webinar slide deck
Sage 100 vs. Sage Intacct webinar slide deckBrainSell Technologies
11 views9 slides
.NET Deserialization Attacks by
.NET Deserialization Attacks.NET Deserialization Attacks
.NET Deserialization AttacksDharmalingam Ganesan
8 views50 slides
Q&A with Confluent Experts: Navigating Networking in Confluent Cloud by
Q&A with Confluent Experts: Navigating Networking in Confluent CloudQ&A with Confluent Experts: Navigating Networking in Confluent Cloud
Q&A with Confluent Experts: Navigating Networking in Confluent Cloudconfluent
17 views27 slides
FlowCart_ Transforming the Game as the Premier AI eCom Funnel Builder Worldwi... by
FlowCart_ Transforming the Game as the Premier AI eCom Funnel Builder Worldwi...FlowCart_ Transforming the Game as the Premier AI eCom Funnel Builder Worldwi...
FlowCart_ Transforming the Game as the Premier AI eCom Funnel Builder Worldwi...AMB-Review
5 views32 slides
Transport Management System - Shipment & Container Tracking by
Transport Management System - Shipment & Container TrackingTransport Management System - Shipment & Container Tracking
Transport Management System - Shipment & Container TrackingFreightoscope
6 views3 slides
Data, Metadata, GenAI (Seminar by IEEE, New Zealand North Section) by
Data, Metadata, GenAI (Seminar by IEEE, New Zealand North Section)Data, Metadata, GenAI (Seminar by IEEE, New Zealand North Section)
Data, Metadata, GenAI (Seminar by IEEE, New Zealand North Section)mars197365
12 views32 slides
CD_Con_Japan_2023.pdf by
CD_Con_Japan_2023.pdfCD_Con_Japan_2023.pdf
CD_Con_Japan_2023.pdfTiffany Jachja
23 views26 slides
eXplain – Systematical Analysis of IBM Legacy Code by
eXplain – Systematical Analysis of IBM Legacy CodeeXplain – Systematical Analysis of IBM Legacy Code
eXplain – Systematical Analysis of IBM Legacy Codemarketing792137
6 views40 slides
Mobile App Development Company by
Mobile App Development CompanyMobile App Development Company
Mobile App Development CompanyRichestsoft
8 views6 slides
Demystifying API governance: Building Success through Understanding by
Demystifying API governance: Building Success through UnderstandingDemystifying API governance: Building Success through Understanding
Demystifying API governance: Building Success through UnderstandingArnaud Lauret
14 views54 slides
Winter Projects GDSC IITK by
Winter Projects GDSC IITKWinter Projects GDSC IITK
Winter Projects GDSC IITKSahilSingh368445
599 views60 slides
Automated Testing of Microsoft Power BI Reports by
Automated Testing of Microsoft Power BI ReportsAutomated Testing of Microsoft Power BI Reports
Automated Testing of Microsoft Power BI ReportsRTTS
786 views20 slides
Migrating To PostgreSQL by
Migrating To PostgreSQLMigrating To PostgreSQL
Migrating To PostgreSQLGrant Fritchey
52 views131 slides

Recently uploaded (20)

Supercharging your Python Development Environment with VS Code and Dev Contai... by Dawn Wages
Supercharging your Python Development Environment with VS Code and Dev Contai...Supercharging your Python Development Environment with VS Code and Dev Contai...
Supercharging your Python Development Environment with VS Code and Dev Contai...
Dawn Wages13 views
How To Make Your Plans Suck Less — Maarten Dalmijn at the 57th Hands-on Agile... by Stefan Wolpers
How To Make Your Plans Suck Less — Maarten Dalmijn at the 57th Hands-on Agile...How To Make Your Plans Suck Less — Maarten Dalmijn at the 57th Hands-on Agile...
How To Make Your Plans Suck Less — Maarten Dalmijn at the 57th Hands-on Agile...
Stefan Wolpers53 views
Level-up Your Cloud Visibility Into AWS With ThousandEyes by ThousandEyes
Level-up Your Cloud Visibility Into AWS With ThousandEyesLevel-up Your Cloud Visibility Into AWS With ThousandEyes
Level-up Your Cloud Visibility Into AWS With ThousandEyes
ThousandEyes26 views
Field Service Booster- A Solution to Optimize the Capabilities Of Salesforce ... by Grazitti Interactive
Field Service Booster- A Solution to Optimize the Capabilities Of Salesforce ...Field Service Booster- A Solution to Optimize the Capabilities Of Salesforce ...
Field Service Booster- A Solution to Optimize the Capabilities Of Salesforce ...
Hire a Salesforce Consultant for Success and Expert Guidance by eShopSync Software
Hire a Salesforce Consultant for Success and Expert GuidanceHire a Salesforce Consultant for Success and Expert Guidance
Hire a Salesforce Consultant for Success and Expert Guidance
Q&A with Confluent Experts: Navigating Networking in Confluent Cloud by confluent
Q&A with Confluent Experts: Navigating Networking in Confluent CloudQ&A with Confluent Experts: Navigating Networking in Confluent Cloud
Q&A with Confluent Experts: Navigating Networking in Confluent Cloud
confluent17 views
FlowCart_ Transforming the Game as the Premier AI eCom Funnel Builder Worldwi... by AMB-Review
FlowCart_ Transforming the Game as the Premier AI eCom Funnel Builder Worldwi...FlowCart_ Transforming the Game as the Premier AI eCom Funnel Builder Worldwi...
FlowCart_ Transforming the Game as the Premier AI eCom Funnel Builder Worldwi...
AMB-Review5 views
Transport Management System - Shipment & Container Tracking by Freightoscope
Transport Management System - Shipment & Container TrackingTransport Management System - Shipment & Container Tracking
Transport Management System - Shipment & Container Tracking
Freightoscope 6 views
Data, Metadata, GenAI (Seminar by IEEE, New Zealand North Section) by mars197365
Data, Metadata, GenAI (Seminar by IEEE, New Zealand North Section)Data, Metadata, GenAI (Seminar by IEEE, New Zealand North Section)
Data, Metadata, GenAI (Seminar by IEEE, New Zealand North Section)
mars19736512 views
eXplain – Systematical Analysis of IBM Legacy Code by marketing792137
eXplain – Systematical Analysis of IBM Legacy CodeeXplain – Systematical Analysis of IBM Legacy Code
eXplain – Systematical Analysis of IBM Legacy Code
marketing7921376 views
Mobile App Development Company by Richestsoft
Mobile App Development CompanyMobile App Development Company
Mobile App Development Company
Richestsoft 8 views
Demystifying API governance: Building Success through Understanding by Arnaud Lauret
Demystifying API governance: Building Success through UnderstandingDemystifying API governance: Building Success through Understanding
Demystifying API governance: Building Success through Understanding
Arnaud Lauret14 views
Automated Testing of Microsoft Power BI Reports by RTTS
Automated Testing of Microsoft Power BI ReportsAutomated Testing of Microsoft Power BI Reports
Automated Testing of Microsoft Power BI Reports
RTTS786 views

Ready player 2 Multiplayer Red Teaming Against macOS

  • 1. READY PLAYER 2 MULTIPLAYER RED TEAMING AGAINST MACOS BSIDES SEATTLE 2019
  • 2. CODY THOMAS • Senior Operator at SpecterOps • Previously: • Adversary Emulation Engineer at MITRE • Mac/Linux ATT&CK • APT3 Emulation Plan • Twitter: @its_a_feature_ • GitHub: github.com/its-a-feature/ 2
  • 3. MACOS OPERATIONS What’s the current landscape? 3
  • 4. CURRENT MACOS OPERATIONS Malware seen in the wild: • WindTail • Signed macOS application • FairyTale: • Signed macOS application • Calisto • Unsigned macOS application • AppleJeus • Signed macOS application • EvilEgg and LamePyre • Utilize EggShell and Empire Red Teaming FOSS Frameworks: • Empire • Python-based agent • Single User Terminal Application • RESTful Interface • EggShell • Python-based agent • Single User Terminal Application • Evil OSX • Python-based agent • Some GUI components 4 https://objective-see.com/downloads/MacMalware_2018.pdf https://github.com/EmpireProject/Empire https://github.com/neoneggplant/EggShell https://github.com/Marten4n6/EvilOSX
  • 5. OPERATIONAL PROBLEMS ● Want to emulate adversaries, but: ○ Current FOSS capabilities don’t match up ○ More easily caught as “Red Team” ○ Signing macOS applications is not easy ● Want to operate in a team, but: ○ Need proper collaboration and sharing ○ Screen sharing isn’t scalable 5
  • 6. BRIDGING THE GAP How can we get operations closer to the real thing? 6
  • 7. JAVASCRIPT FOR AUTOMATION (JXA) ● Scriptable execution: ○ Most of the lower-level Objective C APIs exposed in a JS way ○ Kind of like if PowerShell stopped at version 1 or 2 ● According to Apple: “In OS X 10.10, JavaScript became a peer to AppleScript in OS X.” ● Still isn’t a signed macOS Application though ○ Hard to emulate as a consultant across multiple customers ● Very limited threading capabilities 7https://developer.apple.com/library/archive/documentation/LanguagesUtilities/Conceptual/MacAutomationScriptingGuide/index.html
  • 8. ● Does osascript normally run? ○ AppleScript has been around since 1993 ○ Mainly used by Admins and power users ● How does JXA perform actions? ○ Apple Events for IPC (causes popups in 10.14) ○ Objective C API calls ● Signing? ○ Not a problem – Live off the land ○ osascript is an Apple signed binary ○ Can execute entirely in memory 8 DEFENSIVE CONSIDERATIONS
  • 9. NOW IT’S TIME TO OP You’ve been tasked to operate against macOS, now what? 9
  • 10. 10 INTRODUCING It’s not a bug, it’s a feature
  • 11. WHAT IS APFELL? ● Collaborative, post-exploitation framework with a web front-end ● Apfell server runs on MacOS/Linux (needs python3.6+) ● Apfell agents can be any operating system ○ JXA payload for macOS ○ @xorrior already released a Chrome extension payload ○ Payloads can be scripted or dynamically compiled ● Any number of c2 profiles running at a time 11
  • 12. DEMO TIME! Let’s operate 12 Demo videos: ● https://youtu.be/9yjNzYtOyHE ● https://youtu.be/FJf9oQkBG0g ● https://youtu.be/_V7PrbDHfY8 ● https://youtu.be/Hgn-RUa9feo ● https://youtu.be/4mABpw20KMQ ● https://youtu.be/KypCqWSQGwE
  • 13. A FRAMEWORK SHOULD BE: 1. Informative • Track data, environment, operation, OPSEC concerns • Easy to understand user interface • Purple in nature - helping both Red and Blue teams 2. Collaborative • Every operator has their own customized front-end • Can share detailed information easily and quickly 3. Extensible • Easily add/share commands, C2 profiles, payloads • Support multiple operating systems • You shouldn’t have to re-roll a UI for every new payload 13
  • 14. INFORMATIVE: FOR RED TEAMERS ● Operators ● Commands ○ OPSEC (Artifacts, Transforms) ● Payload Types ○ Creation, loading modules, execution help ● Operational Data Model ○ Let’s use all the data we collect/generate in operations ● Task-Response grouping ○ not just data-dump console ● Searching tasks and responses across an operation 14
  • 15. INFORMATIVE: FOR BLUE TEAMERS ● Commands mapped to MITRE ATT&CK ○ Regex matching for more granularity ○ Exports to ATT&CK Navigator ○ Auto populates based on the command ● Host/Network artifact tracking per task ○ Helpful for deconfliction and reporting ○ Auto populated while operating ○ Agents can report updates or new artifacts ○ Soon include exportability of artifacts to Splunk/SIEMs 15
  • 16. COLLABORATIVE ● Web-based GUI ○ No client dependencies besides a modern browser ○ Each operator has their own profile and login ● Users assigned to operations ○ Multiple operations ongoing concurrently ○ Individual tasks sharable amongst team members ● Operators can comment on tasks ○ Seen by all members in that operation 16
  • 17. EXTENSIBLE ● You can create/add any number of payload types across all OSes ○ JXA, Python, C#, Go, etc ○ Can be scripts or compiled ● You can create/add any number of commands for a payload ○ Command templating ● You can create/add/run any number of C2 profiles at a time ○ They run as sub-processes ○ Only bound ports need to be unique 17
  • 19. PAYLOAD TYPES • Add / Edit Payload types • Can be wrappers for full payloads • Macro • MSBuild • DyLib 19
  • 20. COMMANDS • View Code • Provide operator help • Edit code • Add/edit/remove parameters 20
  • 21. COMMAND TRANSFORMS / ATT&CK / ARTIFACTS • Transform commands • Provide ATT&CK Mappings • Indicate host/network artifacts 21
  • 23. C2 PROFILE PARAMETERS • Specify parameters that will be stamped into an agent during creation • “key” value is stamped out with user’s value in agent code 23
  • 24. PAYLOAD CREATION - UI • Pick C2 profile, payload type, and initial commands • Stamp all pieces together 24
  • 25. PAYLOAD CONFIGURATION • All payloads registered in the database • See configuration and comparison to server state at any time 25
  • 26. CALLBACK VIEW • Familiar table of callbacks like most tools • Detailed task data grouped by task (not time) • Add/track optional comments per task 26
  • 27. SHARING SINGULAR TASKS • Click task number on almost any page to view JUST that one task and its output • Easy to share URL amongst team members: /tasks/task# • Only viewable by users assigned to that operation 27
  • 28. TASK VIEW • View all tasks at once across all callbacks • Click to expand and see output 28
  • 29. SEARCH VIEW • Search all task output or task parameters for key words/phrases • Searches across all callbacks in an operation • Faster and more targeted than just 29
  • 30. ATT&CK × Transform commands × Provide ATT&CK Mappings × Indicate host/network artifacts 30
  • 31. APPLY ATT&CK WITH REGEX • Match all tasks where the parameters fit regex: .*id • Check matches and their current ATT&CK mappings 31
  • 32. BASIC ARTIFACT TRACKING • Define formats for artifacts based on commands and command parameters 32
  • 33. COMMAND TRANSFORMS • Toggle transforms on/off locally • Can optionally persist settings globally for all operators • Test outputs of each transform: 33
  • 34. UPLOADING / DOWNLOAD 34 • View all uploads/downloads and file paths across an operation • Real-time updates for in-progress downloads
  • 35. SCREEN CAPTURES 35 • View screen captures by callback or across an entire operation
  • 36. COMMAND COMPLETION 36 • Auto populate available commands based on the associated payload type for the callback • Can use L/R arrow keys to cycle through choices
  • 37. COMMAND PARAMETERS 37 • If a command has registered parameters and you don’t type any on the command line • Pop-up dialog to fill in parameters
  • 38. APFELL AGENTS What does an agent look like? 38
  • 39. PAYLOAD DESIGN CONSIDERATIONS 39 ● Modular ○ All commands are stand-alone ○ Main payload is just management engine ○ C2 is abstracted away ■ Creates plug-and-play C2 functionality ○ Stamp in commands at creation ■ And load more in later ● Inspiration ○ Malware samples: PlugX, Flame, CozyDuke, etc
  • 40. PAYLOAD DESIGN CONSIDERATIONS 40 ● OS Agnostic ○ Apfell is a framework for collaborative operations ○ Payloads can be created for any OS – scripted or compiled ● OPSEC aware ○ Ideally agents track their footprint on host and report back ○ Artifact tracking with real-time data in responses
  • 41. GOING FORWARD What’s next for Apfell? 41
  • 42. FUTURE UPDATES – SHORT TERM ● More encryption ○ Currently just HTTPS ● More payload types across multiple operating systems ○ Python, Mach-O, C#, ELF, Go ● More built-in commands ○ Keylogging, Process Injection, Proxy Pivots 42
  • 43. FUTURE UPDATES – MEDIUM TERM ● More customizable C2 profiles included by default ○ Control GET/POST requests ● More C2 profiles that don’t require external comms ○ SMB, SSH ● More Artifact Tracking / Defensive Guidance ○ Better tracking of operational artifacts ○ Inclusion of defensive measures for commands 43
  • 44. FUTURE UPDATES – LONG TERM ● Create scriptable Python API for greater control ○ Registerable within the UI – no need for RESTful scripting ● Server speed improvements ○ Automated builds ● More UI Upgrades ○ Attackers think in graphs, not lists ● Community driven updates ○ Please contribute! ☺ 44
  • 45. 45 THANKS!Any questions? • Twitter: @its_a_feature_ • GitHub: github.com/its-a-feature/ • https://its-a-feature.github.io • Blog series on creating Apfell • macOS AD discovery (Orchard) It’s not a bug, it’s a feature