Dependency Combobulator is an Open-Source, modular and extensible framework to detect and prevent dependency confusion leakage and potential attacks.

Overview

Dependency Combobulator

BHEU BADGE python maintained

Dependency Combobulator is an Open-Source, modular and extensible framework to detect and prevent dependency confusion leakage and potential attacks. This facilitates a holistic approach for ensuring secure application releases that can be evaluated against different sources (e.g., GitHub Packages, JFrog Artifactory) and many package management schemes (e.g., ndm, maven).

Intendend Audiances

The framework can be used by security auditors, pentesters and even baked into an enterprise's application security program and release cycle in an automated fashion.

Main features

  • Pluggable - interject on commit level, build, release steps in SDLC.
  • Expandable - easily add your own package management scheme or code source of choice
  • General-purpose Heuristic-Engine - an abstract package data model provides agnostic heuristic approach
  • Supporting wide range of technologies
  • Flexible - decision trees can be determined upon insights or verdicts provided by the toolkit

Easly exstensible

The project is putting practicionar's ability to extend and fit the toolkit to her own specific needs. As such, it is designed to be able to extend it to other sources, public registries, package management schemes and extending the abstract model and accompnaied heuristics engine.

Installation

Dependency Combobulator is ready to work with as it is - just git clone or download the package from https://github.com/apiiro/combobulator

Arguments (--help)

  -h, --help            show this help message and exit
  -t {npm,NuGet,maven}, --type {npm,NuGet,maven}
                        Package Manager Type, i.e: npm, NuGet, maven
  -l LIST_FROM_FILE, --load_list LIST_FROM_FILE
                        Load list of dependencies from a file
  -d FROM_SRC, --directory FROM_SRC
                        Extract dependencies from local source repository
  -p--package SINGLE    Name a single package.
  -c CSV, --csv CSV     Export packages properties onto CSV file
  -gh GITHUB_TOKEN, --github GITHUB_TOKEN
                        GitHub Access Token (Overrides .env file setting)
  -a {compare,comp,heuristics,heur}, --analysis {compare,comp,heuristics,heur}
                        Required analysis level - compare (comp), heuristics
                        (heur) (default: compare)

Apiiro 
   
     Community

   

Supported package types (-t, --t): npm, maven

Supported source dependency assessment:

  • From file containing the dependency identifiers line-by-line. (-l, --load_list)
  • By analyzing the appropriate repo's software bill-of-materials (e.g. package.json, pom.xml) (-d, --directory)
  • Naming a single identifier (-p, --package)

Analysis level is customizable as you can build your own preferred analysis profile in seconds. Dependency Combobulator does come with several analysis levels out-of-the-box, selected by -a, --analysis

Supported output format:

  • Screen stdout (default)
  • CSV export to designated file -(-CSV)

Usage examples

usage-maven.mp4

Credits

The project is maintained and sponsored by Apiiro with 💜

We honor great developers & AppSec practitioners with a passion for change 🙏

