This is a continuation of Useful Aliases in bash, but it’s 2020, and I have a bunch of aliases and functions I’ve been using to make my general life easier.
I use ZSH, but these additions can be transposed pretty easily to any shell.
In my .zshrc
, the first trick I use is exporting wordlists, I’ve spoken about this before but I think it’s important to reiterate to those who haven’t used variables for common paths how helpful it can be.e
export BIG="~/Lists/SecLists/Discovery/Web-Content/big.txt"
export WEB="~/Lists/SecLists/Discovery/Web-Content/"
export DNS="~/Lists/SecLists/Discovery/DNS/bitquark-subdomains-top100000.txt"
export DIRS_LARGE="~/Lists/SecLists/Discovery/Web-Content/raft-large-directories.txt"
export DIRS_SMALL="~/Lists/SecLists/Discovery/Web-Content/raft-small-directories.txt"
export FILES_LARGE="~/Lists/SecLists/Discovery/Web-Content/raft-large-files.txt"
export FILES_SMALL="~/Lists/SecLists/Discovery/Web-Content/raft-small-files.txt"
export SECLISTS="~/Lists/SecLists/"
This means that I can do things such as ffuf -ac -w $FILES_LARGE https://host.com/
, and not have to write out the entire path.
The next thing I have in my zshrc is:
alias hades="axiom-boxes new hades && axiom-init hades --restore=hades && axiom-ssh hades --tmux && axiom-backup hades && axiom
-rm hades -f"
This is a one-liner to start a VPS with my new tool, Axiom, a tool used for managing dynamic infrastructure. This one-liner will initialize a new instance, restore the last backup, and drop me into a tmux sessoin. Once I detach from the session, it will backup the machine (just the changes) and delete the box. As I only get charged when the machine is on, I can have multiple machines that I only initialize when I need it.
The beauty of dynamic infrastructure too is that I can spin this same machine up in any region at a moments notice, got a target that is located in San Francisco? Let me just tear down and put back up my scanning box in SFO2, oh we need to test London too? I can run
axiom-backup hades
axiom-region select lon1 <- work in progress ->
axiom-init hades-london --restore=hades
And then I have two identical machines, one in London, and one in San Francisco, when I’m done, I can tear them both down and back up their data. Should I want to restore my personal box to my work Digital Ocean for further work, I can do that too.
Eventually, I’m looking to expand to other cloud providers, I’m essentially trying to make portable cloud machine, where you control the data because you can just stop paying the provider and cancel the account at a moments notice.
But those are my handy aliases, this discussion is not just about me, what are your favourite aliases? And do we have any windows hackers on here with their shell tweaks? Share them all!