Land #9731, tool updates

GSoC/Meterpreter_Web_Console
Brent Cook 2018-04-01 23:26:42 -05:00
commit f386ae0ba3
No known key found for this signature in database
GPG Key ID: 1FFAA0B24B708F96
53 changed files with 279 additions and 218 deletions

View File

@ -12,7 +12,7 @@ module CommandDispatcher
# These are functions that are used in two or more command dispatchers.
module Common
# Parse +arg+ into a {Rex::Socket::RangeWalker} and append the result into +host_ranges+
#
# @note This modifies +host_ranges+ in place
@ -41,7 +41,7 @@ module Common
end
return true
end
#
# Parse +arg+ into an array of ports and append the result into +port_ranges+
#
@ -62,7 +62,7 @@ module Common
end
return true
end
#
# Set RHOSTS in the +active_module+'s (or global if none) datastore from an array of addresses
#
@ -119,6 +119,7 @@ module Common
if (p)
p_opt = Serializer::ReadableText.dump_options(p, ' ')
print("\nPayload options (#{mod.datastore['PAYLOAD']}):\n\n#{p_opt}\n") if (p_opt and p_opt.length > 0)
print(" **DisablePayloadHandler: True (RHOST and RPORT settings will be ignored!)**\n\n") if mod.datastore['DisablePayloadHandler']
end
end
@ -137,8 +138,8 @@ module Common
# Uncomment this line if u want target like msf2 format
#print("\nTarget: #{mod.target.name}\n\n")
end
end
end

5
tools/dev/find_release_notes.rb Normal file → Executable file
View File

@ -1,5 +1,10 @@
#!/usr/bin/env ruby
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'net/http'
require 'nokogiri'
require 'thread'

View File

@ -1,11 +1,13 @@
#!/usr/bin/env ruby
# -*- coding: binary -*-
#
# Check (recursively) for style compliance violations and other
# tree inconsistencies.
#
# by jduck, todb, and friends
#
require 'fileutils'
require 'find'
require 'time'
@ -216,7 +218,7 @@ class Msftidy
end
# See if 'require "rubygems"' or equivalent is used, and
# warn if so. Since Ruby 1.9 this has not been necessary and
# warn if so. Since Ruby 1.9 this has not been necessary and
# the framework only suports 1.9+
def check_rubygems
@lines.each do |line|

View File

@ -1,5 +1,6 @@
#!/usr/bin/env ruby
#
# Check that modules actually pass msftidy checks before committing
# or after merging.
#
@ -15,6 +16,7 @@
# That way, you will track changes to this script when it updates
# (rarely). If you'd prefer to copy it directly, that's okay, too (mark
# it +x and don't name it filename.rb, just filename).
#
def merge_error_message
msg = []

View File

@ -1,5 +1,10 @@
#!/usr/bin/env ruby
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
msfbase = __FILE__
while File.symlink?(msfbase)
msfbase = File.expand_path(File.readlink(msfbase), File.dirname(msfbase))

View File

@ -1,12 +1,14 @@
#!/usr/bin/env ruby
#
# $Id$
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
#
# This script converts an EXE to a VBA script for Word/Excel
# Credit to PriestMaster for the original C code
#
# $Revision$
#
msfbase = __FILE__
while File.symlink?(msfbase)

View File

@ -1,11 +1,13 @@
#!/usr/bin/env ruby
#
# $Id$
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
#
# This script converts an EXE to a vbs script
#
# $Revision$
#
msfbase = __FILE__
while File.symlink?(msfbase)

View File

@ -1,12 +1,14 @@
#!/usr/bin/env ruby
#
# $Id$
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
#
# This script is intended to assist an exploit developer in deducing what
# "bad characters" exist for a given input path to a program.
#
# $Revision$
#
msfbase = __FILE__
while File.symlink?(msfbase)

View File

@ -1,5 +1,10 @@
#!/usr/bin/env ruby
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
msfbase = __FILE__
while File.symlink?(msfbase)
msfbase = File.expand_path(File.readlink(msfbase), File.dirname(msfbase))

View File

