Practical Mac OS X Insecurity. Security Concepts, Problems and Exploits on your Mac



Similar documents
Practical Mac OS X Insecurity

Securing your Virtual Datacenter. Part 1: Preventing, Mitigating Privilege Escalation

TIPS FOR USING OS X 10.8 MOUNTAIN LION

User's Manual. Intego VirusBarrier Server 2 / VirusBarrier Mail Gateway 2 User's Manual Page 1

Windows Operating Systems. Basic Security

Instructions for Adding a MacOS 10.4.x Client to ASURITE

The safer, easier way to help you pass any IT exams. Exam : 9L OS X Server Essentials 10.8 Exam. Title : Version : Demo 1 / 6

Virtualization System Security

System Security Policy Management: Advanced Audit Tasks

Future Technology Devices International Ltd. Mac OS-X Installation Guide

Take Your Mac OS X Security to NSA Standards June 19, 2014 by Larry Chafin

Mac OS X. Staff members using NEIU issued laptops and computers on Active Directory can access NEIU resources that are available on the wired network.

EECS 354 Network Security. Introduction

SY system so that an unauthorized individual can take over an authorized session, or to disrupt service to authorized users.

ArcGIS Server Security Threats & Best Practices David Cordes Michael Young

SECURING YOUR SMALL BUSINESS. Principles of information security and risk management

Securing ios Applications. Dr. Bruce Sams, OPTIMAbit GmbH

System Security Fundamentals

Host/Platform Security. Module 11

Sophos Anti-Virus for Mac OS X Help

Security Testing. Vulnerability Assessment vs Penetration Testing. Gabriel Mihai Tanase, Director KPMG Romania. 29 October 2014

CEN 559 Selected Topics in Computer Engineering. Dr. Mostafa H. Dahshan KSU CCIS

Lectures 9 Advanced Operating Systems Fundamental Security. Computer Systems Administration TE2003

Homeland Security Red Teaming

Case Studies. Joint software development Mail 1 / 38. Case Studies Joint Software Development. Mailers

Application Intrusion Detection

Security Maintenance Practices. IT 4823 Information Security Administration. Patches, Fixes, and Revisions. Hardening Operating Systems

Windows Attack - Gain Enterprise Admin Privileges in 5 Minutes

Penetration Testing in Romania

1. Open the Account Settings window by clicking on Account Settings from the Entourage menu.

Sophos Anti-Virus for Mac OS X: Home Edition Help

CS197U: A Hands on Introduction to Unix

DeployStudio Server Quick Install

Security+ Guide to Network Security Fundamentals, Third Edition. Chapter 2 Systems Threats and Risks

Crowd Security Intelligence. (download slides)

Integrated Network Vulnerability Scanning & Penetration Testing SAINTcorporation.com

Case Study: Access control 1 / 39

CEH Version8 Course Outline

(General purpose) Program security. What does it mean for a pgm to be secure? Depends whom you ask. Takes a long time to break its security controls.

Secure Shell Demon setup under Windows XP / Windows Server 2003

Example of Standard API

3. Broken Account and Session Management. 4. Cross-Site Scripting (XSS) Flaws. Web browsers execute code sent from websites. Account Management

Mac OS X Security Checklist:

Kaspersky Endpoint Security 10 for Windows. Deployment guide

eggon SDK for ios 7 Integration Instructions

CS 356 Lecture 25 and 26 Operating System Security. Spring 2013

Administering FileVault 2 on OS X Lion with the Casper Suite. Technical Paper July 2012

Malwarebytes Anti-Malware for Mac User Guide Version October 2015

Online Backup Client User Manual

RACK911 Labs. Year in Review. May 6, 2014

CSE331: Introduction to Networks and Security. Lecture 15 Fall 2006

CSE331: Introduction to Networks and Security. Lecture 32 Fall 2004

Mac OS X Server Migration Guide

Instructions for Adding a MacOS 10.4.x Server to ASURITE for File Sharing. Installation Section

Sophos Endpoint Security and Control Help

View CPU, Memory, Disk, and Network Usage in Activity Monitor.

Nikolay Zaynelov Annual LUG-БГ Meeting nikolay.zaynelov.com

TUXERA NTFS for Mac USER GUIDE 2/13. Index

