ronin-exploits 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,14 @@
1
+ == 0.1.1 / 2009-01-22
2
+
3
+ * Removed old references to the <tt>ronin/vulnerability</tt> directory.
4
+ * Removed old references to the Ronin::Vulnerability namespace.
5
+ * Removed past usage of the <tt>:value</tt> option with parameters.
6
+ * Parametes now uses the <tt>:default</tt> option, for specifying the
7
+ default value of parameters.
8
+ * Added the missing Ronin::Exploits::PayloadSize exception.
9
+ * Reduce usage of first_or_create.
10
+ * Updated target methods.
11
+
1
12
  == 0.1.0 / 2008-01-08
2
13
 
3
14
  * Initial release.
data/Manifest.txt CHANGED
@@ -9,6 +9,7 @@ lib/ronin/exploits.rb
9
9
  lib/ronin/exploits/exceptions.rb
10
10
  lib/ronin/exploits/exceptions/exploit_not_built.rb
11
11
  lib/ronin/exploits/exceptions/restricted_char.rb
12
+ lib/ronin/exploits/exceptions/payload_size.rb
12
13
  lib/ronin/exploits/exploitable.rb
13
14
  lib/ronin/exploits/requirement.rb
14
15
  lib/ronin/exploits/impact.rb
data/README.txt CHANGED
@@ -41,7 +41,7 @@ of Ronin.
41
41
 
42
42
  == REQUIREMENTS:
43
43
 
44
- * Ronin >= 0.1.1
44
+ * ronin >= 0.1.3
45
45
 
46
46
  == INSTALL:
47
47
 
data/TODO.txt CHANGED
@@ -1,11 +1,5 @@
1
1
  == TODO:
2
2
 
3
- === Ronin Exploits 0.1.0:
4
-
5
- * Complete exploit/payload taxonomy code.
6
- * Add dm-scope methods for finding exploits based on their taxonomy
7
- relations.
8
-
9
3
  === Ronin Exploits 0.1.1:
10
4
 
11
5
  * Add more dm-scope methods for finding exploits and payloads based:
@@ -16,7 +10,7 @@
16
10
  * Spec exploit/payload relations and dm-scope methods.
17
11
  * Add methods for chaining exploits.
18
12
 
19
- === Ronin Exploits 0.1.2:
13
+ === Ronin Exploits 0.2.0:
20
14
 
21
15
  * Design a basic Vulnerability Scanner class:
22
16
  * Scan networks of hosts.
@@ -39,14 +39,16 @@ module Ronin
39
39
 
40
40
  # Target index to use
41
41
  parameter :target_index,
42
- :value => 0,
42
+ :default => 0,
43
43
  :description => 'default target index'
44
44
 
45
45
  # Custom target to use
46
46
  parameter :custom_target, :description => 'custom target'
47
47
 
48
48
  # String to pad extra space with
49
- parameter :pad, :value => 'A', :description => 'padding string'
49
+ parameter :pad,
50
+ :default => 'A',
51
+ :description => 'padding string'
50
52
 
51
53
  # Restricted characters that may not occurr in the built exploit
52
54
  attr_accessor :restricted
@@ -65,10 +67,14 @@ module Ronin
65
67
 
66
68
  #
67
69
  # Adds an ExploitTarget with the given _attributes_. If a _block_ is
68
- # given, it will be passed the ExploitTarget.
70
+ # given, it will be passed to the newly created ExploitTarget
71
+ # object.
69
72
  #
70
73
  def target(attributes={},&block)
71
- @targets << ExploitTarget.first_or_create(attributes,&block)
74
+ self.targets << ExploitTarget.new(
75
+ attributes.merge(:exploit => self),
76
+ &block
77
+ )
72
78
  end
73
79
 
74
80
  #
@@ -21,6 +21,7 @@
21
21
  #++
22
22
  #
23
23
 
24
+ require 'ronin/exploits/exceptions/payload_size'
24
25
  require 'ronin/exploits/buffer_overflow_target'
25
26
  require 'ronin/exploits/binary_exploit'
26
27
 