@ -1,19 +1,22 @@
#!/usr/bin/env ruby
#
# $Id$
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
#
# This tool provides an easy way to see what opcodes are associated with
# certain x86 instructions by making use of Metasm! Also allows to get
# friendly output from a GAS assembler source code file.
#
#
# $Revision$
#
#
# This file is part of Metasm, the Ruby assembly manipulation suite
# Copyright (C) 2007 Yoann GUILLOT
#
# Licence is LGPL, see LICENCE in the top-level directory
#
msfbase = __FILE__
while File.symlink?(msfbase)

View File

@ -1,8 +1,9 @@
#!/usr/bin/env ruby
#
# $Id$
# $Revision$
#
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
msfbase = __FILE__
while File.symlink?(msfbase)

View File

@ -1,5 +1,10 @@
#!/usr/bin/env ruby
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'patch_finder/core/helper'
require 'patch_finder/msu'
require 'optparse'

View File

@ -1,13 +1,15 @@
#!/usr/bin/env ruby
#
# $Id$
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
#
# This tool provides an easy way to see what opcodes are associated with
# certain x86 instructions by making use of nasm if it is installed and
# reachable through the PATH environment variable.
#
# $Revision$
#
msfbase = __FILE__
while File.symlink?(msfbase)
@ -43,7 +45,7 @@ shell.init_ui(Rex::Ui::Text::Input::Stdio.new, Rex::Ui::Text::Output::Stdio.new)
shell.run { |line|
line.gsub!(/(\r|\n)/, '')
line.gsub!(/\\n/, "\n")
line.gsub!(/\\n/, "\n")
break if (line =~ /^(exit|quit)/i)

View File

@ -1,5 +1,10 @@
#!/usr/bin/env ruby
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
msfbase = __FILE__
while File.symlink?(msfbase)
msfbase = File.expand_path(File.readlink(msfbase), File.dirname(msfbase))

View File

@ -1,5 +1,10 @@
#!/usr/bin/env ruby
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
msfbase = __FILE__
while File.symlink?(msfbase)
msfbase = File.expand_path(File.readlink(msfbase), File.dirname(msfbase))

View File

@ -1,11 +1,13 @@
#!/usr/bin/env ruby
#
# This script converts a PDF file to an equivalent XML Data Package file,
# which can be opened by Adobe Reader as well and typically escapes AV
# detection better than a "normal" PDF
#
# Alexander 'alech' Klink, 2011
# public domain / CC-0
#
require 'base64'

View File

@ -1,5 +1,10 @@
#!/usr/bin/env ruby
#
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
#
# This is rough and dirty standalone (Rex only) psexec implementation
#
@ -302,4 +307,3 @@ rescue ::Interrupt
rescue ::Exception
#raise $!
end

View File

@ -1,10 +1,13 @@
#!/usr/bin/env ruby
#
# $Id$
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
#
# This script acts as a small registry reader.
# You may easily automate a lot of registry forensics with a proper method.
# $Revision$
#
msfbase = __FILE__

View File

@ -27,7 +27,6 @@
# sinn3r <sinn3r[at]metasploit.com>
#
msfbase = __FILE__
while File.symlink?(msfbase)
msfbase = File.expand_path(File.readlink(msfbase), File.dirname(msfbase))

View File

@ -1,21 +1,22 @@
#!/usr/bin/env ruby
# ELM327 and STN1100 MCU interface to the Metasploit HWBridge
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
####
#
# ELM327 and STN1100 MCU interface to the Metasploit HWBridge
#
#
# This module requires a connected ELM327 or STN1100 is connected to
# the machines serial. Sets up a basic RESTful web server to communicate
# the machines serial. Sets up a basic RESTful web server to communicate
#
# Requires MSF and the serialport gem to be installed.
# - `gem install serialport`
# - or, if using rvm: `rvm gemset install serialport`
####
#
### Non-typical gem ###
begin
@ -119,7 +120,7 @@ module ELM327HWBridgeRelay
'DefaultOptions' =>
{
'SRVPORT' => self.server_port,
'URIPATH' => "/"
'URIPATH' => "/"
}))
self.serial_port = @opts[:serial] if @opts.has_key? :serial
self.serial_baud = @opts[:baud].to_i if @opts.has_key? :baud
@ -134,7 +135,7 @@ module ELM327HWBridgeRelay
@supported_buses = [ { "bus_name" => "can0" } ]
end
# Sends a serial command to the ELM327. Automatically appends \r\n
# Sends a serial command to the ELM327. Automatically appends \r\n
#
# @param cmd [String] Serial AT command for ELM327
# @return [String] Response between command and '>' prompt
@ -149,7 +150,7 @@ module ELM327HWBridgeRelay
# Connects to the ELM327, resets paramters, gets device version and sets up general comms.
# Serial params are set via command options or during initialization
#
# @return [SerialPort] SerialPort object for communications. Also available as @ser
# @return [SerialPort] SerialPort object for communications. Also available as @ser
def connect_to_device()
begin
@ser = SerialPort.new(self.serial_port, self.serial_baud, self.serial_bits, self.serial_stop_bits, SerialPort::NONE)
@ -218,7 +219,7 @@ module ELM327HWBridgeRelay
{ "system_timezone" => Time.now.getlocal.zone }
end
# Returns supported buses. Can0 is always available
# Returns supported buses. Can0 is always available
# TODO: Use custom methods to force non-standard buses such as kline
#
# @return [Hash] Hash of supported_buses
@ -228,7 +229,7 @@ module ELM327HWBridgeRelay
# Sends CAN packet
#
# @param id [String] ID as a hex string
# @param id [String] ID as a hex string
# @param data [String] String of HEX bytes to send
# @return [Hash] Success Hash
def cansend(id, data)
@ -238,7 +239,7 @@ module ELM327HWBridgeRelay
resp = send_cmd("ATSH#{id}")
if resp == "OK"
send_cmd("ATR0") # Disable response checks
send_cmd("ATCAF0") # Turn off ISO-TP formating
send_cmd("ATCAF0") # Turn off ISO-TP formatting
else
return result
end
@ -269,11 +270,11 @@ module ELM327HWBridgeRelay
result["success"] = false
srcid = "%03X" % srcid.to_i(16)
dstid = "%03X" % dstid.to_i(16)
send_cmd("ATCAF1") # Turn on ISO-TP formatting
send_cmd("ATR1") # Turn on responses
send_cmd("ATSH#{srcid}") # Src Header
send_cmd("ATCAF1") # Turn on ISO-TP formatting
send_cmd("ATR1") # Turn on responses
send_cmd("ATSH#{srcid}") # Src Header
send_cmd("ATCRA#{dstid}") # Resp Header
send_cmd("ATCFC1") # Enable flow control
send_cmd("ATCFC1"). # Enable flow control
resp = send_cmd(data)
@packets_sent += 1
@last_sent = Time.now()
@ -345,7 +346,7 @@ module ELM327HWBridgeRelay
end
end
# Main run operation. Connects to device then runs the server
# Main run operation. Connects to device then runs the server
def run
connect_to_device()
exploit()
@ -377,7 +378,7 @@ module ELM327HWBridgeRelay
# Returns the parsed options from ARGV
#
# raise [OptionParser::InvalidOption] Invalid option found
# @return [OptionParser, Hash] The OptionParser object and an hash containg the options
# @return [OptionParser, Hash] The OptionParser object and an hash containing the options
def self.get_parsed_options
options = {}
parser = OptionParser.new do |opt|
@ -423,3 +424,4 @@ if __FILE__ == $PROGRAM_NAME
$stdout.puts("Shutting down")
end
end

