ronin-exploits 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +80 -2
- data/Manifest.txt +63 -16
- data/README.txt +89 -2
- data/Rakefile +1 -1
- data/TODO.txt +1 -1
- data/bin/ronin-exploits +12 -0
- data/bin/ronin-payload +12 -0
- data/bin/ronin-payloads +12 -0
- data/lib/ronin/exploits.rb +13 -10
- data/lib/ronin/exploits/{impact.rb → allow.rb} +9 -4
- data/lib/ronin/exploits/exceptions.rb +3 -0
- data/lib/ronin/exploits/exceptions/target_data_missing.rb +29 -0
- data/lib/ronin/exploits/exceptions/target_unspecified.rb +29 -0
- data/lib/ronin/exploits/exceptions/unknown_helper.rb +29 -0
- data/lib/ronin/exploits/exploit.rb +330 -77
- data/lib/ronin/exploits/{format_string_target.rb → ftp.rb} +5 -11
- data/lib/ronin/exploits/helpers.rb +27 -0
- data/lib/ronin/exploits/helpers/binary.rb +44 -0
- data/lib/ronin/exploits/helpers/buffer_overflow.rb +102 -0
- data/lib/ronin/exploits/helpers/format_string.rb +107 -0
- data/lib/ronin/exploits/helpers/padding.rb +84 -0
- data/lib/ronin/exploits/http.rb +37 -0
- data/lib/ronin/exploits/{requirement.rb → local.rb} +2 -14
- data/lib/ronin/exploits/remote.rb +34 -0
- data/lib/ronin/exploits/remote_tcp.rb +70 -0
- data/lib/ronin/exploits/remote_udp.rb +70 -0
- data/lib/ronin/exploits/target.rb +134 -0
- data/lib/ronin/exploits/targets.rb +29 -0
- data/lib/ronin/exploits/{buffer_overflow_target.rb → targets/buffer_overflow.rb} +13 -11
- data/lib/ronin/exploits/{exploit_target.rb → targets/format_string.rb} +11 -14
- data/lib/ronin/exploits/version.rb +1 -1
- data/lib/ronin/exploits/{web_exploit.rb → web.rb} +3 -3
- data/lib/ronin/model/targets_arch.rb +59 -0
- data/lib/ronin/model/targets_os.rb +59 -0
- data/lib/ronin/payloads.rb +7 -3
- data/lib/ronin/payloads/binary_payload.rb +3 -7
- data/lib/ronin/payloads/{ability.rb → control.rb} +7 -2
- data/lib/ronin/payloads/encoder.rb +78 -0
- data/lib/ronin/payloads/encoders.rb +33 -0
- data/lib/ronin/payloads/encoders/xor.rb +81 -0
- data/lib/ronin/payloads/exceptions.rb +24 -0
- data/lib/ronin/payloads/exceptions/unknown_helper.rb +29 -0
- data/lib/ronin/payloads/helpers.rb +26 -0
- data/lib/ronin/payloads/helpers/exceptions.rb +24 -0
- data/lib/ronin/payloads/helpers/exceptions/program_not_found.rb +31 -0
- data/lib/ronin/payloads/helpers/exceptions/unimplemented.rb +31 -0
- data/lib/ronin/payloads/helpers/file_system.rb +187 -0
- data/lib/ronin/payloads/helpers/rpc.rb +83 -0
- data/lib/ronin/payloads/helpers/shell.rb +91 -0
- data/lib/ronin/payloads/nops.rb +32 -0
- data/lib/ronin/payloads/payload.rb +90 -53
- data/lib/ronin/payloads/shellcode.rb +1 -1
- data/lib/ronin/payloads/web_payload.rb +2 -1
- data/lib/ronin/targeted_arch.rb +38 -0
- data/lib/ronin/targeted_os.rb +38 -0
- data/lib/ronin/targeted_product.rb +34 -0
- data/lib/ronin/ui/command_line/commands/exploits.rb +77 -0
- data/lib/ronin/ui/command_line/commands/payload.rb +106 -0
- data/lib/ronin/ui/command_line/commands/payloads.rb +73 -0
- data/spec/exploits/binary_exploit_spec.rb +44 -0
- data/spec/exploits/buffer_overflow_exploit_spec.rb +70 -0
- data/spec/exploits/exploit_spec.rb +122 -25
- data/spec/exploits/format_string_exploit_spec.rb +32 -0
- data/spec/exploits/ftp_spec.rb +17 -0
- data/spec/exploits/http_spec.rb +17 -0
- data/spec/exploits/padding_exploit_spec.rb +44 -0
- data/spec/exploits/remote_tcp_spec.rb +24 -0
- data/spec/exploits/remote_udp_spec.rb +24 -0
- data/spec/exploits/target_spec.rb +91 -0
- data/spec/exploits/targets/buffer_overflow_spec.rb +18 -0
- data/spec/exploits/{web_exploit_spec.rb → web_spec.rb} +5 -5
- data/spec/helpers/database.rb +5 -0
- data/spec/helpers/objects.rb +22 -0
- data/spec/objects/exploits/test.rb +28 -0
- data/spec/objects/payloads/example.rb +19 -0
- data/spec/objects/payloads/test.rb +11 -0
- data/spec/payloads/encoder_spec.rb +26 -0
- data/spec/payloads/encoders/xor_spec.rb +20 -0
- data/spec/payloads/payload_spec.rb +48 -13
- data/spec/spec_helper.rb +3 -5
- metadata +71 -22
- data/lib/ronin/exploits/binary_exploit.rb +0 -139
- data/lib/ronin/exploits/buffer_overflow.rb +0 -80
- data/lib/ronin/exploits/exploitable.rb +0 -77
- data/lib/ronin/exploits/format_string.rb +0 -88
- data/lib/ronin/models.rb +0 -38
- data/lib/ronin/translators/xor.rb +0 -96
- data/spec/exploits/exploitable_spec.rb +0 -21
- data/spec/translators/xor_spec.rb +0 -26
data/History.txt
CHANGED
@@ -1,4 +1,82 @@
|
|
1
|
-
|
1
|
+
=== 0.2.0 / 2009-04-11
|
2
|
+
|
3
|
+
* Added Ronin::TargetedArch.
|
4
|
+
* Added Ronin::TargetedOS.
|
5
|
+
* Added Ronin::TargetedProduct.
|
6
|
+
* Added Ronin::Model::TargetsArch.
|
7
|
+
* Added Ronin::Model::TargetsOS.
|
8
|
+
* Refactored Ronin::Exploits:
|
9
|
+
* Added Ronin::Exploits::Target.
|
10
|
+
* Added Ronin::Exploits::Targets::BufferOverflow.
|
11
|
+
* Added Ronin::Exploits::Targets::FormatString.
|
12
|
+
* Added Ronin::Exploits::Helpers::Binary.
|
13
|
+
* Added Ronin::Exploits::Helpers::Padding.
|
14
|
+
* Added Ronin::Exploits::Helpers::BufferOverflow.
|
15
|
+
* Added Ronin::Exploits::Helpers::FormatString.
|
16
|
+
* Added Ronin::Exploits::Local.
|
17
|
+
* Added Ronin::Exploits::Remote.
|
18
|
+
* Added Ronin::Exploits::RemoteTCP.
|
19
|
+
* Added Ronin::Exploits::RemoteUDP.
|
20
|
+
* Added Ronin::Exploits::FTP.
|
21
|
+
* Added Ronin::Exploits::HTTP.
|
22
|
+
* Renamed Ronin::Exploits::Impact to Ronin::Exploits::Allow.
|
23
|
+
* Removed the Ronin::Exploits::Requirement.
|
24
|
+
* Rewrote Ronin::Exploits::Exploit:
|
25
|
+
* Use the new Ronin::Cacheable module.
|
26
|
+
* Added a status property, which may be either <tt>:potential</tt>,
|
27
|
+
<tt>:proven</tt>, <tt>:weaponized</tt>, but will default to
|
28
|
+
<tt>:potential</tt>.
|
29
|
+
* Added a disclosure property, which can be a combination of
|
30
|
+
<tt>:private</tt>, <tt>:in_wild</tt>, <tt>:vendor_aware</tt>
|
31
|
+
or <tt>:public</tt>.
|
32
|
+
* Added Exploit#helper, which will extend the Exploit object with the
|
33
|
+
Helper module with the similar name.
|
34
|
+
* Added the Exploit#build!, Exploit#verify!, Exploit#deploy!
|
35
|
+
methods, which will call the user-defined Exploit#build,
|
36
|
+
Exploit#verify, Exploit#deploy methods, respectively.
|
37
|
+
* Added Exploit#targeting.
|
38
|
+
* Added Exploit#behaviors.
|
39
|
+
* Added Exploit#targeted_archs, Exploit#targeted_oses,
|
40
|
+
Exploit#targeted_products.
|
41
|
+
* Added Exploit#select_target.
|
42
|
+
* Added the Exploit#target which will return the current selected
|
43
|
+
target, or the first target of the exploit.
|
44
|
+
* Added the Exploit#arch, Exploit#os and Exploit#product methods.
|
45
|
+
* Added the Exploit#verify_target!, Exploit#verify_arch!,
|
46
|
+
Exploit#verify_os! and Exploit#verify_product! methods.
|
47
|
+
* Added Exploit#encoded_payload.
|
48
|
+
* Added Exploit#encode_payload!.
|
49
|
+
* Have Exploit#verify_restricted! raise an exception listing all
|
50
|
+
restricted characters found in the given text.
|
51
|
+
* Renamed Exploit#allows to Exploit#allowing.
|
52
|
+
* Renamed Exploit#verify_restricted to Exploit#verify_restricted!.
|
53
|
+
* Renamed Exploit#exploit to Exploit#exploit!.
|
54
|
+
* Removed Exploit#payloads.
|
55
|
+
* Removed Exploit#vulnerable?.
|
56
|
+
* Refactored Ronin::Payloads:
|
57
|
+
* Added Ronin::Payloads::Helpers::FileSystem.
|
58
|
+
* Added Ronin::Payloads::Helpers::RPC.
|
59
|
+
* Added Ronin::Payloads::Helpers::Shell.
|
60
|
+
* Added Ronin::Payloads::Nops.
|
61
|
+
* Added Ronin::Payloads::Encoder.
|
62
|
+
* Added Ronin::Payloads::Encoders::XOR.
|
63
|
+
* Renamed Ronin::Payloads::Ability to Ronin::Payloads::Control.
|
64
|
+
* Rewrote Ronin::Payloads::Payload:
|
65
|
+
* Use the new Ronin::Cacheable module.
|
66
|
+
* Use Ronin::Model::TargetsArch.
|
67
|
+
* Use Ronin::Model::TargetsOS.
|
68
|
+
* Added Payload#helper, which will extend the Payload object with the
|
69
|
+
Helper module with the similar name.
|
70
|
+
* Added Payload#behaviors.
|
71
|
+
* Added Payload#build!, Payload#verify!, Payload#deploy!, which will
|
72
|
+
call the user-defined Payload#build, Payload#verify, Payload#deploy
|
73
|
+
methods, respectively.
|
74
|
+
* Rewrote Payload#to_s to return the name and version of the payload.
|
75
|
+
* Renamed Payload#controls to Payload#controlling.
|
76
|
+
* Removed encoders from the Payload class.
|
77
|
+
* Added specs.
|
78
|
+
|
79
|
+
=== 0.1.1 / 2009-01-22
|
2
80
|
|
3
81
|
* Removed old references to the <tt>ronin/vulnerability</tt> directory.
|
4
82
|
* Removed old references to the Ronin::Vulnerability namespace.
|
@@ -9,7 +87,7 @@
|
|
9
87
|
* Reduce usage of first_or_create.
|
10
88
|
* Updated target methods.
|
11
89
|
|
12
|
-
|
90
|
+
=== 0.1.0 / 2008-01-08
|
13
91
|
|
14
92
|
* Initial release.
|
15
93
|
* Supports many basic exploit types:
|
data/Manifest.txt
CHANGED
@@ -4,40 +4,87 @@ Manifest.txt
|
|
4
4
|
README.txt
|
5
5
|
Rakefile
|
6
6
|
TODO.txt
|
7
|
+
bin/ronin-payload
|
8
|
+
bin/ronin-payloads
|
9
|
+
bin/ronin-exploits
|
10
|
+
lib/ronin/targeted_arch.rb
|
11
|
+
lib/ronin/targeted_os.rb
|
12
|
+
lib/ronin/targeted_product.rb
|
13
|
+
lib/ronin/model/targets_arch.rb
|
14
|
+
lib/ronin/model/targets_os.rb
|
7
15
|
lib/ronin/vuln/behavior.rb
|
8
16
|
lib/ronin/exploits.rb
|
9
17
|
lib/ronin/exploits/exceptions.rb
|
18
|
+
lib/ronin/exploits/exceptions/unknown_helper.rb
|
19
|
+
lib/ronin/exploits/exceptions/target_unspecified.rb
|
20
|
+
lib/ronin/exploits/exceptions/target_data_missing.rb
|
10
21
|
lib/ronin/exploits/exceptions/exploit_not_built.rb
|
11
22
|
lib/ronin/exploits/exceptions/restricted_char.rb
|
12
23
|
lib/ronin/exploits/exceptions/payload_size.rb
|
13
|
-
lib/ronin/exploits/
|
14
|
-
lib/ronin/exploits/
|
15
|
-
lib/ronin/exploits/
|
24
|
+
lib/ronin/exploits/helpers.rb
|
25
|
+
lib/ronin/exploits/helpers/binary.rb
|
26
|
+
lib/ronin/exploits/helpers/padding.rb
|
27
|
+
lib/ronin/exploits/helpers/buffer_overflow.rb
|
28
|
+
lib/ronin/exploits/helpers/format_string.rb
|
29
|
+
lib/ronin/exploits/targets.rb
|
30
|
+
lib/ronin/exploits/targets/buffer_overflow.rb
|
31
|
+
lib/ronin/exploits/targets/format_string.rb
|
32
|
+
lib/ronin/exploits/allow.rb
|
33
|
+
lib/ronin/exploits/target.rb
|
16
34
|
lib/ronin/exploits/exploit.rb
|
17
35
|
lib/ronin/exploits/exploit_author.rb
|
18
|
-
lib/ronin/exploits/
|
19
|
-
lib/ronin/exploits/
|
20
|
-
lib/ronin/exploits/
|
21
|
-
lib/ronin/exploits/
|
22
|
-
lib/ronin/exploits/
|
23
|
-
lib/ronin/exploits/
|
24
|
-
lib/ronin/exploits/
|
36
|
+
lib/ronin/exploits/remote.rb
|
37
|
+
lib/ronin/exploits/local.rb
|
38
|
+
lib/ronin/exploits/remote_tcp.rb
|
39
|
+
lib/ronin/exploits/remote_udp.rb
|
40
|
+
lib/ronin/exploits/ftp.rb
|
41
|
+
lib/ronin/exploits/http.rb
|
42
|
+
lib/ronin/exploits/web.rb
|
25
43
|
lib/ronin/exploits/version.rb
|
26
|
-
lib/ronin/models.rb
|
27
44
|
lib/ronin/payloads.rb
|
28
|
-
lib/ronin/payloads/
|
45
|
+
lib/ronin/payloads/exceptions.rb
|
46
|
+
lib/ronin/payloads/exceptions/unknown_helper.rb
|
47
|
+
lib/ronin/payloads/encoder.rb
|
48
|
+
lib/ronin/payloads/encoders.rb
|
49
|
+
lib/ronin/payloads/encoders/xor.rb
|
50
|
+
lib/ronin/payloads/helpers.rb
|
51
|
+
lib/ronin/payloads/helpers/exceptions.rb
|
52
|
+
lib/ronin/payloads/helpers/exceptions/unimplemented.rb
|
53
|
+
lib/ronin/payloads/helpers/exceptions/program_not_found.rb
|
54
|
+
lib/ronin/payloads/helpers/file_system.rb
|
55
|
+
lib/ronin/payloads/helpers/shell.rb
|
56
|
+
lib/ronin/payloads/helpers/rpc.rb
|
57
|
+
lib/ronin/payloads/control.rb
|
29
58
|
lib/ronin/payloads/payload_author.rb
|
30
59
|
lib/ronin/payloads/payload.rb
|
31
60
|
lib/ronin/payloads/binary_payload.rb
|
61
|
+
lib/ronin/payloads/nops.rb
|
32
62
|
lib/ronin/payloads/shellcode.rb
|
33
63
|
lib/ronin/payloads/web_payload.rb
|
34
|
-
lib/ronin/
|
64
|
+
lib/ronin/ui/command_line/commands/payload.rb
|
65
|
+
lib/ronin/ui/command_line/commands/payloads.rb
|
66
|
+
lib/ronin/ui/command_line/commands/exploits.rb
|
35
67
|
tasks/spec.rb
|
36
68
|
spec/spec_helper.rb
|
69
|
+
spec/helpers/database.rb
|
70
|
+
spec/helpers/objects.rb
|
71
|
+
spec/objects/exploits/test.rb
|
72
|
+
spec/objects/payloads/test.rb
|
73
|
+
spec/objects/payloads/example.rb
|
37
74
|
spec/exploits_spec.rb
|
38
75
|
spec/vuln/behavior_spec.rb
|
39
|
-
spec/exploits/
|
76
|
+
spec/exploits/targets/buffer_overflow_spec.rb
|
77
|
+
spec/exploits/target_spec.rb
|
40
78
|
spec/exploits/exploit_spec.rb
|
41
|
-
spec/exploits/
|
79
|
+
spec/exploits/remote_tcp_spec.rb
|
80
|
+
spec/exploits/remote_udp_spec.rb
|
81
|
+
spec/exploits/ftp_spec.rb
|
82
|
+
spec/exploits/http_spec.rb
|
83
|
+
spec/exploits/web_spec.rb
|
84
|
+
spec/exploits/binary_exploit_spec.rb
|
85
|
+
spec/exploits/padding_exploit_spec.rb
|
86
|
+
spec/exploits/buffer_overflow_exploit_spec.rb
|
87
|
+
spec/exploits/format_string_exploit_spec.rb
|
88
|
+
spec/payloads/encoder_spec.rb
|
89
|
+
spec/payloads/encoders/xor_spec.rb
|
42
90
|
spec/payloads/payload_spec.rb
|
43
|
-
spec/translators/xor_spec.rb
|
data/README.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
= Ronin
|
1
|
+
= Ronin Exploits
|
2
2
|
|
3
3
|
* http://ronin.rubyforge.org/exploits/
|
4
4
|
* http://github.com/postmodern/ronin-exploits
|
@@ -39,14 +39,101 @@ of Ronin.
|
|
39
39
|
|
40
40
|
== FEATURES:
|
41
41
|
|
42
|
+
* Ability to define payloads based on:
|
43
|
+
* Contributing authors.
|
44
|
+
* Behaviors they control.
|
45
|
+
* Helpers they use.
|
46
|
+
* Ability to define payload encoders:
|
47
|
+
* Architectures they target.
|
48
|
+
* OSes they target.
|
49
|
+
* Ability to define exploits based on:
|
50
|
+
* Wether they are local or remote.
|
51
|
+
* Protocol they use.
|
52
|
+
* Contributing authors.
|
53
|
+
* Disclosure status.
|
54
|
+
* Level of weaponization.
|
55
|
+
* Behaviors the vulnerability allows.
|
56
|
+
* Architectures they target.
|
57
|
+
* OSes they target.
|
58
|
+
* Products they target.
|
59
|
+
* Helpers they use.
|
60
|
+
|
42
61
|
== REQUIREMENTS:
|
43
62
|
|
44
|
-
* ronin >= 0.
|
63
|
+
* {ronin}[http://ronin.rubyforge.org/] >= 0.2.3
|
45
64
|
|
46
65
|
== INSTALL:
|
47
66
|
|
48
67
|
$ sudo gem install ronin-exploits
|
49
68
|
|
69
|
+
== EXAMPLES:
|
70
|
+
|
71
|
+
* Define a shellcode payload:
|
72
|
+
|
73
|
+
ronin_shellcode do
|
74
|
+
cache do
|
75
|
+
self.name = 'test'
|
76
|
+
self.version = '0.5'
|
77
|
+
|
78
|
+
self.arch :i686
|
79
|
+
self.os :name => 'Linux'
|
80
|
+
end
|
81
|
+
|
82
|
+
parameter :exit_status,
|
83
|
+
:default => 0,
|
84
|
+
:description => 'Exit status of shellcode'
|
85
|
+
|
86
|
+
def build
|
87
|
+
@payload = "\x66\x31\xc0\xfe\xc0"
|
88
|
+
|
89
|
+
unless @exit_status == 0
|
90
|
+
@payload << "\xb3#{@exit_status.chr}\xcd\x80"
|
91
|
+
else
|
92
|
+
@payload << "\x66\x31\xdb\xcd\x80"
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
* Define a payload encoder:
|
98
|
+
|
99
|
+
ronin_payload_encoder do
|
100
|
+
cache do
|
101
|
+
self.name = 'base64_encode'
|
102
|
+
self.description = %{Example base64 payload encoder}
|
103
|
+
|
104
|
+
self.arch :i686
|
105
|
+
self.os :name => 'Linux'
|
106
|
+
end
|
107
|
+
|
108
|
+
def call(data)
|
109
|
+
return data.to_s.base64_encode
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
* Define a remote TCP exploit:
|
114
|
+
|
115
|
+
ronin_remote_tcp_exploit do
|
116
|
+
helper :buffer_overflow
|
117
|
+
|
118
|
+
cache do
|
119
|
+
self.name = 'test'
|
120
|
+
|
121
|
+
targeting do |target|
|
122
|
+
target.arch :i686
|
123
|
+
target.os :name => 'Linux'
|
124
|
+
target.product :name => 'ExampleWare', :version => '2.4.7b'
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
128
|
+
def build
|
129
|
+
@buffer = "USER #{build_buffer}\n"
|
130
|
+
end
|
131
|
+
|
132
|
+
def deploy
|
133
|
+
tcp_send @buffer
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
50
137
|
== LICENSE:
|
51
138
|
|
52
139
|
Ronin Exploits - A Ruby library for Ronin that provides exploitation and
|
data/Rakefile
CHANGED
@@ -9,7 +9,7 @@ Hoe.new('ronin-exploits', Ronin::Exploits::VERSION) do |p|
|
|
9
9
|
p.rubyforge_name = 'ronin'
|
10
10
|
p.developer('Postmodern', 'postmodern.mod3@gmail.com')
|
11
11
|
p.remote_rdoc_dir = 'docs/ronin-exploits'
|
12
|
-
p.extra_deps = [['ronin', '>=0.
|
12
|
+
p.extra_deps = [['ronin', '>=0.2.3']]
|
13
13
|
end
|
14
14
|
|
15
15
|
# vim: syntax=Ruby
|
data/TODO.txt
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
* Add more dm-scope methods for finding exploits and payloads based:
|
6
6
|
* Target attributes:
|
7
7
|
* Arch (name).
|
8
|
-
*
|
8
|
+
* OS (name, version).
|
9
9
|
* Authors
|
10
10
|
* Spec exploit/payload relations and dm-scope methods.
|
11
11
|
* Add methods for chaining exploits.
|
data/bin/ronin-exploits
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
|
5
|
+
lib_dir = File.expand_path(File.join(File.dirname(__FILE__),'..','lib'))
|
6
|
+
unless $LOAD_PATH.include?(lib_dir)
|
7
|
+
$LOAD_PATH << lib_dir
|
8
|
+
end
|
9
|
+
|
10
|
+
require 'ronin/ui/command_line/commands/exploits'
|
11
|
+
|
12
|
+
Ronin::UI::CommandLine::Commands::Exploits.run(*ARGV)
|
data/bin/ronin-payload
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
|
5
|
+
lib_dir = File.expand_path(File.join(File.dirname(__FILE__),'..','lib'))
|
6
|
+
unless $LOAD_PATH.include?(lib_dir)
|
7
|
+
$LOAD_PATH << lib_dir
|
8
|
+
end
|
9
|
+
|
10
|
+
require 'ronin/ui/command_line/commands/payload'
|
11
|
+
|
12
|
+
Ronin::UI::CommandLine::Commands::Payload.run(*ARGV)
|
data/bin/ronin-payloads
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
|
5
|
+
lib_dir = File.expand_path(File.join(File.dirname(__FILE__),'..','lib'))
|
6
|
+
unless $LOAD_PATH.include?(lib_dir)
|
7
|
+
$LOAD_PATH << lib_dir
|
8
|
+
end
|
9
|
+
|
10
|
+
require 'ronin/ui/command_line/commands/payloads'
|
11
|
+
|
12
|
+
Ronin::UI::CommandLine::Commands::Payloads.run(*ARGV)
|
data/lib/ronin/exploits.rb
CHANGED
@@ -21,19 +21,22 @@
|
|
21
21
|
#++
|
22
22
|
#
|
23
23
|
|
24
|
-
require 'ronin/exploits/
|
25
|
-
require 'ronin/exploits/impact'
|
26
|
-
require 'ronin/exploits/exploit_author'
|
27
|
-
require 'ronin/exploits/exploit_target'
|
24
|
+
require 'ronin/exploits/targets'
|
28
25
|
require 'ronin/exploits/exploit'
|
29
|
-
require 'ronin/exploits/
|
30
|
-
require 'ronin/exploits/
|
31
|
-
require 'ronin/exploits/
|
32
|
-
require 'ronin/exploits/
|
33
|
-
require 'ronin/exploits/
|
26
|
+
require 'ronin/exploits/local'
|
27
|
+
require 'ronin/exploits/remote'
|
28
|
+
require 'ronin/exploits/remote_tcp'
|
29
|
+
require 'ronin/exploits/remote_udp'
|
30
|
+
require 'ronin/exploits/ftp'
|
31
|
+
require 'ronin/exploits/http'
|
32
|
+
require 'ronin/exploits/web'
|
33
|
+
require 'ronin/exploits/version'
|
34
|
+
require 'ronin/database'
|
34
35
|
|
35
36
|
require 'reverse_require'
|
36
37
|
|
38
|
+
require_for 'ronin-exploits', 'ronin/exploits'
|
39
|
+
|
37
40
|
module Ronin
|
38
|
-
|
41
|
+
Database.update!
|
39
42
|
end
|
@@ -28,14 +28,19 @@ require 'ronin/model'
|
|
28
28
|
|
29
29
|
module Ronin
|
30
30
|
module Exploits
|
31
|
-
class
|
31
|
+
class Allow
|
32
32
|
|
33
33
|
include Model
|
34
34
|
|
35
|
-
# The
|
36
|
-
|
35
|
+
# The primary key of the allowance
|
36
|
+
property :id, Serial
|
37
37
|
|
38
|
-
# The
|
38
|
+
# The behavior which is allowed
|
39
|
+
belongs_to :behavior,
|
40
|
+
:child_key => [:behavior_id],
|
41
|
+
:class_name => '::Ronin::Vuln::Behavior'
|
42
|
+
|
43
|
+
# The exploit which facilitates the behavior
|
39
44
|
belongs_to :exploit
|
40
45
|
|
41
46
|
# Validates
|
@@ -21,6 +21,9 @@
|
|
21
21
|
#++
|
22
22
|
#
|
23
23
|
|
24
|
+
require 'ronin/exploits/exceptions/unknown_helper'
|
25
|
+
require 'ronin/exploits/exceptions/target_unspecified'
|
26
|
+
require 'ronin/exploits/exceptions/target_data_missing'
|
24
27
|
require 'ronin/exploits/exceptions/exploit_not_built'
|
25
28
|
require 'ronin/exploits/exceptions/restricted_char'
|
26
29
|
require 'ronin/exploits/exceptions/payload_size'
|
@@ -0,0 +1,29 @@
|
|
1
|
+
#
|
2
|
+
#--
|
3
|
+
# Ronin Exploits - A Ruby library for Ronin that provides exploitation and
|
4
|
+
# payload crafting functionality.
|
5
|
+
#
|
6
|
+
# Copyright (c) 2007-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
7
|
+
#
|
8
|
+
# This program is free software; you can redistribute it and/or modify
|
9
|
+
# it under the terms of the GNU General Public License as published by
|
10
|
+
# the Free Software Foundation; either version 2 of the License, or
|
11
|
+
# (at your option) any later version.
|
12
|
+
#
|
13
|
+
# This program is distributed in the hope that it will be useful,
|
14
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
15
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
16
|
+
# GNU General Public License for more details.
|
17
|
+
#
|
18
|
+
# You should have received a copy of the GNU General Public License
|
19
|
+
# along with this program; if not, write to the Free Software
|
20
|
+
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
21
|
+
#++
|
22
|
+
#
|
23
|
+
|
24
|
+
module Ronin
|
25
|
+
module Exploits
|
26
|
+
class TargetDataMissing < RuntimeError
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|