Pentesting notes and snippets

Recon Copy pasta stuff I use for recon - both inside and outside of a target. Host Discovery Ping Sweeping: IP_RANGE='' SUBNET_MASK='/24' nmap -sn -oA onlineHosts "${IP_RANGE}/${SUBNET_MASK}" -sn: Use ping scan for host discovery (don’t run a port scan) -oA: Store output in normal, XML, and grepable file formats Parse IP Addresses from gnmap file grep "^Host: " onlineHosts.gnmap | grep "Status: Up" | \ cut -d " " -f 2 | sort -n | uniq Skip ICMP checks...

February 14, 2017 · Jayson Grace

Screen Cheatsheet

Create Screen Session screen -S <name> Attach Screen Session screen -x <name> Background Screen Session ctrl a d

December 7, 2015 · Jayson Grace


Premise This is a quick and dirty tutorial on how to get set up with the AWS EC2 API. Credentials Go to and follow the instructions to get your access key and secret access key. Install the CLI Component For this to work, you’ll need python and pip. Once you’ve ensured both are installed, run this command: pip3 install awscli Generate your config and credentials file Now that you have your credentials, go ahead and run this command:...

July 27, 2015 · Jayson Grace

Killing sl on the UNM CS Machines

This will be a quickie. Basically, the UNM CS machines have the sl (steam locomotive) command set up, which is incredibly annoying if you happen to accidentally type “ls” incorrectly - something I manage to do quite regularly. Let’s replace this with ls. Open ~/.bash_profile with your favorite text editor, and toss this in there (if it’s not already there): source ~/.bashrc Next, open ~/.bashrc and throw this up: alias sl='ls' alias LS='ls' alias l='ls' If there’s something already in there, do not overwrite it, unless you know what you’re doing....

February 5, 2015 · Jayson Grace

Setting up VNC on the UNM CS Machines

This will help you set up vnc for the cs machines for UNM Obviously, if you’re not a computer science student at UNM, this will not be very interesting to you. However, since I have been asked this question on multiple occasions, I figured it would be good to get the process documented and easily accessible. Here goes: Log into your CS account. Run this command: touch ~/.vnc/xstartup Throw this into that file with your favorite text editor:...

February 5, 2015 · Jayson Grace

Android Security Notes

Reverse Engineering Methodology Use jadx (used to analyze java bytecode) to disassemble an APK. Another great tool is Apktool Terminology Activity Something a user “touches” What launches when you tap the application icon Service Long running process that runs in the background An example of this is spotify - you listen to music while doing stuff on other apps Intent Used to facilitate communications between different Android objects A message that states that you did or want something to happen For example, this could be something like the phone ringing, or receiving an SMS message Intents are used to start activities and services or deliver a broadcast message Intent Receiver Respond to input, which could be something like an SMS message, losing WiFi, etc....

Jayson Grace

Ansible Notes

Installation on Centos 8 sudo dnf makecache sudo dnf install -y epel-releasesudo dnf makecache sudo dnf install -y ansible Resource: Build Control Node I used an Ubuntu 20.04 instance for this. While I do provide installation instructions for Red Hat, everything is focused around Ubuntu. If you want to use another OS, you’ll just need to change the commands for installing and the username (ubuntu). Create SSH key for management ssh-keygen -b 4096 -f ~/....

Jayson Grace

Apple Notes

Keyboard Shortcuts There are many useful keyboard shortcuts that I’ve come across over time, and I try to include them here so they don’t get forgotten. DevTools keyboard shortcut COMMAND+SHIFT+I Resource: Open Finder OPTION + COMMAND + SPACE Resource:,window%20for%20quick%20file%20searches. Open Spotlight COMMAND + SPACE Maximize window COMMAND + TAB to highlight the minimized window you want to maximize. Before releasing the COMMAND button, hit the OPTION button (ALT on a windows keyboard)....

Jayson Grace

AWS Cheatsheet

This contains various commands and information that I find useful for AWS work. Install latest version of AWS CLI on linux curl "" \ -o "" unzip sudo ./aws/install Resource: Check AWS CLI is installed if ! [ -x "$(command -v aws)" ]; then echo 'Error: AWS CLI is not installed.' >&2 else echo 'AWS CLI is installed.' aws --version fi Credentials Use env vars Create the following env vars with your AWS credentials:...

Jayson Grace

AWS Security

Automated Scanning Tools These are tools that can be run by attackers or defenders to get a sense for all of the assets in an environment. Create audit user to use for running tools export AUDIT_IAM_USER="usr-security-audit" aws iam create-user --user-name "${AUDIT_IAM_USER}" aws iam attach-user-policy --user-name "${AUDIT_IAM_USER}" --policy-arn arn:aws:iam::aws:policy/ReadOnlyAccess aws iam attach-user-policy --user-name "${AUDIT_IAM_USER}" --policy-arn arn:aws:iam::aws:policy/SecurityAudit aws iam create-access-key --user-name "${AUDIT_IAM_USER}" Be sure to create a profile in your ~/.aws/config and ~/....

Jayson Grace