SCodeScanner stands for Source Code scanner where the user can scans the source code for finding the Critical Vulnerabilities.

Overview

SCodeScanner

The SCodeScanner stands for Source Code Scanner, where you can scan your source code files like PHP and get identify the vulnerabilities inside it. The tool can use by Pentester, Developer to quickly identify the weakness.

Learn more on http://scodescanner.info

Features

The main features for this tool are:-

  1. Scans the whole folder which contains multiple PHP files.
  2. Scans folder inside a folder, NOTE: This scans only one time, it will not scan folders inside folders inside folder
  3. It will not only notify you at which file but also which line the vulnerable code exists for quickly identified it.
  4. Scans not only the PRE-Defined PHP variables but also scans the custom variables. Like a $test1 = $_GET["aaa"], then it scans for both $test1 and the GET variables inside the source code
  5. Scans functions with a function that contains our variable. Like include(htmlentities($test)) so it will parse this and give the results like the $test variable found inside the include function. Because there might be possiblity of using base64 function instead of htmlentities.
  6. It runs on your localhost, where you will have to give the folder name for scans.
  7. Give results out for each file inside the anchors tag (So you can move on to it.)
  8. You can add more functions which are dangerous if you found missing any inside the vulnerablefunctions python file.

Test Vulnerable Folders

This tool uses vulnerable scripts from this repo:- https://github.com/snoopysecurity/Vulnerable-Code-Snippets

There are predifined folder named final, where it contains the PHP files/folder. Just for test. You can also use that folder to see how this tool will find the results in PHP.

On terminal: python scscanner.py final

Demo Video

Please go to:- http://scodescanner.info/2021/05/21/example-content/

How to run it?

Requirements

PHP, Python3

If you don't have any of these please download, then,

  1. Upload your folder which contains files inside upload directory, find it in root folder of this tool. This is important to run this tool (Working on this to make it more smoother).
  2. On terminal:- pip install -r requirements.txt
  3. On terminal:- php -S localhost:80
  4. Browse to localhost
  5. Type the foldername which contains the PHP files

OR run it on Terminal to see if any error pops up

python scscanner.py foldername

Note: Please try not to change the main file name 'scscanner.py', otherwise we will have to change the name in upload.php file.

Feedback

I would really like to hear your thoughts on this tool. And if you wanted to contribute in this tool please let me know on Twitter agrawalsmart7 or you can send me a Pull request.

Future Work

For now, I have focused only on PHP, but in future, I will make this scanner for other languages too. Focused languages are:- PHP, ASP, PYTHON JAVA. Let me know if anyone interested.

Also, I will update this tool regularly to make it more powerful.

You might also like...
CamRaptor is a tool that exploits several vulnerabilities in popular DVR cameras to obtain device credentials.

CamRaptor is a tool that exploits several vulnerabilities in popular DVR cameras to obtain device credentials.

SSRF search vulnerabilities exploitation extended.
SSRF search vulnerabilities exploitation extended.

This tool search for SSRF using predefined settings in different parts of a request (path, host, headers, post and get parameters).

Small python script to look for common vulnerabilities on SMTP server.
Small python script to look for common vulnerabilities on SMTP server.

BrokenSMTP BrokenSMTP is a python3 BugBounty/Pentesting tool to look for common vulnerabilities on SMTP server. Supported Vulnerability : Spoofing - T

A script based on sqlmap that uses sql injection vulnerabilities to traverse the existence of a file

A script based on sqlmap that uses sql injection vulnerabilities to traverse the existence o

Binary check tool to identify command injection and format string vulnerabilities in blackbox binaries

Binary check tool to identify command injection and format string vulnerabilities in blackbox binaries. Using xrefs to commonly injected and format string'd files, it will scan binaries faster than Firmware Slap.

A Python Tool that uses Shodan API's to perform quick recon for vulnerabilities

Shodan Quick Recon A Python Tool that uses Shodan API's to perform quick recon for vulnerabilities Configuration You must edit the python code, and in

WpDisect is a wordpress hacking tool that finds vulnerabilities in wordpress.

