Chef Notes

Chef Server Download On Centos 8: CHEF_SERVER_DL= INSTALL_DIR=/home/admin wget $CHEF_SERVER_DL -P $INSTALL_DIR Installation sudo dnf localinstall -y $INSTALL_DIR/chef-server-core-14.1.0-1.el7.x86_64.rpm Configuration Start by setting the following variables to correspond with the commands below: USERNAME="chefadmin" FIRST_NAME="Chef" LAST_NAME="Administrator" EMAIL="" KEY_PATH="${HOME}/chefadmin.pem" ORG_NAME="myorg" ORG_FULL_NAME="Organization Inc." VALIDATION_KEY_PATH="/etc/chef/myorg-validator.pem" Install Chef server and automatically accept the license: sudo chef-server-ctl reconfigure --chef-license=accept Show status of server sudo chef-server-ctl status Create new user The key at ${KEY_PATH} will be used by a workstation at a later time....

July 18, 2019 · Jayson Grace

Frida Cheatsheet

IOS List running applications: frida-ps -Ua Run a script on a plugged in phone (and spawn the application): frida -U -l <script>.js --no-pause -f <application>

July 16, 2019 · Jayson Grace

Google Dorks

Find instances of a string in a site intext:"penetration" Find all pdfs in a site filetype:pdf Resource: Search for emails in xlsx files intext:@<domain> filetype:xlsx Search for subdomain takeover reports on h1 intext:"subdomain takeover"

May 24, 2019 · Jayson Grace

Google Search Analytic on a Ghost blog

Add google site verification Go to register your site Easy way: Go to /ghost/##/settings/code-injection, and paste the code you’re given from the google site into the Site Header, click Save. Hard way: Go to your theme Open default.hbs Paste the code you’ve been given under the <head> area Add google search analytics Go to to register your site Easy way: Go to /ghost/##/settings/code-injection, and paste the code you’re given from the google site into the Site Header, click Save....

March 1, 2019 · Jayson Grace

GDB Notes

Compile This will compile in debug mode and include symbols gcc -ggdb cprog.c -o cprog Load exec in gdb gdb ./exec Set breakpoint on main b main Show instructions for main function disassemble Show all functions info functions Show all variables This will only work if the program is compiled in debug mode (with symbols) info variables List breakpoints i b Break on a specific memory address b *0x8048417 Show register values i r Show multiple register values i r ebp esp View value for a particular register String value:...

February 26, 2019 · Jayson Grace

Puppet Notes

Modules Install module on Puppet master /opt/puppetlabs/bin/puppet module install <name of module> Uninstall module on Puppet master /opt/puppetlabs/bin/puppet module uninstall <name of module> Resource: List installed Modules puppet module list Resource: Show module path Run this on the puppet master: puppet config print modulepath Resource: Change module install path By default, puppet module install installs modules into the first directory in the Puppet modulepath, which defaults to $codedir/environments/production/modules....

February 18, 2019 · Jayson Grace

Packer notes

Installation on Ubuntu 20.04 curl -fsSL | sudo apt-key add - sudo apt-add-repository "deb [arch=amd64] $(lsb_release -cs) main" sudo apt-get update && sudo apt-get install packer # Verify it works packer Resource: File transfer This snippet will move a directory called scripts into the /tmp directory of the AMI being built. It will then run an ls -l on /tmp from within the AMI being built so that we can see that the directory transferred as we expected it to....

December 14, 2018 · Jayson Grace

Ruby Notes

This will encompass things that I find useful and end up looking up later when I haven’t coded in a while. File Operations Chmod file File.chmod(0600, file) Resource: Move file without fileutils File.rename source_path, target_path Resource: Fix extensions not built errors Run this command: gem pristine --all Resource: Multiline comments =begin stuff =end Resource: Install specific version of a gem Install the bcrypt_pbkdf package that came before version 2....

November 30, 2018 · Jayson Grace

Kali Config

This encompasses the various things I do whenever I’m setting up a new Kali VM in Virtualbox. Proxy Configuration Configure proxy (if applicable) by inputting the required values into /etc/environment. It will probably look something like this:,localhost, Resource: Config apt with proxy (if applicable): touch /etc/apt/apt.conf.d/95proxies Input the required values into this file. It will probably look something like this: Acquire::http::proxy ""; Acquire::https::proxy ""; Acquire::ftp::proxy ""; Restart the server : reboot...

October 3, 2018 · Jayson Grace

PHP Notes

I’m not thrilled that I have to create this cheatsheet, but such is life. Embed HTML in php <?php echo "<p>Stuff</p>"; ?> Resource: Setup Debugger with PHP w/ PHPStorm and XAMPP Start out by installing phpstorm and xampp. Follow the process in here: For the above process, don’t forget to install xdebug for the version of php in xampp, and not the OS version: /Applications/XAMPP/bin/php -v Make sure you do everything in here: https://confluence....

September 21, 2018 · Jayson Grace