@@ -37,8 +38,11 @@ module Ronin
37
38
  # Adds a new BufferOverflowTarget with the given _attributes_. If a
38
39
  # _block_ is given, it will be passed the BufferOverflowTarget object.
39
40
  #
40
- def target(options={},&block)
41
- @targets << BufferOverflowTarget.new(options,&block)
41
+ def target(attributes={},&block)
42
+ self.targets << BufferOverflowTarget.new(
43
+ attributes.merge(:exploit => self),
44
+ &block
45
+ )
42
46
  end
43
47
 
44
48
  #
@@ -68,7 +72,7 @@ module Ronin
68
72
  # Default builder method which simply calls build_buffer.
69
73
  #
70
74
  def builder
71
- @package = build_buffer
75
+ @exploit = build_buffer
72
76
  end
73
77
 
74
78
  end
@@ -23,3 +23,4 @@
23
23
 
24
24
  require 'ronin/exploits/exceptions/exploit_not_built'
25
25
  require 'ronin/exploits/exceptions/restricted_char'
26
+ 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 PayloadSize < RuntimeError
27
+ end
28
+ end
29
+ end
@@ -24,7 +24,7 @@
24
24
  require 'ronin/exploits/requirement'
25
25
  require 'ronin/exploits/impact'
26
26
  require 'ronin/exploits/exploit_author'
27
- require 'ronin/vulnerability/behavior'
27
+ require 'ronin/vuln/behavior'
28
28
  require 'ronin/objectify'
29
29
  require 'ronin/has_license'
30
30
 
@@ -100,15 +100,18 @@ module Ronin
100
100
 
101
101
  #
102
102
  # Adds an ExploitAuthor with the given _attributes_ to the exploit.
103
- # If a _block_ is given, it will be passed the ExploitAuthro object.
103
+ # If a _block_ is given, it will be passed to the newly created
104
+ # ExploitAuthor object.
104
105
  #
105
106
  def author(attributes={},&block)
106
- self.authors << ExploitAuthor.first_or_create(attributes,&block)
107
+ self.authors << ExploitAuthor.new(
108
+ attributes.merge(:exploit => self),
109
+ &block
110
+ )
107
111
  end
108
112
 
109
113
  #
110
- # Adds a new Requirement for the Ability with the specified
111
- # _behavior_.
114
+ # Adds a new Requirement for the specified _behavior_.
112
115
  #
113
116
  def requires(behavior)
