All Projects → OWASP → cwe-tool

OWASP / cwe-tool

Licence: Apache-2.0 license
A command line CWE discovery tool based on OWASP / CAPSEC database of Common Weakness Enumeration.

Programming Languages

javascript
184084 projects - #8 most used programming language
Dockerfile
14818 projects

Projects that are alternatives of or similar to cwe-tool

cwe-sdk-javascript
A Common Weakness Enumeration (CWE) Node.js SDK compliant with MITRE / CAPEC
Stars: ✭ 18 (-55%)
Mutual labels:  owasp, vulnerabilities, cve, mitre, cwe
PatrowlHearsData
Open-Source Vulnerability Intelligence Center - Unified source of vulnerability, exploit and threat Intelligence feeds
Stars: ✭ 66 (+65%)
Mutual labels:  vulnerabilities, cve, cwe
Sbt Dependency Check
SBT Plugin for OWASP DependencyCheck. Monitor your dependencies and report if there are any publicly known vulnerabilities (e.g. CVEs). 🌈
Stars: ✭ 187 (+367.5%)
Mutual labels:  owasp, vulnerabilities, cve
Cve Search
cve-search - a tool to perform local searches for known vulnerabilities
Stars: ✭ 1,765 (+4312.5%)
Mutual labels:  vulnerabilities, cve
Patrowlhears
PatrowlHears - Vulnerability Intelligence Center / Exploits
Stars: ✭ 89 (+122.5%)
Mutual labels:  vulnerabilities, cve
Cvebase.com
cvebase is a community-driven vulnerability data platform to discover the world's top security researchers and their latest disclosed vulnerabilities & PoCs
Stars: ✭ 88 (+120%)
Mutual labels:  vulnerabilities, cve
Vulnix
Vulnerability (CVE) scanner for Nix/NixOS.
Stars: ✭ 161 (+302.5%)
Mutual labels:  vulnerabilities, cve
Cve Bin Tool
This tool scans for a number of common, vulnerable components (openssl, libpng, libxml2, expat and a few others) to let you know if your system includes common libraries with known vulnerabilities.
Stars: ✭ 211 (+427.5%)
Mutual labels:  vulnerabilities, cve
dependency-check-plugin
Jenkins plugin for OWASP Dependency-Check. Inspects project components for known vulnerabilities (e.g. CVEs).
Stars: ✭ 107 (+167.5%)
Mutual labels:  owasp, vulnerabilities
Dependency Track
Dependency-Track is an intelligent Component Analysis platform that allows organizations to identify and reduce risk in the software supply chain.
Stars: ✭ 718 (+1695%)
Mutual labels:  owasp, vulnerabilities
Dependency Check Sonar Plugin
Integrates Dependency-Check reports into SonarQube
Stars: ✭ 332 (+730%)
Mutual labels:  owasp, vulnerabilities
Hacker ezines
A collection of electronic hacker magazines carefully curated over the years from multiple sources
Stars: ✭ 72 (+80%)
Mutual labels:  owasp, vulnerabilities
Vulmap
Vulmap 是一款 web 漏洞扫描和验证工具, 可对 webapps 进行漏洞扫描, 并且具备漏洞利用功能
Stars: ✭ 1,079 (+2597.5%)
Mutual labels:  vulnerabilities, cve
Opencve
CVE Alerting Platform
Stars: ✭ 384 (+860%)
Mutual labels:  vulnerabilities, cve
Vulapps
快速搭建各种漏洞环境(Various vulnerability environment)
Stars: ✭ 3,353 (+8282.5%)
Mutual labels:  vulnerabilities, cve
Writeups
This repository contains writeups for various CTFs I've participated in (Including Hack The Box).
Stars: ✭ 61 (+52.5%)
Mutual labels:  vulnerabilities, cve
Awesome Nodejs Security
Awesome Node.js Security resources
Stars: ✭ 1,294 (+3135%)
Mutual labels:  owasp, vulnerabilities
PocOrExp in Github
聚合Github上已有的Poc或者Exp,CVE信息来自CVE官网。Auto Collect Poc Or Exp from Github by CVE ID.
Stars: ✭ 544 (+1260%)
Mutual labels:  vulnerabilities, cve
Dvws
OWSAP Damn Vulnerable Web Sockets (DVWS) is a vulnerable web application which works on web sockets for client-server communication.
Stars: ✭ 267 (+567.5%)
Mutual labels:  owasp, vulnerabilities
Mobile Security Framework Mobsf
Mobile Security Framework (MobSF) is an automated, all-in-one mobile application (Android/iOS/Windows) pen-testing, malware analysis and security assessment framework capable of performing static and dynamic analysis.
Stars: ✭ 10,212 (+25430%)
Mutual labels:  owasp, cwe

cwe-tool

A command line CWE discovery tool based on OWASP / CAPSEC database of Common Weakness Enumeration.
Official OWASP CWE Toolkit Page

npm version license downloads build codecov Known Vulnerabilities Responsible Disclosure Policy

Install

Executable with Node.js tooling

If you have a Node.js environment, you can invoke cwe-tool using the npx tool as follows:

npx cwe-tool [...command-line options...]

Docker

Pull the image from Docker Hub

docker pull lirantal/cwe-tool
docker run --rm lirantal/cwe-tool --search test

Local build instructions

git clone https://github.com/OWASP/cwe-tool
docker build -t docker.pkg.github.com/owasp/cwe-tool/cwe-tool . 

-t image name above can be an image name of your choosing!

Run examples with Docker

docker run --rm docker.pkg.github.com/owasp/cwe-tool/cwe-tool --id 22
docker run --rm docker.pkg.github.com/owasp/cwe-tool/cwe-tool --search test

Do not want to build locally? Pull the image down

Pull image from Github package registry and run a search

docker pull docker.pkg.github.com/owasp/cwe-tool/cwe-tool:latest
docker run --rm docker.pkg.github.com/owasp/cwe-tool/cwe-tool:latest --search test

Usage

The CWE Tool output is JSON to allow processing of the data or later investigations.

Command-line options blueprint:

command-line argument description implemented
--id Get a CWE data by its ID.
--parent-id When both --id and --parent-id are provided, returns only CWE ids which satisfy the parent id. PRs welcome
--indirect When specified along with --parent-id, retrieves all indirect parents up to the root of the tree.
--search String search returns all the matching CWEs titles
--show-membership Returns all the CWE IDs along with their CWE Category membership relations PRs welcome

Example

Get CWE By ID

npx cwe-tool --id 22

Filter for CWE IDs that satisfy a parent relationship

The following command filters all CWE IDs based on whether they satisfy any direct or indirect relationship across the tree to a given parent ID.

npx cwe-tool --id 22 --parent-id 167 --indirect

The output is the following JSON:

