# #-- # Ronin Exploits - A Ruby library for Ronin that provides exploitation and # payload crafting functionality. # # Copyright (c) 2007-2009 Hal Brodigan (postmodern.mod3 at gmail.com) # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #++ # require 'ronin/extensions/meta' require 'ronin/extensions/string' require 'ronin/model' require 'dm-predefined' module Ronin module Vuln class Behavior include Model include DataMapper::Predefined # Primary key of the behavior property :id, Serial # Name of the behavior property :name, String # Description for the behavior property :description, Text # Validates validates_present :name, :description validates_is_unique :name # # Returns the name of the behavior. # def to_s @name.to_s end protected # # Defines a new builtin Behavior with the specified _name_ and the # given _description_. # def self.define(name,description=nil) super(name,:name => name.to_s, :description => description) end define :memory_read, "The ability to read memory" define :memory_write, "The ability to write to memory" define :file_create, "Arbitrary file creation" define :file_read, "The ability to read from a file" define :file_write, "The ability to write to a file" define :file_modify, "The ability to modify an existing file" define :file_ownership, "The ability to change ownership of an existing file" define :file_mtime, "The ability to change the modification timestamp of a file" define :file_ctime, "The ability to change the creation timestamp of a file" define :socket_redirect, "The ability to redirect a socket's connection" define :socket_connect, "The ability to create a network socket" define :socket_listen, "The ability to listen on a network socket" define :socket_read, "The ability to read from a network socket" define :socket_write, "The ability to write to a network socket" define :code_exec, "Arbitrary code execution" define :command_exec, "Arbitrary command execution" define :auth_bypass, "Authentication by-pass" define :priv_escalation, "Privilege escalation" define :exhaust_memory, "Exhaust freely available memory" define :exhaust_disk, "Exhaust freely available disk-space" define :exhaust_bandwidth, "Exhaust available bandwidth" define :exahust_cpu, "Exhaust CPU performance" end end end