Skip to content

Instantly share code, notes, and snippets.

{
"packs": {
"osxlockdown": {
"platform": "darwin",
"version": ".1",
"queries": {
"OS Updates": {
"query": "select value from preferences where path = '/Library/Preferences/com.apple.SoftwareUpdate.plist' and key = 'LastSuccessfulDate';",
"interval": "86400",
"description": "Verify all Apple OS-bundled software has checked it's configured server recently",
@arubdesu
arubdesu / front.html
Created May 16, 2016 15:28
Sal button-style plugin for generic security criteria
<div class="panel panel-default panel-traffic-light">
<div class="panel-heading">
{{ title }}
</div>
<!-- /.panel-heading -->
<div class="panel-body">
<a href="{% url 'machine_list_front' plugin 'gatekeep' %}" class="btn btn-danger">
<span class="bigger"> {{ gatekeep }} </span><br />
{{ gatekeep_label }}

Teddy was aware of recently:

  • keychain autolocking/statuses
  • password policies info
  • ASL configurations
  • applications install log
  • power management details (pmset)
  • gatekeeper configuration

✅sudo details/configuration and list of sudoers

@arubdesu
arubdesu / Vagrantfile
Last active December 28, 2015 02:08
For working on madebygraham Django webapps, a vagrantfile and script to run inside the resulting vm (as sudo) to set up a dev env (no nginx, no postgresql, no wsgi). Expects a unpacked download of the crypt-server docker repo in the shared folder(which is the same as the vagrantfile's working dir by default), checks out current master
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "puppetlabs/ubuntu-14.04-64-nocm"
config.vm.network "forwarded_port", guest: 8000, host: 8000
# note: if rolling back snapshots w/ 1.8, this may cause a lenghty re-provision
config.vm.provision "shell", inline: <<-SHELL
sudo apt-get update
sudo apt-get install -y software-properties-common && \
@arubdesu
arubdesu / LSbootstrapper.py
Last active September 7, 2016 20:10
For running at first boot, to enable both location services and whitelist Maps and AutoTimeZone('based on current location')
#!/usr/bin/python
"""Enables location services, allows Maps and Timezone"""
import os
import platform
import subprocess
import sys
try:
sys.path.append('/usr/local/munki/munkilib/')
import FoundationPlist
except ImportError as error:
@arubdesu
arubdesu / catalogs.rb
Created December 21, 2015 16:35
Puppet facts for munki reporting
Facter.add(:munki_catalog_array) do
confine :kernel => "Darwin"
setcode do
Dir.entries('/Library/Managed Installs/catalogs').select {|f| !File.directory? f}
end
end
@arubdesu
arubdesu / see_ayyys.py
Created December 1, 2015 18:52
Work In Progress
#!/usr/bin/python
"""Check osquery output against whitelisted CA's."""
import json
import os
import subprocess
import sys
@arubdesu
arubdesu / xprotect_fetcher.py
Created November 25, 2015 22:19
haven't worked in sig validation, but runs
#!/usr/bin/python
"""
Checks the MountainLion-Era version of the xprotect plist for the current
version number, compares it against version on disk.
"""
import urllib2
import sys
sys.path.append("/usr/local/munki/munkilib")
@arubdesu
arubdesu / change_tz-1.0.plist
Created November 2, 2015 20:58
example for the munki wiki
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>OnDemand</key>
<true/>
<key>_metadata</key>
<dict>
<key>created_by</key>
<string>abanks</string>
@arubdesu
arubdesu / fix_timezone.py
Last active November 2, 2015 19:18
Uses a web geoip service and cocoaDialog (via Googles gmacpyutil) to allow end users to change the time zone on their Mac. Deployable via Munki OnDemand task
#!/usr/bin/python
'''Uses a web geoip service and cocoaDialog to allow end users to change
the time zone on their Mac (assuming they can get on the internet)'''
import json
import subprocess
import sys
import urllib2
from gmacpyutil import cocoadialog