wpdisect WpDisect is a wordpress hacking tool that finds misconfigurations in wordpress. Prerequisites You need to download wordpress in the wpdisect

Something I built to test for Log4J vulnerabilities on customer networks.

Log4J-Scanner Something I built to test for Log4J vulnerabilities on customer networks. I'm not responsible if your computer blows up, catches fire or

Visibility and Mitigation for Log4J vulnerabilities

Visibility and Mitigation for Log4J vulnerabilities Several scripts for the visibility and mitigation of Log4J vulnerabilities. Static Scanner - Linux

Comments
  • ValueError: Invalid format string

    ValueError: Invalid format string

    logger.info("Starting the scanner - " + str(time.strftime("%Y-%m-%d-%hh-%MM-%ss")) +'\n')
    

    ValueError: Invalid format string scscanner.py line:39 I changed it to logger.info("Starting the scanner - " + str(time.strftime("%Y-%m-%d")) +'\n') But I'm not sure if it's accurate,Because there is no error in the operation, but there is no result image

    opened by SkinAir 6
  • error - doesn't run

    error - doesn't run

    python scscanner.py -h

    Traceback (most recent call last): File "scscanner.py", line 3, in from helper import yaml_main, php_main File "/root/scodescanner/helper.py", line 2, in from typing import final ImportError: cannot import name 'final' from 'typing' (/root/.pyenv/versions/3.7.13/lib/python3.7/typing.py)

    opened by svchost9913 3
  • Module not found - No module named 'src.php'

    Module not found - No module named 'src.php'

    I am getting an error when running the command python3 scscanner.py --help

    Traceback (most recent call last):
      File "/home/corrupted/scodescanner/scscanner.py", line 3, in <module>
        from helper import yaml_main, php_main
      File "/home/corrupted/scodescanner/helper.py", line 4, in <module>
        from src.php.folder_parserer import folderparser, fileparser
    ModuleNotFoundError: No module named 'src.php'
    

    image

    opened by banner-prog 1
  • error - doesn't run

    error - doesn't run

    Hi,

    this is what I get when running python3 scscanner.py

    
    Traceback (most recent call last):
      File "scscanner.py", line 3, in <module>
        from helper import yaml_main, php_main
      File "/home/adrian/Downloads/tools/scodescanner/helper.py", line 10, in <module>
        from src.common.file_sender import jira_issue_creater, slack_issue_creator
    ModuleNotFoundError: No module named 'src.common'
    
    
    opened by adrian-rt 4
Releases(v3.1.0)
  • v3.1.0(Jun 3, 2022)

    CHANGELOG-

    • Added yaml scanning capability
    • Better code
    • Reduces false positives
    • Improved command agrument list
    • Added new yaml rules file - rules.yaml inside rules/yaml directory.
    • ignore low hanging fruits with severity.
    • Yaml scanner have ability to give output in beautiful JSON file.
    Source code(tar.gz)
    Source code(zip)
  • v2.1.0(Apr 20, 2022)

    CHANGELOG:

    1. Improved Code by removing unnecessary code

    2. Improved Rules.

    3. Rules now contains the tracking of the variable, Example:

        $var1 = $_GET['a'];
        $var2 = $_GET['b'];
      
       echo htmlspecialchars($var1 ); This will Ignore
       echo $var1; This will match
      
       $encryptedvalue = htmlspecialchars($var2);
       echo $encryptedvalue; this will ignore
      
       echo $var2; this will match
      
    4. Added --check flag - Which is responsible for removing the false positives.

    5. Addded Jira intergraion - Now we can send the output file directly to Jira instance.

    6. Added Slack Integration - We can send file to slack channel

    Source code(tar.gz)
    Source code(zip)
  • v2.0.0(Mar 4, 2022)

Discord Token Stealer Malware Protection

TokenGuard TokenGuard, protect your account, prevent token steal. Totally free and open source Discord Server: https://discord.gg/EmwfaGuBE8 Source Co

10 Nov 23, 2022
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
Profil3r is an OSINT tool that allows you to find potential profiles of a person on social networks, as well as their email addresses 🕵️

Profil3r is an OSINT tool that allows you to find potential profiles of a person on social networks, as well as their email addresses. This program also alerts you to the presence of a data leak for

