Giter Club home page Giter Club logo

backend's Introduction

Security Inspector (Backend) : Repo Vulnerability Scanner ๐Ÿ“ ๐Ÿ’ป ๐Ÿ‰

Description :

Tech Stack (Frontend + Backend) ๐Ÿ’ป

1. React JS 
2. Flask Framework
3. Beautiful Soup Library
4. Owasp ZAP Proxy Tool

Note: Approximate Running Time of Each API ๐Ÿ•ฅ 30 sec to 1 minute


Installation and Setup ๐ŸŽ›๏ธ

  1. Install Stable OWASP ZAP Proxy from their Official Website
  2. Install Python 3.10 Version from Official Website
  3. Run OWASP ZAP Proxy Application. It runs on port 8080.
  4. Get API Key of OWASP ZAP Proxy Application. Paste that API Key in WebScan/apikey.py file.
  5. Run the following commands in main directory.
pip install -r requirements.txt
python app.py 
  1. You are good to go !

API Usage Examples

  1. To get Vulnerable Packages of Repository

Request Format

GET <url>/getvulnerablepackages?url={URL of your Open Source Project Pypi, GitHub, npm}

Sample Response

{
    "CVSS_Score": 5.506909430438841,
    "orginalurl": "<Your URL>",
    "packages": [
        {
            "CVSS_Score": 6.075,
            "name": "amqp",
            "version": "1.4.9\r",
            "vulnerability": [
                {
                    "CVE": "CVE-2018-11087",
                    "CVSS_Score": 4.3,
                    "description": "Pivotal Spring AMQP, 1.x versions prior to 1.7.10 and 2.x versions prior to 2.0.6, expose a man-in-the-middle vulnerability due to lack of hostname validation. A malicious user that has the ability to intercept traffic would be able to view data in transit.\n\n"
                },
                {
                    "CVE": "CVE-2017-8045",
                    "CVSS_Score": 7.5,
                    "description": "In Pivotal Spring AMQP versions prior to 1.7.4, 1.6.11, and 1.5.7, an org.springframework.amqp.core.Message may be unsafely deserialized when being converted into a string. A malicious payload could be crafted to exploit this and enable a remote code execution attack.\n\n"
                },
               
                    ]
        }
        ],
        "projecturl": <GITHUB URL>
    "webLink": <WEB APP URL IF Applicable>
}
  1. To get Secrets of a Repository

Request Format

GET <url>/findsecrets?url={URL of your Repo}

Sample Response

[
      {
        "file": "settings.py",
        "secrets": [
            "# SECURITY WARNING: keep the secret key used in production secret!",
            "SECRET_KEY = 'django-insecure-180(d!16vi4icc#nfc)83l*esib-ike^o_nuq@4anue@l+wf6+'"
        ],
        "url": "<Raw Url of File>"
    },
]
  1. Web Scan API

Request Format

GET <url>/runscan?url={URL of your Repo}?<typeofscan> = true?&<rest...> = false

Sample Response Spider/Ajax Spider

[
    "https://github.com/trending/developers",
    "https://github.com/WerWolv/ImHex/stargazers",
    
]

Sample Response Active/Passive Scan (Run only after Spider Scans)

[

    {
        "alert": "Missing Anti-clickjacking Header",
        "alertRef": "10020-1",
        "attack": "",
        "confidence": "Medium",
        "cweid": "1021",
        "description": "The response does not include either Content-Security-Policy with 'frame-ancestors' directive or X-Frame-Options to protect against 'ClickJacking' attacks.",
        "evidence": "",
        "id": "0",
        "messageId": "4",
        "method": "GET",
        "name": "Missing Anti-clickjacking Header",
        "other": "",
        "param": "X-Frame-Options",
        "pluginId": "10020",
        "reference": "https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options",
        "risk": "Medium",
        "solution": "Modern Web browsers support the Content-Security-Policy and X-Frame-Options HTTP headers. Ensure one of them is set on all web pages returned by your site/app.\nIf you expect the page to be framed only by pages on your server (e.g. it's part of a FRAMESET) then you'll want to use SAMEORIGIN, otherwise if you never expect the page to be framed, you should use DENY. Alternatively consider implementing Content Security Policy's \"frame-ancestors\" directive.",
        "sourceid": "3",
        "tags": {
            "OWASP_2017_A06": "https://owasp.org/www-project-top-ten/2017/A6_2017-Security_Misconfiguration.html",
            "OWASP_2021_A05": "https://owasp.org/Top10/A05_2021-Security_Misconfiguration/",
            "WSTG-v42-CLNT-09": "https://owasp.org/www-project-web-security-testing-guide/v42/4-Web_Application_Security_Testing/11-Client-side_Testing/09-Testing_for_Clickjacking"
        },
        "url": "https://public-firing-range.appspot.com",
        "wascid": "15"
    },

]

Built by </>

Built with โค๏ธ

backend's People

Contributors

dragonman164 avatar

Stargazers

 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.