This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| daemon off; # docker requirement | |
| worker_processes 6; | |
| pid /tmp/nginx.pid; | |
| user nginx; | |
| events { | |
| worker_connections 768; | |
| } | |
| http { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ### | |
| ### | |
| ### UPDATE: For Win 11, I recommend using this tool in place of this script: | |
| ### https://christitus.com/windows-tool/ | |
| ### https://github.com/ChrisTitusTech/winutil | |
| ### https://www.youtube.com/watch?v=6UQZ5oQg8XA | |
| ### iwr -useb https://christitus.com/win | iex | |
| ### | |
| ### OR take a look at | |
| ### https://github.com/HotCakeX/Harden-Windows-Security |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import objc | |
| from Foundation import NSBundle | |
| IOKit_bundle = NSBundle.bundleWithIdentifier_('com.apple.framework.IOKit') | |
| functions = [("IOServiceGetMatchingService", b"II@"), | |
| ("IOServiceMatching", b"@*"), | |
| ("IORegistryEntryCreateCFProperty", b"@I@@I"), | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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>PayloadContent</key> | |
| <array> | |
| <dict> | |
| <key>PayloadType</key> | |
| <string>com.apple.applicationaccess.new</string> | |
| <key>PayloadVersion</key> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from munkilib import gurl | |
| def run_connection(options): | |
| connection = gurl.Gurl.alloc().initWithOptions_(options) | |
| percent_complete = -1 | |
| bytes_received = 0 | |
| connection.start() | |
| try: | |
| while not connection.isDone(): | |
| if connection.destination_path: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl --connect-timeout 15 -v --insecure "smtp://smtp.example.com:25" -u "username:password" | |
| \ --mail-from "sender@example.com" --mail-rcpt "destination@example.com" | |
| \ -T email-contents.txt --ssl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| REM use this file to run the powershell script bypassing the policy restrictions | |
| PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& '%~dpn0.ps1'" | |
| pause |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import CoreFoundation | |
| from Foundation import NSDate | |
| # read Safari's current ManagedPlugInPolicies | |
| policy = CoreFoundation.CFPreferencesCopyAppValue( | |
| 'ManagedPlugInPolicies', 'com.apple.Safari') | |
| if not 'com.oracle.java.JavaAppletPlugin' in policy: | |
| # create an empty dict | |
| policy['com.oracle.java.JavaAppletPlugin'] = {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # NOTE: These patterns take into account the additional log-line information passed to the logstash listener from rsyslog. YMMV. | |
| DHCPD ((%{SYSLOGTIMESTAMP:timestamp})\s*(%{HOSTNAME:hostname})\s*dhcpd\S+\s*(%{WORD:dhcp_action})?.*[for|on] (%{IPV4:dhcp_client_ip})?.*[from|to] (%{COMMONMAC:dhcp_client_mac})?.*via (%{USERNAME:interface})) | |
| IPTABLES ((%{SYSLOGTIMESTAMP:nf_timestamp})\s*(%{HOSTNAME:nf_host})\s*kernel\S+\s*(%{WORD:nf_action})?.*IN=(%{USERNAME:nf_in_interface})?.*OUT=(%{USERNAME:nf_out_interface})?.*MAC=(%{COMMONMAC:nf_dst_mac}):(%{COMMONMAC:nf_src_mac})?.*SRC=(%{IPV4:nf_src_ip}).*DST=(%{IPV4:nf_dst_ip}).*PROTO=(%{WORD:nf_protocol}).?*SPT=(%{INT:nf_src_port}?.*DPT=%{INT:nf_dst_port}?.*)) | |
| DNS ((%{MONTHDAY:day})-(%{MONTH:month})-(%{YEAR:year}) (%{TIME:timestamp}) client (%{IPV4:dns_client_ip})#(%{NONNEGINT:dns_uuid})?.*query: (%{HOSTNAME:dns_dest}) (%{WORD:dns_type}) (%{WORD:dns_record})?.*(%{IPV4:dns_server})) | |
| PGSQL ((%{SYSLOGTIMESTAMP:pgsql_timestamp}) (%{HOSTNAME:pgsql_hostname})?.*SAST >(%{WORD:pgs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| SERVER_MOUNT_PT="/Volumes/Munki" | |
| SERVER_URL="//SERVICEACCOUNTNAME:SERVICEACCOUNTPASS@mastermunkiserver.yourorg.org/Munki" | |
| we_mounted="false" | |
| MUNKI_MASTER="/Volumes/Munki/Master Repository/munki_repo/" | |
| MUNKI_LOCAL="/Users/Shared/munki_repo" | |
| # important, trailing slash must be on source and must not be on destination | |
| MountServer() |