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

Merge Readme #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
45 changes: 45 additions & 0 deletions Dockerfile-alpine
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
FROM smebberson/alpine-base:3.0.0

MAINTAINER Sebastian Ruml <[email protected]>; <[email protected]>

RUN echo "@testing http://dl-4.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
&& apk add --update \
musl \
build-base \
python3 \
python3-dev \
bash \
git \
&& pip3.5 install --upgrade pip \
&& rm /var/cache/apk/*

# make some useful symlinks that are expected to exist
RUN cd /usr/bin \
&& ln -sf easy_install-3.5 easy_install \
&& ln -sf idle3.5 idle \
&& ln -sf pydoc3.5 pydoc \
&& ln -sf python3.5 python \
&& ln -sf python-config3.5 python-config \
&& ln -sf pip3.5 pip

# Prowler + ServerTelegramBot + Nmap + AWS CLI + Git
RUN apk add --update && apk upgrade && \
apk add nmap nmap-scripts \
bash \
git \
&& pip3 install awscli \
&& mkdir /CloudBot && cd /CloudBot \
&& git clone https://github.com/Alfresco/prowler /CloudBot/prowler \
&& git clone https://github.com/i4specete/ServerTelegramBot.git /CloudBot/ServerTelegramBot \
&& cd /CloudBot/ServerTelegramBot \
&& pip3 install -r requirements.txt \
&& cd /CloudBot \
&& rm /var/cache/apk/*

# Add AWS CLI Credentials
# Attention to add credentials file to gitignore
RUN mkdir /root/.aws
ADD credentials /root/.aws/

# Execute CloudBot
CMD ["/env/bin/python", "python /CloudBot/ServerTelegramBot/CloudBot.py"]
62 changes: 62 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,68 @@ Search the bot previously created. Torun the scan from your Telegram Account you
Example: /Nmap
![Telegram](https://i.imgur.com/5FCy9xh.png)


# CloudBot Dockerized

## Telegram Bot

> Create the bot with BotFather

> Take the TOKEN API Telegram Bot.

> Extract your ID with the following URL:

`https://api.telegram.org/bot{TOKEN}/getUpdates`

> The ID is the json `id:`


## Install AWS CLI in the Host that run Docker

`sudo apt-get install aws-cli`


## Write Amazon API Key and Secret

`aws configure`


## Copy credentials File to repository

`mkdir CloudBot`

`cd CloudBot`

`cp ~/.aws/credentials .`

## Add to .gitignore credentials File

`# Credentials AWS

credentials`


## Build Container

`sudo docker build -t cloudbot .`


## Run and Lauch Interactive Shell

`sudo docker run -ti cloudbot /bin/bash`


## Execution
`sudo docker run cloudbot python /CloudBot/ServerTelegramBot/CloudBot.py -t xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-Ls -p ./CloudBot/prowler/prowler -u xxxxxxxxx`


## Execution from Telegram
`/ScanAWS -p default`





## To do:

- Add more hacking tools to conquer the world
Expand Down
8 changes: 6 additions & 2 deletions Readme-Docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,14 @@
credentials`


### Build Container
### Build Container Debian

`sudo docker build -t cloudbot .`

### Build Container Alpine

`sudo docker build -f ./Dockerfile-alpine -t cloudbot-alpine .`


### Run and Lauch Interactive Shell

Expand All @@ -53,4 +57,4 @@ credentials`


### Execution from Telegram
`/ScanAWS -p default`
`/ScanAWS -p default`