Discovering Mac OS X Weaknesses and Fixing Them with the New Bastille OS X Port

USM IT Security Council Guide for Security Event Logging. Version 1.1

Eugene Tsyrklevich. Ozone HIPS: Unbreakable Windows

Mac OS X Security Framework

Online Backup Client User Manual Mac OS

Online Backup Client User Manual Mac OS

Sophos Anti-Virus for Mac OS X Help

McAfee Vulnerability Manager 7.0.2

Table of Contents. Cisco Cisco VPN Client FAQ

CCM 4350 Week 11. Security Architecture and Engineering. Guest Lecturer: Mr Louis Slabbert School of Science and Technology.

User's Manual. Intego Remote Management Console User's Manual Page 1

VMWARE Introduction ESX Server Architecture and the design of Virtual Machines

Top 10 Database. Misconfigurations.

Optional Mainserver Setup Instructions for OS X Support

Host Hardening. Presented by. Douglas Couch & Nathan Heck Security Analysts for ITaP 1

Lecture Embedded System Security A. R. Darmstadt, Introduction Mobile Security

A SECURITY COMPARISON OF OPEN-SOURCE AND CLOSED- SOURCE OPERATING SYSTEMS

Worms, Trojan Horses and Root Kits

Shellshock Security Patch for X86

OS Security. Malware (Part 2) & Intrusion Detection and Prevention. Radboud University Nijmegen, The Netherlands. Winter 2015/2016

How To Fix A Snare Server On A Linux Server On An Ubuntu (Amd64) (Amd86) (For Ubuntu) (Orchestra) (Uniden) (Powerpoint) (Networking

Enterprise Apple Xserve Wiki and Blog using Active Directory. Table Of Contents. Prerequisites 1. Introduction 1

Oracle Security on Windows

Undercover. User Guide

Linux Security Ideas and Tips

Sophos Anti-Virus for Mac OS X Help. For networked and single computers running Mac OS X version 10.4 or later

Section 12 MUST BE COMPLETED BY: 4/22

An overwhelming majority of IaaS clouds leverage virtualization for their foundation.

by New Media Solutions 37 Walnut Street Wellesley, MA p f Avitage IT Infrastructure Security Document

ABSTRACT' INTRODUCTION' COMMON'SECURITY'MISTAKES'' Reverse Engineering ios Applications

Compromise-as-a-Service

The current version installed on your server is el6.x86_64 and it's the latest available.

Certified Ethical Hacker Exam Version Comparison. Version Comparison

Bypassing Local Windows Authentication to Defeat Full Disk Encryption. Ian Haken

Transcription:

Practical Mac OS X Insecurity Security Concepts, Problems and Exploits on your Mac

Who am I? Student of physics, mathematics and astronomy in Bonn Mac user since 1995 I love Macs Mac evangelist

Intentions Macs have to become even more secure Apple needs to react appropriately Give an overview on Mac security

Overview Mac OS X Security Concepts Worst vulnerabilities and exploits Securing your Mac

Security Concepts

Security Concepts What s good: No network services are listening by default User is never logged in as root Relies on the strong Unix security and permissions model Malware usually needs some sort of privilege escalation exploit

Security Concepts What s not so good: Closed-source security components (e.g. Admin.framework) User can do almost anything without entering the password Insecure default settings

Vulnerabilities

Vulnerability #1 System Preferences

System Preferences Closed-source Relies on setuid root helper tool Many things can be done without password Start and stop services, change power management settings, add new users

System Preferences You can add users to the admin group You can get root within 5 seconds Still works in Tiger AppleScript Demo!

System Preferences How do I fix it?

System Preferences I reported this bug to Apple in October I sent the exploit and suggested a workaround The answer was: You can enable the "Require password to unlock each secure system preferences" checkbox, which can be found in the Security preference pane. Note: After doing so, any user will have to provide the admin name and password in order to change settings, including Accounts.

System Preferences This was no question, this was a local privilege escalation vulnerability I wrote them again This time they answered: Thank you for the clarification. Please know that we have forwarded this information on to the appropriate engineering team for review.

System Preferences The year is now over, it is still not fixed

System Preferences This morning, I got mail from Apple We are taking security seriously Wait for next security update Don t publish it Too late, it s already in the congress proceedings

Vulnerability #2 Bad Installers and wrong Permissions

Bad Installers and wrong Permissions Global startup items can be put to /Library/StartupItems They will be executed as root

Bad Installers and wrong Permissions The directory /Library/StartupItems does not exist by default Many installers will create it with wrong permissions It will likely be user- or even world-writable

Bad Installers and wrong Permissions Execution of arbitrary code as root by putting it in /Library/StartupItems and rebooting

Bad Installers and wrong Permissions Disk Utility can repair permissions The problem is: Disk Utility does not repair the permissions of /Library/StartupItems This is a major bug

Bad Installers and wrong Permissions How do I fix it? Put something like chown -R root:wheel /Library/StartupItems chmod -R og-w /Library/StartupItems into /etc/rc or /etc/daily as a workaround.

Vulnerability #3 Clear Text Passwords in Swap File

Clear Text Passwords Apple s Security Framework does not lock passwords in physical memory by using something like mlock() Eventually they will be written to the swap file Type: sudo strings /var/vm/swapfile0 grep -A 4 -i longname and you will much likely see your password in clear text

Clear Text Passwords Fix? In Panther, there is a way http://andreas-s.net/osxencrypted-swap.html but it makes OS X unstable Wait for Tiger which lets you encrypt your swap But: it s no clean solution, breaks performance

Vulnerability #4 Personal Filesharing Denial of Service

Personal Filesharing Denial of Service Personal Filesharing is the Mac equivalent to Samba on Windows Contains a guest account by default You cannot disable it in System Preferences

Personal Filesharing Denial of Service The guest account has write access to a drop box There is no limit on the amount of written data The Harddisk is the limit

Personal Filesharing Denial of Service The attacker can fill up all disk space with bullshit OS X will likely crash when it has no free swap space anymore Especially dangerous over gigabit ethernet RendezPoo Demo!

Personal Filesharing Denial of Service The guest account can be disabled in /Library/Preferences/com.apple.AppleFileServer.plist by setting <key>guestaccess</key> <true/> to <key>guestaccess</key> <false/>

Vulnerability #5 Mach Injection

Mach Injection Mach Kernel API Inject code into running Programs and execute it Override C-Functions at runtime

Mach Injection With Objective-C it gets interesting

Intermezzo: Objective-C Categories Categories: Objective-C language feature Add new methods to existing classes at compile time Subclassing without subclassing ;-)

