Coder Social home page Coder Social logo

jnqpblc / metasploit-db_automate Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 8.0 529 KB

A pentest scanning task automation project using custom resource files and Metasploit's internal services database.

Python 68.96% Shell 6.95% Ruby 13.87% Lua 10.22%

metasploit-db_automate's Introduction

db_automate

A pentest scanning task automation project using custom resource files and Metasploit's internal services database.

This project is a beta attempt to automate scanning tasks using the Metasploit database.

db_* files like db_nikto will run the associated external command only against the specific services that match the tool

The *.rc files are the shell resource files for each MetaSploit module. To include a new module, simply create a new *.rc file and link it to the appropreiate stub ruby file (*.rb).

The *.rb files are the brains of each resource (*.rc and *.db) file. These files are shared resources for each akin resource (*.rc) file.

Below is a example:

$ python setup.py clone // will download all needed repos
$ python setup.py build // will install all needed packages and build specific repos
$ python setup.py pull // will to update all git repos
$ cat ftp_anonymous.rc
use auxiliary/scanner/ftp/anonymous
resource stub_ftp_rhosts.rb
$ cat stub_ftp_rhosts.rb 
<ruby>
framework.db.hosts.each do |host|
  host.services.each do |service|
    if service.name == "ftp"
      self.run_single("set RHOSTS #{host.address}")
      self.run_single("set RPORT #{service.port}")
      self.run_single("run")
    end
  end
end
</ruby>

My example methodology is as follows:

1> Begin with a masscan scan and then db_import masscan-output.xml or "msf> resource db_portscan", which pulls its targets from ~/targets file.

2> "msf> resource db_verscan" <~ loops over all services in the msf database and uses nmap to preform a version scan.

3> "msf> resource db_whatweb" <~ loops over all web services in the msf database and runs whatweb against them.

4> "msf> resource db_nikto" <~ loops over all web services in the msf database and runs nikto against them.

5> "msf> resource db_dirb" <~ loops over all web services in the msf database and runs dirb against them.

6> "msf> resource db_sqlmap" <~ loops over all web services in the msf database and runs sqlmap against them.

7> "msf> resource db_w3af" <~ loops over all web services in the msf database and runs w3af against them.

8> "msf> resource db_auxiliary_scanners" <~ loops over all services in the msf database and runs ALL auxiliary scripts against them.

9> "msf> resource db_exploit_scanners" <~ loops over all services in the msf database and runs only the exploit scripts with a check function against them.

metasploit-db_automate's People

Contributors

jnqpblc avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.