0
tools/modules/aws-aggregator-userdata.sh Normal file → Executable file
View File

View File

@ -1,5 +1,6 @@
#!/usr/bin/env ruby
#
# The committer_count.rb is a way to tell who's been active over the last
# given period. It's of course, quite coarse -- someone with 10 commits in a day
# may or may not be more productive than someone with 3, but over long enough
@ -19,6 +20,7 @@
#
# History with colors and e-mail addresses (respecting .mailmap):
# git log --pretty=format:"%C(white)%ad %C(yellow)%h %Cblue'%aN' <%aE> %Cgreen%f%Creset" --date=short
#
class GitLogLine < Struct.new(:date, :hash, :author, :message)
end

View File

@ -1,13 +1,16 @@
#!/usr/bin/env ruby
###
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
#
# This tool allows you to find all the pull requests for a particular file in the Metasploit
# repository. It does not include commit history from SVN.
#
# Author: sinn3r
#
###
require 'net/http'
require 'optparse'

View File

@ -1,4 +1,5 @@
#!/usr/bin/env ruby
#
# This script generates Mettle payload wrappers
#

View File

@ -1,9 +1,16 @@
#!/usr/bin/env ruby
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
#
# Reads untest payload modules from log/untested-payloads.log (which can be produced by running `rake spec`) and prints
# the statements that need to be added to `spec/modules/payloads_spec.rb`. **Note: this script depends on the payload
# the statements that need to be added to `spec/modules/payloads_spec.rb`. **Note: this script depends on the payload
# being loadable, so if module is not loadable, then the developer must manually determine which single needs to be tested
# or which combinations of stages and stagers need to be tested.**
#
msfbase = __FILE__
while File.symlink?(msfbase)

