Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prepare-npk-installation.sh + delete_npkfile.sh scripts #155

Open
wants to merge 173 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
173 commits
Select commit Hold shift + click to select a range
e179ae1
Docker support & fix terraform template
AlphaGit Nov 16, 2019
f90c7c3
Merge pull request #1 from Coalfire-Research/main
c6fc Apr 11, 2021
d7b0a5c
Fixed wiki reference
c6fc Apr 16, 2021
26096f8
Merge pull request #2 from c6fc/dev
c6fc Apr 16, 2021
e5d705c
Merge pull request #3 from c6fc/main
c6fc Apr 16, 2021
c30d407
Merge branch 'docker-release' of https://github.com/AlphaGit/npk into…
c6fc Apr 19, 2021
044fe73
Merge branch 'AlphaGit-docker-release' into dev
c6fc Apr 19, 2021
7ecbe14
Added quick deploy
c6fc Apr 19, 2021
2e85b3b
Pin AWSCLI version and update dependency checks
robellegate May 16, 2021
b305351
Merge pull request #4 from robellegate/main
c6fc May 20, 2021
fca4e65
Removed inappropriate 'then' case
c6fc Jul 27, 2021
f3255f2
Merge branch 'dev' into main
c6fc Jul 27, 2021
7b20997
api rewrite progress
c6fc Sep 4, 2021
e1247b8
Migrate to Terraform 0.15, break up API.
c6fc Sep 5, 2021
cbbfe93
Uncommit touch file
c6fc Sep 5, 2021
4f679d8
rewrite create, execute, delete
c6fc Sep 6, 2021
5a3664b
Fix terraform signing and ACM dependency
c6fc Sep 7, 2021
c711d70
Updated sample settings
c6fc Sep 9, 2021
f5805fb
Fix attempt for #6
c6fc Sep 9, 2021
f54ac85
Updated dockerfile and backend
c6fc Sep 11, 2021
025ba70
Rewrite spot_monitor, fix events & SSO
c6fc Sep 13, 2021
322c075
lambda function fixes and user friendliness changes
c6fc Sep 14, 2021
299eae9
Added large file upload support
c6fc Sep 14, 2021
b3dbc4b
Fix order of DNS checks
c6fc Sep 15, 2021
3945b88
Fix spot_monitor race condition
c6fc Sep 15, 2021
73cd336
Merge branch 'dev' into api_rewrite
c6fc Sep 18, 2021
61c72d5
Merge pull request #10 from c6fc/api_rewrite
c6fc Sep 18, 2021
a55a713
Deprecated old files
c6fc Sep 18, 2021
5f40f04
Merge pull request #11 from c6fc/dev
c6fc Sep 18, 2021
e117e7a
Updated quota handling
c6fc Sep 22, 2021
6b8af61
Merge pull request #13 from c6fc/dev
c6fc Sep 22, 2021
b323107
Fix quotas.json
c6fc Sep 22, 2021
e4b79ea
Merge pull request #14 from c6fc/dev
c6fc Sep 22, 2021
13f0744
deploy sourceable
c6fc Oct 12, 2021
d21fcbb
major rewrite on quotas and instance selection
c6fc Oct 13, 2021
87793b2
Mostly functional - benchmarking
c6fc Oct 17, 2021
2b3fb41
Functional - shift to ML Base AMI
c6fc Oct 20, 2021
3a3749b
mask fix, add interrupt catcher, campaign sort & QOL
c6fc Oct 25, 2021
72aa20a
Dropped min quota from 16 to 4, added skipquota
c6fc Oct 28, 2021
a07ef20
Trying NPM for JSonnet/Terraform deps
c6fc Oct 31, 2021
aa9bd38
Populated package scripts
c6fc Oct 31, 2021
ae3fead
Fix file permissions on cache
c6fc Oct 31, 2021
12e9641
Fixed toggles in new campaign form
c6fc Oct 31, 2021
8cd57e3
Added event search
c6fc Oct 31, 2021
17388f2
Update build-docker-image.sh
ostrichgolf Nov 1, 2021
9472eca
Update build-docker-image.sh
ostrichgolf Nov 1, 2021
ffea020
Upgrade compute-node, finish integrating primaryRegion
c6fc Nov 14, 2021
1a3e8c4
Fixed selfhost
c6fc Nov 14, 2021
215dd51
Merge branch 'dev' into regions
c6fc Nov 14, 2021
b22985e
Merge pull request #18 from c6fc/regions
c6fc Nov 14, 2021
f1643e1
Merging explicit platform per ostrichgolf
c6fc Nov 14, 2021
1600651
Merge branch 'ostrichgolf-main' into dev
c6fc Nov 14, 2021
3d86600
Selfhost default
c6fc Nov 16, 2021
d12cbbf
Merge pull request #19 from c6fc/dev
c6fc Nov 16, 2021
46ad019
Revert "Dev"
c6fc Nov 16, 2021
150c446
Merge pull request #20 from c6fc/revert-19-dev
c6fc Nov 16, 2021
e1e7418
Merge pull request #21 from c6fc/selfhost
c6fc Nov 16, 2021
80477a0
remove upload scripts
c6fc Nov 16, 2021
637dc90
Merge branch 'dev' of github.com:c6fc/npk into dev
c6fc Nov 16, 2021
0dc8ac0
Fixed brad; thanks Stigs
c6fc Nov 22, 2021
810c88e
Fix deploy command
c6fc Nov 22, 2021
128557a
Fix deploy command again
c6fc Nov 22, 2021
d1b7b00
Fix deploy command again again
c6fc Nov 22, 2021
c814ef5
Auth fix
c6fc Nov 22, 2021
ee0e904
Fix auth
c6fc Nov 23, 2021
e8b6cde
Fix create bucket error check
c6fc Nov 23, 2021
4b70e12
Fix hostedzone fallback
c6fc Nov 23, 2021
3faf6a2
Fixes w/Stigs
c6fc Nov 23, 2021
293c435
Fix campaign management cancel
c6fc Nov 29, 2021
fd35fd6
fix spot monitor
c6fc Dec 1, 2021
1cf3a43
fix spot monitor
c6fc Dec 1, 2021
9afadd8
Fix hash count, spot_monitor
c6fc Dec 6, 2021
94bb0a8
Removing deprecated files
c6fc Dec 7, 2021
e8d31d1
Merge branch 'dev'
c6fc Dec 7, 2021
594eb58
Revert "Dev"
c6fc Dec 7, 2021
2791325
Merge pull request #23 from c6fc/revert-22-dev
c6fc Dec 7, 2021
07fe7d0
Merge branch 'main' into dev
c6fc Dec 7, 2021
1cd2d5f
Merge pull request #24 from c6fc/dev
c6fc Dec 7, 2021
bd57dca
remove old dictionaries
c6fc Dec 7, 2021
9e41cf4
Use all regions for providers.
c6fc Dec 10, 2021
ac1dc02
sonnetization
c6fc Feb 23, 2022
38ad600
SLR fix
c6fc Feb 23, 2022
2602099
yargs & inquirer
c6fc Feb 24, 2022
1a01802
Move spot SLR to preamble
c6fc Feb 26, 2022
88bdebb
Default to interactive when no settings.
c6fc Feb 27, 2022
990ef7f
Sonnetry bump, move auth
c6fc Feb 28, 2022
7964b7c
Merge pull request #31 from c6fc/sonnetry
c6fc Feb 28, 2022
c93b09d
compression_pipe and uploaded wordlist/rules functional
c6fc Mar 1, 2022
dc759d8
Add .gz support to file upload
c6fc Mar 4, 2022
402758f
Add .gz support to file upload
c6fc Mar 4, 2022
12339d6
Remove LFM. Fix streaming uploads, verified up to 17GB
c6fc Mar 5, 2022
faeb559
Documentation
c6fc Mar 5, 2022
c9e761d
Clean-up and testing
c6fc Mar 5, 2022
942e022
inquirer stdin buffer
c6fc Mar 6, 2022
d1bcf59
add update, destroy
c6fc Mar 6, 2022
9265d45
Merge pull request #32 from c6fc/dev
c6fc Mar 6, 2022
13728dc
Remote settings
c6fc Mar 8, 2022
c765e42
Friendly output for remote settings
c6fc Mar 8, 2022
0decbad
Fix settings retrieval
c6fc Mar 8, 2022
1713943
Merge pull request #34 from c6fc/dev
c6fc Mar 9, 2022
f7f8f87
to_process timeout
c6fc Mar 9, 2022
5f261d1
Fix npm install on lambda functions
c6fc Mar 9, 2022
b8c258e
unb0rk compression_pipe
c6fc Mar 9, 2022
bc64fc5
Merge pull request #35 from c6fc/dev
c6fc Mar 9, 2022
68e4743
Add g5 instance support, fix remote settings bug
c6fc Mar 16, 2022
1cf8f63
un-benchmark
c6fc Mar 16, 2022
4958d03
Merge pull request #36 from c6fc/dev
c6fc Mar 16, 2022
cbaccec
Added Graviton and Radeon support
c6fc Mar 19, 2022
612bcc9
Wordlist volume calculation
c6fc Mar 21, 2022
56aeef7
persist sAMLMetadataFile, fix volume discovery
c6fc Mar 25, 2022
6a76bf8
fix artifact regression for settings
c6fc Mar 25, 2022
16c5e32
Add wordlist benchmarks, fix g3, p2, p3 regressions
c6fc Mar 27, 2022
3c6a442
Userdata
c6fc Mar 27, 2022
5c1721a
Merge pull request #41 from c6fc/dev
c6fc Mar 27, 2022
04cc0b7
Custom cloudshell prompt, README updates
c6fc Mar 27, 2022
4cd64c9
README update
c6fc Mar 27, 2022
d36e910
README update 3
c6fc Mar 27, 2022
a8e5004
Merge pull request #42 from c6fc/dev
c6fc Mar 27, 2022
76d7935
updated readme
c6fc Mar 30, 2022
0b57097
Merge pull request #43 from c6fc/dev
c6fc Mar 30, 2022
140377b
quickfix upload copy/volume size
c6fc Apr 9, 2022
2fa975a
Merge pull request #49 from c6fc/dev
c6fc Apr 9, 2022
d79d118
Facelift + per-region supported instances
c6fc Apr 11, 2022
d523da9
Remove debug string
c6fc Apr 11, 2022
1c660b0
Merge pull request #50 from c6fc/dev
c6fc Apr 23, 2022
3827504
large file compression handling
c6fc Apr 25, 2022
b03b89b
Use FAMILYREGIONS intead of REGIONS
c6fc May 2, 2022
0244b62
Remove debug
c6fc May 2, 2022
e473ba8
Fix strict content-type check on hashfile
c6fc May 7, 2022
41a14a6
Merge pull request #55 from c6fc/dev
c6fc May 7, 2022
f28ec1e
Remove SMS. Fix #57, #62, #63
c6fc Jun 26, 2022
2772ad7
Fix comma
c6fc Jun 26, 2022
b681be7
Add quota view
c6fc Jul 3, 2022
85fd4ea
Add quota tooltip to new campaign view
c6fc Jul 3, 2022
dca90d5
Merge pull request #66 from c6fc/dev
c6fc Jul 15, 2022
b5b568b
quota limit & crack count bugfixes
c6fc Sep 8, 2022
858ec40
fix api permissions
c6fc Sep 10, 2022
f3f3a18
Fix apigateway
c6fc Sep 13, 2022
fc170a3
fix g5.48xlarge, apigateway
c6fc Sep 25, 2022
5348c2b
Ask for restricted regions, and store in config
neilramsay Sep 27, 2022
5249939
Fix: Minor update Terraform to use regionKeys in VPC creation
neilramsay Sep 27, 2022
36a920b
Terraform: Filter regionKeys if restrict_to_regions set
neilramsay Sep 27, 2022
9c3465a
Send restrict_to_regions to angularjs/lambda functions
neilramsay Sep 27, 2022
124421b
Frontend: Limit quota listing to restricted regions
neilramsay Sep 27, 2022
438714e
Frontend: Limit start campaign region listing
neilramsay Sep 28, 2022
f77e172
Frontend: Validate user hasn't provided restricted region
neilramsay Sep 28, 2022
4ca624d
Backend: Ensure requests to create campaigns respects restricted regions
neilramsay Sep 28, 2022
bc1b9ba
Exclude wavelength zones
c6fc Oct 6, 2022
3132cc3
Merge pull request #74 from consegna/region_restrict
c6fc Oct 9, 2022
4d061b7
fail gracefully with computedQuotas
c6fc Oct 9, 2022
7e83f44
Adjust restrict_to_region, fix region eval
c6fc Oct 9, 2022
1626c92
Merge branch 'dev' into consegna
c6fc Oct 9, 2022
50e7e20
Merge pull request #75 from c6fc/consegna
c6fc Oct 9, 2022
61041da
Fix api_gateway_deployment retrigger
c6fc Oct 9, 2022
7681e1c
Add spotfleet SLR
c6fc Nov 3, 2022
bd33205
Fix event timestamp
c6fc Dec 6, 2022
930a765
remove campaign table putitem
c6fc Dec 6, 2022
c3befa9
use getServiceQuota instead of listServiceQuotas
c6fc Dec 6, 2022
6b297a5
Merge pull request #78 from c6fc/dev
c6fc Dec 9, 2022
849ebd4
Force campaigns to 'cancelled' when missing
c6fc Jan 9, 2023
c92ea82
Fix S3 defaults, update Sonnetry
c6fc May 5, 2023
0b6775b
Merge pull request #84 from c6fc/dev
c6fc May 5, 2023
1e48cd5
Update Graviton AMI name due to breaking AWS change. Add new Discord.
c6fc Dec 8, 2023
4012807
Merge pull request #92 from c6fc/dev
c6fc Dec 8, 2023
9390375
Fix Graviton again
c6fc Jan 10, 2024
55044df
Merge pull request #95 from c6fc/dev
c6fc Jan 10, 2024
09e1434
Fix architecture detection, use parallelcluster AMI
c6fc Jan 11, 2024
7a29e7f
Merge pull request #96 from c6fc/dev
c6fc Jan 12, 2024
c2fb981
Bumping lambda runtime
c6fc Feb 12, 2024
d8178f6
Fix NPM packaging
c6fc Feb 21, 2024
778661b
Add cognito condition, add visibility to missing metadata
c6fc Mar 10, 2024
af3859c
Update discord reference on failed deploy
c6fc Mar 10, 2024
fdcc282
Merge pull request #99 from c6fc/dev
c6fc Apr 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 18 additions & 19 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
*.auto.tfvars
*.pem
#!terraform/dictionaries.auto.tfvars
*/.terraform*
*.tfstate
*.tfstate*
plan/
plan/*
site-content/angular/npk_config.js
site-content/assets/js/cognito_config.js
/site-content/assets/js/dictionary-buckets.js
**/node_modules
terraform/quotas.json
terraform/npk-settings.json
terraform/generated-settings.jsonnet
terraform/regions.json
terraform/*.tf.json
terraform-selfhost/*.tf.json
terraform/lambda_functions/zip_files/*
terraform/lambda_functions/proxy_api_handler/api_handler_variables.js
terraform/lambda_functions/status_reporter/npk_settings.js
terraform/lambda_functions/spot_monitor/npk_settings.js
terraform/lambda_functions/proxy_api_handler/userdata.sh
terraform/templates/api-handler-variables.tpl
terraform/templates/npk_settings.tpl
terraform-selfhost/components/
npk-settings.json
render-npk*
lambda_functions/zip_files/*
lambda_functions/*/accountDetails.json
lambda_functions/*/ENVVARS
lambda_functions/proxy_api_handler/api_handler_variables.js
lambda_functions/status_reporter/npk_settings.js
lambda_functions/spot_monitor/npk_settings.js
lambda_functions/proxy_api_handler/userdata.sh
lambda_functions/execute_campaign/userdata.sh
templates/api-handler-variables.tpl
templates/npk_settings.tpl
tools/components/*
tools/rules/*
tools/wordlists/*
terraform-selfhost/upload_npkfile.sh
terraform-selfhost/upload_npkcomponents.sh
terraform-selfhost/sync_npkcomponents.sh
tools/upload_npkfile.sh
tools/upload_npkcomponents.sh
tools/sync_npkcomponents.sh
**.bak
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
135 changes: 57 additions & 78 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,41 @@

NPK is a distributed hash-cracking platform built entirely of serverless components in AWS including Cognito, DynamoDB, and S3. It was designed for easy deployment and the intuitive UI brings high-power hash-cracking to everyone.

![Image](/readme-content/dashboard-active.png)
![dashboard_progress](https://user-images.githubusercontent.com/143415/162669450-1b6da5bb-9e58-4cc5-941c-82b565f86b1b.png)

'NPK' is an initialism for the three primary atomic elements in fertilizer (Nitrogen, Phosphorus, and Potassium). Add it to your hashes to increase your cred yield!

## How it works

Lets face it - even the beastliest cracking rig spends a lot of time at idle. You sink a ton of money up front on hardware, then have the electricity bill to deal with. NPK lets you leverage extremely powerful hash cracking with the 'pay-as-you-go' benefits of AWS. For example, you can crank out as much as 1.2TH/s of NTLM for a mere $14.70/hr. NPK was also designed to fit easily within the free tier while you're not using it! Without the free tier, it'll still cost less than 25 CENTS per MONTH to have online!

If you'd like to see it in action, check out the video here: https://www.youtube.com/watch?v=BrBPOhxkgzc
Let's face it - even the beastliest cracking rig spends a lot of time at idle. You sink a ton of money up front on hardware, then have the electricity bill to deal with. NPK lets you leverage extremely powerful hash cracking with the 'pay-as-you-go' benefits of AWS. For example, you can crank out 336 GH/s of NTLM for a mere $1/hr and scale it however you want. NPK was also designed to fit easily within the free tier while you're not using it! Without the free tier, it'll still cost less than $1 per MONTH to have online!

## Features

### 1. Super easy install

One config file, one command to run. That's about it.
Paste a one-liner into AWS CloudShell. Pretty easy.

```source <(curl https://npkproject.io/cloudshell_install.sh)```

If you'd like to use the `dev` branch to use beta features, use this one-liner instead:

```source <(curl https://npkproject.io/cloudshell_install_dev.sh)```

![cloudshell_oneliner](https://user-images.githubusercontent.com/143415/160295789-7b4f21fa-4ac3-4900-b78a-7a974b9f48ac.png)

There are also [Step-by-step instructions](https://github.com/c6fc/npk/wiki/Step-by-step-Installation) if you want them.

### 2. Intuitive campaign builder

Take the trial-and-error out of complex attack types with the intuitive campaign builder. With a couple clicks you can create advanced campaigns that even advanced Hashcat users would struggle to emulate.

![gpu_families](https://user-images.githubusercontent.com/143415/156901010-a6ae07e8-273b-496c-8916-b0d8955d840f.png)

### 3. Campaign price and coverage estimates

Take the guess-work out of your campaigns. See how far you'll get and how much it will cost *before* starting the campaign.

![Image](/readme-content/coverage.png)
![coverage](https://user-images.githubusercontent.com/143415/156901016-a63b2ea1-fcf0-4a48-99c5-a1c6ab2e3221.png)

### 4. Max price enforcement and runaway instance protection

Expand All @@ -36,106 +46,75 @@ GPU instances are expensive. Runaway GPU instances are EXTREMELY expensive. NPK

NPK supports multiple users, with strict separation of data, campaigns, and results between each user. It can optionally integrate with SAML-based federated identity providers to enable large teams to use NPK with minimal effort.

![Image](/readme-content/userManagement.png)
![user_administration](https://user-images.githubusercontent.com/143415/156901873-6c89bb50-5268-4382-aebd-e45ee5ff2f9f.png)

### 6. Data lifecycle management

Configure how long data will stay in NPK with configurable lifecycle durations during installation. Hashfiles and results are automatically removed after this much time to keep things nicely cleaned up.

## Install

NPK requires that you have the following installed:
* **awscli** (v2)
* **terraform** (v0.11)
* **jq**
* **jsonnet**
* **npm**
## Easy Install

**ProTip:** To keep things clean and distinct from other things you may have in AWS, it's STRONGLY recommended that you deploy NPK in a fresh account. You can create a new account easily from the 'Organizations' console in AWS. **By 'STRONGLY recommended', I mean 'seriously don't install this next to other stuff'.**

```sh
$ git clone npk .
$ cd npk/terraform/
npk/terraform$ cp npk-settings.json.sample npk-settings.json
```
**Note: If you have an older version of NPK that you deployed without the one-liner, you'll need to destroy it before installing the new version**

Edit `npk-settings.json` to taste:

* `backend_bucket`: Is the bucket to store the terraform state in. If it doesn't exist, NPK will create it for you. Replace '<somerandomcharacters>' with random characters to make it unique, or specify another bucket you own.
* `campaign_data_ttl`: This is the number of seconds that uploaded files and cracked hashes will last before they are automatically deleted. Default is 7 days.
* `campaign_max_price`: The maximum number of dollars allowed to be spent on a single campaign.
* `georestrictions`: An array of https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 country codes that access should be WHITELISTED for. Traffic originating from other countries will not be permitted.
* `useCustomDNS`: A boolean value for whether to use custom domain names for your NPK installation. if set to `true`, you must configure `route53Zone` and `dnsNames` below.
* `route53Zone`: The Route53 Zone ID for the domain or subdomain you're going to host NPK with. You must configure this zone yourself in the same account before installing NPK.
* `dnsNames`: This is where you configure the DNS names for the console and api endpoints for your NPK installation. Both domains must be at the same depth as one another; e.g. {www,api}.npk.yourdomain.com
* `awsProfile`: The profile name in `~/.aws/credentials` that you want to piggyback on for the installation.
* `criticalEventsSMS`: The cellphone number of a destination to receive critical events to. Only catastrophic errors are reported here, so use a real one.
* `adminEmail`: The email address of the administrator and first user of NPK. Once the installation is complete, this is where you'll receive your credentials.
* `useSAML`: Set to `true` if you want to enable SAML-based federated authentication.
* `sAMLMetadataFile` or `sAMLMetadataUrl`: Only one can be configured, and it's required if `useSAML` is `true`.

Here's an example of a completed config file with custom DNS and no SAML:

```json
{
"backend_bucket": "backend-terraform-npkdev",
"campaign_data_ttl": 604800,
"campaign_max_price": 50,
"georestrictions": [],
"useCustomDNS": true,
"route53Zone": "Z05471496OWNC3E2EHCI",
"dnsNames": {
"www": [
"www.npk.yourdomain.com"
],
"api": [
"api.npk.yourdomain.com"
]
},
"awsProfile": "npkdev",
"criticalEventsSMS": "+12085551234",
"adminEmail": "[email protected]",
"debug_lambda": true,

"useSAML": false,
"sAMLMetadataFile": ""
}
```
After that, run the deploy!
1. Log into the AWS Console for the account you want to deploy to.
2. Click the AWS CloudShell button in the top right corner.
![cloudshell_icon](https://user-images.githubusercontent.com/143415/156901055-5107d4b2-c5b4-4ca5-8454-57e7504e2316.png)

```sh
npk/terraform$ ./deploy.sh
```
3. Paste in the one-liner: `source <(curl https://npkproject.io/cloudshell_install.sh)`
4. Use the wizard to complete the configuration

When the deploy finishes, you'll be dropped to a custom prompt, which indicates that NPK is deployed and CloudShell is connected to it.

![deployed_prompt](https://user-images.githubusercontent.com/143415/160296855-d2b5a383-445f-44a7-8a06-0051ad215536.png)

If you said 'no' at the end of the wizard, you can run `npm run deploy` from this prompt to finish the deployment.

See https://github.com/c6fc/npk/wiki/Detailed-NPK-Settings for more details about advanced configurations, or https://github.com/c6fc/npk/wiki/Configuring-SAML-SSO for help configuring SAML SSO.

For more details about each setting, their effects, and allowed values, check out [the wiki](https://github.com/Coalfire-Research/npk/wiki/Detailed-NPK-Settings). For more details around custom installations, see [Detailed Instructions](https://github.com/Coalfire-Research/npk/wiki/Detailed-Usage-Instructions).
## Connect to an existing installation

NPK will use the specified AWS cli profile to fully deploy NPK and provision the first user. If you'd like to change the configuration, simply run `./deploy.sh` again afterward. While it's deploying, pay a visit to https://aws.amazon.com/marketplace/pp/B07S5G9S1Z to subscribe and accept the terms of NVidia's AMIs. NPK uses these to ensure compatability with the GPUs. There is no cost associated with this step, but allows NPK to use these AMIs on your behalf.
**Note: If you have an older version of NPK that you deployed without the one-liner, you'll need to destroy it before installing the new version**

Once it's done, you'll receive an email with the URL and credentials to your deployment:
To connect to an existing NPK installation (which is needed to modify or uninstall NPK), log into the AWS account where NPK resides, click the CloudShell icon, and paste in the one-liner:

![Image](/readme-content/npk-invite.png)
```source <(curl https://npkproject.io/cloudshell_install.sh)```

**NOTE: CloudFront may take several minutes to come up after the deployment is done. This is normal. Grab yourself a cup of coffee after the deploy and give the cloud a few minutes to do its magic.**
CloudShell will now connect to NPK (which may take a minute or two), after which you'll drop to a new prompt that looks like this:

![deployed_prompt](https://user-images.githubusercontent.com/143415/160296855-d2b5a383-445f-44a7-8a06-0051ad215536.png)

You're now connected to your NPK installation. This can be performed by any user in the AWS account with admin rights, and can be performed in any region.

## Modify Install

You can change the settings of an install without losing your existing campaigns. Edit `npk-settings.json` as necessary, then rerun `deploy.sh`. That easy!
You can change the settings of an install without losing your existing campaigns. Use the instructions above to connect to your NPK installation, then edit `npk-settings.json` as necessary and run `npm run update`. It's that easy!

```sh
npk/terraform$ vim npk-settings.json
npk/terraform$ ./deploy.sh
cloudshell-user$ source <(curl https://npkproject.io/cloudshell_install.sh)
@c6fc/npk> vim npk-settings.json
< ... change your settings however you need >
@c6fc/npk> npm run update
```

## Uploading your own dictionaries and rule files

Once NPK has been deployed, administrative users can use the NPK console to upload wordlists and rule files using the 'Dictionary Management' link in the sidebar. NPK supports plain-text and gzipped dictionaries.

![upload_dictionaries](https://user-images.githubusercontent.com/143415/156901465-6e906177-e9fa-4189-8cda-0735813d02c0.png)

## Uninstall

You can completely turn down NPK and delete all of its data from AWS with a single command:
You can completely turn down NPK and delete all of its data from AWS very easily. Just attach your CloudShell to NPK, then run `npm run destroy`:

```sh
npk/terraform$ terraform destroy
cloudshell-user$ source <(curl https://npkproject.io/cloudshell_install.sh)
@c6fc/npk> npm run destroy
```

# Official Discord Channel

Come hang out on Discord!
Have questions, need help, want to contribute or brag about a win? Come hang out on Discord!

[![Porchetta Industries](https://discordapp.com/api/guilds/736724457258745996/widget.png?style=banner3)](https://discord.gg/k5PQnqSNDF)
[![Official c6fc Discord](https://discordapp.com/api/guilds/825770240309985310/widget.png?style=banner3)](https://discord.gg/w4G5k92czX)
Loading