• Stars
    star
    735
  • Rank 61,652 (Top 2 %)
  • Language
    Ruby
  • License
    MIT License
  • Created over 11 years ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Dawn is a static analysis security scanner for ruby written web applications. It supports Sinatra, Padrino and Ruby on Rails frameworks.

Dawnscanner - The raising security scanner for ruby web applications

dawn is a source code scanner designed to review your web applications for security issues.

The tool is able to scan web applications written in Ruby and it supports all major MVC (Model View Controller) frameworks, out of the box:


Gem Version Build Status Coverage Status Code Triagers Badge Inline docs Gitter


dawn version 2.0 has 680+ security checks loaded in its knowledge base which is weekly updated from the National Vulnerability Database by NIST.

A brief "how it works"

When you run dawn on your code it parses your project Gemfile.lock looking for the gems used and it tries to detect the ruby interpreter version you are using or you declared in your ruby version management tool you like most (RVM, rbenv, ...).

Then the tool tries to detect the MVC framework your web application uses and it applies the security check accordingly. There checks designed to match rails application or checks that are appliable to any ruby code.

dawn can also understand the code in your views and to backtrack sinks to spot cross site scripting and sql injections introduced by the code you actually wrote (in the project roadmap this is the code most of the future development effort will be focused on).

dawn security scan result is a list of vulnerabilities with some mitigation actions you want to follow in order to build a stronger web application.

Installation

You can install latest dawn version, fetching it from Rubygems by typing:

$ gem install dawnscanner

After that, you need to download the knowledge base from Github and unpack the archive to $HOME/dawnscanner/kb directory.

A typical kb directory layout is similar to this:

$ ll ~/dawnscanner/kb
total 56K
drwxr-xr-x 2 thesp0nge users  28K 29 mar 18.27 bulletin
drwxr-xr-x 2 thesp0nge users   72  7 lug  2021 generic_check
-rw-r--r-- 1 thesp0nge users   65 29 mar 17.06 kb.yaml
-rw-r--r-- 1 thesp0nge users   74 29 mar 17.06 kb.yaml.sig
drwxr-xr-x 2 thesp0nge users 4,0K  7 lug  2021 owasp_ror_cheatsheet

The knowledge base is structured this way:

  • bulletin is the folder where all CVE downloaded from NIST are stored.
  • generic_check is the folder with all custom checks for your code
  • owasp_ror_cheatsheet is for the Owasp Ruby on Rails cheatsheet recomendations

Usage

Starting from version 2.0, the tool uses subcommands to start specific tasks, each of them with specific help messages.

Scanning a project

The scan subcommand tells dawn to scan the specified target for security issues.

$ dawn scan target

At the moment results are available in text format only and they are stored in a directory named with the scan timestamp, under $HOME/dawnscanner/results/target, where target is the name of the application being analyzed.

Querying the knowledge base

Is it possible, with the kb subcommand, to query the knowledge base.

dawn kb find                        # Searches the knowledge base for a given vulnerability
dawn kb help [COMMAND]              # Describe subcommands or one specific subcommand
dawn kb lint                        # Checks knowledge base content for correcteness
dawn kb list gem_name[gem_version]  # List all security issues affecting a gem passed as argument (the version string is optional).
dawn kb status                      # Checks the status of the knowledge base
dawn kb unpack                      # Unpacks security checks in KB library path

Useful links

Twitter profile: @dawnscanner Github repository: https://github.com/thesp0nge/dawnscanner

Support us

Feedbacks are great and we really love to hear your voice.

If you're a proud dawn user, if you find it useful, if you integrated it in your release process and if you want to openly support the project you can put your reference here. Just open an issue with a statement saying how do you feel the tool and your company logo if any.

Thank you.

Thanks to

saten: first issue posted about a typo in the README

presidentbeef: for his outstanding work that inspired me creating dawn and for double check comparison matrix. Issue #2 is yours :)

marinerJB: for misc bug reports and further ideas

Matteo: for ideas on API and their usage with github.com hooks

LICENSE

Copyright (c) 2013-2023 Paolo Perego [email protected]

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

owasp-orizon

Owasp Orizon is a source code static analyzer tool designed to spot security issues in Java applications.
Java
142
star
2

owasp-esapi-ruby