View File

@ -1,7 +1,10 @@
#!/usr/bin/env ruby
#
# $Id$
# $Revision$
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
#
# This script lists each module by its author(s) and
# the number of modules per author

View File

@ -1,9 +1,16 @@
#!/usr/bin/env ruby
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
#
# Check the commit history of a module or tree of modules.
# and sort by number of commits.
#
# Usage: tools/module_commits.rb [module dir | module fname]
#
require 'find'

View File

@ -1,6 +1,13 @@
#!/usr/bin/env ruby
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
#
# Lists the current count of modules, by type, and outputs a bare CSV.
#
msfbase = __FILE__
while File.symlink?(msfbase)
@ -39,7 +46,7 @@ $framework.modules.each do |name, mod|
[:exploit, :auxiliary, :post, :payload, :encoder, :nop].each do |meth|
interrogative = "#{meth}?".intern
if this_mod.send(interrogative)
module_types[meth] += 1
module_types[meth] += 1
end
end
end

10
tools/modules/module_description.rb Normal file → Executable file
View File

@ -1,11 +1,13 @@
#!/usr/bin/env ruby
#
# $Id$
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
#
# This script lists each module with its description
#
# $Revision$
#
msfbase = __FILE__
while File.symlink?(msfbase)

View File

@ -1,7 +1,10 @@
#!/usr/bin/env ruby
#
# $Id$
# $Revision$
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
#
# This script lists each module by its disclosure date
#

View File

@ -1,11 +1,13 @@
#!/usr/bin/env ruby
#
# $Id$
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
#
# This script lists each module by its licensing terms
#
# $Revision$
#
msfbase = __FILE__
while File.symlink?(msfbase)

View File

@ -1,11 +1,13 @@
#!/usr/bin/env ruby
#
# $Id$
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
#
# This script lists all modules with their mixins. Handy for finding different "kinds" of modules.
#
# $Revision$
#
msfbase = __FILE__
while File.symlink?(msfbase)
@ -46,7 +48,7 @@ if ARGV[0]
mod_hash[m] ||= 0
mod_hash[m] += 1
longest_name = m.to_s.size unless m.to_s.size < longest_name
end
end
end
mod_hash.sort_by {|a| a[1]}.reverse.each do |arr|
puts "%-#{longest_name}s | %d" % arr

View File

@ -1,11 +1,13 @@
#!/usr/bin/env ruby
#
# $Id$
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
#
# This script lists each exploit module by its compatible payloads
#
# $Revision$
#
msfbase = __FILE__
while File.symlink?(msfbase)
@ -31,4 +33,3 @@ $framework.exploits.each_module { |name, mod|
puts "#{x.refname.ljust 40} - #{n}"
}
}

View File

@ -1,11 +1,13 @@
#!/usr/bin/env ruby
#
# $Id$
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
#
# This script lists each module by the default ports it uses
#
# $Revision$
#
msfbase = __FILE__
while File.symlink?(msfbase)

View File

@ -1,11 +1,13 @@
#!/usr/bin/env ruby
#
# $Id$
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
#
# This script lists each module with its rank
#
# $Revision$
#
msfbase = __FILE__
while File.symlink?(msfbase)

View File

@ -1,4 +1,10 @@
#!/usr/bin/env ruby
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
#
# This script lists each module with its references
#

View File

@ -1,11 +1,13 @@
#!/usr/bin/env ruby
#
# $Id$
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
#
# This script lists all modules with their targets
#
# $Revision$
#
msfbase = __FILE__
while File.symlink?(msfbase)

View File