Intermezzo: Objective-C Categories Example: Extend NSString to be able to deal with regular expressions In your App, create a Category NSString (RegExp) Implement all methods you want to add All NSString are now capable of regular expresions

Intermezzo: Objective-C Categories No subclassing and casting necessary Also used to split up large classes into a number of smaller files

Mach Injection It gets even cooler... We have seen what we can do with Objective-C at compile time On Mac OS X, you can inject Categories into running Applications at runtime I repeat, at runtime!

Mach Injection It doesn t stop there... The Objective-C Runtime Library lets you replace one method with another MethodSwizzling I repeat, at runtime!

Mach Injection What does it mean? You can selectively replace arbitrary methods with your own implementations in any Objective-C App at runtime Even possible when you don t have the source code

Mach Injection Consequences: You can patch the closed-source components in Mac OS X at runtime (e.g. the Finder or Safari) You can do almost anything you want with any running App

Mach Injection Implications on security: You don t get a free root shell It makes it easy for malware to patch the system in a malicious way No privileges needed

Mach Injection New kind of malware that works entirely with user privileges It will be able to patch the system in a malicious way and perhaps even hide itself Rootkit without root Pretty welcoming atmosphere for viruses

Mach Injection Implications for security are not yet explored

Vulnerability #6 Disguised Executables

Disguised Executables An executable can be camouflaged as any other filetype in the Finder How? Simply change the suffix and the symbol to e.g. match an mp3 file

Disguised Executables Fix? None known

Summary 1. System Preferences privilege escalation 2. Bad permissions 3. Clear text passwords in swap 4. Personal Filesharing DOS 5. Mach Injection 6. Disguised executables

One more thing

The first Mac OS X Worm Proof-of-concept, no malicious routine

The first Mac OS X Worm Demo!

Resources Slides available at: https://21c3.annulator.de/ Demo source code available soon