Upload your SSH public key to the VulnCheck platform to clone git repositories from VulnCheck's git servers. VulnCheck hosts repositories on two servers, and the server you use depends on the repository:
| Server | What it hosts | Example SSH URL |
|---|---|---|
git.vulncheck.com | The Initial Access Intelligence repository | git@git.vulncheck.com:vulncheck/initial-access.git |
git-poc.vulncheck.com | Cached proof-of-concept repositories, linked from the clone_ssh_url_cached field of exploit entries | git@git-poc.vulncheck.com:bitbucket.org/mburr/cve-2015-7547.git |
The same SSH key is used on both servers. The repositories you can clone depend on what your organization subscribes to.
This guide will walk you through the process of generating a new SSH key, adding it to your VulnCheck account, and testing it.
You need to generate a new SSH key and add it to your VulnCheck account. To do so, follow the instructions below:
ssh-keygen -t ed25519 -C "your_email@example.com"
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
This creates a new SSH key, using the provided email as a label. You should see a message on the screen similar to:
Generating public/private ALGORITHM key pair.
When you're prompted to "Enter a file in which to save the key", you can press Enter to accept the default file location. Please note that if you created SSH keys previously, ssh-keygen may ask you to rewrite another key, in which case we recommend creating a custom-named SSH key. To do so, type the default file location and replace id_ssh_keyname with your custom key name. You should see a message on the screen similar to:
Enter a file in which to save the key (/c/Users/USERNAME/.ssh/id_rsa):
Enter passphrase (empty for no passphrase): [Type a passphrase]
Enter same passphrase again: [Type passphrase again]
Once you have your ssh key generated, you need to add it to your VulnCheck account. To do so, follow the instructions below:
Once you have added your SSH key to your VulnCheck account, test it against the server that hosts the repository you need. git ls-remote checks that you can read the repository without downloading it.
You can specify the SSH command that git uses. To do so, follow the instructions below:
GIT_SSH_COMMAND='ssh -i ./sshkey' git ls-remote git@git.vulncheck.com:vulncheck/initial-access.git
GIT_SSH_COMMAND='ssh -i ./sshkey' git ls-remote git@git-poc.vulncheck.com:bitbucket.org/mburr/cve-2015-7547.git
If your key works, git prints a list of commit hashes and references, starting with HEAD. If you see Error: you are not authorized to do this, see Troubleshooting.
You can add your SSH key to your SSH agent, so that you don't have to specify the SSH command every time you clone a repository. To do so, follow the instructions below:
ssh-add ./sshkey
ssh-add -l
This should print the fingerprint of your new key. You may compare this fingerprint with the list of SSH keys on the token section to confirm it is the correct key.
Error: you are not authorized to do thisVulnCheck's git servers return this same error when your key isn't registered, when the repository is on the other server, when the repository path is wrong, and when your organization doesn't have access to the repository. Check each in turn:
If you see Error: user not found, the server doesn't recognize your key. Confirm that the public key appears under Tokens & SSH Keys and that you're using the matching private key.
The Initial Access repository is on git.vulncheck.com, and proof-of-concept repositories are on git-poc.vulncheck.com. See the table at the top of this page.
Confirm that your organization subscribes to the product you're cloning from. If you still can't clone, contact support@vulncheck.com.