Comments
  • installation failed using Python 3.10.4 at Ubuntu 22.04

    installation failed using Python 3.10.4 at Ubuntu 22.04

    System and Python versions

    $ lsb_release -a
    No LSB modules are available.
    Distributor ID:	Ubuntu
    Description:	Ubuntu 22.04 LTS
    Release:	22.04
    Codename:	jammy
    $ python3 --version
    Python 3.10.4
    

    Installation: (steps for reproduce)

    $ git clone https://github.com/apiiro/combobulator
    Cloning into 'combobulator'...
    remote: Enumerating objects: 85, done.
    remote: Counting objects: 100% (85/85), done.
    remote: Compressing objects: 100% (72/72), done.
    remote: Total 85 (delta 34), reused 46 (delta 11), pack-reused 0
    Receiving objects: 100% (85/85), 213.21 KiB | 2.11 MiB/s, done.
    Resolving deltas: 100% (34/34), done.
    $ cd combobulator/
    $ virtualenv venv
    created virtual environment CPython3.10.4.final.0-64 in 419ms
    $ source venv/bin/activate
    $ pip install -r requirements.txt
    Collecting requests==2.12.1
      Using cached requests-2.12.1-py2.py3-none-any.whl (574 kB)
    Collecting gql==2.0.0
      Using cached gql-2.0.0-py2.py3-none-any.whl (10 kB)
    Collecting python-dotenv==0.19.2
      Using cached python_dotenv-0.19.2-py2.py3-none-any.whl (17 kB)
    Collecting six>=1.10.0
      Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
    Collecting promise<3,>=2.3
      Using cached promise-2.3-py3-none-any.whl
    Collecting graphql-core<3,>=2.3.2
      Using cached graphql_core-2.3.2-py2.py3-none-any.whl (252 kB)
    Collecting rx<2,>=1.6
      Using cached Rx-1.6.1-py2.py3-none-any.whl (179 kB)
    Installing collected packages: rx, requests, six, python-dotenv, promise, graphql-core, gql
    Successfully installed gql-2.0.0 graphql-core-2.3.2 promise-2.3 python-dotenv-0.19.2 requests-2.12.1 rx-1.6.1 six-1.16.0
    $ combobulator --help
    combobulator: command not found
    

    I can't run combobulator directly, I must search python file for this.

    $  find ../combobulator/ -iname combobulato*
    ../combobulator/
    ../combobulator/src/combobulator.py
    $ python src/combobulator.py --help
    Traceback (most recent call last):
      File "combobulator/venv/lib/python3.10/site-packages/requests/packages/urllib3/_collections.py", line 2, in <module>
        from collections import Mapping, MutableMapping
    ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.10/collections/__init__.py)
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "combobulator/venv/lib/python3.10/site-packages/requests/packages/__init__.py", line 29, in <module>
        import urllib3
    ModuleNotFoundError: No module named 'urllib3'
    

    module urllib3 used, but missed at reqirements. So i install it manually

    $ pip install urllib3
    Successfully installed urllib3-1.26.9
    

    try launch script again

    $ python src/combobulator.py --help
    Traceback (most recent call last):
      File "temp_for_tool/combobulator/src/combobulator.py", line 7, in <module>
        import registry.npm as npm
      File "temp_for_tool/combobulator/src/registry/npm.py", line 2, in <module>
        import requests
      File "temp_for_tool/combobulator/venv/lib/python3.10/site-packages/requests/__init__.py", line 63, in <module>
        from . import utils
      File "temp_for_tool/combobulator/venv/lib/python3.10/site-packages/requests/utils.py", line 29, in <module>
        from .cookies import RequestsCookieJar, cookiejar_from_dict
      File "temp_for_tool/combobulator/venv/lib/python3.10/site-packages/requests/cookies.py", line 174, in <module>
        class RequestsCookieJar(cookielib.CookieJar, collections.MutableMapping):
    AttributeError: module 'collections' has no attribute 'MutableMapping'
    
    bug 
    opened by sv-atoslav 2
  • getting issue no module named dotenv in cli following cmds run in readme.md video

    getting issue no module named dotenv in cli following cmds run in readme.md video

    [email protected]:~/git/combobulator/src
    04:29 PM (main=) $ python3 ./combobulator.py --help
    Traceback (most recent call last):
      File "/.../combobulator/src/./combobulator.py", line 3, in <module>
        from dotenv import load_dotenv
    ModuleNotFoundError: No module named 'dotenv'
    
    
    
    documentation 
    opened by noahehall 2
  • Circular dependency conflict on installation

    Circular dependency conflict on installation

    requirements.txt specifies a pinned version of requests as a dependency requests==2.11.1 however it also calls for gql. gql 2.0.0 has it's own dependency on a higher version of requests requests<3,>=2.12 ![dependency conflict example](https://user-images.githubusercontent.com/47631344/148214910-fb884a6d-d9e4-4e6a-a971-3b7b0d198d5c.png)

    invalid 
    opened by JennyCide 1
  • Safer dependencies collector

    Safer dependencies collector

    some improvements such as using path.join, fix scan source dev and peer dependencies were not analyzed

    related to https://github.com/apiiro/combobulator/issues/21

    opened by efratas 0
  • failed when try launch scan

    failed when try launch scan

    System and Python versions

    $ lsb_release -a
    No LSB modules are available.
    Distributor ID:	Ubuntu
    Description:	Ubuntu 22.04 LTS
    Release:	22.04
    Codename:	jammy
    $ python3 --version
    Python 3.10.4
    

    steps to reproduse:

    $ cd ~/Downloads
    $ git clone https://github.com/clarkio/vulnerable-app.git
    Cloning into 'vulnerable-app'...
    [...]
    Resolving deltas: 100% (237/237), done.
    $ git clone https://github.com/stamparm/DSVW.git
    Cloning into 'DSVW'...
    [...]
    Resolving deltas: 100% (68/68), done.
    $ git clone https://github.com/rafaelrpinto/VulnerableJavaWebApplication
    Cloning into 'VulnerableJavaWebApplication'...
    [...]
    Resolving deltas: 100% (66/66), done.
    
    • scan targets:
    $ cd *path_to_combobulator_folder*
    $ python src/combobulator.py --type npm --directory ~/Downloads/vulnerable-app/
      ____  _____ ____  _____ _   _ ____  _____ _   _  ______   __
     |  _ \| ____|  _ \| ____| \ | |  _ \| ____| \ | |/ ___\ \ / /
     | | | |  _| | |_) |  _| |  \| | | | |  _| |  \| | |    \ V / 
     | |_| | |___|  __/| |___| |\  | |_| | |___| |\  | |___  | |  
     |____/|_____|_|   |_____|_| \_|____/|_____|_| \_|\____| |_|  
       ____ ____  __  __ ____   ____  ____  _   _ _        _  _____ ____  ____  
      / ___/ /\ \|  \/  | __ ) / /\ \| __ )| | | | |      / \|_   _/ /\ \|  _ \ 
     | |  / /  \ \ |\/| |  _ \/ /  \ \  _ \| | | | |     / _ \ | |/ /  \ \ |_) |
     | |__\ \  / / |  | | |_) \ \  / / |_) | |_| | |___ / ___ \| |\ \  / /  _ < 
      \____\_\/_/|_|  |_|____/ \_\/_/|____/ \___/|_____/_/   \_\_| \_\/_/|_| \_
    [PROC] Arguments parsed.
    [PROC] Package list imported....  ['body-parser', 'cookie-parser', 'express', 'morgan', 'serve-favicon', dict_keys(['browser-sync', 'chai', 'chai-as-promised', 'chalk', 'dateformat', 'debug', 'del', 'glob', 'gulp', 'gulp-angular-templatecache', 'gulp-autoprefixer', 'gulp-bump', 'gulp-bytediff', 'gulp-concat', 'gulp-filter', 'gulp-header', 'gulp-if', 'gulp-imagemin', 'gulp-inject', 'gulp-jscs', 'gulp-jshint', 'gulp-less', 'gulp-load-plugins', 'gulp-minify-css', 'gulp-minify-html', 'gulp-ng-annotate', 'gulp-nodemon', 'gulp-order', 'gulp-plumber', 'gulp-print', 'gulp-rev', 'gulp-rev-replace', 'gulp-sourcemaps', 'gulp-task-listing', 'gulp-uglify', 'gulp-useref', 'gulp-util', 'jshint-stylish', 'karma', 'karma-chai', 'karma-chai-sinon', 'karma-chrome-launcher', 'karma-coverage', 'karma-firefox-launcher', 'karma-growl-reporter', 'karma-mocha', 'karma-phantomjs-launcher', 'karma-safari-launcher', 'karma-sinon', 'lodash', 'method-override', 'minimist', 'mocha', 'node-notifier', 'phantomjs-prebuilt', 'plato', 'q', 'sinon', 'sinon-chai', 'wiredep', 'yargs'])]
    Traceback (most recent call last):
      File "combobulator/src/combobulator.py", line 195, in <module>
        main()
      File "combobulator/src/combobulator.py", line 173, in main
        metapkg(x, args.package_type)
      File "combobulator/src/metapackage.py", line 7, in __init__
        if len(pkgname.split(':')) == 2:
    AttributeError: 'dict_keys' object has no attribute 'split'
    
    $ python src/combobulator.py --type pypi --directory ~/Downloads/DSVW/
      ____  _____ ____  _____ _   _ ____  _____ _   _  ______   __
     |  _ \| ____|  _ \| ____| \ | |  _ \| ____| \ | |/ ___\ \ / /
     | | | |  _| | |_) |  _| |  \| | | | |  _| |  \| | |    \ V / 
     | |_| | |___|  __/| |___| |\  | |_| | |___| |\  | |___  | |  
     |____/|_____|_|   |_____|_| \_|____/|_____|_| \_|\____| |_|  
       ____ ____  __  __ ____   ____  ____  _   _ _        _  _____ ____  ____  
      / ___/ /\ \|  \/  | __ ) / /\ \| __ )| | | | |      / \|_   _/ /\ \|  _ \ 
     | |  / /  \ \ |\/| |  _ \/ /  \ \  _ \| | | | |     / _ \ | |/ /  \ \ |_) |
     | |__\ \  / / |  | | |_) \ \  / / |_) | |_| | |___ / ___ \| |\ \  / /  _ < 
      \____\_\/_/|_|  |_|____/ \_\/_/|____/ \___/|_____/_/   \_\_| \_\/_/|_| \_
    [PROC] Arguments parsed.
    [ERROR]  Selected package type doesn't support import scan.
    
    $ python src/combobulator.py --type maven --directory ~/Downloads/VulnerableJavaWebApplication/
      ____  _____ ____  _____ _   _ ____  _____ _   _  ______   __
     |  _ \| ____|  _ \| ____| \ | |  _ \| ____| \ | |/ ___\ \ / /
     | | | |  _| | |_) |  _| |  \| | | | |  _| |  \| | |    \ V / 
     | |_| | |___|  __/| |___| |\  | |_| | |___| |\  | |___  | |  
     |____/|_____|_|   |_____|_| \_|____/|_____|_| \_|\____| |_|  
       ____ ____  __  __ ____   ____  ____  _   _ _        _  _____ ____  ____  
      / ___/ /\ \|  \/  | __ ) / /\ \| __ )| | | | |      / \|_   _/ /\ \|  _ \ 
     | |  / /  \ \ |\/| |  _ \/ /  \ \  _ \| | | | |     / _ \ | |/ /  \ \ |_) |
     | |__\ \  / / |  | | |_) \ \  / / |_) | |_| | |___ / ___ \| |\ \  / /  _ < 
      \____\_\/_/|_|  |_|____/ \_\/_/|____/ \___/|_____/_/   \_\_| \_\/_/|_| \_
    [PROC] Arguments parsed.
    [PROC] Package list imported....  ['org.springframework.boot:spring-boot-starter-web', 'org.apache.tomcat.embed:tomcat-embed-jasper', 'javax.servlet:jstl', 'org.springframework:spring-jdbc', 'com.h2database:h2']
    [PROC] Maven checker engaged.
    [ANALYSIS] Package:  spring-boot-starter-web   is present on public provider.
    [ANALYSIS] Package:  tomcat-embed-jasper   is present on public provider.
    [ANALYSIS] Package:  jstl   is present on public provider.
    [ANALYSIS] Package:  spring-jdbc   is present on public provider.
    [ANALYSIS] Package:  h2   is present on public provider.
    

    summary:

    Only java scan are stable. Please, fix it. Also, please, update a readme.md

    triage 
    opened by sv-atoslav 0
  • Introduce a keyword list to mark internal only package scheme

    Introduce a keyword list to mark internal only package scheme

    For dependency confusion use case - a keyword list option for marking risky packages that should follow a scheme for internal-facing only. That way - the user will be able to designate dependencies that are to be highlighted if found to be present on the public repo

    cc @rotemreiss

    enhancement 
    opened by moshe-apiiro 0
