Git Product home page Git Product logo

cve-scan's Introduction

CVE-Scan

Scan systems with NMap and parse the output to a list of CVE's, CWE's and DPE's

Goals:

  • Scan a system with NMap or any other scanning tool and use the scan to analyse the systems for vulnerabilities
  • Have the posibility for multiple input formats (NMap scan, xml, Json, etc)
  • Use CVE-Search to enhance the scan to add more information
  • Have multiple export formats as well as webbrowser component

Optional:

  • Automatically download known scripts to use on exploits

Installation:

Warning, this tutorial is for Linux systems (developed and tested on Ubuntu 14.10). This program should run under Windows (and probably Mac) systems as well.

Requirements

CVE-Scan uses the CVE-Search API to enhance your nmap scans.
Warning CVE-Search is not included in CVE-Scan
You can use CIRCLs [public API] (http://cve.circl.lu), or install CVE-Search localy, or on another accessible machine. You can install CVE-Search from the git repo. For now, CVE-Search does not have a "core" package yet (Without the webpages), but I will add this later on. Once you installed CVE-Search, in the configuration file, make sure you set the correct URL to it.

CVE-Scan needs some aditional packages to work. Install them using:

sudo apt-get install -y nmap (or your package manager of choice)

pip3 install -r requirements.txt

Weasyprint has a set of sub-requirements. Please find the details here

Usage:

To use CVE-Scan, first run an nmap scan on a system. You can modify the parameters however you want, however, you'd want to include Service Detection and OS detection. Below, you can find a default nmap scan that will output to an xml file.

nmap -A -O 192.168.0.1 -oX output.xml

CVE-Scan is composed of 3 major functions:

  • converter.py - Converts the nmap xml to the CVE-Scan json format
  • analyzer.py - Analyses either an nmap xml or a CVE-Scan json and queries CVE-Search to obtain vulnerability information
  • visualizer.py - Visualizes the results of analyzer.py

and Nmap2CVE-Search.py, which does all of the above in 1 go.

You can either run python3 Nmap2CVE-Search.py output.xml to enhance and visualize the report, or python3 analyzer.py -x output.xml enhanced.json, to create the enhanced report, followed by python3 visualizer.py enhanced.json to visualize the report (default webserver on localhost:5050. Add -t for terminal view)

All scripts in the bin folder can be called with the -h flag, to get more information about it.

Online Demo

If you want to try our online demo, please visit our website.

Since we don't have a large budget, the website might not be available all the time.

Support us

If you like this tool, please consider donating, so we can keep our servers up and running. You can support us on Subscribestar

Licencing

This software is licensed under the "Original BSD License".

  (C) 2015  NorthernSec		https://github.com/NorthernSec
  (c) 2015  Pieter-Jan Moreels	https://github.com/pidgeyl

cve-scan's People

Contributors

damienmolina avatar pidgeyl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cve-scan's Issues

Configure in configuration.ini ignored and unable to reach cve.circl.lu's API

Hi,
looks like that cve-search configuration in the configuration.ini file is ignored.

roy@ubuntu:/Desktop/CVE-Scan-master/bin$ python3 Nmap2CVE-Search.py -xN test2.xml
Could not connect to the CVE-Search API on localhost:5000
roy@ubuntu:
/Desktop/CVE-Scan-master/bin$ more ../etc/configuration.ini
[Webserver]
Host: 127.0.0.1
Port: 5050
Debug: True

[CVE-Search]
cve-searchHost: cve.circl.lu
cve-searchPort: 80

I've changed the default host in the Config.py file but I get "Could not connect to the CVE-Search API on cve.circl.lu:80"
The API is accessible from the same machine using CURL.

roy@ubuntu:/Desktop/CVE-Scan-master/bin$ python3 Nmap2CVE-Search.py -xN test2.xml
Could not connect to the CVE-Search API on cve.circl.lu:80
roy@ubuntu:
/Desktop/CVE-Scan-master/bin$ curl http://cve.circl.lu/api/search/microsoft/office | more
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 823k 0 3776 0 0 2875 0 0:04:53 0:00:01 0:04:52 2878[{"summary": "Microsoft Office 2007 SP3, Office for Mac 2011, Office for Mac 2016, and Word Viewer allow remote attackers to [..]

could you please let me know if i'm missing anything ?
Thanks,

Can I separate nmap scan and Nmap2CVE-Search task into two hosts?

I want to install a very light client at the target machine and handoff other tasks as much as I can to another server. I am just wondering can I first nmap scan the target machine and then send its report to another server? On the other server I then run Nmap2CVE-Search.py to obtain the vulnerability report of the initial target VM? Or Nmap2CVE-Search.py must be run within the target machine?

Thanks,

Dependencies missing: from lib.PDFParser import pdfify

I get a Dependencies missing! error when running the visualizer.

Seems to be caused by from lib.PDFParser import pdfify

⇒  uname -a
Darwin foo.local 15.3.0 Darwin Kernel Version 15.3.0: Thu Dec 10 18:40:58 PST 2015; root:xnu-3248.30.4~1/RELEASE_X86_64 x86_64
⇒  python3 --version
Python 3.5.1

'list' object has no attribute 'get'

root@ubuntu:/test/CVE-Scan/bin# python3.8 Nmap2CVE-Search.py output.xml
'list' object has no attribute 'get'
Couldn't fetch the info for cpe:/o:linux:linux_kernel:2.6.32
'list' object has no attribute 'get'
Couldn't fetch the info for cpe:/a:pureftpd:pure-ftpd
HTTP Error 404: NOT FOUND
HTTP Error 404: NOT FOUND

  • Serving Flask app 'lib.WebDisplay'
  • Debug mode: on
    WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
  • Running on http://127.0.0.1:5050
    Press CTRL+C to quit

issue in Nmap2CVE-Search.py

when i try Nmap2CVE-Search.py output.xml
Traceback (most recent call last):
File "Nmap2CVE-Search.py", line 20, in
from lib.Config import Configuration
ImportError: No module named Config

is it possible to have an XML-formated scan report?

Hi,

thanks for providing this software and I really like its functionality. I realized that by default the scan report can be found on a web server on port 5050. This is suitable if the report consumer is a person. However, we want to utilize some policies to automate the patch management. Therefore we need a machine-readable report (e.g. xml formated). I could not find such info through README. Could someone please let me know what is the most convenient way to generate such report? if there is no such function yet, could someone let me know which class in the code gathered all report data before present them into web? In that case I can try to see if we can convert the report format there.

Thanks a lot in advance!

Su Zhang

how to run cve-search as a constant process with a port open?

Hello,

It seems like that I need to specify url and port for cve-search service within /etc/configuration.ini file. However, it appears to me that cve-search is only used to search through "./search.py". Is there a way to make cve-search as a constant process with a port open therefore the request from cve-scan can be received?

thanks,

Su

error while running analyzer.py (AttributeError: 'Namespace' object has no attribute 'xN')

I hit the following error while running analyzer, here is the running script. any ideas?

su@ubuntu:~/CVE-Scan/bin$ python3 analyzer.py -h
usage: analyzer.py [-h] [-j json] [-x xml] output

Read input from NMap and use the information from cve-search to find potential
vulnerabilities in the recognized systems and their services

positional arguments:
output Output file

optional arguments:
-h, --help show this help message and exit
-j json Read Json file in Nmap2CVE format
-x xml Read NMap XML file
su@ubuntu:/CVE-Scan/bin$ python3 analyzer.py -x output.xml out
Traceback (most recent call last):
File "analyzer.py", line 64, in
if not args.xN and not args.jN and not args.sN: sys.exit("No input selected!")
AttributeError: 'Namespace' object has no attribute 'xN'
su@ubuntu:
/CVE-Scan/bin$

thanks,

Find out if DPE is relevant for the project

DPE might not be relevant if the DPE list does not cointain default passwords for services, or NMap scan does not detect specific systems.
However, if in the future we add a format that has CPE's for those, this will be very relevant.

Metasploit modules

See if there are feeds for metasploit modules based on CVE's or CPE's

Update requirements.txt

Possible weasyprint is missing in requirements.txt

needed from

PDFParser.py
(...from weasyprint)

where to find the vulnerability scan report?

I first run "nmap -A -O 192.168.0.1 -oX output.xml" and then run "python3 Nmap2CVE-Search.py -xN output.xml" by following the instructions. However, it hangs there like forever

su@ubuntu:~/devstack/CVE-Scan/bin$ python3 Nmap2CVE-Search.py -xN output.xml

  • Restarting with stat
  • Debugger is active!
  • Debugger pin code: 274-696-130

I then ctrl+c to terminate the process. However, I could not find any report generated. Should I do something to obtain the report?

Thanks,

Su

Server Hosting

Hi,

Thanks for the great work. Looks like your website is not up. In order to support open source community, I would love to offer you our hosting so that we can make it live and don't let your precious work go. This way the community can benefit.

Thanks

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.