114
117
  self.requirements << Requirement.new(
@@ -34,11 +34,15 @@ module Ronin
34
34
  has n, :targets, :class_name => 'FormatStringTarget'
35
35
 
36
36
  #
37
- # Adds a new FormatStringTarget with the given _options_. If a _block_
38
- # is given, it will be passed the new FormatStringTarget object.
37
+ # Adds a new FormatStringTarget with the given _attributes_. If a
38
+ # _block_ is given, it will be passed the new FormatStringTarget
39
+ # object.
39
40
  #
40
- def target(options={},&block)
41
- self.targets << FormatStringTarget.new(options,&block)
41
+ def target(attributes={},&block)
42
+ self.targets << FormatStringTarget.new(
43
+ attributes.merge(:exploit => self),
44
+ &block
45
+ )
42
46
  end
43
47
 
44
48
  #
@@ -76,7 +80,7 @@ module Ronin
76
80
  # The default builder method, simply calls build_format_string.
77
81
  #
78
82
  def builder
79
- @package = build_format_string
83
+ @exploit = build_format_string
80
84
  end
81
85
 
82
86
  end
@@ -21,7 +21,7 @@
21
21
  #++
22
22
  #
23
23
 
24
- require 'ronin/vulnerability/behavior'
24
+ require 'ronin/vuln/behavior'
25
25
  require 'ronin/exploits/exploit'
26
26
 
27
27
  require 'ronin/model'
@@ -33,7 +33,7 @@ module Ronin
33
33
  include Model
34
34
 
35
35
  # The behavior which the impact allows
36
- belongs_to :behavior, :class_name => 'Vulnerability::Behavior'
36
+ belongs_to :behavior, :class_name => 'Vuln::Behavior'
37
37
 
38
38
  # The exploit which facilitates the impact
39
39
  belongs_to :exploit
@@ -21,7 +21,7 @@
21
21
  #++
22
22
  #
23
23
 
24
- require 'ronin/vulnerability/behavior'
24
+ require 'ronin/vuln/behavior'
25
25
  require 'ronin/exploits/exploit'
26
26
 
27
27
  require 'ronin/model'
@@ -33,7 +33,7 @@ module Ronin
33
33
  include Model
34
34
 
35
35
  # The behavior which is required
36
- belongs_to :behavior, :class_name => 'Vulnerability::Behavior'
36
+ belongs_to :behavior, :class_name => 'Vuln::Behavior'
37
37
 
38
38
  # The exploit which requires the behavior
39
39
  belongs_to :exploit
@@ -24,6 +24,6 @@
24
24
  module Ronin
25
25
  module Exploits
26
26
  # Ronin Exploits version
27
- VERSION = '0.1.0'
27
+ VERSION = '0.1.1'
28
28
  end
29
29
  end
@@ -21,7 +21,7 @@
21
21
  #++
22
22
  #
23
23
 
24
- require 'ronin/vulnerability/behavior'
24
+ require 'ronin/vuln/behavior'
25
25
  require 'ronin/payloads/payload'
26
26
 
27
27
  require 'ronin/model'
@@ -33,7 +33,7 @@ module Ronin
33
33
  include Model
34
34
 
35
35
  # The behavior the ability provides
36
- belongs_to :behavior, :class_name => 'Vulnerability::Behavior'
36
+ belongs_to :behavior, :class_name => 'Vuln::Behavior'
37
37
 
38
38
  # The payload which has this ability
39
39
  belongs_to :payload
@@ -100,23 +100,26 @@ module Ronin
100
100
  end
101
101
 
102
102
  #
103
- # Adds a new Ability to the payload that provides the behavior
104
- # with the specified _name_.
103
+ # Adds a new Ability to the payload that provides the specified
104
+ # _behavior_.
105
105
  #
106
- def provides(name)
106
+ def provides(behavior)
107
107
  self.abilities << Ability.new(
108
- :behavior => Vulnerability::Behavior.first_or_create(
109
- :name => name.to_s
110
- ),
108
+ :behavior => behavior,
111
109
  :payload => self
112
110
  )
113
111
  end
114
112
 
115
113
  #
116
- # Adds a new PayloadAuthor with the given _attributes_ and _block_.
114
+ # Adds a new PayloadAuthor with the given _attributes_. If a _block_
115
+ # is given, it will be passed to the newly created PayloadAuthor
116
+ # object.
117
117
  #
118
118
  def author(attributes={},&block)
119
- authors << PayloadAuthor.first_or_create(attributes,&block)
119
+ authors << PayloadAuthor.new(
120
+ attributes.merge(:payload => self),
121
+ &block
122
+ )
120
123
  end
121
124
 
122
125
  #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ronin-exploits
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Postmodern
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-01-08 00:00:00 -08:00
12
+ date: 2009-01-22 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -30,7 +30,7 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 1.8.2
33
+ version: 1.8.3
34
34
  version:
35
35
  description: Ronin Exploits is a Ruby library for Ronin that provides exploitation and payload crafting functionality. Ronin is a Ruby platform designed for information security and data exploration tasks. Ronin allows for the rapid development and distribution of code over many of the common Source-Code-Management (SCM) systems.
36
36
  email:
@@ -57,6 +57,7 @@ files:
57
57
  - lib/ronin/exploits/exceptions.rb
58
58
  - lib/ronin/exploits/exceptions/exploit_not_built.rb
59
59
  - lib/ronin/exploits/exceptions/restricted_char.rb
60
+ - lib/ronin/exploits/exceptions/payload_size.rb
60
61
  - lib/ronin/exploits/exploitable.rb
61
62
  - lib/ronin/exploits/requirement.rb
62
63
  - lib/ronin/exploits/impact.rb