Releases(v1.0.0-rc1)
Owner
Apiiro
Apiiro
An easy-to-use wrapper for NTFS-3G on macOS

ezNTFS ezNTFS is an easy-to-use wrapper for NTFS-3G on macOS. ezNTFS can be used as a menu bar app, or via the CLI in the terminal. Installation To us

Matthew Go 34 Dec 01, 2022
Um keylogger que se disfarça de um app que tira print da tela.

Keylogger_ Um keylogger que se disfarça de um app que tira print da tela. Este programa captura o print da tela e salva ,normalmente, na pasta Picture

Marcus Vinícius Ribeiro Andrade 1 Dec 03, 2021
CVE-2022-22963 PoC

CVE-2022-22963 CVE-2022-22963 PoC Slight modified for English translation and detection of https://github.com/chaosec2021/Spring-cloud-function-SpEL-R

Nicolas Krassas 104 Dec 08, 2022
Finite Volume simulation of the Raleigh-Taylor Instability

finitevolume2-python Finite Volume simulation of the Raleigh-Taylor Instability Create Your Own Finite Volume Fluid Simulation (With Python): Part 2 B

Philip Mocz 12 Sep 01, 2022
(D)arth (S)ide of the (L)og4j (F)orce, the ultimate log4j vulnerabilities assessor

