• Apple

    Using Viruses For Good

    I get prompted any time one of my books is cited in legitimate research journals. A group of Kuwaiti researchers wrote a paper that, to quote the researchers, finds that “In a nutshell, this research indicates that there is a possibility of converting computer viruses into beneficial programs for storage space and CPU optimization.” The paper is available here: http://www.jatit.org/volumes/Vol101No10/19Vol101No10.pdf I’ve often said that agent-based device management tools (and let’s keep in mind that MDM is an Apple-supplied agent) are in a way commercially supported advanced persistent threats. After all, they have similar command and control architectures… These are often larger, monolithic architectures that grow, and so consume more resources…

  • Apple,  Swift

    Simple Swift Fuzzer

    Sometimes we want to test a function to see how… robust it is. This is a small example fuzzing function to input randomly generated characters that get passed to another function. It just uses randomBytes so much more logic could easily be added to constrain what’s being passed to whatever type it’s being passed to… but this satisfies my need. import Foundation func fuzz(function: () -> Void) { // Generate a random input to pass to the function we are fuzzing let input = Data(randomBytes: 1024) // Call the fuzzed function with the random input do { try function() } catch { print(error) } // Check the fuzzed function to…

  • Mac OS X

    Free Space Required for Modern macOS Upgrades

    The amount of free space required to upgrade a Mac has increased drastically in the run-up to and since the introduction of apfs-based snapshots in 2016. The amount of required free space had been growing steadily in the HFS+-era of file systems, but as more elements of iOS (like a modern file system) came to the Mac, and as the Mac transitioned to a fully 64-bit operating system, that number escalated and never returned now that the transition away from things like 32-bit apps and kexts is finished. Sierra (Mac OS X 10.12) had a minimum drive capacity of 8.8 GB but really needed more like 12 GB; however there…

  • Mac OS X,  Mac OS X Server,  Mac Security

    Secure Keyboard Entry on macOS

    The Secure Keyboard Entry option has been in Terminal going back almost a decade. Secure Keyboard Entry was added as EnableSecureEventInput way back in Mac OS X 10.3 and was developed to protect the more sensitive inputs people provided, so also made into a public API. It was meant to protect the more sensitive types of data so if we had a login screen with a password field or something else, we’d protect those with it. The purpose was to lock what other processes could use the GetKeys function (once used to write keystroke loggers), tap the IOHIDDeviceInterace and IOHIDOptionsTypeSeizeDevice processes or tap any events that involved any HID system…

  • Mac OS X

    Disable Password Hints in macOS

    You can easily disable password hints in macOS by opening the System Preferences, clicking on the “Users & Groups” System Preference pane and then clicking on Login Options. From there, uncheck the box for “Show password hints” You can also disable this feature using the com.apple.loginwindow defaults domain. Send the following through a script to do so: defaults write com.apple.loginwindow RetriesUntilHint -int 0

  • Apple Configurator

    Install Apple Configurator 2

    Apple Configurator 2 is a great tool to manage iOS devices. It’s also a pretty decent tool when you need to create profiles for use on Macs. Apple Configurator is easily installed using the Mac App Store. This involves a number of tasks: Restore: Restore an operating system to an iOS device Duplicate: Similar to imaging (but not), restore various options on a device so it is similar to a previous device. There are limitations to this feature as any data stored in the secure enclave will not be duplicated Application Assignment: Install apps on devices with or without an MDM solution to manage the devices Supervise: Enable supervised mode on…

  • Mac OS X

    Make Your Bash Prompt Into A Smiling Pile Of Poo (💩) For Halloween

    Did you know that bash supports emojis? So do SSIDs. Let’s run a quick and easy command so that bash can enjoy the same holiday that you’re enjoying. Let’s say the name of an emoji. To do so, open the Terminal.app and paste this command in: say 💩 You can also easily edit your .bash_profile. To do so, run the `vi .bash_profile` command and paste this line in: PS1="💩   $" Note that I put a few spaces here, after the smiling pile of poo (which I really just like to type and verbalize while sitting next to people on airplanes). The reason for the spaces is that otherwise your text might…

  • Mac OS X Server,  Mass Deployment

    Automating The Server.app Setup Using A Script

    There are a couple of parts to this article. The first is to describe the server command, stored in /Applications/Server.app/Contents/ServerRoot/usr/sbin/server. The description of the command by Brad Chapman was so eloquently put on this JAMF Nation post that I’m just gonna’ paste it in here: So … I just installed Server 5.0.x tonight on my Mac Mini running Yosemite (10.10.5). There was a question that came up during JNUC about upgrading Server and having a way to accept the license agreement without going through the GUI. So for shits and giggles I tried: server setup It’s not documented. And lo and behold, I got the prompt to accept the license agreement just…

  • Consulting,  Mac OS X,  Mac OS X Server,  Mac Security,  Mass Deployment

    Come One, Come All: Speaking at ACES Conference 2016 in Austin

    The planning for ACES Conference 2016 seems to be in full gear. I’ve been slated to speak not on JAMF or Bushel stuff, but on my time in the Apple Consultants Network (ACN) community. One of the biggest challenges we had as we grew, was to responsibly pick vendors that matched with our customer requirements while also allowing us to scale efficiently. If you’re an ACN, this is a great conference for you. Check it out at https://acesconf.com!