@ -1,8 +1,10 @@
#!/usr/bin/env ruby
#
# $Id$
# $Revision$
#
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
# This script lists each payload module along with its length
# NOTE: No encoding or BadChar handling is performed
#

View File

@ -1,4 +1,10 @@
#!/usr/bin/env ruby
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
#
# This script updates the CachedSize constants in payload modules
#
@ -31,4 +37,3 @@ framework.payloads.each_module do |name, mod|
$stdout.puts "[*] Updating the CacheSize for #{mod.file_path}..."
Msf::Util::PayloadCachedSize.update_module_cached_size(mod_inst)
end

View File

@ -1,6 +1,5 @@
#!/usr/bin/env ruby
#
# $Id$
#
# This script parses a Metasploit module's use of the datastore to
# ensure that all datastore elements are both declared and used. Adding
@ -12,8 +11,6 @@
# bash's "for i in path/to/modules/*.rb; do verify_datastore.rb $i; done" Also,
# it assumes Metasploit's msf/core is in the load path.
#
# $Revision$
#
infile = ARGV[0]
unless(infile && File.readable?(infile))
@ -111,4 +108,3 @@ end
if undeclared_datastores.empty? && unused_datastores.empty?
puts "[+] %-60s : okay" % [infile]
end

View File

@ -6,7 +6,7 @@
##
#
# This script will allow you to specify an encrypted cpassword string using the Microsofts public
# This script will allow you to specify an encrypted cpassword string using the Microsoft's public
# AES key. This is useful if you don't or can't use the GPP post exploitation module. Just paste
# the cpassword encrypted string found in groups.xml or scheduledtasks.xml and it will output the
# decrypted string for you.

View File

@ -1,14 +1,16 @@
#!/usr/bin/env ruby
#
# $Id$
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
#
# This script cracks a half-lm challenge/response hash that uses a
# a static challenge key. The idea is you use rainbow tables to
# crack the first 7 chars and this script to complete a few remaining.
# If the password is longer than 10 characters, this script will fail.
#
# $Revision$
#
msfbase = __FILE__
while File.symlink?(msfbase)

View File

@ -1,6 +1,10 @@
#!/usr/bin/env ruby
#
# $Id$
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
#
# This script cracks HMAC SHA1 hashes. It is strangely necessary as existing tools
# have issues with binary salt values and extremely large salt values. The primary

View File

@ -1,11 +1,14 @@
#!/usr/bin/env ruby
#
# $Id$
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
#
# This script cracks any type of NTLM hash
# Credit to -Yannick Hamon <yannick.hamon[at]xmcopartners.com> for the original idea/perl code
# -Alexandre Maloteaux <a.maloteaux[at]gmail.com> for improvments
# $Revision$
#
msfbase = __FILE__
@ -167,7 +170,7 @@ when "HALFLM"
exit
end
calculatedhash = CRYPT::lm_hash(pass,true).unpack("H*")[0].upcase
puts "[*] The LM hash for #{pass.upcase} is : #{calculatedhash}"
puts "[*] The LM hash for #{pass.upcase} is : #{calculatedhash}"
exit
when PASS_MODE
if not pass =~ /^.{0,7}$/
@ -216,7 +219,7 @@ when "LM"
exit
end
calculatedhash = CRYPT::lm_hash(pass.upcase).unpack("H*")[0].upcase
puts "[*] The LM hash for #{pass.upcase} is : #{calculatedhash}"
puts "[*] The LM hash for #{pass.upcase} is : #{calculatedhash}"
exit
when PASS_MODE
if not pass =~ /^.{0,14}$/
@ -261,7 +264,7 @@ when "NTLM"
exit
when HASH_MODE
calculatedhash = CRYPT::ntlm_hash(pass).unpack("H*")[0].upcase
puts "[*] The NTLM hash for #{pass} is : #{calculatedhash}"
puts "[*] The NTLM hash for #{pass} is : #{calculatedhash}"
exit
when PASS_MODE
if not hash =~ /^([a-fA-F0-9]{32})$/
@ -327,7 +330,7 @@ when "HALFNETLMv1"
:challenge => [ srvchal ].pack("H*") }
calculatedhash = CRYPT::lm_response(arglm,true).unpack("H*")[0].upcase
puts "[*] The HALFNETLMv1 hash for #{pass.upcase} is : #{calculatedhash}"
puts "[*] The HALFNETLMv1 hash for #{pass.upcase} is : #{calculatedhash}"
exit
when PASS_MODE
if not pass =~ /^.{0,7}$/
@ -408,7 +411,7 @@ when "NETLMv1"
:challenge => [ srvchal ].pack("H*") }
calculatedhash = CRYPT::lm_response(arglm).unpack("H*")[0].upcase
puts "[*] The NETLMv1 hash for #{pass.upcase} is : #{calculatedhash}"
puts "[*] The NETLMv1 hash for #{pass.upcase} is : #{calculatedhash}"
exit
when PASS_MODE
if not pass =~ /^.{1,14}$/
@ -483,7 +486,7 @@ when "NETNTLMv1"
argntlm = { :ntlm_hash => CRYPT::ntlm_hash(pass),
:challenge => [ srvchal ].pack("H*") }
calculatedhash = CRYPT::ntlm_response(argntlm).unpack("H*")[0].upcase
puts "[*] The NETNTLMv1 hash for #{pass} is : #{calculatedhash}"
puts "[*] The NETNTLMv1 hash for #{pass} is : #{calculatedhash}"
exit
when PASS_MODE
if not hash =~ /^([a-fA-F0-9]{48})$/
@ -577,7 +580,7 @@ when "NETNTLM2_SESSION"
optntlm = { :client_challenge => [ clichal ].pack("H*")}
calculatedhash = CRYPT::ntlm2_session(argntlm,optntlm).join[24,24].unpack("H*")[0].upcase
puts "[*] The NETNTLM2_SESSION hash for #{pass} is : #{calculatedhash}"
puts "[*] The NETNTLM2_SESSION hash for #{pass} is : #{calculatedhash}"
exit
when PASS_MODE
if not hash =~ /^([a-fA-F0-9]{48})$/