DSLF DSLF stands for (D)arth (S)ide of the (L)og4j (F)orce. It is the ultimate log4j vulnerabilities assessor. It comes with four individual Python3 m

frontal 1 Jan 11, 2022
A simple subdomain scanner in python

Subdomain-Scanner A simple subdomain scanner in python ✨ Features scans subdomains of a domain thats it! 💁‍♀️ How to use first download the scanner.p

Portgas D Ace 2 Jan 07, 2022
Python lib to automate basic QFT calculations like Wick-contractions.

QFTools Python lib to automate basic QFT calculations like Wick-contractions. Features Wick contractions for real scalar fields Wick contractions for

2 Aug 21, 2022
S2-062 (CVE-2021-31805) / S2-061 / S2-059 RCE

CVE-2021-31805 Remote code execution S2-062 (CVE-2021-31805) Due to Apache Struts2's incomplete fix for S2-061 (CVE-2020-17530), some tag attributes c

warin9 31 Nov 22, 2022
Apache Flink 目录遍历漏洞批量检测 (CVE-2020-17519)

使用方法&免责声明 该脚本为Apache Flink 目录遍历漏洞批量检测 (CVE-2020-17519)。 使用方法:Python CVE-2020-17519.py urls.txt urls.txt 中每个url为一行,漏洞地址输出在vul.txt中 影响版本: Apache Flink 1

