Giter Club home page Giter Club logo

cve2docker's Introduction

Edb2Docker

The project aims is to automatize the creation process of docker-compose for an exploit present in ExploitDB. Currently are supported only exploit related to:

  • WordPress: Plugin, Theme or Core
  • Joomla: Component
  • PHP WebApps

For WordPress and Joomla there is always the same configuration, that is user/password = test , project title = test, email = [email protected]. So the tool takes care of the initialization of the project and also the possible installation of the plugin, theme or component associated with it.

For MySQL the root password is simple root. The access for PhpMyAdmin is user: root pass: root.

See consideration section for more info for which exploit is capable of generating.

Getting Started

Prerequisites

You need to have:

Generate configuration starting from EdbID

If you are interested in generating a configuration for one particular exploit, you only need the EdbID:

 java -jar edb2docker.jar -id 12345 

You can also generate multiple configurations at the same time:

 java -jar edb2docker.jar -id 12345 6789 87652

If the generation success, you can find it in exploits/{edbid} where you just need to launch the command docker-compose up.

Generate configurations based on criteria

You can also generate a series of configurations based on different criteria (no one is mandatory):

java -jar edb2docker.jar -a -s 2020-01-01 -e 2020-12-31 -r true -t wordpress

Where:

 -e,--end-date <yyyy-MM-dd>        Date (included) before which the
                                   exploit has been published
 -r,--remove-config <true/false>   If true remove the container after it
                                   has been tested, with the volumes
                                   associated to it. Default: false
 -s,--start-date <yyyy-MM-dd>      Date (included) after which the exploit
                                   has been published
 -t,--type-exploit <type>          [REQUIRED] The exploit types:
                                   wordpress, joomla or php

At the end of this process, the program generates a CSV with the name result.csv with the result of all configuration.

Please note that this command removes all docker networks (every 10 configurations) created to free space.

Consideration

There are some considerations to do for the automation process.

Joomla

Not for all exploits present in exploitDB is possible to create a configuration, only for those who meet the following requirements:

  • if related to a Component/Plugin has a vulnerable app associated with and is compatible wih Joomla 3.9.x, otherwise if is related to Core there is a official Joomla image for that version;

Wordpress

The situation for WordPress is better since there is an official cli and also an official SVN where plugins and themes are saved. The configuration can be generated only for the exploit that meets the following requirements:

  • has a clear distinction in the title that is related to a PLUGIN, THEME or CORE;
  • has a version written in the title;
  • if is a plugin/theme is present in SVN (the project and the specific version, since there are some cases where the developer has deleted that version) or has a vulnerable app to download; instead if is related to core, there is an official WordPress image for that version in docker hub, so for versions before 4.1.0 is not possibile to proceed.

PHP WebApps [Working in progress]

For the PHP webapps, the automatization process is more complicated. Currently, are supported only the exploit that has:

  • a software link* related to sourcecodester or phpgurukul.

In most cases, there is a DB dump that must import, so the system also automatically find it and import it. Please note* the non-automatable step is to modify the php file to connect to the database.

cve2docker's People

Contributors

catuhub avatar lprevidente avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.