View File

@ -5,7 +5,6 @@
# Current source: https://github.com/rapid7/metasploit-framework
##
###
#
# This script will look up a collection of MD5 hashes (from a file) against the following databases
# via md5cracker.org:
@ -21,7 +20,6 @@
# * hasherezade (http://hasherezade.net, @hasherezade)
# * sinn3r (ported the module as a standalone msf tool)
#
###
#
# Load our MSF API

View File

@ -1,7 +1,5 @@
#!/usr/bin/env ruby
# $Id$
#
# This script scans a memory dump or firmware image for any password hashes that
# happen to match the "master password" list generated by vxmaster. This is a
@ -9,8 +7,6 @@
#
# (C) 2010 Rapid7
#
# $Revision$
#
def usage
$stderr.puts "usage: #{$0} [dump-file] <master password list>"
@ -61,4 +57,3 @@ hashes.each do |r|
puts "[+] Password hash '#{k}' (##{x}) can be accessed with #{h.unpack("C*").map{|i| "\\x%.2x" % i}} [ '#{h}' ]"
puts "[+]"
end

View File

@ -1,11 +1,8 @@
#!/usr/bin/env ruby
#
# $Id$
#
# This script can be used to calculate hash values for VxWorks passwords.
#
# $Revision$
#
def hashit(inp)
if inp.length < 8 or inp.length > 120

View File

@ -1,7 +1,5 @@
#!/usr/bin/env ruby
# $Id$
#
# This script calculates all possible password hashes for the vxworks platform.
# The generated list can be used to bruteforce authentication to any service
@ -9,16 +7,18 @@
#
# (C) 2010 Rapid7
#
# $Revision$
#
#
# VxWorks converts the clear-text password into single integer value. This value
# can only be one of about 210,000 possible options. The method below emulates
# what the vxencrypt utility does and was implemented based on publicly indexed
# documentation and source code snippets.
#
#
# XXX: Newer VxWorks can use passwords up to 120 characters long, but this is
# not very common in the wild.
#
def vxworks_sum_from_pass(pass)
if pass.length < 8 or pass.length > 40

View File

@ -1,5 +1,10 @@
#!/usr/bin/env ruby
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
require 'rex/parser/winscp'

View File

@ -1,4 +1,10 @@
#!/usr/bin/env ruby
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
#
# This tool asks Google for the location of a given set of BSSIDs
#

View File