45 Sep 21, 2022
Wonk is a tool for combining a set of AWS policy files into smaller compiled policy sets.

Wonk is a tool for combining a set of AWS policy files into smaller compiled policy sets.

Amino, Inc 140 Dec 16, 2022
Pgen is the best brute force password generator and it is improved from the cupp.py

pgen Pgen is the best brute force password generator and it is improved from the cupp.py The pgen tool is dedicated to Leonardo da Vinci -Time stays l

heyheykids 2 Jan 31, 2022
Evil-stalker - A simple tool written in python, it is so simple that it is based on google dorks

evil-stalker How to run First of all, you must install the necessary libraries.

rock3d 6 Nov 16, 2022
Xteam All in one Instagram,Android,phishing osint and wifi hacking tool available

Xteam All in one Instagram,Android,phishing osint and wifi hacking tool available

xploits tech 283 Dec 29, 2022
A python package with tools to read and postprocess the output of the channel DNS-solver (davecats/channel), as well as its associated postprocessing tools.

Python tools for davecats/channel A python package with tools to read and postprocess the output of the channel dns solver, as well as its associated

Andrea Andreolli 1 Dec 13, 2021
User-friendly reference finder in IDA

IDARefHunter Updated: This project's been introduced on IDA Plugin Contest 2021! Why do we need RefHunter? Getting reference information in one specif

Jiwon 29 Dec 04, 2022
CVE-2022-23046 - SQL Injection Vulnerability on PhpIPAM v1.4.4

CVE-2022-23046 PhpIPAM v1.4.4 allows an authenticated admin user to inject SQL s

2 Feb 15, 2022
POC using subprocess lib in Python 🐍

POC subprocess ☞ POC using the subprocess library with Python. References: https://github.com/GuillaumeFalourd/poc-subprocess https://geekflare.com/le

Guillaume Falourd 2 Nov 28, 2022
JumpServer远程代码执行漏洞检测利用脚本

Jumpserver-EXP JumpServer远程代码执行漏洞检测利用脚本

Veraxy 181 Dec 20, 2022
Script to calculate Active Directory Kerberos keys (AES256 and AES128) for an account, using its plaintext password

Script to calculate Active Directory Kerberos keys (AES256 and AES128) for an account, using its plaintext password

Matt Creel 27 Dec 20, 2022
Repository for a project of the course EP2520 Building Networked Systems Security

EP2520_ACME_Project Repository for a project of the course EP2520 Building Networked Systems Security in Royal Institute of Technology (KTH), Stockhol

1 Dec 11, 2021