FREE ACCESS & MORE: Syhunt takes action to help secure entities and businesses amid COVID-19 pandemic Read now

Syhunt Code: Getting Started

The information in this document applies to version 6.8.5 of Syhunt Code.

How to perform a code scan

Syhunt's whitebox scan (source code scan) can uncover multiple classes of application vulnerabilities and also identify key areas of the code that need review. Its static source code analysis functionality can detect over 40 vulnerability types, including the 2019 CWE Top 25 Most Dangerous Software Errors and the OWASP mobile top 10 security risks. Initially only PHP was supported. As of today, multiple web and mobile programming languages are supported.

Supported Languages (Web)

ASP Classic (VBScript & JavaScript)
ASP.Net (C# & VB.Net)
Java (JEE / JSP)
JavaScript (Client and Server-Side, Node.js, Angular, AngularJS, Express.js & Koa.js)
Lua (ngx_lua, mod_lua, CGILua & Lua Pages)
Perl
PHP
Python (CGI, Django, mod_python & WSGI)
Ruby (Rails & ERB)
TypeScript (Angular)

Supported Languages (Mobile)

Java (Android)
Swift (iOS)
Objective-C, C & C++ (iOS)
JavaScript (including Node.js, Angular, AngularJS, Express.js & Koa.js)

Follow along with this guide to learn how to perform a source code scan and generate a vulnerability report.

  1. Launch Syhunt Hybrid and click the Syhunt Code icon or New Scan button in the welcome page.

  2. Select a source code directory, source file, APK file or repository to scan.
  3. Select a scan method. We recommend the Application Code Scan (Default) method, which scans for all vulnerabilities using the recommended settings - the different methods are explained in the Hunt Methods document.
  4. Press the OK button to start the scan.

In the end of the scan, you can click Generate a Report to save the results as a HTML report or any other prefered format.

How to perform a code scan via command-line

  1. Go to the directory Syhunt is installed using the command prompt.
  2. Use the following command-line:
 Scancode [target] -hm:[a huntmethod]] -gr

# Examples:
scancode git://sub.domain.com/repo.git -gr
scancode https://github.com/user/repo.git -rb:master -gr
scancode c:\source\www\ -gr
scancode c:\source\www\file.php -gr
scancode c:\mobile\myapp.apk -gr
scancode "c:\source code\www\" -gr

Syhunt ScanCode tool reports are automatically generated and saved if the -gr parameter is provided. You can also open the session by launching Syhunt and using the Menu -> Past Sessions option.

Advanced Features

Preventing a Code Vulnerability From Being Reported

You can create rules that prevent specific vulnerabilities to be reported:

  1. Go to the Code Preferences screen ( -> Preferences -> Code Preferences).
  2. Go to the Advanced tab and click the Vulnerabilities... button
  3. Click the plus button and add using the input dialog a new rule. Examples:
  • path=*,name=XSS would prevent any vulnerability with XSS in the title from being reported
  • path=/demo/*,name=XSS would prevent any vulnerability with a path starting with /demo/ and XSS in the title from being reported
  • path=*,"name=Web Technology Disclosure" would prevent any vulnerability with Web Technology Disclosure in the title from being reported

The following parameters can be used as part of a rule:

  • path (required) - a wildcard text (which can contain the special characters ? and *) that will be matched against the affected path
  • name - a text that will be matched against the vulnerability title
  • params - a param name that will be matched against the affected param(s). If multiple params are provided, they must be separated by comma.
  • risk - a risk that will be matched against the vulnerability risk (can be low, medium, high or info)
  • lines - a number or numbers that will be matched against the affected source code line(s). If multiple lines are provided, they must be separated by comma.
  • cve - a CVE ID that will be matched against the vulnerability's CVE references
  • cwe - a CWE number that will be matched against the vulnerability's CWE references

How To Schedule a Scan

Adding and configuring a scheduled scan is an easy task:

  1. Click the Scheduled Scans icon in the launcher toolbar. The Scheduled Scans screen will open.
  2. Click the Add Scheduled Scan icon in the Scheduled Scans screen toolbar.
  3. Enter a reference name for the new scheduled scan (like MyScan) and hit OK. A preferences dialog window will open.
  4. In the Scan tab, enter the scan target details and select the desired scan method and options.

  5. In the Report tab, enter the desired report generation options.
  6. In the Schedule tab, enter the desired event plan.

  7. Click the OK button when you're done.

Sending Reports Via Email

Firstly, you have to add an Email tracker:

  1. Click the Issue Trackers icon in the launcher toolbar. The Issue Trackers screen will open.
  2. Click the Add Tracker icon in the Issue Trackers screen toolbar and choose the Add tracker: Email menu option.
  3. Enter a reference name for the new tracker (like Mail) and hit OK. A preferences dialog window will open.
  4. Enter Sender/Recipient email addresses.
  5. Enter the SMTP Authentication host and credentials and click the OK button.
  6. Click the Scheduled Scans icon in the launcher toolbar. The Scheduled Scans screen will open.
  7. Right-click the scheduled scan and click the Edit Schedule Preferences option. A preferences dialog window will open.
  8. Go to the Email tab and check the Automatically email report after generation option.

  9. Select the account preferences.
  10. Click the OK button when you're done.

Reviewing results from scheduled scans

At any time you can see the results of past and current scans and generate a report. Just launch the Syhunt Hybrid application and click the Past Sessions icon in the launcher toolbar.

Working with Third-Party Launchers and Schedulers

See this document on how to start Syhunt from within third-party task schedulers, Jenkins and other launchers

System Requirements

Syhunt Hybrid, Dynamic, Code and Mobile

  1. 4GB of available RAM (8GB recommended)
  2. 1GB of free disk space*
  3. Internet connection (recommended for code scans and dynamic scans and some features)
  4. Windows 7, 8 or 10
  5. Internet Explorer 11 or higher
  6. GIT for Windows (optional for GIT repository scans)
  7. Java 8 or higher (optional for Android APK file scan)

* This does not include the space required to save scan session data, which varies depending on the target website or code base size.

If you use a personal firewall, you'll just have to let the firewall know that Syhunt Dynamic is authorized to make connections to the Internet. However, some software firewalls do not handle high loads very well. It is not recommended to run both a personal firewall and Syhunt on the same machine.


For additional product documentation, visit syhunt.com/docs