{
  "attr": {
    "@_ID": "242",
    "@_Name": "Use of Inherently Dangerous Function",
    "@_Abstraction": "Base",
    "@_Structure": "Simple",
    "@_Status": "Draft"
  },
  "Description": "The program calls a function that can never be guaranteed to work safely.",
  "Extended_Description": "Certain functions behave in dangerous ways regardless of how they are used. Functions in this category were often implemented without taking security concerns into account. The gets() function is unsafe because it does not perform bounds checking on the size of its input. An attacker can easily send arbitrarily-sized input to gets() and overflow the destination buffer. Similarly, the >> operator is unsafe to use when reading into a statically-allocated character array because it does not perform bounds checking on the size of its input. An attacker can easily send arbitrarily-sized input to the >> operator and overflow the destination buffer.",
  "Related_Weaknesses": {
    "Related_Weakness": {
      "attr": {
        "@_Nature": "ChildOf",
        "@_CWE_ID": "1177",
        "@_View_ID": "1000",
        "@_Ordinal": "Primary"
      }
    }
  },
  "Weakness_Ordinalities": { "Weakness_Ordinality": { "Ordinality": "Primary" } },
  "Applicable_Platforms": {
    "Language": [
      { "attr": { "@_Name": "C", "@_Prevalence": "Undetermined" } },
      { "attr": { "@_Name": "C++", "@_Prevalence": "Undetermined" } }
    ]
  },
  "Modes_Of_Introduction": { "Introduction": { "Phase": "Implementation" } },
  "Likelihood_Of_Exploit": "High",
  "Common_Consequences": { "Consequence": { "Scope": "Other", "Impact": "Varies by Context" } },
  "Potential_Mitigations": {
    "Mitigation": [
      {
        "Phase": ["Implementation", "Requirements"],
        "Description": "Ban the use of dangerous functions. Use their safe equivalent."
      },
      {
        "Phase": "Testing",
        "Description": "Use grep or static analysis tools to spot usage of dangerous functions."
      }
    ]
  },
  "Demonstrative_Examples": {
    "Demonstrative_Example": [
      {
        "Intro_Text": "The code below calls gets() to read information into a buffer.",
        "Example_Code": {
          "attr": { "@_Nature": "bad", "@_Language": "C" },
          "xhtml:div": { "#text": "char buf[BUFSIZE];gets(buf);", "xhtml:br": "" }
        },
        "Body_Text": "The gets() function in C is inherently unsafe."
      },
      {
        "attr": { "@_Demonstrative_Example_ID": "DX-5" },
        "Intro_Text": "The code below calls the gets() function to read in data from the command line.",
        "Example_Code": {
          "attr": { "@_Nature": "bad", "@_Language": "C" },
          "xhtml:div": {
            "#text": "}",
            "xhtml:div": {
              "#text": "char buf[24];printf(\"Please enter your name and press <Enter>\\n\");gets(buf);...",
              "attr": { "@_style": "margin-left:10px;" },
              "xhtml:br": ["", "", ""]
            }
          }
        },
        "Body_Text": "However, the programmer uses the function gets() which is inherently unsafe because it blindly copies all input from STDIN to the buffer without checking size. This allows the user to provide a string that is larger than the buffer size, resulting in an overflow condition."
      }
    ]
  },
  "Taxonomy_Mappings": {
    "Taxonomy_Mapping": [
      {
        "attr": { "@_Taxonomy_Name": "7 Pernicious Kingdoms" },
        "Entry_Name": "Dangerous Functions"
      },
      {
        "attr": { "@_Taxonomy_Name": "CERT C Secure Coding" },
        "Entry_ID": "POS33-C",
        "Entry_Name": "Do not use vfork()",
        "Mapping_Fit": "CWE More Abstract"
      },
      {
        "attr": { "@_Taxonomy_Name": "Software Fault Patterns" },
        "Entry_ID": "SFP3",
        "Entry_Name": "Use of an improper API"
      }
    ]
  },
  "References": {
    "Reference": [
      { "attr": { "@_External_Reference_ID": "REF-6" } },
      {
        "attr": { "@_External_Reference_ID": "REF-194", "@_Section": "Chapter 5. Working with I/O" }
      },
      {
        "attr": {
          "@_External_Reference_ID": "REF-7",
          "@_Section": "Chapter 5, "gets and fgets" Page 163"
        }
      }
    ]
  },
  "Content_History": {
    "Submission": { "Submission_Name": "7 Pernicious Kingdoms", "Submission_Date": "2006-07-19" },
    "Modification": [
      {
        "Modification_Name": "Sean Eidemiller",
        "Modification_Organization": "Cigital",
        "Modification_Date": "2008-07-01",
        "Modification_Comment": "added/updated demonstrative examples"
      },
      {
        "Modification_Name": "Eric Dalci",
        "Modification_Organization": "Cigital",
        "Modification_Date": "2008-07-01",
        "Modification_Comment": "updated Potential_Mitigations"
      },
      {
        "Modification_Name": "CWE Content Team",
        "Modification_Organization": "MITRE",
        "Modification_Date": "2008-09-08",
        "Modification_Comment": "updated Applicable_Platforms, Relationships, Other_Notes, Taxonomy_Mappings, Type, Weakness_Ordinalities"
      },
      {
        "Modification_Name": "CWE Content Team",
        "Modification_Organization": "MITRE",
        "Modification_Date": "2008-11-24",
        "Modification_Comment": "updated Relationships, Taxonomy_Mappings"
      },
      {
        "Modification_Name": "CWE Content Team",
        "Modification_Organization": "MITRE",
        "Modification_Date": "2009-10-29",
        "Modification_Comment": "updated Description, Other_Notes, References"
      },
      {
        "Modification_Name": "CWE Content Team",
        "Modification_Organization": "MITRE",
        "Modification_Date": "2010-02-16",
        "Modification_Comment": "updated Demonstrative_Examples, References, Relationships"
      },
      {
        "Modification_Name": "CWE Content Team",
        "Modification_Organization": "MITRE",
        "Modification_Date": "2010-04-05",
        "Modification_Comment": "updated Relationships"
      },
      {
        "Modification_Name": "CWE Content Team",
        "Modification_Organization": "MITRE",
        "Modification_Date": "2011-06-01",
        "Modification_Comment": "updated Common_Consequences"
      },
      {
        "Modification_Name": "CWE Content Team",
        "Modification_Organization": "MITRE",
        "Modification_Date": "2011-06-27",
        "Modification_Comment": "updated Common_Consequences"
      },
      {
        "Modification_Name": "CWE Content Team",
        "Modification_Organization": "MITRE",
        "Modification_Date": "2012-05-11",
        "Modification_Comment": "updated Relationships"
      },
      {
        "Modification_Name": "CWE Content Team",
        "Modification_Organization": "MITRE",
        "Modification_Date": "2012-10-30",
        "Modification_Comment": "updated Potential_Mitigations"
      },
      {
        "Modification_Name": "CWE Content Team",
        "Modification_Organization": "MITRE",
        "Modification_Date": "2014-07-30",
        "Modification_Comment": "updated Demonstrative_Examples, Relationships, Taxonomy_Mappings"
      },
      {
        "Modification_Name": "CWE Content Team",
        "Modification_Organization": "MITRE",
        "Modification_Date": "2017-11-08",
        "Modification_Comment": "updated Causal_Nature, References, Relationships, Taxonomy_Mappings"
      },
      {
        "Modification_Name": "CWE Content Team",
        "Modification_Organization": "MITRE",
        "Modification_Date": "2018-03-27",
        "Modification_Comment": "updated References"
      },
      {
        "Modification_Name": "CWE Content Team",
        "Modification_Organization": "MITRE",
        "Modification_Date": "2019-01-03",
        "Modification_Comment": "updated Relationships"
      },
      {
        "Modification_Name": "CWE Content Team",
        "Modification_Organization": "MITRE",
        "Modification_Date": "2020-02-24",
        "Modification_Comment": "updated References, Relationships"
      }
    ],
    "Previous_Entry_Name": [
      { "#text": "Dangerous Functions", "attr": { "@_Date": "2008-01-30" } },
      { "#text": "Use of Inherently Dangerous Functions", "attr": { "@_Date": "2008-04-11" } }
    ]
  }
}

Contributing

Please consult CONTRIBUTING for guidelines on contributing to this project.

Author

cwe-tool © Liran Tal, Released under the Apache-2.0 License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].