Vulnerability Scanner¶ ↑
The vulnerability scanner class provides a simple way to check if service banners match a list of known vulnerabilities.
Initialization¶ ↑
The Vulnerability Scanner scanner class can be setup in a few flexible ways.
Basic Setup¶ ↑
Provide no targets, ip addresses or even a file. I'll be there for you~
require 'violent_ruby' scanner = ViolentRuby::VulnerabilityScanner.new
Provide Some Targets with Setup¶ ↑
Targets are the known IP addresses for the scanner class. Though, note: you can scan IP addresses that are set during the scan method call. Because I do like flexibility quite a bit, don't I?
require 'violent_ruby' ipaddrs = ['192.168.0.2', '192.168.0.3', '192.168.0.4'] scanner = ViolentRuby::VulnerabilityScanner.new(targets: ipaddrs)
Provide a Dictionary with Setup¶ ↑
Because you can do that.
require 'violent_ruby' scanner = ViolentRuby::VulnerabilityScanner.new(dictionary: "known_vulnerable_banners.txt")
Banner Grabbing¶ ↑
Maybe you just wana grab some banners? I feel you bruhv. Let's do that.
Grab Banner from 192.168.0.2 on port 8080¶ ↑
require 'violent_ruby' scanner = ViolentRuby::VulnerabilityScanner.new scanner.retrieve_banner('192.168.0.2', 8080) # => "MS-IIS WEB SERVER 5.0"
Banner Grabbing, in'a Block¶ ↑
Because maybe expressing things in blocks is just the best thing every.
require 'violent_ruby' scanner = ViolentRuby::VulnerabilityScanner.new scanner.retrieve_banner('192.168.0.2', 8080) do |banner| puts "Banner found: " + banner if banner end
Basic Scanning¶ ↑
The Vulnerability Scanner class does have a scan()
method, because that makes a lot of sense!
Method to the Madness¶ ↑
The scan method provides most of the underlying magic for this class.
require 'violent_ruby' scanner = ViolentRuby::VulnerabilityScanner.new scanner.scan(ip: "192.168.0.2", port: 8080, file: "dictionary.txt")
require 'violent_ruby' scanner = ViolentRuby::VulnerabilityScanner.new scanner.scan(ips: ["192.168.0.2", "192.168.0.3" ], port: 8080, file: "dictionary.txt")
require 'violent_ruby' scanner = ViolentRuby::VulnerabilityScanner.new scanner.file = "dictionary.txt" scanner.scan(ips: ["192.168.0.2", "192.168.0.3" ], ports: [80, 8080])