Installation
The installation step by step is base on DigitalOcean with Ubuntu 18.04 but you can use different cloud providers with different Linux distribution or your PC if you want.
We'll show you how put ReconNess running on DigitalOcean and Ubuntu 18.04, but you can use different cloud providers and Linux distribution too, the only that you need is Docker and Docker Compose installed in the host.
You can use your PC with Docker and Docker Compose, but because you are going to run a lot of scanning and to avoid problems with your ISP and because you can require more dedicate resources that your PC is better option use a cloud provider.

DigitalOcean

You need to have a DigitalOcean account first, please use this referent link to create your account and you will receive 100 USD in credit over 60 days.
After you have an account you need to create a Droplet selecting Ubuntu 18.04. Check this link to know more about creating a Droplet on DigitalOcean.
Now you need to install Docker and Docker Compose inside the Droplet, please check the documentation to know how to install Docker and Docker Compose in Ubuntu 18.04.
After you have installed Docker and Docker Compose inside the Ubuntu 18.04 Droplet you need to clone ReconNess source code from GitHub inside the Droplet.
1
$ git clone https://github.com/reconness/reconness.git
2
$ cd reconness/src
Copied!
Inside src/ folder you have Dockerfile and docker-compose.yml files, those are the two only files that you need to touch.
Dockerfile
1
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build
2
WORKDIR /app
3
4
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
5
RUN apt-get install -y nodejs
6
RUN npm install -g @vue/cli
7
8
# copy csproj and restore as distinct layers
9
COPY *.sln .
10
COPY ["DAL/ReconNess.Data.Npgsql/ReconNess.Data.Npgsql.csproj", "DAL/ReconNess.Data.Npgsql/"]
11
COPY ["ReconNess.Web/ReconNess.Web.csproj", "ReconNess.Web/"]
12
COPY ["ReconNess.Entities/ReconNess.Entities.csproj", "ReconNess.Entities/"]
13
COPY ["ReconNess.Core/ReconNess.Core.csproj", "ReconNess.Core/"]
14
COPY ["ReconNess/ReconNess.csproj", "ReconNess/"]
15
RUN dotnet restore "ReconNess.Web/ReconNess.Web.csproj"
16
17
# copy everything else and build app
18
COPY . ./
19
WORKDIR /app/ReconNess.Web
20
RUN dotnet publish -c Release -o /dist
21
22
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 AS runtime
23
WORKDIR /app
24
25
ENV ASPNETCORE_URLS http://+:5000
26
EXPOSE 5000
27
28
COPY --from=build /dist ./
29
30
# -------- Agents dependencies --------
31
32
# -------- End Agents dependencies --------
33
34
ENTRYPOINT ["dotnet", "ReconNess.Web.dll"]
Copied!
In the Dockerfile you need to specify the Agents tools and dependencies that you want to install, for example, if we want to run ping to know if the subdomain is alive you need to install ping inside the docker because by default this docker does not have ping installed that same for the other tools that you want to run to do the #recon

Install Agents [Tools]

You can use this Dockerfile that has all the default agents.
line (30 -32)
1
# -------- Agents dependencies --------
2
3
# To allow run ping inside the docker
4
$ RUN apt-get update && apt-get install -y iputils-ping
5
6
# -------- End Agents dependencies --------
Copied!
The next file is the docker-compose where we need to pay attention to the credentials and keys to avoid security issues.
docker-compose.yml
1
version: '3'
2
services:
3
web:
4
container_name: 'reconness'
5
image: 'reconness'
6
build:
7
context: .
8
dockerfile: Dockerfile
9
ports:
10
- '80:5000'
11
depends_on:
12
- 'postgres'
13
networks:
14
- reconness-network
15
environment:
16
- ReconnessUserName=reconness # login username
17
- ReconnessPassword=reconness # login password
18
- PostgresUser=reconness # postgres userName
19
- PostgresPassword=reconness # postgres password
20
- PostgresDb=reconness # postgres database
21
- SecurityKey=mysecuritykeypleasechangethis # securityKey for the JWT, minimum length is 16 characters
22
23
postgres:
24
ports:
25
- '5432:5432'
26
container_name: 'reconness-postgresql'
27
environment:
28
POSTGRES_USER: 'reconness' # postgres username, needs to be the same defined above
29
POSTGRES_PASSWORD: 'reconness' # postgres password, needs to be the same defined above
30
POSTGRES_DB: 'reconness' # postgres database, needs to be the same defined above
31
volumes:
32
- 'reconness-postgresql-volume:/var/lib/postgresql'
33
image: 'postgres:latest'
34
networks:
35
- reconness-network
36
37
volumes:
38
reconness-postgresql-volume:
39
40
networks:
41
reconness-network:
42
driver: bridge
Copied!
We are linking PostgreSQL with our application and mapping the ports, the only that you need to modify are the credentials in the docker-compose.yml
1
- ReconnessUserName=reconness # login username
2
- ReconnessPassword=reconness # login password
3
- PostgresUser=reconness # postgres userName
4
- PostgresPassword=reconness # postgres password
5
- PostgresDb=reconness # postgres database
6
- SecurityKey=mysecuritykeypleasechangethis # securityKey for the JWT, minimum length is 16 characters
7
8
POSTGRES_USER: 'reconness' # postgres username, needs to be the same defined above
9
POSTGRES_PASSWORD: 'reconness' # postgres password, needs to be the same defined above
10
POSTGRES_DB: 'reconness' # postgres database, needs to be the same defined above
11
Copied!
Notes that PostgresUser needs to be equals to POSTGRES_USER, the same with Password and Db

Login inside ReconNess

Note that the values that you choose for ReconnessUserName and ReconnessPassword are the same that you need to use for the Login page in the portal.
Be sure to changeSecurityKey too and needs to be more than 16 characters. If you keep the SecurityKey by default another user can use that to build a valid JWT token and get access into your ReconNess app and your Droplet.
Dont keep the SecurityKey by default another user can use that to build a valid JWT token and get access
Note if you are not using Docker to run the solution you need to setup all those local environment variables manually.
1
- ReconnessUserName=reconness # login username
2
- ReconnessPassword=reconness # login password
3
- PostgresUser=reconness # postgres userName
4
- PostgresPassword=reconness # postgres password
5
- PostgresDb=reconness # postgres database
6
- SecurityKey=mysecuritykeypleasechangethis # securityKey for the JWT, minimum length is 16 characters
Copied!

Build, Run, Stop and Destroy ReconNess

After saving the files with your setup you are ready to deploy ReconNess Web App. Inside the folder src/
1
$ docker-compose build
2
$ docker-compose up -d
Copied!
if you want to shutdown ReconNess Web App. Inside the folder src/
1
$ docker-compose stop
Copied!
If you want to recreate the database inside the folder src/(be careful this is going to destroy the entire database and you are going to lose all the data saved previously)
1
$ docker-compose up --force-recreate
Copied!
If you want to update ReconNess Web App with the last version. Inside the folder src/
1
$ docker-compose stop
2
$ git pull
3
$ docker-compose build
4
$ docker-compose up -d
Copied!
Remember delete the old docker images, after build multiples time the docker. You need to keep running your last Docker build to avoid delete the database and then execute the next command:
1
$ docker-compose up -d
2
$ docker image prune
Copied!