Chef Notes

Chef Server Download On Centos 8: CHEF_SERVER_DL=https://packages.chef.io/files/stable/chef-server/14.1.0/el/8/chef-server-core-14.1.0-1.el7.x86_64.rpm 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="chefadmin@myorg.com" 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 site:techvomit.net intext:"penetration" Find all pdfs in a site site:tacticaltech.org filetype:pdf Resource: https://exposingtheinvisible.org/guides/google-dorking/ Search for emails in xlsx files intext:@<domain> filetype:xlsx Search for subdomain takeover reports on h1 site:hackerone.com intext:"subdomain takeover"

May 24, 2019 · Jayson Grace

Google Search Analytic on a Ghost blog

Add google site verification Go to https://search.google.com/search-console 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 https://analytics.google.com 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: https://www.puppetcookbook.com/posts/installing-modules-from-the-puppet-forge.html List installed Modules puppet module list Resource: https://puppet.com/docs/puppet/5.3/modules_installing.html Show module path Run this on the puppet master: puppet config print modulepath Resource: https://puppet.com/docs/puppet/5.5/dirs_modulepath.html 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 https://apt.releases.hashicorp.com/gpg | sudo apt-key add - sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main" sudo apt-get update && sudo apt-get install packer # Verify it works packer Resource: https://learn.hashicorp.com/tutorials/packer/getting-started-install 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: https://stackoverflow.com/questions/22707040/change-permissions-of-file-in-ruby Move file without fileutils File.rename source_path, target_path Resource: https://stackoverflow.com/questions/403239/how-do-i-move-a-file-with-ruby Fix extensions not built errors Run this command: gem pristine --all Resource: https://stackoverflow.com/questions/48339706/ignoring-gems-because-its-extensions-are-not-built Multiline comments =begin stuff =end Resource: https://stackoverflow.com/questions/2989762/multi-line-comments-in-ruby 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: http_proxy=www.proxy.com:80 https_proxy=www.proxy.com:80 no_proxy=.proxy.com,localhost,127.0.0.1 Resource: https://askubuntu.com/questions/175172/how-do-i-configure-proxies-without-gui 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 "http://www.proxy.com:80"; Acquire::https::proxy "http://www.proxy.com:80"; Acquire::ftp::proxy "http://www.proxy.com:80"; 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: https://stackoverflow.com/questions/18140270/how-to-write-html-code-inside-php Setup Debugger with PHP w/ PHPStorm and XAMPP Start out by installing phpstorm and xampp. Follow the process in here: https://www.techflirt.com/install-configure-xdebug-on-xampp-windows-and-mac/ 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