Skip to content

AlchemiistCreative/EthicalInsight

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contributing
  5. License
  6. Contact

About The Project

drawing

I started this project to complete some needs that I met and to be able to adapt them as I want. You are free to contribute to this project and bring some new features.

The project consists in centralizing the audit of one or several AD domain controllers. It's working with a powershell script as agent on the DC, pushing several data to MongoDB through a REST API. This project can be easily deployed with Docker.

(back to top)

Built With

(back to top)

Getting Started

Prerequisites

For the client parts:

You will need to setup the powershell script on your Domain Controller(s). You can find them on this repository: github.com/AlchemiistCreative/EthicalInsight-Agent

For the server parts:

You will need a MongoDB instance.

Installation

  1. Clone the repo
    git clone https://github.com/AlchemiistCreative/EthicalInsight.git
  2. Install NPM packages
    npm install
  3. Enter your config in .env
    PORT=8080
    VALIDATION_TOKEN=0000
    MONGODB_URL="mongodb://example:27017/example-db"
    TOKEN_KEY="random_string"

(back to top)

Usage

1. Register

Create an Account with the validation token you have set up in the .env file.

drawing

2. Generate an API key

Generate an API key in settings (make sure to save this key in a safe place, you will need this key to get the agent connected).

drawing

3. Run scripts on Domain Controller(s)

Run ethicalinsight-agent.ps1 on your Domain Controller(s).

drawing

3.1 Clone this repo

git clone https://github.com/AlchemiistCreative/EthicalInsight-Agent.git

3.2 Check the execution policy to be sure that you are able to run scripts.

 Get-ExecutionPolicy

To run the scripts, the execution policy must be Unrestricted/Bypass but if you are in RemoteSigned, you still can copy the contents of the scripts and create new ones. (Be careful about the file names, must be exactly the same to works).

3.3 Run ethicalinsight-agent.ps1

.\ethicalinsight-agent.ps1 #From the correct directory location.

From this menu you have to store your API key, activate the audit and also enable the scheduled task.

4. Finished

Ensure that your Domain Contoller is on the home page if it's not case check error.log in the agent scripts directory.

drawing

(back to top)

Docker

  1. Change environment variables to fit your config in docker-compose.yml and run docker-compose.
    docker-compose up -d
  2. You can also pull the image and run it without docker-compose or build the docker image from Dockerfile in src/Dockerfile
    docker run -d --env-file ./src/.env -p 5000:5000 --name ethicalinsight-server alchemistcreative/ethicalinsight:latest

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the GNUv3. See LICENSE for more information.

(back to top)

Contact

Your Name - @alchmst_ - contact@thomasfrancois.net

Project Link: https://github.com/AlchemiistCreative/EthicalInsight

(back to top)