@ -1,69 +0,0 @@
#!/usr/bin/env ruby
#
# $Id$
# $Revision$
#
# This small utility will display all the informations about the network interfaces
# that one can use under Windows with modules using pcaprub and having the INTERFACE option (ex: arp_poisonning, arp_sweep, ...).
# To use th interface option under Windows use the Index value displayed by this tool (ex: "SET INTERFACE 1")
#
#
msfbase = __FILE__
while File.symlink?(msfbase)
msfbase = File.expand_path(File.readlink(msfbase), File.dirname(msfbase))
end
$:.unshift(File.expand_path(File.join(File.dirname(msfbase), '..', '..','lib')))
require 'msfenv'
$:.unshift(ENV['MSF_LOCAL_LIB']) if ENV['MSF_LOCAL_LIB']
if RUBY_PLATFORM == "i386-mingw32"
begin
require 'network_interface'
rescue ::Exception => e
$stderr.puts "Error: NetworkInterface is not installed..."
exit
end
unless (
NetworkInterface.respond_to?(:interfaces) and
NetworkInterface.respond_to?(:addresses) and
NetworkInterface.respond_to?(:interface_info)
)
$stderr.puts "Error: Looks like you are not running the latest version of NetworkInterface"
exit
end
found = false
NetworkInterface.interfaces.each_with_index do |iface, i|
found = true
detail = NetworkInterface.interface_info(iface)
addr = NetworkInterface.addresses(iface)
puts "#" * 70
puts ""
puts "INDEX : " + (i + 1).to_s
puts "NAME : " + detail["name"]
puts "DESCRIPTION : " + detail["description"]
puts "GUID : " + detail["guid"]
if addr[NetworkInterface::AF_LINK][0]['addr']
puts "MAC ADDRESS : #{addr[NetworkInterface::AF_LINK][0]['addr']}"
else
puts "MAC ADDRESS : NONE"
end
if addr[NetworkInterface::AF_INET][0]['addr'] and addr[NetworkInterface::AF_INET][0]['netmask']
puts "IP ADDRESS : #{addr[NetworkInterface::AF_INET][0]['addr']}/#{addr[NetworkInterface::AF_INET][0]['netmask']}"
else
puts "IP ADDRESS : NONE"
end
puts ""
end
if found
puts "#" * 70
else
$stderr.puts "Error, no network interfaces have been detected"
end
else
$stderr.puts "Error: This script is useful only on Windows, under other OS just use the built-in commands (ifconfig, ip link show, ...)"
exit
end

View File

@ -1,12 +1,17 @@
#!/usr/bin/env ruby
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
#
# This script takes a list of ranges and converts it to a per line ip list.
# This script takes a list of ranges and converts it to a per line IP list.
# Demonstration:
# echo 192.168.100.0-50 >> rangelist.txt
# echo 192.155-156.0.1 >> rangelist.txt
# echo 192.168.200.0/25 >> rangelist.txt
# ruby tools/makeiplist.rb
# ruby tools/recon/makeiplist.rb
#
# Author:
# mubix
@ -25,10 +30,10 @@ require 'optparse'
class OptsConsole
def self.parse(args)
options = {'output' => 'iplist.txt'}
options = {}
opts = OptionParser.new do |opts|
opts.banner = %Q|This script takes a list of ranges and converts it to a per line ip list.
opts.banner = %Q|This script takes a list of ranges and converts it to a per line IP list.
Usage: #{__FILE__} [options]|
opts.separator ""
@ -51,15 +56,23 @@ Usage: #{__FILE__} [options]|
end
end
opts.parse!(args)
if options.empty?
puts "[*] No options specified, try -h for usage"
exit
end
begin
opts.parse!(args)
if options['input'] == nil
puts opts
raise OptionParser::MissingArgument, "-i is a required option"
raise OptionParser::MissingArgument, '-i is a required argument'
end
unless ::File.exist?(options['input'])
raise OptionParser::InvalidArgument, "Not found: #{options['input']}"
end
if options['output'] == nil
options['output'] = 'iplist.txt'
end
rescue OptionParser::InvalidOption
puts "[*] Invalid option, try -h for usage"
exit
@ -68,11 +81,6 @@ Usage: #{__FILE__} [options]|
exit
end
if options.empty?
puts "[*] No options specified, try -h for usage"
exit
end
options
end
end