Skip to content

Commit 898775a

Browse files
authored
Merge pull request #1 from ResistanceIsUseless/ResistanceIsUseless-Axiom-Commands-Cheatsheet
axiom commands cheatsheet
2 parents 04e91b6 + 93331f3 commit 898775a

File tree

1 file changed

+81
-67
lines changed

1 file changed

+81
-67
lines changed

Diff for: Cheatsheet.md

+81-67
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,41 @@
22

33
I've put together a little cheatsheet to help you on your way!
44

5-
---
65

7-
## Pick a Packer provisioner
8-
We currently offer [three](https://github.com/pry0cc/axiom/tree/master/images/provisioners) different base images you can provision. Our [Default](https://github.com/pry0cc/axiom/blob/master/images/provisioners/full.json) provisioner comes with tools to run most [modules](https://github.com/pry0cc/axiom/tree/master/modules). The [ReconFTW](https://github.com/pry0cc/axiom/blob/master/images/provisioners/reconftw.json) provisioner comes with all tools installed and the [Barebones](https://github.com/pry0cc/axiom/blob/master/images/provisioners/barebones.json) provisioner comes with no tools installed. If you want to bring-you-own Packer JSON provisioner, select custom.
6+
---
7+
# axiom-build
8+
**Pick a Packer provisioner** :hatching_chick:
9+
> You must run axiom-configure before anything else. THis creates your axiom.json file which is required by other commands.
910
```
1011
axiom-build
1112
```
12-
## Initialize a single instance
13+
> We currently offer [three](https://github.com/pry0cc/axiom/tree/master/images/provisioners) different base images you can provision, and 2 custom images.
14+
> - [Default](https://github.com/pry0cc/axiom/blob/master/images/provisioners/default.json) provisioner comes with all tools installed.
15+
> - [ReconFTW](https://github.com/pry0cc/axiom/blob/master/images/provisioners/reconftw.json) provisioner comes with all tools installed.
16+
> - [Barebones](https://github.com/pry0cc/axiom/blob/master/images/provisioners/barebones.json) provisioner comes with no tools installed and is just the base ubuntu image.
1317
18+
> Custom Images:
19+
> - [Full](https://github.com/pry0cc/axiom/blob/master/images/provisioners/full.json) provisioner comes with only tools with [modules](https://github.com/pry0cc/axiom/tree/master/modules) availabled. Reccomended for axiom-feet.
20+
> - [Light](https://github.com/pry0cc/axiom/blob/master/images/provisioners/light.json) provsioner comes with zsh and a few other minor adjustments over the barebones provsioner.
21+
> If you want to bring-your-own Packer JSON provisioner, select custom. *Make sure your packer json is placed in ~/.axiom/images/provsioners*
1422
---
23+
# axiom-init
24+
**Initialize a single instance** :seedling:
1525

1626
```bash
1727
axiom-init <name> # Init
18-
axiom-init <name> --deploy=<profile> --restore=<box> # Init & deploy & restore
28+
axiom-init <name> --deploy=<profile> --restore=<box> # Init & deploy & restore
29+
#Note: profile argument is file name is without .json
1930
```
20-
21-
the `--deploy` option allows you to deploy a profile (stored in `~/.axiom/profiles/`). `--restore` will restore a profile. These options can be used together.
31+
> the `--deploy` option allows you to deploy a profile (stored in `~/.axiom/profiles/`). `--restore` will restore a profile. These options can be used together.
2232
2333
---
24-
25-
## Connect to an instance
34+
# axiom-ssh
35+
**Connect to an instance** - axiom-connect**
2636

2737
```bash
38+
axiom-connect #automatically connects to list intialized instance
39+
axiom-connect <name>
2840
axiom-ssh <name> <ssh args>
2941
axiom-ssh <name> --tmux
3042
axiom-ssh <name> -m -t=<tmux session> # Connect with mosh and attach to tmux session
@@ -33,28 +45,30 @@ axiom-ssh <name> -L 8080:127.0.0.1:8080 -D 4040 # All additional SSH args are p
3345
axiom-ssh <name> --cache # Don't generate ssh config, just connect with cache
3446
axiom-ssh --just-generate # Generate an SSH config at ~/.axiom/.sshconfig
3547
```
36-
37-
## Backup an initialized instance to the cloud
48+
---
49+
# axiom-backup
50+
**Backup an initialized instance to the cloud** :luggage:
3851

3952
```bash
4053
axiom-backup
4154
```
4255

43-
After running axiom-init you can set up config files, unique wordlists, private tools etc, take a snapshot of that image and use it to deploy future axiom instances/fleets.
56+
> After running axiom-init you can set up config files, unique wordlists, private tools etc, take a snapshot of that image and use it to deploy future axiom instances/fleets.
4457
4558
---
46-
47-
## Backup the home directory of an initialized instance to the local filesystem
59+
# axiom-sync
60+
**Backup the home directory of an initialized instance to the local filesystem**
4861

4962
```bash
5063
axiom-sync instance01
5164
```
5265

53-
This allows you to download a copy of everything in an axiom instance to you local filesystem
66+
> This allows you to download a copy of everything in an axiom instance to you local filesystem
5467
5568
---
5669

57-
## List all box backups
70+
# axiom-boxes
71+
**List all box backups** :brain:
5872

5973
```bash
6074
axiom-boxes ls # List boxes
@@ -65,59 +79,61 @@ axiom-boxes archive <box> # Archive a box (tarball & gpg -e)
6579
axiom-boxes unarchive <box> # Unarchive (from ~/.axiom/archives/), gpg decrypts
6680
axiom-boxes get pry0cc/lazy # Get a box from github, username/repo
6781
```
68-
69-
Using the archive option will convert the box to a tarball and encrypt using the email specified in your account `~/.axiom/accounts/*.json`
82+
> Using the archive option will convert the box to a tarball and encrypt using the email specified in your account `~/.axiom/accounts/*.json`
7083
7184
---
7285

73-
## Manage user accounts
86+
# axiom-region
87+
**Switch to a new region** :compass:
7488

7589
```bash
76-
axiom-account-setup # Setup a new account
77-
axiom-account # No args, list available accounts
78-
axiom-account <account> # Select/Switch to the specifed account
90+
axiom-region ls # lists regions
91+
axiom-region select <region> # select region
92+
93+
axiom-region select ams2
7994
```
8095
8196
---
8297
83-
## Initialize a fleet
98+
# axiom-account
99+
**Manage user accounts**
84100
85101
```bash
86-
axiom-fleet -i=13 # Initialize a fleet, name it randomly
87-
axiom-fleet testy -i=8 # Initialize a fleet named 'testy', instances will be named, testy01, test02 etc
88-
axiom-fleet testy -i=10 --regions=NYC1,LON1,TOR1 # Initialize a fleet using round-robin region distribution
102+
axiom-account-setup # Setup a new account
103+
axiom-account # No args, list available accounts
104+
axiom-account <account> # Select/Switch to the specifed account
89105
```
90-
91106
---
92107
93-
## Copy files to and from hosts
94-
95-
Copy a remote file from all instances in myfleet to local folder. `'$name'` must be wrapped single quotes. `'$name'` is a required literal string and gets interpolated from the instance name. <br>
108+
# axiom-scp
109+
**Copy files to and from hosts**
110+
> Copy a remote file from all instances in myfleet to local folder. `'$name'` must be wrapped single quotes. `'$name'` is a required literal string and gets interpolated from the instance name. <br>
96111
97112
```
98113
axiom-scp 'myfleet*':/home/op/myfile.txt '~/local/folder/$name.txt'
99114
```
100115
101-
Copy a remote file from one instance 'myfleet05' to a local file <br>
116+
> Copy a remote file from one instance 'myfleet05' to a local file <br>
102117
103118
```
104119
axiom-scp myfleet05:/home/op/myfile-from-myfleet05.txt '~/local/folder/myfile-from-myfleet05.txt'
105120
```
106121
107-
Copy a local file to all instances in myfleet, for example uploading a custom wordlist <br>
122+
> Copy a local file to all instances in myfleet, for example uploading a custom wordlist <br>
108123
109124
```
110125
axiom-scp myfile.txt 'myfleet*':/home/op/myfile.txt
111126
```
112127
113-
Copy a local folder to all instances in myfleet, for example uploading a folder of custom nuclei templates <br>
128+
> Copy a local folder to all instances in myfleet, for example uploading a folder of custom nuclei templates <br>
114129
115130
```
116131
axiom-scp mytemplates/ 'myfleet*':/home/op/custom-templates
117132
```
118133
---
119134
120-
## Deploy a profile
135+
# axiom-select
136+
**Deploy a profile** :mechanical_arm:
121137
122138
```bash
123139
axiom-select '<instance>'
@@ -126,57 +142,65 @@ axiom-deploy openvpn # Install openvpn against host or fleet
126142
axiom-deploy covenant # Install covenent
127143
```
128144
129-
All profiles can be found in `~/.axiom/profiles`
130-
131-
---
145+
> All profiles can be found in `~/.axiom/profiles`
132146
133-
## Connect to an OpenVPN Server Deployed by Axiom
147+
**Connect to a remote axiom instance Docker (over ssh)**
134148
135149
```bash
136-
axiom-vpn <instance>
150+
axiom-select <instance>
151+
. axiom-docker # Not a typo, the . means source
152+
docker ps
137153
```
138-
139154
---
140-
141-
## Connect to a remote axiom instance Docker (over ssh)
155+
# axiom-vpn
156+
**Connect to an OpenVPN Server Deployed by Axiom**
142157
143158
```bash
144-
axiom-select <instance>
145-
. axiom-docker # Not a typo, the . means source
146-
docker ps
159+
axiom-vpn <instance>
147160
```
148161
149162
---
150163
151-
## Proxy through a set of hosts (or one)
152164
165+
# axiom-proxy
166+
**Proxy through a set of hosts (or one)**
153167
```bash
154168
axiom-proxy '<fleet>*'
155169
axiom-proxy '<instance>'
156170
axiom-proxy 'testy*'
157171
proxychains4 curl -s ipinfo.io
158172
```
159-
160-
This will SSH tunnel all hosts to a range of local ports, 127.0.0.1:5000-50100, then generate a proxychains configuration file to `./proxychains.conf`
173+
> This will SSH tunnel all hosts to a range of local ports, 127.0.0.1:5000-50100, then generate a proxychains configuration file to `./proxychains.conf`
161174
162175
---
163176
164-
## Create a DNS A record
165-
177+
# axiom-dns
178+
**Create a DNS A record**
179+
*Currently only supported by Digital Ocean*
166180
```bash
167181
axiom-dns ls # List domains
168182
axiom-dns ls <domain> # List records for domain
169183
axiom-dns add <subdomain> <domain> <ip address>
170184
axiom-dns add cisco navisec.xyz 167.71.89.136 # Example, this will create a record cisco.navisec.xyz pointing to 167.71.89.136
171185
```
172-
173-
Domain names can be hosted in DigitalOcean ([https://cloud.digitalocean.com/networking/domains?](https://cloud.digitalocean.com/networking/domains?i=87a4bd))
186+
> Domain names can be hosted in DigitalOcean ([https://cloud.digitalocean.com/networking/domains?](https://cloud.digitalocean.com/networking/domains?i=87a4bd))
174187
175188
---
176189
177-
## Scanning using a fleet
190+
# axiom-fleet
191+
**Initialize a fleet** :rocket:
192+
193+
```bash
194+
axiom-fleet -i=13 # Initialize a fleet, name it randomly
195+
axiom-fleet testy -i=8 # Initialize a fleet named 'testy', instances will be named, testy01, test02 etc
196+
axiom-fleet testy -i=10 --regions=NYC1,LON1,TOR1 # Initialize a fleet using round-robin region distribution
197+
```
198+
199+
---
178200
179-
Modules are in `~/.axiom/modules/`
201+
# axiom-scan
202+
**Scanning using a fleet** :rocket:
203+
*Modules are in `~/.axiom/modules/`*
180204
181205
```bash
182206
axiom-select 'fleet*' # fleets should be already selected, but just in case, select can be a good idea
@@ -196,21 +220,11 @@ axiom-scan ips.txt -m nmap -oX full -p- -T5 -sV --script=vulners # Will create
196220

197221
axiom-scan ips.txt -m masscan -oG masscan.txt # Run masscan
198222
```
199-
200223
---
201224
202-
## Switch to a new region
203-
204-
```bash
205-
axiom-region ls # lists regions
206-
axiom-region select <region> # select region
207-
208-
axiom-region select ams2
209-
```
210225
211-
---
212-
213-
## Execute a command against an Instance
226+
# axiom-exec
227+
**Execute a command against an Instance** :robot:
214228
215229
```bash
216230
axiom-exec '<command>' '<instance>' # Execute a command against an instance
@@ -219,4 +233,4 @@ axiom-exec '<command>' '<instance>' -q --cache # Execute silent, just show comm
219233

220234
axiom-exec 'nmap -T5 navisec.io' 'testy01' -q --cache  # Example
221235
axiom-execb 'nmap -T5 navisec.io' 'testy01' -q --cache
222-
```
236+
```

0 commit comments

Comments
 (0)