The Owasp Esapi Ruby is a port for outstanding release quality Owasp Esapi project to the Ruby programming language. The idea is to build a Ruby gem (the standard ruby library archive format) containing the Esapi concepts implemented in Ruby classes so people using Ruby in their Rails application can have security into them.
Ruby
46
star
3

wordstress

A security scanner for Wordpress blogging engine
Ruby
32
star
4

shellerate

A shellcode generator with encryption, encoding and polymorphism facilities built-in
Python
29
star
5

gengiscan

Fingerprint server side technology
Ruby
28
star
6

enchant

Enchant is is tool aimed to discover web application directory and pages by fuzzing the requests using a dictionary approach.
Ruby
22
star
7

recon.sh

This is the reconnaissance script I wrote for my OSCP journey
Shell
15
star
8

links

A swiss army knife to leverage your webapp attack surface
Ruby
13
star
9

cross

A tool for finding Cross Site Scripting vulnerabilities in web applications
Ruby
9
star
10

ciphersurfer

Ruby
8
star
11

octopress_gravatar_plugin

Ruby
7
star
12

wc

Your Word Counter Gem
JavaScript
6
star
13

casper

A transparent HTTP proxy
Ruby
6
star
14

nightcrawler

A python program that crawls a website and tries to stress it, polluting forms with bogus data
Python
6
star
15

HackInBoSafeEdition

Materiale per il talk ad HackInBo - 2020
Assembly
4
star
16

octopress_highlight_plugin

An octopress plugin to highlight text in your posts
4
star
17

nexty

A command line interface to your Nexpose VA tool
Ruby
3
star
18

aurora

aurora is an hybrid source code analyzer for security issues
Shell
3
star
19

sinatra_ad_auth

Authenticate users against Active Directory in a Sinatra application
Ruby
3
star
20

nanoc_kickstart

A Nanoc site with batteries included.
Ruby
3
star
21

palco

Creates Sinatra based application and extension skeletons
Ruby
3
star
22

coat

COntract And Test - my 2012 summer project, just for fun. I'd like to merge BDD, design by contract, creating a preprocessor language to add security checks and both pre/post conditions in a ruby class
Ruby
3
star
23

uyuni-hardening-guide

3
star
24

spot_the_vuln

Python
2
star
25

flender

flender is a security oriented bot. It uses github APIs to scan opensource projects for vulnerabilities such as XSS, SQLInjections, and old school ones such as buffer overflow or format bugs
Ruby
2
star
26

java_audit_sh

A set of companion tools needed by everyday job during Java source code audits
Shell
2
star
27

templates

Some useful (for me) templates
Python
2
star
28

dawnscanner_knowledge_base

Python
2
star
29

railsberry2013

My Railsberry 2013 talk stuff
JavaScript
2
star
30

sniper

Network discovery and reconnaissance
Ruby
1
star
31

hound-dog

An automated web resources discovery hunter
Python
1
star
32

thesp0nge.com

The code behind my nanoc generated blog
Ruby
1
star
33

paoloperego.it

La mia landing page
1
star
34

datify

Datify is a rubygem to convert a string storing a date or a time in a proper Time ruby object
Ruby
1
star
35

polite

polite is your text cleaner gem. It removes bad words or offenses and make your text more polite.
Ruby
1
star
36

trimmy

Ruby
1
star
37

corto

Corto is a URL Shortening gem
Ruby
1
star
38

thesp0nge.github.com

My home page at GitHub
1
star
39

ama

Ask me anything
1
star
40

angel

AngeL is a linux kernel module with an ambitious goal: to turn a generic network party in a manner that such an host is unable to start any attack over the network
C
1
star
41

libweb

A tiny, portable and fast library for handling HTTP requests
Shell
1
star
42

codiceinsicuro.github.io

A responsive Jekyll theme with clean typography and support for large full page images.
JavaScript
1
star
43

sessionable

sessionable
Ruby
1
star
44

rhsa

Check RedHat Security Advisories for a specific package version closing a CVE
Ruby
1
star
45

deadly-simple-login-api

An API designed to fulfill login functionality providing a reasonable set of password complexity rules and support to passphrases
1
star
46

armoredcode.github.io

This is the source code for my English blog "The Armored Code"
HTML
1
star
47

enc0re

enc0re is a custom binary encoder created just for fun and for OSCE preparation
C
1
star