Coder Social home page Coder Social logo

code-dave / cisco_psirt Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 95 KB

This development of Cisco psirt automation, allows users the ability to pull live vulnerability (cve) data from Cisco's repository

License: MIT License

Python 100.00%
cisco psirt networking vulnerbility cve

cisco_psirt's Introduction

published

Cisco psirt vulnerbility data retrevial and storing

This development of Cisco psirt vulnerability automation, provides the ability to pull live vulnerability data from Cisco's repository.

Pre-Requirements:

  1. Cisco [API CONSOLE] account registration
  2. Register the application you will be using.
  3. Create access method (i.e. shared secret/key) with registered applicaiton.
  4. Install Python 3.x
  5. Verify you have all the correct Python libraries installed e.g. pip -install {libary_name}

Requirements:

  1. Copy all the files from the repo into the directory/folder you will be executing the script from.
  2. configuration.json: used for cred storing. Please keep the same formatting as listed in the example, and provided below
"servers": {
        "cisco": {
			"psirt_key" : "_KEY_",
      "psirt_secret" : "_SECRET_"
        }
    }
	
} 
  1. Verify you have SQLite DB application (https://sqlitebrowser.org/), if you desire to utilize a sql database, and correlating script 'all_sql.py'
  2. Execute the main task with python to run all the scripts. python -i all_jobs.py
  3. Optional: Import your network infrascrutures inventory into the sqlite database, and preform data comparison (i.e SQL comparison)
  4. Nugget: Running vuln_cvrf.py requires the use of the Sqlite DB referenced earlier. If this script is intiated, it will iniate the download of cvrf data from Cisco for all the Vulns you stored earlier, into a searlized xml format.
  5. Nugget: You can pass the all_sql.py class any file type: csv, txt, searlized, and it will extract the data into key/value pairs and store the data in the desired database table.

How it works:

This script simplifies auth, data retrevial, and storing. In addition, there is an option to utilize sqlite3 and a database, for structured psirt vuln data storing and data relating. This will allow the storing of vulnerbility data for all vulnerabilities that have been released in the past 5 years, via Cisco.

What the code does:

vuln.py

  1. Configuration.json is used for cred storing
  2. Auth with cisco oauth, token retrieval
  3. Token auth and get data with cisco endpoint
  4. Data sent to two parsing functions:
  • first compiles the data into a formatting with the vulnerability code as the primary key, and appending each product additionally 1NF formatting (could be useful for data comparison)
  • second compiles the data in a easy viewing parsing format, but non SQL NF.
  1. Searlizes the data with pickle and stores as an outputfile, which can be desearlized/opened and interpreted at will.

all_sql.py

  1. De-searlizes the stored data into .txt formatting
  2. Validation of database existance
  3. Auto-generation of sql table. As listed in the all_jobs.py the first value passed into all_sql.file_interpreter() is the previously searlized data, the second is what your table name will be in sql. test = all_sql.file_interpreter('searlized_data.txt', 'My_SQLITE_TABLE')
  4. Post the table generation, the script will auto-append the data to the newly created table (execute), and save the database config.

cisco_psirt's People

Contributors

code-dave 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.