ronin 2.0.0 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +14 -0
- data/.rubocop.yml +21 -0
- data/ChangeLog.md +35 -2
- data/Gemfile +20 -16
- data/README.md +42 -23
- data/Rakefile +2 -2
- data/bin/ronin +6 -7
- data/data/new/project/Gemfile.erb +9 -9
- data/gemspec.yml +7 -7
- data/lib/ronin/cli/char_set_options.rb +1 -1
- data/lib/ronin/cli/cipher_command.rb +3 -1
- data/lib/ronin/cli/command.rb +3 -0
- data/lib/ronin/cli/commands/asn.rb +1 -1
- data/lib/ronin/cli/commands/banner_grab.rb +5 -3
- data/lib/ronin/cli/commands/cert_dump.rb +4 -7
- data/lib/ronin/cli/commands/cert_gen.rb +4 -4
- data/lib/ronin/cli/commands/cert_grab.rb +5 -6
- data/lib/ronin/cli/commands/decode.rb +14 -14
- data/lib/ronin/cli/commands/dns.rb +2 -2
- data/lib/ronin/cli/commands/encode.rb +14 -14
- data/lib/ronin/cli/commands/extract.rb +1 -1
- data/lib/ronin/cli/commands/grep.rb +7 -5
- data/lib/ronin/cli/commands/hexdump.rb +54 -22
- data/lib/ronin/cli/commands/hmac.rb +1 -1
- data/lib/ronin/cli/commands/host.rb +15 -15
- data/lib/ronin/cli/commands/http.rb +42 -25
- data/lib/ronin/cli/commands/ip.rb +5 -3
- data/lib/ronin/cli/commands/iprange.rb +2 -2
- data/lib/ronin/cli/commands/netcat.rb +32 -38
- data/lib/ronin/cli/commands/new/project.rb +19 -19
- data/lib/ronin/cli/commands/new/script.rb +12 -12
- data/lib/ronin/cli/commands/proxy.rb +37 -41
- data/lib/ronin/cli/commands/rot.rb +11 -10
- data/lib/ronin/cli/commands/strings.rb +1 -1
- data/lib/ronin/cli/commands/unhexdump.rb +1 -1
- data/lib/ronin/cli/dns.rb +3 -0
- data/lib/ronin/cli/file_processor_command.rb +3 -0
- data/lib/ronin/cli/host_and_port.rb +58 -0
- data/lib/ronin/cli/http_shell.rb +19 -16
- data/lib/ronin/cli/key_options.rb +3 -5
- data/lib/ronin/cli/method_options.rb +0 -2
- data/lib/ronin/cli/pattern_options.rb +5 -6
- data/lib/ronin/cli/printing/syntax_highlighting.rb +3 -0
- data/lib/ronin/cli/typo_options.rb +1 -1
- data/lib/ronin/cli/value_processor_command.rb +1 -1
- data/lib/ronin/config.rb +3 -3
- data/lib/ronin/version.rb +2 -2
- data/man/ronin-asn.1 +11 -1
- data/man/ronin-asn.1.md +9 -1
- data/man/ronin-banner-grab.1 +1 -1
- data/man/ronin-banner-grab.1.md +1 -1
- data/man/ronin-bitflip.1 +1 -1
- data/man/ronin-bitflip.1.md +1 -1
- data/man/ronin-cert-dump.1 +1 -1
- data/man/ronin-cert-dump.1.md +1 -1
- data/man/ronin-cert-gen.1 +16 -7
- data/man/ronin-cert-gen.1.md +11 -5
- data/man/ronin-cert-grab.1 +1 -1
- data/man/ronin-cert-grab.1.md +1 -1
- data/man/ronin-decode.1 +1 -1
- data/man/ronin-decode.1.md +1 -1
- data/man/ronin-decrypt.1 +31 -1
- data/man/ronin-decrypt.1.md +19 -1
- data/man/ronin-dns.1 +2 -2
- data/man/ronin-dns.1.md +2 -2
- data/man/ronin-email-addr.1 +3 -3
- data/man/ronin-email-addr.1.md +3 -3
- data/man/ronin-encode.1 +1 -1
- data/man/ronin-encode.1.md +1 -1
- data/man/ronin-encrypt.1 +31 -1
- data/man/ronin-encrypt.1.md +19 -1
- data/man/ronin-entropy.1 +1 -1
- data/man/ronin-entropy.1.md +1 -1
- data/man/ronin-escape.1 +2 -2
- data/man/ronin-escape.1.md +2 -2
- data/man/ronin-extract.1 +1 -1
- data/man/ronin-extract.1.md +1 -1
- data/man/ronin-grep.1 +1 -1
- data/man/ronin-grep.1.md +1 -1
- data/man/ronin-help.1 +1 -1
- data/man/ronin-help.1.md +1 -1
- data/man/ronin-hexdump.1 +2 -2
- data/man/ronin-hexdump.1.md +2 -2
- data/man/ronin-highlight.1 +1 -1
- data/man/ronin-highlight.1.md +1 -1
- data/man/ronin-hmac.1 +1 -1
- data/man/ronin-hmac.1.md +1 -1
- data/man/ronin-homoglyph.1 +1 -1
- data/man/ronin-homoglyph.1.md +1 -1
- data/man/ronin-host.1 +3 -3
- data/man/ronin-host.1.md +3 -3
- data/man/ronin-http.1 +1 -1
- data/man/ronin-http.1.md +1 -1
- data/man/ronin-ip.1 +1 -1
- data/man/ronin-ip.1.md +1 -1
- data/man/ronin-iprange.1 +1 -1
- data/man/ronin-iprange.1.md +1 -1
- data/man/ronin-irb.1 +1 -1
- data/man/ronin-irb.1.md +1 -1
- data/man/ronin-md5.1 +1 -1
- data/man/ronin-md5.1.md +1 -1
- data/man/ronin-netcat.1 +1 -1
- data/man/ronin-netcat.1.md +1 -1
- data/man/ronin-new-project.1 +1 -1
- data/man/ronin-new-project.1.md +1 -1
- data/man/ronin-new-script.1 +1 -1
- data/man/ronin-new-script.1.md +1 -1
- data/man/ronin-new.1 +1 -1
- data/man/ronin-new.1.md +1 -1
- data/man/ronin-proxy.1 +2 -2
- data/man/ronin-proxy.1.md +2 -2
- data/man/ronin-public-suffix-list.1 +11 -1
- data/man/ronin-public-suffix-list.1.md +9 -1
- data/man/ronin-quote.1 +2 -2
- data/man/ronin-quote.1.md +2 -2
- data/man/ronin-rot.1 +20 -3
- data/man/ronin-rot.1.md +14 -3
- data/man/ronin-sha1.1 +1 -1
- data/man/ronin-sha1.1.md +1 -1
- data/man/ronin-sha256.1 +2 -2
- data/man/ronin-sha256.1.md +2 -2
- data/man/ronin-sha512.1 +1 -1
- data/man/ronin-sha512.1.md +1 -1
- data/man/ronin-strings.1 +1 -1
- data/man/ronin-strings.1.md +1 -1
- data/man/ronin-tips.1 +1 -1
- data/man/ronin-tips.1.md +1 -1
- data/man/ronin-tld-list.1 +11 -1
- data/man/ronin-tld-list.1.md +9 -1
- data/man/ronin-typo.1 +1 -1
- data/man/ronin-typo.1.md +1 -1
- data/man/ronin-typosquat.1 +1 -1
- data/man/ronin-typosquat.1.md +1 -1
- data/man/ronin-unescape.1 +1 -1
- data/man/ronin-unescape.1.md +1 -1
- data/man/ronin-unhexdump.1 +1 -1
- data/man/ronin-unhexdump.1.md +1 -1
- data/man/ronin-unquote.1 +1 -1
- data/man/ronin-unquote.1.md +1 -1
- data/man/ronin-url.1 +1 -1
- data/man/ronin-url.1.md +1 -1
- data/man/ronin-xor.1 +1 -1
- data/man/ronin-xor.1.md +1 -1
- data/man/ronin.1 +1 -1
- data/man/ronin.1.md +1 -1
- data/ronin.gemspec +4 -3
- metadata +40 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 31356f467f009277f4c840fb645f3f64bfba3c6d9e1cf1b1bef2dee177dc4b96
|
4
|
+
data.tar.gz: 4cce57a146892ac6b05bf6a41aa35467d50e307c74ed6150cfdf05234aa177f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 244f986f64b8ee769769ca050321ff3ad6ebe4de5ea7c9f7f509514e32e02d580fbd391bf65c1a35238f2b42825050082fd0a1a06c491e447462a603b7a3c9de
|
7
|
+
data.tar.gz: 312f52036a301608b240fd91a26f2d3632eafd1f0c193ef6127851eb43e69840c443a8f3f9608ab7ad8d522e7fb58d96e45e8e32cdfac00a59e931ed636b7d48
|
data/.github/workflows/ruby.yml
CHANGED
@@ -30,3 +30,17 @@ jobs:
|
|
30
30
|
run: bundle install --jobs 4 --retry 3
|
31
31
|
- name: Run tests
|
32
32
|
run: bundle exec rake test
|
33
|
+
|
34
|
+
# rubocop linting
|
35
|
+
rubocop:
|
36
|
+
runs-on: ubuntu-latest
|
37
|
+
steps:
|
38
|
+
- uses: actions/checkout@v2
|
39
|
+
- name: Set up Ruby
|
40
|
+
uses: ruby/setup-ruby@v1
|
41
|
+
with:
|
42
|
+
ruby-version: 3.0
|
43
|
+
- name: Install dependencies
|
44
|
+
run: bundle install --jobs 4 --retry 3
|
45
|
+
- name: Run rubocop
|
46
|
+
run: bundle exec rubocop --parallel
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
AllCops:
|
2
|
+
NewCops: enable
|
3
|
+
SuggestExtensions: false
|
4
|
+
TargetRubyVersion: 3.1
|
5
|
+
|
6
|
+
inherit_gem:
|
7
|
+
rubocop-ronin: rubocop.yml
|
8
|
+
|
9
|
+
#
|
10
|
+
# ronin specific exceptions
|
11
|
+
#
|
12
|
+
|
13
|
+
# this rule does not take into account the spacing of commented out lines
|
14
|
+
Layout/ExtraSpacing:
|
15
|
+
Exclude:
|
16
|
+
- 'Gemfile'
|
17
|
+
|
18
|
+
# no need to add `frozen_string_literal: true` to new scripts/projects
|
19
|
+
Style/FrozenStringLiteralComment:
|
20
|
+
Exclude:
|
21
|
+
- 'data/new/**/*'
|
data/ChangeLog.md
CHANGED
@@ -1,4 +1,37 @@
|
|
1
|
-
### 2.0.
|
1
|
+
### 2.0.2 / 2023-06-09
|
2
|
+
|
3
|
+
* Documentation fixes and improvements.
|
4
|
+
|
5
|
+
#### CLI
|
6
|
+
|
7
|
+
* Fixed a bug in the `ronin ip` command where empty lines would be printed
|
8
|
+
if the IP had no hostname.
|
9
|
+
* Fixed a bug in the `ronin hexdump` command where the `--type` option was being
|
10
|
+
ignored.
|
11
|
+
* Fixed the `Usage:` of the `ronin host` and `ronin dns` commands.
|
12
|
+
* Fixed typos in the `ronin email-addr`, `ronin escape`, and `ronin sha256`
|
13
|
+
man-pages.
|
14
|
+
* Fixed formatting in the `ronin cert-gen` man-page.
|
15
|
+
* Added more examples to the `ronin rot`, `ronin encrypt`, and `ronin decrypt`
|
16
|
+
man-pages.
|
17
|
+
|
18
|
+
### 2.0.1 / 2023-03-01
|
19
|
+
|
20
|
+
* Require [ronin-support] ~> 1.0, >= 1.0.1.
|
21
|
+
* Require [ronin-core] ~> 0.1, >= 0.1.1.
|
22
|
+
* Require [ronin-web] ~> 1.0, >= 1.0.1.
|
23
|
+
* Require [ronin-payloads] ~> 0.1, >= 0.1.1.
|
24
|
+
* Require [ronin-vulns] ~> 0.1, >= 0.1.2.
|
25
|
+
* Require [ronin-exploits] ~> 1.0, >= 1.0.1.
|
26
|
+
* Added {Ronin::CLI::HostAndPort} for common `host:port` parsing logic.
|
27
|
+
* Minor bug fixes.
|
28
|
+
* Improved documentation.
|
29
|
+
|
30
|
+
#### CLI
|
31
|
+
|
32
|
+
* Ensure that the `ronin http` command works with IDN host-names.
|
33
|
+
|
34
|
+
### 2.0.0 / 2023-02-01
|
2
35
|
|
3
36
|
* Require `ruby` >= 3.0.0.
|
4
37
|
* Require [rouge] ~> 3.0
|
@@ -756,7 +789,7 @@
|
|
756
789
|
* Require Spidr >= 0.1.3.
|
757
790
|
* Moved Ronin::Parameters into the parameters 0.1.0 RubyGem.
|
758
791
|
* Added a Ronin::Hexdump module:
|
759
|
-
* Provides Ronin::Hexdump.dump and Kernel#hexdump, which can hexdump any
|
792
|
+
* Provides Ronin::Hexdump.dump and Kernel#hexdump, which can hexdump any
|
760
793
|
object that supports the #each_byte method.
|
761
794
|
* Refactored Ronin::Chars::CharSet:
|
762
795
|
* Now inherites the SortedSet class.
|
data/Gemfile
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
source 'https://rubygems.org'
|
2
4
|
|
3
5
|
gemspec
|
@@ -21,37 +23,37 @@ group :database do
|
|
21
23
|
end
|
22
24
|
|
23
25
|
# Library dependencies
|
24
|
-
# gem 'ronin-support', '~> 1.0', github:
|
26
|
+
# gem 'ronin-support', '~> 1.0', github: 'ronin-rb/ronin-support',
|
25
27
|
# branch: 'main'
|
26
|
-
# gem 'ronin-core', '~> 0.1', github:
|
28
|
+
# gem 'ronin-core', '~> 0.1', github: 'ronin-rb/ronin-core',
|
27
29
|
# branch: 'main'
|
28
|
-
# gem 'ronin-repos', '~> 0.1', github:
|
30
|
+
# gem 'ronin-repos', '~> 0.1', github: 'ronin-rb/ronin-repos',
|
29
31
|
# branch: 'main'
|
30
|
-
# gem 'ronin-db', '~> 0.1', github:
|
32
|
+
# gem 'ronin-db', '~> 0.1', github: 'ronin-rb/ronin-db',
|
31
33
|
# branch: 'main'
|
32
|
-
# gem 'ronin-db-activerecord', '~> 0.1', github:
|
34
|
+
# gem 'ronin-db-activerecord', '~> 0.1', github: 'ronin-rb/ronin-db-activerecord',
|
33
35
|
# branch: 'main'
|
34
|
-
# gem 'ronin-fuzzer', '~> 0.1', github:
|
36
|
+
# gem 'ronin-fuzzer', '~> 0.1', github: 'ronin-rb/ronin-fuzzer',
|
35
37
|
# branch: 'main'
|
36
|
-
# gem 'ronin-post_ex', '~> 0.1', github:
|
38
|
+
# gem 'ronin-post_ex', '~> 0.1', github: 'ronin-rb/ronin-post_ex',
|
37
39
|
# branch: 'main'
|
38
|
-
# gem 'ronin-code-asm', '~> 1.0', github:
|
40
|
+
# gem 'ronin-code-asm', '~> 1.0', github: 'ronin-rb/ronin-code-asm',
|
39
41
|
# branch: 'main'
|
40
|
-
# gem 'ronin-code-sql', '~> 2.0', github:
|
42
|
+
# gem 'ronin-code-sql', '~> 2.0', github: 'ronin-rb/ronin-code-sql',
|
41
43
|
# branch: 'main'
|
42
|
-
# gem 'ronin-payloads', '~> 0.1', github:
|
44
|
+
# gem 'ronin-payloads', '~> 0.1', github: 'ronin-rb/ronin-payloads',
|
43
45
|
# branch: 'main'
|
44
|
-
# gem 'ronin-exploits', '~> 1.0', github:
|
46
|
+
# gem 'ronin-exploits', '~> 1.0', github: 'ronin-rb/ronin-exploits',
|
45
47
|
# branch: 'main'
|
46
|
-
# gem 'ronin-vulns', '~> 0.1', github:
|
48
|
+
# gem 'ronin-vulns', '~> 0.1', github: 'ronin-rb/ronin-vulns',
|
47
49
|
# branch: 'main'
|
48
|
-
# gem 'ronin-web-server',
|
50
|
+
# gem 'ronin-web-server', '~> 0.1', github: 'ronin-rb/ronin-web-server',
|
49
51
|
# branch: 'main'
|
50
|
-
# gem 'ronin-web-spider',
|
52
|
+
# gem 'ronin-web-spider', '~> 0.1', github: 'ronin-rb/ronin-web-spider',
|
51
53
|
# branch: 'main'
|
52
|
-
# gem 'ronin-web-user_agents', '~> 0.1', github:
|
54
|
+
# gem 'ronin-web-user_agents', '~> 0.1', github: 'ronin-rb/ronin-web-user_agents',
|
53
55
|
# branch: 'main'
|
54
|
-
# gem 'ronin-web', '~> 1.0', github:
|
56
|
+
# gem 'ronin-web', '~> 1.0', github: 'ronin-rb/ronin-web',
|
55
57
|
# branch: 'main'
|
56
58
|
|
57
59
|
group :development do
|
@@ -70,4 +72,6 @@ group :development do
|
|
70
72
|
gem 'dead_end', require: false
|
71
73
|
gem 'sord', require: false, platform: :mri
|
72
74
|
gem 'stackprof', require: false, platform: :mri
|
75
|
+
gem 'rubocop', require: false, platform: :mri
|
76
|
+
gem 'rubocop-ronin', require: false, platform: :mri
|
73
77
|
end
|
data/README.md
CHANGED
@@ -40,7 +40,7 @@ HTTP, [scanning for web vulnerabilities][ronin-vulns-synopsis],
|
|
40
40
|
|
41
41
|
* A toolkit of useful commands.
|
42
42
|
* A fully-loaded Ruby REPL.
|
43
|
-
* An ecosystem of high-quality security related Ruby libraries,
|
43
|
+
* An ecosystem of high-quality security related Ruby libraries, APIs, and
|
44
44
|
commands.
|
45
45
|
|
46
46
|
### What can you do with Ronin?
|
@@ -290,25 +290,6 @@ foo bar
|
|
290
290
|
|
291
291
|
### Text
|
292
292
|
|
293
|
-
De-obfuscate an email address:
|
294
|
-
|
295
|
-
```shell
|
296
|
-
$ ronin email-addr --deobfuscate "john [dot] smith [at] example [dot] com"
|
297
|
-
john.smith@example.com
|
298
|
-
```
|
299
|
-
|
300
|
-
Enumerate through all of the obfuscations of an email address:
|
301
|
-
|
302
|
-
```shell
|
303
|
-
$ ronin email-addr --enum-obfuscations john.smith@example.com
|
304
|
-
john.smith @ example.com
|
305
|
-
john.smith AT example.com
|
306
|
-
john.smith at example.com
|
307
|
-
john.smith[AT]example.com
|
308
|
-
john.smith[at]example.com
|
309
|
-
...
|
310
|
-
```
|
311
|
-
|
312
293
|
Extract high-entropy data from a file:
|
313
294
|
|
314
295
|
```shell
|
@@ -386,13 +367,13 @@ Decrypt data:
|
|
386
367
|
$ ronin decrypt --cipher aes-256-cbc --password "..." encrypted.bin
|
387
368
|
```
|
388
369
|
|
389
|
-
Generates
|
370
|
+
Generates a HMAC for a file:
|
390
371
|
|
391
372
|
```shell
|
392
373
|
$ ronin hmac --hash sha1 --password "too many secrets" data.txt
|
393
374
|
```
|
394
375
|
|
395
|
-
Generates
|
376
|
+
Generates a HMAC for a string:
|
396
377
|
|
397
378
|
```shell
|
398
379
|
$ ronin hmac --hash sha1 --password "too many secrets" --string "..."
|
@@ -657,6 +638,25 @@ example.com.bh
|
|
657
638
|
...
|
658
639
|
```
|
659
640
|
|
641
|
+
Find all subdomains that have addresses:
|
642
|
+
|
643
|
+
```shell
|
644
|
+
$ ronin host --enum-subdomains subdomains.txt --has-addresses google.com
|
645
|
+
www.google.com
|
646
|
+
mail.google.com
|
647
|
+
smtp.google.com
|
648
|
+
ns1.google.com
|
649
|
+
ns2.google.com
|
650
|
+
m.google.com
|
651
|
+
ns.google.com
|
652
|
+
blog.google.com
|
653
|
+
admin.google.com
|
654
|
+
news.google.com
|
655
|
+
vpn.google.com
|
656
|
+
ns3.google.com
|
657
|
+
...
|
658
|
+
```
|
659
|
+
|
660
660
|
Enumerate over every possible typosquat variation of a domain:
|
661
661
|
|
662
662
|
```shell
|
@@ -684,6 +684,25 @@ Find all of the unregistered typosquat domains for a valid domain:
|
|
684
684
|
$ ronin typosquat --unregistered microsoft.com
|
685
685
|
```
|
686
686
|
|
687
|
+
De-obfuscate an email address:
|
688
|
+
|
689
|
+
```shell
|
690
|
+
$ ronin email-addr --deobfuscate "john [dot] smith [at] example [dot] com"
|
691
|
+
john.smith@example.com
|
692
|
+
```
|
693
|
+
|
694
|
+
Enumerate through all of the obfuscations of an email address:
|
695
|
+
|
696
|
+
```shell
|
697
|
+
$ ronin email-addr --enum-obfuscations john.smith@example.com
|
698
|
+
john.smith @ example.com
|
699
|
+
john.smith AT example.com
|
700
|
+
john.smith at example.com
|
701
|
+
john.smith[AT]example.com
|
702
|
+
john.smith[at]example.com
|
703
|
+
...
|
704
|
+
```
|
705
|
+
|
687
706
|
#### SSL/TLS Certs
|
688
707
|
|
689
708
|
Dump information about a SSL/TLS certificate:
|
@@ -815,7 +834,7 @@ If you prefer using [Docker], there are also [Docker images] available:
|
|
815
834
|
|
816
835
|
```shell
|
817
836
|
docker pull roninrb/ronin
|
818
|
-
docker run -it ronin
|
837
|
+
docker run -it roninrb/ronin
|
819
838
|
```
|
820
839
|
|
821
840
|
Additionally, if you want to mount your home directory into the docker image:
|
data/Rakefile
CHANGED
data/bin/ronin
CHANGED
@@ -1,17 +1,16 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
2
3
|
|
3
4
|
require 'rubygems'
|
4
5
|
|
5
6
|
root = File.expand_path(File.join(File.dirname(__FILE__),'..'))
|
6
7
|
if File.file?(File.join(root,'Gemfile.lock'))
|
7
8
|
Dir.chdir(root) do
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
exit -1
|
14
|
-
end
|
9
|
+
require 'bundler/setup'
|
10
|
+
rescue LoadError => e
|
11
|
+
warn e.message
|
12
|
+
warn "Run `gem install bundler` to install Bundler"
|
13
|
+
exit(-1)
|
15
14
|
end
|
16
15
|
end
|
17
16
|
|
@@ -4,13 +4,13 @@ source 'https://rubygems.org'
|
|
4
4
|
gem 'rake'
|
5
5
|
|
6
6
|
<%- end -%>
|
7
|
-
gem 'ronin-support', '~> 1.0'
|
7
|
+
gem 'ronin-support', '~> 1.0' # , github: 'ronin-rb/ronin-support'
|
8
8
|
|
9
|
-
# gem 'ronin-code-asm', '~> 0.3'
|
10
|
-
# gem 'ronin-code-sql', '~> 1.2'
|
11
|
-
# gem 'ronin-db', '~> 0.1'
|
12
|
-
# gem 'ronin-web-server', '~> 0.1'
|
13
|
-
# gem 'ronin-web-spider', '~> 0.1'
|
14
|
-
# gem 'ronin-web-user_agents', '~> 0.1'
|
15
|
-
# gem 'ronin-payloads', '~> 0.1'
|
16
|
-
# gem 'ronin-exploits', '~> 1.0'
|
9
|
+
# gem 'ronin-code-asm', '~> 0.3' # , github: 'ronin-rb/ronin-code-asm'
|
10
|
+
# gem 'ronin-code-sql', '~> 1.2' # , github: 'ronin-rb/ronin-code-sql'
|
11
|
+
# gem 'ronin-db', '~> 0.1' # , github: 'ronin-rb/ronin-db'
|
12
|
+
# gem 'ronin-web-server', '~> 0.1' # , github: 'ronin-rb/ronin-web-server'
|
13
|
+
# gem 'ronin-web-spider', '~> 0.1' # , github: 'ronin-rb/ronin-web-spider'
|
14
|
+
# gem 'ronin-web-user_agents', '~> 0.1' # , github: 'ronin-rb/ronin-web-user_agents'
|
15
|
+
# gem 'ronin-payloads', '~> 0.1' # , github: 'ronin-rb/ronin-payloads'
|
16
|
+
# gem 'ronin-exploits', '~> 1.0' # , github: 'ronin-rb/ronin-exploits'
|
data/gemspec.yml
CHANGED
@@ -2,7 +2,7 @@ name: ronin
|
|
2
2
|
summary: A Ruby toolkit for security research and development.
|
3
3
|
description:
|
4
4
|
Ronin is a free and Open Source Ruby toolkit for security research and
|
5
|
-
development.Ronin contains many different CLI commands and Ruby libraries for
|
5
|
+
development.Ronin contains many different CLI commands and Ruby libraries for
|
6
6
|
a variety of security tasks, such as encoding/decoding data, filter
|
7
7
|
IPs/hosts/URLs, querying ASNs, querying DNS, HTTP, scanning for web
|
8
8
|
vulnerabilities, spidering websites, install 3rd party repositories of
|
@@ -96,17 +96,17 @@ dependencies:
|
|
96
96
|
async-io: ~> 1.0
|
97
97
|
wordlist: ~> 1.0
|
98
98
|
# Ronin dependencies:
|
99
|
-
ronin-support: ~> 1.0
|
100
|
-
ronin-core: ~> 0.1
|
99
|
+
ronin-support: ~> 1.0, >= 1.0.1
|
100
|
+
ronin-core: ~> 0.1, >= 0.1.1
|
101
101
|
ronin-repos: ~> 0.1
|
102
102
|
ronin-db: ~> 0.1
|
103
103
|
ronin-fuzzer: ~> 0.1
|
104
|
-
ronin-web: ~> 1.0
|
104
|
+
ronin-web: ~> 1.0, >= 1.0.1
|
105
105
|
ronin-code-asm: ~> 1.0
|
106
106
|
ronin-code-sql: ~> 2.0
|
107
|
-
ronin-payloads: ~> 0.1
|
108
|
-
ronin-exploits: ~> 1.0
|
109
|
-
ronin-vulns: ~> 0.1
|
107
|
+
ronin-payloads: ~> 0.1, >= 0.1.1
|
108
|
+
ronin-exploits: ~> 1.0, >= 1.0.1
|
109
|
+
ronin-vulns: ~> 0.1, >= 0.1.2
|
110
110
|
|
111
111
|
development_dependencies:
|
112
112
|
bundler: ~> 2.0
|
@@ -24,6 +24,9 @@ require 'ronin/support/crypto/cipher'
|
|
24
24
|
module Ronin
|
25
25
|
class CLI
|
26
26
|
module Commands
|
27
|
+
#
|
28
|
+
# Base class for all commands which use ciphers.
|
29
|
+
#
|
27
30
|
class CipherCommand < FileProcessorCommand
|
28
31
|
|
29
32
|
include KeyOptions
|
@@ -142,7 +145,6 @@ module Ronin
|
|
142
145
|
cipher.stream(input, block_size: @block_size, output: stdout)
|
143
146
|
end
|
144
147
|
|
145
|
-
|
146
148
|
end
|
147
149
|
end
|
148
150
|
end
|
data/lib/ronin/cli/command.rb
CHANGED
@@ -17,6 +17,7 @@
|
|
17
17
|
#
|
18
18
|
|
19
19
|
require 'ronin/cli/value_processor_command'
|
20
|
+
require 'ronin/cli/host_and_port'
|
20
21
|
|
21
22
|
require 'ronin/support/network/tcp'
|
22
23
|
|
@@ -42,6 +43,8 @@ module Ronin
|
|
42
43
|
#
|
43
44
|
class BannerGrab < ValueProcessorCommand
|
44
45
|
|
46
|
+
include HostAndPort
|
47
|
+
|
45
48
|
usage '[options] {HOST:PORT} ...'
|
46
49
|
|
47
50
|
option :with_host_port, desc: 'Print the service with the banner'
|
@@ -62,8 +65,7 @@ module Ronin
|
|
62
65
|
# The `HOST:PORT` service pair.
|
63
66
|
#
|
64
67
|
def process_value(service)
|
65
|
-
host, port = service
|
66
|
-
port = port.to_i
|
68
|
+
host, port = host_and_port(service)
|
67
69
|
|
68
70
|
begin
|
69
71
|
banner = Support::Network::TCP.banner(host,port)
|
@@ -73,7 +75,7 @@ module Ronin
|
|
73
75
|
else
|
74
76
|
puts banner
|
75
77
|
end
|
76
|
-
rescue => error
|
78
|
+
rescue StandardError => error
|
77
79
|
print_error("#{service}: #{error.message}")
|
78
80
|
end
|
79
81
|
end
|
@@ -17,6 +17,7 @@
|
|
17
17
|
#
|
18
18
|
|
19
19
|
require 'ronin/cli/value_processor_command'
|
20
|
+
require 'ronin/cli/host_and_port'
|
20
21
|
require 'ronin/support/crypto/cert'
|
21
22
|
require 'ronin/support/network/ssl/mixin'
|
22
23
|
|
@@ -62,6 +63,7 @@ module Ronin
|
|
62
63
|
include CommandKit::Printing::Indent
|
63
64
|
include CommandKit::Printing::Fields
|
64
65
|
include CommandKit::Printing::Lists
|
66
|
+
include HostAndPort
|
65
67
|
|
66
68
|
usage '[options] {HOST:PORT | URL | FILE} ...'
|
67
69
|
|
@@ -100,14 +102,11 @@ module Ronin
|
|
100
102
|
def process_value(value)
|
101
103
|
case value
|
102
104
|
when /\A[^:]+:\d+\z/
|
103
|
-
host, port = value
|
104
|
-
port = port.to_i
|
105
|
+
host, port = host_and_port(value)
|
105
106
|
|
106
107
|
print_cert(ssl_cert(host,port))
|
107
108
|
when /\Ahttps:/
|
108
|
-
|
109
|
-
host = uri.host
|
110
|
-
port = uri.port
|
109
|
+
host, port = host_and_port_from_url(value)
|
111
110
|
|
112
111
|
print_cert(ssl_cert(host,port))
|
113
112
|
else
|
@@ -180,8 +179,6 @@ module Ronin
|
|
180
179
|
|
181
180
|
puts
|
182
181
|
|
183
|
-
fields = {}
|
184
|
-
|
185
182
|
if options[:extensions]
|
186
183
|
puts "Extensions:"
|
187
184
|
indent do
|
@@ -103,8 +103,8 @@ module Ronin
|
|
103
103
|
|
104
104
|
option :subject_alt_name, short: '-A',
|
105
105
|
value: {
|
106
|
-
|
107
|
-
|
106
|
+
type: /[a-z0-9:\._-]+/,
|
107
|
+
usage: 'HOST|IP'
|
108
108
|
},
|
109
109
|
desc: 'Adds HOST or IP to subjectAltName' do |value|
|
110
110
|
@subject_alt_names << value
|
@@ -277,7 +277,7 @@ module Ronin
|
|
277
277
|
@not_after ||= if options[:not_after]
|
278
278
|
Time.parse(options[:not_after])
|
279
279
|
else
|
280
|
-
not_before+Support::Crypto::Cert::ONE_YEAR
|
280
|
+
not_before + Support::Crypto::Cert::ONE_YEAR
|
281
281
|
end
|
282
282
|
end
|
283
283
|
|
@@ -378,7 +378,7 @@ module Ronin
|
|
378
378
|
# @return [String, nil]
|
379
379
|
#
|
380
380
|
def subject_alt_name_ext
|
381
|
-
|
381
|
+
unless @subject_alt_names.empty?
|
382
382
|
@subject_alt_names.map { |name|
|
383
383
|
if name =~ IP_REGEXP
|
384
384
|
"IP: #{name}"
|
@@ -17,6 +17,7 @@
|
|
17
17
|
#
|
18
18
|
|
19
19
|
require 'ronin/cli/value_processor_command'
|
20
|
+
require 'ronin/cli/host_and_port'
|
20
21
|
require 'ronin/support/network/ssl/mixin'
|
21
22
|
|
22
23
|
require 'uri'
|
@@ -49,6 +50,7 @@ module Ronin
|
|
49
50
|
#
|
50
51
|
class CertGrab < ValueProcessorCommand
|
51
52
|
|
53
|
+
include HostAndPort
|
52
54
|
include Support::Network::SSL::Mixin
|
53
55
|
|
54
56
|
usage '[options] {HOST:PORT | URL} ...'
|
@@ -63,7 +65,7 @@ module Ronin
|
|
63
65
|
examples [
|
64
66
|
'github.com:443',
|
65
67
|
'93.184.216.34:443',
|
66
|
-
'https://github.com/'
|
68
|
+
'https://github.com/'
|
67
69
|
]
|
68
70
|
|
69
71
|
man_page 'ronin-cert-grab.1'
|
@@ -77,14 +79,11 @@ module Ronin
|
|
77
79
|
def process_value(value)
|
78
80
|
case value
|
79
81
|
when /\A[^:]+:\d+\z/
|
80
|
-
host, port = value
|
81
|
-
port = port.to_i
|
82
|
+
host, port = host_and_port(value)
|
82
83
|
|
83
84
|
grab_cert(host,port)
|
84
85
|
when /\Ahttps:/
|
85
|
-
|
86
|
-
host = uri.host
|
87
|
-
port = uri.port
|
86
|
+
host, port = host_and_port_from_url(value)
|
88
87
|
|
89
88
|
grab_cert(host,port)
|
90
89
|
else
|
@@ -61,14 +61,14 @@ module Ronin
|
|
61
61
|
class Decode < StringMethodsCommand
|
62
62
|
|
63
63
|
option :base16, desc: 'Base16 decodes the data' do
|
64
|
-
|
65
|
-
|
66
|
-
|
64
|
+
require 'ronin/support/encoding/base16'
|
65
|
+
@method_calls << :base16_decode
|
66
|
+
end
|
67
67
|
|
68
68
|
option :base32, desc: 'Base32 decodes the data' do
|
69
|
-
|
70
|
-
|
71
|
-
|
69
|
+
require 'ronin/support/encoding/base32'
|
70
|
+
@method_calls << :base32_decode
|
71
|
+
end
|
72
72
|
|
73
73
|
option :base64, short: '-b',
|
74
74
|
equals: true,
|
@@ -78,11 +78,11 @@ module Ronin
|
|
78
78
|
},
|
79
79
|
desc: 'Base64 decodes the data' do |mode=nil|
|
80
80
|
require 'ronin/support/encoding/base64'
|
81
|
-
if mode
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
81
|
+
@method_calls << if mode
|
82
|
+
[:base64_decode, [mode]]
|
83
|
+
else
|
84
|
+
:base64_decode
|
85
|
+
end
|
86
86
|
end
|
87
87
|
|
88
88
|
option :zlib, short: '-z',
|
@@ -122,9 +122,9 @@ module Ronin
|
|
122
122
|
end
|
123
123
|
|
124
124
|
option :http, desc: 'HTTP decodes the data' do
|
125
|
-
|
126
|
-
|
127
|
-
|
125
|
+
require 'ronin/support/encoding/http'
|
126
|
+
@method_calls << :http_decode
|
127
|
+
end
|
128
128
|
|
129
129
|
option :js, short: '-j',
|
130
130
|
desc: 'JavaScript decodes the data' do
|
@@ -28,7 +28,7 @@ module Ronin
|
|
28
28
|
#
|
29
29
|
# ## Usage
|
30
30
|
#
|
31
|
-
# ronin dns [options]
|
31
|
+
# ronin dns [options] {HOST ... | --file FILE}
|
32
32
|
#
|
33
33
|
# ## Options
|
34
34
|
#
|
@@ -46,7 +46,7 @@ module Ronin
|
|
46
46
|
|
47
47
|
include DNS
|
48
48
|
|
49
|
-
usage '[options] HOST'
|
49
|
+
usage '[options] {HOST ... | --file FILE}'
|
50
50
|
|
51
51
|
option :type, short: '-t',
|
52
52
|
value: {
|