forked from nccgroup/ScoutSuite
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request nccgroup#893 from kbroughton/bugfix/docker-build
fix docker-compose.yaml, unignore docker/bin
- Loading branch information
Showing
8 changed files
with
198 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,3 +68,5 @@ report-* | |
# Private folders | ||
/private*/ | ||
/**/private*/ | ||
|
||
!docker/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/bin/bash | ||
|
||
# ===================================== | ||
# install software packages needed for | ||
# all the other components to run | ||
# ===================================== | ||
# AUTHOR: jason.ross@nccgroup.com | ||
# VERSION: 0.1.0 | ||
# ===================================== | ||
export DEBIAN_FRONTEND=noninteractive | ||
|
||
WORKDIR=/root | ||
TMPDIR=/tmp | ||
cd ${TMPDIR} | ||
|
||
echo -e "\n\nSoftware Pre-reqs Installation Starting...\n\n" | ||
|
||
# ===================================== | ||
# make sure the timezone gets set to UTC | ||
# ===================================== | ||
ln -fs /usr/share/zoneinfo/Etc/UTC /etc/localtime | ||
|
||
# ===================================== | ||
# set up the pre-reqs | ||
# ===================================== | ||
apt-get update > /dev/null 2>&1 | ||
apt-get install -qy \ | ||
apt-transport-https \ | ||
apt-utils \ | ||
ca-certificates \ | ||
cmake \ | ||
curl \ | ||
dialog \ | ||
gnupg \ | ||
groff \ | ||
less \ | ||
lsb-release \ | ||
nano \ | ||
python3 \ | ||
python3-pip \ | ||
unzip \ | ||
vim \ | ||
virtualenv \ | ||
virtualenvwrapper | ||
|
||
# reconfigure the tzdata package to make sure it picks up the UTC bit | ||
dpkg-reconfigure --frontend noninteractive tzdata | ||
|
||
echo -e "\n\nSoftware Pre-reqs Installation Complete!\n\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/bin/bash | ||
|
||
# ===================================== | ||
# container-scoutsuite-install.sh | ||
# ===================================== | ||
# AUTHOR: jason.ross@nccgroup.com | ||
# VERSION: 0.1.0 | ||
# ===================================== | ||
export DEBIAN_FRONTEND=noninteractive | ||
|
||
WORKDIR=/root | ||
TMPDIR=/tmp | ||
AWSDIR=/root/.aws | ||
|
||
echo -e "\n\nAWS2 CLI Installation Starting...\n\n" | ||
|
||
# ===================================== | ||
# install AWS CLI v2 | ||
# ===================================== | ||
cd ${TMPDIR} | ||
curl "https://d1vvhvl2y92vvt.cloudfront.net/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" | ||
unzip awscliv2.zip | ||
./aws/install --update | ||
|
||
# ===================================== | ||
# clean up install artifacts | ||
# ===================================== | ||
rm ${TMPDIR}/awscliv2.zip | ||
rm -rf ${TMPDIR}/aws | ||
|
||
# ===================================== | ||
# Setup AWS configuration templates | ||
# ===================================== | ||
|
||
# if the aws config directory already exists | ||
# then we do nothing and leave it alone | ||
if [ ! -d ${AWSDIR} ]; then | ||
mkdir ${AWSDIR} | ||
|
||
# create the config template | ||
cat <<'EOF' >${AWSDIR}/config | ||
[default] | ||
region = us-east-1 | ||
output = json | ||
aws_access_key_id = <access-key> | ||
aws_secret_access_key = <secret key> | ||
EOF | ||
fi | ||
|
||
echo -e "\n\nAWS2 CLI Installation Complete!\n\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/bash | ||
|
||
# ===================================== | ||
# install the Azure CLI Tools | ||
# ===================================== | ||
# AUTHOR: jason.ross@nccgroup.com | ||
# VERSION: 0.1.0 | ||
# ===================================== | ||
export DEBIAN_FRONTEND=noninteractive | ||
|
||
WORKDIR=/root | ||
TMPDIR=/tmp | ||
cd ${TMPDIR} | ||
|
||
echo -e "\n\nAzure CLI Installation Starting...\n\n" | ||
|
||
# blackbox pipe a random URL directly to shell | ||
# why? because MSFT | ||
#curl -sL https://aka.ms/InstallAzureCLIDeb | bash | ||
|
||
# manual process | ||
|
||
# add msft gpg key to apt | ||
curl -sL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /etc/apt/trusted.gpg.d/microsoft.asc.gpg | ||
|
||
# set the right repo name | ||
CLI_REPO=$(lsb_release -cs) | ||
|
||
# MSFT has no repo for focal yet, force the system to use eoan instead | ||
if [[ ${CLI_REPO} -eq "focal" ]]; then | ||
CLI_REPO="eoan" | ||
fi | ||
|
||
# add the msft repo to apt | ||
echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ ${CLI_REPO} main" \ | ||
> /etc/apt/sources.list.d/azure-cli.list | ||
|
||
# install the software | ||
apt-get update && apt-get install -y azure-cli | ||
|
||
echo -e "\n\nAzure CLI Installation Complete!\n\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
# ===================================== | ||
# install gCloud SDK CLI Tools | ||
# ===================================== | ||
# AUTHOR: jason.ross@nccgroup.com | ||
# VERSION: 0.1.0 | ||
# ===================================== | ||
export DEBIAN_FRONTEND=noninteractive | ||
|
||
WORKDIR=/root | ||
TMPDIR=/tmp | ||
cd ${TMPDIR} | ||
|
||
echo -e "\n\ngCloud SDK Installation Starting...\n\n" | ||
|
||
# add the gcp repo to apt | ||
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" > /etc/apt/sources.list.d/google-cloud-sdk.list | ||
|
||
# add the gcp pubkey to apt | ||
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - | ||
|
||
# install the sdk + some extra python-related bits | ||
apt-get update && apt-get install -y google-cloud-sdk google-cloud-sdk-app-engine-python google-cloud-sdk-app-engine-python-extras | ||
|
||
# let folks know the install is done | ||
echo -e "\n\ngCloud SDK Installation Complete!\n\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
# ===================================== | ||
# install ScoutSuite into a virtual env | ||
# ===================================== | ||
# AUTHOR: jason.ross@nccgroup.com | ||
# VERSION: 0.1.0 | ||
# ===================================== | ||
export DEBIAN_FRONTEND=noninteractive | ||
|
||
WORKDIR=/root | ||
TMPDIR=/tmp | ||
|
||
# ===================================== | ||
# install ScoutSuite | ||
# ===================================== | ||
cd ${WORKDIR} | ||
virtualenv -p python3 scoutsuite | ||
source ${WORKDIR}/scoutsuite/bin/activate | ||
pip install scoutsuite | ||
|
||
echo -e "\n\nScoutsuite Installation Complete!\n\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
cat <<'EOF' >> /root/.bashrc | ||
cd ${HOME} | ||
source ${HOME}/scoutsuite/bin/activate | ||
echo -e "Welcome to ScoutSuite!\nTo run ScoutSuite, just type \`scout -h\` to see the help documentation.\nHave fun!\n\n" | ||
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters