What is NagaScan

NagaScan is a distributed passive vulnerability scanner for Web application.

What NagaScan do

NagaScan currently support some common Web application vulnerabilities, e.g. XSS, SQL Injection, File Inclusion etc

How NagaScan work

Config a proxy, e.g. Web Browser proxy or mobile Wi-Fi proxy, the traffic (including requests headers, cookies, post data, URLs, etc) will be mirrored and parsed into our central database, then NagaScan will be automatically assigned to distributed scanners to scan the common web application vulnerabilities.

Web Console

  • sudo pip install mysql-connector
  • sudo pip install jinja2
  • sudo pip install bleach


  • sudo apt-get install python-pip python-dev libmysqlclient-dev
  • sudo pip install requests
  • sudo pip install MySQL-python
  • sudo pip install -U selenium
  • sudo apt-get install libfontconfig


  • sudo apt-get install python-pip python-dev libmysqlclient-dev
  • sudo pip install MySQL-python


  • Install MySQL and create a db user and password, e.g. root/toor
  • Create database for NagaScan by using command source schema.sql

Web Console

  • Modify www/ with your own DB configuration for Web console
configs = {
    'db': {
        'host': '',
        'user': 'root',
        'password': 'toor'

  • Run sudo python www/ to start Web console


  • Modify scanner/lib/ with your own DB configuration for Scanner
def db_conn():
        user = "root"
        pwd = "toor"
        hostname = ""

  • Install PhantomJs
    • Linux 64-bit:
    • Linux 32-bit:
  • Modify scanner/lib/ in line 28 as below
self.executable_path='[Your Own Phantomjs Binary Path]' # e.g. /home/ubuntu/phantomjs-2.1.1-linux-x86_64/bin/phantomjs

  • Run below commands to start Scanner
    • python scanner/ to scan File Inclusion
    • python scanner/ to scan XSS
    • python scanner/ to scan SQL injection

Proxy & Parser

  • Install MitmProxy
    • Ubuntu 16.04 (Preferred):
      • sudo apt-get install python3-dev python3-pip libffi-dev libssl-dev
      • sudo pip3 install mitmproxy
    • Ubuntu 14.04:
      • sudo apt-get install python-pip python-dev libffi-dev libssl-dev libxml2-dev libxslt1-dev libjpeg8-dev zlib1g-dev
      • sudo pip install "mitmproxy==0.18.2"
    • MacOS:
      • brew install python3
      • brew install mitmproxy
  • Run mitmdump -p 443 -s "proxy/ /tmp/logs.txt" to start Proxy
  • Modify parser/lib/ with your own DB configuration for Parser
def db_conn():
        user = "root"
        pwd = "toor"
        hostname = ""

  • Run python parser/ /tmp/logs.txt to start Parser
  • Access to Web Console with the default username and password ([email protected]/[email protected]) to config exclusions and add SQLMAP server webconsole exclusion_1 exclusion_2 sqlmapserver
  • Install MitmProxy certificates for Browser or Mobile per Instruction
  • Add a proxy you created in your Web Browser or Mobile Wi-Fi
  • Just browse websites from Browser or use APPs from Mobile whatever you like
  • Have fun!



  1. - 漏洞组合拳 - 攻击分布式节点
  2. 轻松组建分布式 pyspider 集群 - imlonghao
  3. 去哪儿自动化测试框架Qunit中的零侵入切面技术应用及分布式运行平台 【携程技术中心】
  4. scrapy-redis 分布式爬虫 | 帅羊羊的博客
  5. 开源扫描器