1.1k Aug 24, 2021
Client script for the fisherman phishing tool

Client script for the fisherman phishing tool

Pushkar Raj 1 Feb 23, 2022
Bypass 4xx HTTP response status codes.

Forbidden Bypass 4xx HTTP response status codes. To see all the test cases, check the source code - follow the NOTE comments. Script uses multithreadi

Ivan Šincek 165 Dec 28, 2022
Phishing Campaign Toolkit

King Phisher Phishing Campaign Toolkit Installation For instructions on how to install, please see the INSTALL.md file. After installing, for instruct

RSM US LLP 1.9k Jan 01, 2023
SonicWALL SSL-VPN Web Server Vulnerable Exploit

SonicWALL SSL-VPN Web Server Vulnerable Exploit

44 Nov 15, 2022
Phoenix Framework is an environment for writing, testing and using exploit code.

Phoenix Framework is an environment for writing, testing and using exploit code. 🖼 Screenshots 🎪 Community PwnWiki Forums 🔑 Licen

42 Aug 09, 2022
HatSploit collection of generic payloads designed to provide a wide range of attacks without having to spend time writing new ones.

HatSploit collection of generic payloads designed to provide a wide range of attacks without having to spend time writing new ones.

EntySec 5 May 10, 2022
NExfil is an OSINT tool written in python for finding profiles by username.

NExfil is an OSINT tool written in python for finding profiles by username. The provided usernames are checked on over 350 websites within few seconds.

thewhiteh4t 1.4k Jan 01, 2023
Suricata Language Server is an implementation of the Language Server Protocol for Suricata signatures

Suricata Language Server is an implementation of the Language Server Protocol for Suricata signatures. It adds syntax check, hints and auto-completion to your preferred editor once it is configured.

Stamus Networks 39 Nov 28, 2022
An forensics tool to help aid in the investigation of spoofed emails based off the email headers.

A forensic tool to make analysis of email headers easy to aid in the quick discovery of the attacker. Table of Contents About mailMeta Installation Us

Syed Modassir Ali 59 Nov 26, 2022
PreviewGram is for users that wants get a more private experience with the Telegram's Channel.

PreviewGram is for users that wants get a more private experience with the Telegram's Channel.

1 Sep 25, 2022
xkeysnail is yet another keyboard remapping tool for X environment written in Python

xkeysnail is yet another keyboard remapping tool for X environment written in Python. It's like xmodmap but allows more flexible remappings.

Masafumi Oyamada 809 Dec 26, 2022
ORector - A Fast Python tool designed to detect open redirects vulnerabilities on websites

ORector is a Fast Python tool designed to detect open redirects vulnerabilities

11 Apr 02, 2022
Mass Shortlink Bypass Merupakan Tools Yang Akan Bypass Shortlink Ke Tujuan Asli, Dibuat Dengan Python 3

Shortlink-Bypass Mass Shortlink Bypass Merupakan Tools Yang Akan Bypass Shortlink Ke Tujuan Asli, Dibuat Dengan Python 3 Support Shortlink tii.ai/tei.

Wan Naz ID 6 Oct 24, 2022
CVE-2021-22986 & F5 BIG-IP RCE

Vuln Impact This vulnerability allows for unauthenticated attackers with network access to the iControl REST interface, through the BIG-IP management

Al1ex 85 Dec 02, 2022
A Python Tool that uses Shodan API's to perform quick recon for vulnerabilities

Shodan Quick Recon A Python Tool that uses Shodan API's to perform quick recon for vulnerabilities Configuration You must edit the python code, and in

Black Hat Ethical Hacking 5 Aug 09, 2022
Moodle community-based vulnerability scanner

badmoodle Moodle community-based vulnerability scanner Description badmoodle is an unofficial community-based vulnerability scanner for moodle that sc

Michele Di Bonaventura 11 Dec 22, 2022
Exploiting CVE-2021-44228 in Unifi Network Application for remote code execution and more

Log4jUnifi Exploiting CVE-2021-44228 in Unifi Network Application for remote cod

96 Jan 02, 2023