Commit Graph

410 Commits (636c43dcdc1c7e0eee54fbb6351251e3f2c302f4)

Author SHA1 Message Date
sinn3r 032da9be10
Land #2426 - make use of Msf::Config.data_directory 2013-10-21 13:07:33 -05:00
William Vu 38965f91ee Add Outpost24 importer code to core/db.rb 2013-10-15 15:32:28 -05:00
Meatballs 7ba846ca24 Find and replace 2013-09-26 20:34:48 +01:00
HD Moore 72dff03426 FixRM #8396 change all lib use of regex to 8-bit pattern 2013-09-12 16:58:49 -05:00
Tab Assassin 7e5e0f7fc8 Retab lib 2013-08-30 16:28:33 -05:00
Brandon Turner cd45c77080 Fix a few database leaks
All database access should be wrapped in with_connection blocks.

To avoid breaking git blame with a bunch of whitespace, I outdented
the with_connection blocks as seems to be common in db.rb.

[Story #55586616]
2013-08-21 18:53:17 -05:00
sinn3r 4558aca7ca Land #2136 - Removed requirement for note.data to be present 2013-08-09 15:29:25 -05:00
jvazquez-r7 2b3dcaf678 Land #2157, @wvu and @averagesecurityguy patch for OpenVAS XML Reports importing 2013-07-25 12:04:38 -05:00
William Vu 97680304d6 Use index, since it can apparently do regex 2013-07-25 12:00:33 -05:00
Samuel Huckins 832db57171 Removed requirement for note.data to be present. It wasn't required in
the model or in specs, but was in db.rb, resulting in an error during
certain import scenarios.
2013-07-20 10:27:12 -05:00
William Vu f267c11bc4 Add regex fix 2013-07-10 15:43:16 -05:00
Tod Beardsley f775a0bb01 Handle single quotes for OpenVAS import 2013-06-10 19:45:50 -04:00
Tod Beardsley d4e9431633 Add Gemfile entry for PacketFu 2013-06-10 14:18:05 -05:00
David Maloney 2e26256217 was missing a nil check 2013-06-04 14:21:07 -05:00
David Maloney c4475538e7 Report on TaskSession associations
add TaskSession objects so when we report
on a session, we know what Task created it, if there
was a task
2013-06-04 13:42:36 -05:00
lsanchez-r7 8b488c3c6b Merge pull request #1866 from dmaloney-r7/bug/mdm_session_port
Add session_port to the mdm object

SEERM #7281
2013-05-30 10:05:48 -07:00
David Maloney 849d974463 Add session_port to the mdm object
Mdm::Session was not being passed the session_port
FIXRM #7281
2013-05-24 17:46:03 -05:00
David Maloney 0f21861921 Add task handling to imports
allow imports to carry along task info

[Story #49167601]
2013-05-23 13:33:19 -05:00
David Maloney d8074c0bf4 Use create not new
Was calling .new instead of .create
[Story #49167601]
2013-05-22 18:29:22 -05:00
David Maloney 69dd7f5c58 Update Mdm and Add Task stuff to report
make report_* methods aware of Tasks

[Story #49167601]
2013-05-22 14:59:43 -05:00
Luke Imhoff afa04ac9d0 Merge branch 'master' into feature/mdm-module-namespace 2013-05-09 16:13:06 -05:00
Luke Imhoff a5648a8830 Merge branch 'master' into feature/mdm-module-namespace
Conflicts:
	Gemfile
	Gemfile.lock
	lib/msf/core/db_manager.rb
2013-05-08 13:22:41 -05:00
James Lee 9ab68ac935 Fix unintelligible error when importing empty file
IO#read returns nil for an empty file if given a length argument, which
caused a stack trace when attempting to import a file instead of a
useful error message.
2013-05-07 18:05:45 -05:00
Luke Imhoff 249a09cd52 Update to metasploit_data_models 0.7.1
[#47979793]
2013-04-26 13:14:38 -05:00
Luke Imhoff e5befb7094 Msf::DBManager#report_session specs
[#47979793]
2013-04-19 10:11:33 -05:00
scriptjunkie 2c41ca6598 Merge branch 'encoding_fix' of git://github.com/rsmudge/metasploit-framework 2013-04-12 21:10:44 -05:00
Luke Imhoff 0bb79ba890 Msf::DBManager#import_msf_xml refactor
[#46491831]

Move Msf::DBManager#import_msf_xml into
Msf::DBManager::ImportMsfXml#import_msf_xml and include
Msf::DBManager::ImportMsfXml to cut down size of the infamous db.rb.
Break up #import_msf_xml to have separate methods for parsing web_forms,
web_pages, and web_vulns.  The method for
web_vulns, #import_msf_web_vuln_element is needed so that it can be overridden in
Pro to handle the Pro-only changes to Mdm::WebVuln.
2013-04-01 16:06:40 -05:00
Raphael Mudge d764740779 Convert user/pass tokens to ASCII in db.rb
This commit fixes an Encoding::CompatibilityError incompatible
encoding regexp match (ASCII-8BIT regexp with UTF-8 string) when
sanitizing non-printable tokens from a user/pass string.

The UTF-8 strings are derived from strings passed through the
module.execute RPC call.
2013-03-11 15:02:28 -04:00
James Lee a928e5f963 Whitespace 2013-03-05 14:34:56 -06:00
Gerry Eisenhaur 724b32af17 Fixed the importing of NBE files 2013-02-26 16:55:26 -08:00
Raphael Mudge 4740cb09a1 Fix NoMethodError if handler has no ParentModule
db.rb assumes that multi/handler sessions have a ParentModule defined
in their datastore. This assumption breaks when a user sets up a
multi/handler by hand to receive a session from another user (e.g.,
via multi_meter_inject).

When db.rb tries to access a member of a nil ParentModule, a
stacktrace is dumped to framework.log.
2013-01-22 02:56:43 -05:00
kernelsmith 6e8e7a407d adds a .nil? check as well 2013-01-17 00:30:58 -06:00
kernelsmith 7090a4a82f adds check for empty data b4 sending to parser [RM7269]
[fixes RM7269]
we discussed the solution to this bug a lot on IRC and in the ticket
itself, the consensus was to fix it as far upstream as possible before
sending to the parsers so as to avoid any future bugs of the same
nature, so this commit adds a check to import_nmap_xml to see if the
data is empty before passing it on to the parser, whether that parser
is nokogiri or the legacy parser.
db_nmap -h now produces the expected output and db_nmap still works as
expected.
2013-01-17 00:18:13 -06:00
James Lee 95a95d45ec Fix importing msfxml files containing a session
[See #1179][SeeRM #7669]
2013-01-08 12:13:20 -06:00
James Lee a0e6c7043b Add actual cdata handler
Netsparker puts requests, responses, and info for vulns inside a cdata
(which makes sense because it's usually html snippets). This commit
handles that so report_web_vuln will actually be somewhat useful. Note
that the request is ignored by report_web_vuln despite there being a
place for it in the WebVuln model.

[SeeRM #7665]
2013-01-07 17:16:48 -06:00
Samuel Huckins 4f3c6f973d Changes to BAP session storage.
[SEERM #7294]
[Bug #40937817]

* exploit/multi/handler no longer filtered out from vuln creation and
other steps
* Name changed to parent module's name in session storage so we show something more helpful
than generic handler
* Same for vuln and attempt creation
2012-12-13 15:35:34 -06:00
Tasos Laskos c659b37c94 Updated indentation to use tabs 2012-11-16 23:11:48 +02:00
Tasos Laskos 0d2ad8734e #report_web_vuln: updated to include an owner and payload 2012-11-01 22:23:56 +02:00
James Lee ac0415eae0 Normalize hosts when doing a framework.db.get_host
Ensures that the host is an address (not a host name).

[FixRM #7226]
2012-09-06 17:23:21 -05:00
HD Moore 64e8956319 More small tweaks to import/export of attempts 2012-07-10 00:18:06 -05:00
HD Moore 25fee46020 Quick typo fix 2012-07-09 23:31:53 -05:00
HD Moore 6c977535d0 Fix up attempt/detail import/export structure 2012-07-09 22:47:05 -05:00
HD Moore bfde053cf4 Correct a flaw in vuln_attempt/vuln_detail import 2012-07-09 22:28:42 -05:00
HD Moore d656e3185f Mark all libraries as defaulting to 8-bit strings 2012-06-29 00:18:28 -05:00
HD Moore d5768080bf Add a fail_message to attempts and fix bugs 2012-06-19 00:48:39 -05:00
HD Moore bf3062aa89 Fix up opts.delete into temp storage for attempt tracking 2012-06-18 20:30:24 -05:00
HD Moore 0696748914 Import exploit attempts 2012-06-18 01:27:50 -05:00
HD Moore e8ad66b799 Exploit attempt tracking is mostly complete 2012-06-17 23:00:21 -05:00
HD Moore a8f7ea901a Fix cache counters for vuln_attempts, tweak nexpose 2012-06-17 21:55:11 -05:00
HD Moore be9b7a88fb Complicate the matching process in the name of memory
and loading speed. Use optional match_details param
to find matching vuln instances.
2012-06-17 00:07:00 -05:00