Commit Graph

1371 Commits

Author SHA1 Message Date
James Lee 301d220c80 get rid of debugging alerts. wtf
git-svn-id: file:///home/svn/framework3/trunk@9800 4d416f70-5f16-0410-b530-b9f4589650da
2010-07-13 07:58:50 +00:00
HD Moore a430970ddd Wrap the write() calls to catch exceptions from the socket api
git-svn-id: file:///home/svn/framework3/trunk@9794 4d416f70-5f16-0410-b530-b9f4589650da
2010-07-12 17:55:20 +00:00
HD Moore 16134447d9 Cleanup / cosmetic for dcerpc, make EBADF pretend to be EOFError in terms of what exception is raised
git-svn-id: file:///home/svn/framework3/trunk@9752 4d416f70-5f16-0410-b530-b9f4589650da
2010-07-09 19:05:16 +00:00
HD Moore adf33feb0e Catch an odd corner case with zero timeouts - this broke dcerpc over tcp
git-svn-id: file:///home/svn/framework3/trunk@9749 4d416f70-5f16-0410-b530-b9f4589650da
2010-07-09 17:58:59 +00:00
HD Moore 2d65cb602b Fix boolean handling
git-svn-id: file:///home/svn/framework3/trunk@9747 4d416f70-5f16-0410-b530-b9f4589650da
2010-07-09 16:34:18 +00:00
Joshua Drake 573fc216dd add write support, tftproot, output dir for tftp server
git-svn-id: file:///home/svn/framework3/trunk@9742 4d416f70-5f16-0410-b530-b9f4589650da
2010-07-08 23:34:29 +00:00
HD Moore a4c6280ae0 Minor cleanups for railgun, fix 1.8/1.9 differences, remove use of string encoding routines for 1.8 back-compat
git-svn-id: file:///home/svn/framework3/trunk@9736 4d416f70-5f16-0410-b530-b9f4589650da
2010-07-08 18:53:49 +00:00
Joshua Drake 3049d527ef there is no comm variable here, fixes #2200
git-svn-id: file:///home/svn/framework3/trunk@9728 4d416f70-5f16-0410-b530-b9f4589650da
2010-07-07 20:49:49 +00:00
HD Moore 9915be8935 Add the railgun client extensions
git-svn-id: file:///home/svn/framework3/trunk@9712 4d416f70-5f16-0410-b530-b9f4589650da
2010-07-07 16:31:24 +00:00
HD Moore 843b6ffa00 Make the http client try harder
git-svn-id: file:///home/svn/framework3/trunk@9698 4d416f70-5f16-0410-b530-b9f4589650da
2010-07-06 23:08:28 +00:00
Joshua Drake 24fbbfb906 use fat_offset, from Dino, fixes #2183
git-svn-id: file:///home/svn/framework3/trunk@9682 4d416f70-5f16-0410-b530-b9f4589650da
2010-07-06 17:16:35 +00:00
HD Moore f3afedf490 Fix an issue caused by pad_data being a string not an integer, this caused the evasion code to return a nil. Fixed a couple of ambiguities in how options are passed
git-svn-id: file:///home/svn/framework3/trunk@9674 4d416f70-5f16-0410-b530-b9f4589650da
2010-07-05 13:38:39 +00:00
Tod Beardsley 2250a83913 Updates meterpreter autoroute to accept CIDR notation.
git-svn-id: file:///home/svn/framework3/trunk@9667 4d416f70-5f16-0410-b530-b9f4589650da
2010-07-03 01:27:24 +00:00
Tod Beardsley fb273e83a9 Updates autoroute to enforce sensible netmasks. This is serious business.
git-svn-id: file:///home/svn/framework3/trunk@9664 4d416f70-5f16-0410-b530-b9f4589650da
2010-07-02 18:42:56 +00:00
Tod Beardsley 01139ed655 Adding an autoroute meterpreter script, and enabling route housekeeping to be stored and retrived via Sessions directly, rather than through Rex::Socket::SwitchBoard.
git-svn-id: file:///home/svn/framework3/trunk@9663 4d416f70-5f16-0410-b530-b9f4589650da
2010-07-02 17:38:56 +00:00
James Lee 1c9059eeb1 standardize job context as an Array and always copy datastore for jobs. fixes #2096 and fixes #2098
git-svn-id: file:///home/svn/framework3/trunk@9652 4d416f70-5f16-0410-b530-b9f4589650da
2010-07-01 22:02:46 +00:00
HD Moore 864fcafb4a See #2167. This should make all platforms equal now in terms of how read selects are handled. It looks like OS X needs the same workaround as Windows
git-svn-id: file:///home/svn/framework3/trunk@9641 4d416f70-5f16-0410-b530-b9f4589650da
2010-07-01 14:49:49 +00:00
HD Moore aecb6cd43f Prevent a loop condition noted by commonism
git-svn-id: file:///home/svn/framework3/trunk@9631 4d416f70-5f16-0410-b530-b9f4589650da
2010-06-28 14:40:11 +00:00
James Lee 96cd7bddae compatibility for 1.9. fixes #2143
git-svn-id: file:///home/svn/framework3/trunk@9622 4d416f70-5f16-0410-b530-b9f4589650da
2010-06-25 05:52:05 +00:00
James Lee 83d3e3cbac 1.9 fixes, see 2143
git-svn-id: file:///home/svn/framework3/trunk@9618 4d416f70-5f16-0410-b530-b9f4589650da
2010-06-25 04:03:58 +00:00
James Lee 01702e8506 don't rescue IOError.
git-svn-id: file:///home/svn/framework3/trunk@9616 4d416f70-5f16-0410-b530-b9f4589650da
2010-06-25 00:31:00 +00:00
James Lee 6e01b03767 IO.select has different behavior when a socket is closed, go back to Rex::ThreadSafe.select; fixes portfwd
git-svn-id: file:///home/svn/framework3/trunk@9615 4d416f70-5f16-0410-b530-b9f4589650da
2010-06-25 00:28:49 +00:00
James Lee 161ae211c4 add a capabilities hash to the meterpreter client for determining whether libs are available on the server. eventually there should be a way to request this from the server directly instead of inferring it from platform
git-svn-id: file:///home/svn/framework3/trunk@9561 4d416f70-5f16-0410-b530-b9f4589650da
2010-06-18 23:15:48 +00:00
Tod Beardsley 50c59a9ab1 Skip nmap port imports where the result is unknown and the target is really localhost.
git-svn-id: file:///home/svn/framework3/trunk@9553 4d416f70-5f16-0410-b530-b9f4589650da
2010-06-18 03:03:11 +00:00
James Lee ebe48096f3 put the original suspend handler back, even if it was nil. fixes 2102
git-svn-id: file:///home/svn/framework3/trunk@9547 4d416f70-5f16-0410-b530-b9f4589650da
2010-06-16 22:41:53 +00:00
James Lee 3e38aa9cd4 put the old sigint handler back, fixes #2103
git-svn-id: file:///home/svn/framework3/trunk@9546 4d416f70-5f16-0410-b530-b9f4589650da
2010-06-16 21:57:46 +00:00
Tod Beardsley 3d98f22ef4 Un-private-ing :range
git-svn-id: file:///home/svn/framework3/trunk@9537 4d416f70-5f16-0410-b530-b9f4589650da
2010-06-16 19:12:31 +00:00
James Lee f6901861fa allow host specifications like 'range, range' e.g. '10.1.1.0/24, 10.2.2.1'. Note that the space is required
git-svn-id: file:///home/svn/framework3/trunk@9489 4d416f70-5f16-0410-b530-b9f4589650da
2010-06-11 17:20:14 +00:00
Joshua Drake e32abab8dc a HTTP -> an HTTP (http://www.english-zone.com/grammar/a-anlessn.html)
git-svn-id: file:///home/svn/framework3/trunk@9488 4d416f70-5f16-0410-b530-b9f4589650da
2010-06-11 16:12:05 +00:00
James Lee 32c24b944a actually increment the loop variable; document the deficiencies of the employed technique
git-svn-id: file:///home/svn/framework3/trunk@9449 4d416f70-5f16-0410-b530-b9f4589650da
2010-06-07 23:56:35 +00:00
James Lee 7044c65f22 make sure we have a newline in a chunk length before parsing it, tighten up the regex. fixes 2063 (I hope)
git-svn-id: file:///home/svn/framework3/trunk@9448 4d416f70-5f16-0410-b530-b9f4589650da
2010-06-07 23:43:32 +00:00
James Lee 6950cae916 more legible inspect for meterpreter packets
git-svn-id: file:///home/svn/framework3/trunk@9445 4d416f70-5f16-0410-b530-b9f4589650da
2010-06-07 15:20:24 +00:00
Tod Beardsley e4c2a74915 DIY on the iconv stuff. just load the arrays once, plz.
git-svn-id: file:///home/svn/framework3/trunk@9407 4d416f70-5f16-0410-b530-b9f4589650da
2010-06-03 17:35:58 +00:00
Tod Beardsley a5a318f623 Workaround for a lack of Iconv for performing EBCDIC/ASCII conversions
git-svn-id: file:///home/svn/framework3/trunk@9406 4d416f70-5f16-0410-b530-b9f4589650da
2010-06-03 17:28:45 +00:00
HD Moore 87379e798a Bump the timeout for hashdump, handle large DCs better, thanks Chris!
git-svn-id: file:///home/svn/framework3/trunk@9385 4d416f70-5f16-0410-b530-b9f4589650da
2010-06-01 16:45:34 +00:00
James Lee 5b6b13e7e8 check for existence before using stuff
git-svn-id: file:///home/svn/framework3/trunk@9384 4d416f70-5f16-0410-b530-b9f4589650da
2010-06-01 16:35:10 +00:00
HD Moore 845407a356 Allow interrupts to break out of recvfrom
git-svn-id: file:///home/svn/framework3/trunk@9380 4d416f70-5f16-0410-b530-b9f4589650da
2010-05-29 06:52:47 +00:00
Joshua Drake 288b700e75 remove silly debugging statements
git-svn-id: file:///home/svn/framework3/trunk@9377 4d416f70-5f16-0410-b530-b9f4589650da
2010-05-26 22:46:22 +00:00
Joshua Drake 6d1e7bdaa5 big commit - lots of cmdstager changes
created 4 cmd stagers (instead of just one): CmdStagerVBS, CmdStagerDebugAsm, CmdStagerDebugWrite, CmdStagerTFTP
created a TFTPServer mixin
created Msf::Exploit::EXE mixin to generate executables
updated all uses of CmdStager to use CmdStagerVBS for the time being
add exploit for cve-2001-0333 using CmdStagerTFTP
updated tftp server to wait for transfers to finish (up to 30 seconds) before shutting down
write debug.exe stager stub in 16-bit assembly (used in CmdStagerDebugAsm)


git-svn-id: file:///home/svn/framework3/trunk@9375 4d416f70-5f16-0410-b530-b9f4589650da
2010-05-26 22:39:56 +00:00
Tod Beardsley 110e0c8404 Allow for an IP range notation of "10.1.1.1-10.255.255.255" . This is equivalent to "10.1-255.1-255.1-255" but is more natural for some people not familiar with the nmap-style notation. Note that there must be no spaces around the hyphen. In the case of "10.1.1.1 - 10.255.255.255", this will merely fail normally. In the case of "10.1.1.1- 10.255.255.255," you will end up with a funny range of 10.1.1.1-255 and 10.255.255.255, since the space after the hyphen denotes "until the end of the octet space."
git-svn-id: file:///home/svn/framework3/trunk@9368 4d416f70-5f16-0410-b530-b9f4589650da
2010-05-25 22:44:55 +00:00
Tod Beardsley 563ab310dc Strengthening up the checks for valid formats for CIDR address ranges when passed to Rex::Socket::RangeWalker
git-svn-id: file:///home/svn/framework3/trunk@9366 4d416f70-5f16-0410-b530-b9f4589650da
2010-05-25 20:46:00 +00:00
Tod Beardsley 1a2be34a63 Fixes #2002. Needed to work with some pipelining to get this all to work right, but it seems to function now pretty well -- if the target takes Basic, do basic, if the target takes NTLM, do NTLM. Should implement Digest too, but I don't think hardly anyone uses that.
git-svn-id: file:///home/svn/framework3/trunk@9346 4d416f70-5f16-0410-b530-b9f4589650da
2010-05-22 17:58:01 +00:00
Joshua Drake 83adc3f391 switch to ::IO.select
git-svn-id: file:///home/svn/framework3/trunk@9339 4d416f70-5f16-0410-b530-b9f4589650da
2010-05-21 05:02:52 +00:00
HD Moore 872575209f Fix a corner case with udp send destinations already having a ::ffff: prefix
git-svn-id: file:///home/svn/framework3/trunk@9338 4d416f70-5f16-0410-b530-b9f4589650da
2010-05-21 05:01:14 +00:00
Joshua Drake 21130bc38a replace hardcoded numbers with friendly constants
git-svn-id: file:///home/svn/framework3/trunk@9334 4d416f70-5f16-0410-b530-b9f4589650da
2010-05-21 00:15:10 +00:00
Joshua Drake 957b1432ed add simple tftp server
git-svn-id: file:///home/svn/framework3/trunk@9333 4d416f70-5f16-0410-b530-b9f4589650da
2010-05-21 00:03:04 +00:00
James Lee 15cee53b41 move tab completion setup out of init_ui. fixes #1180
git-svn-id: file:///home/svn/framework3/trunk@9332 4d416f70-5f16-0410-b530-b9f4589650da
2010-05-20 23:47:49 +00:00
HD Moore dfa7fb7d0b Move away from Kernel.select in exchange for IO.select, solves some issues with windows compatibility
git-svn-id: file:///home/svn/framework3/trunk@9330 4d416f70-5f16-0410-b530-b9f4589650da
2010-05-20 20:42:17 +00:00
HD Moore a29371647f Force cygwin to use the Rex::ThreadSafe.select code
git-svn-id: file:///home/svn/framework3/trunk@9322 4d416f70-5f16-0410-b530-b9f4589650da
2010-05-18 15:11:19 +00:00
Joshua Drake 670bacb9bc a couple rex/ole fixes
git-svn-id: file:///home/svn/framework3/trunk@9287 4d416f70-5f16-0410-b530-b9f4589650da
2010-05-12 05:33:35 +00:00
James Lee c0494dcbc0 compat fix for 1.8.6, there are probably many more bugs like this
git-svn-id: file:///home/svn/framework3/trunk@9281 4d416f70-5f16-0410-b530-b9f4589650da
2010-05-11 07:37:57 +00:00
HD Moore cdc591488c Bug fix
git-svn-id: file:///home/svn/framework3/trunk@9276 4d416f70-5f16-0410-b530-b9f4589650da
2010-05-10 23:55:58 +00:00
Joshua Drake 3d023ec1fa add comment about pe.read
git-svn-id: file:///home/svn/framework3/trunk@9272 4d416f70-5f16-0410-b530-b9f4589650da
2010-05-10 16:18:19 +00:00
HD Moore 542782e7e6 Match existing mime implementations more closely
git-svn-id: file:///home/svn/framework3/trunk@9258 4d416f70-5f16-0410-b530-b9f4589650da
2010-05-09 17:01:52 +00:00
HD Moore 14363ca2e8 Rex::MIME::Message can now parse as well as write
git-svn-id: file:///home/svn/framework3/trunk@9257 4d416f70-5f16-0410-b530-b9f4589650da
2010-05-09 16:53:16 +00:00
HD Moore 5f23151c22 Replace the core of the text generation methods; previously, these could result in an oddball string result that would not auto-convert into ASCII-8BIT. Looks like a strange corner case in Ruby 1.9
git-svn-id: file:///home/svn/framework3/trunk@9254 4d416f70-5f16-0410-b530-b9f4589650da
2010-05-09 02:58:55 +00:00
Joshua Drake cd213c29c5 change offset_to_rva into file_offset_to_va, add comments
git-svn-id: file:///home/svn/framework3/trunk@9242 4d416f70-5f16-0410-b530-b9f4589650da
2010-05-07 21:45:21 +00:00
Carlos Perez abe2cb9919 cd can now change directory giving it a Windows ENV variable
git-svn-id: file:///home/svn/framework3/trunk@9237 4d416f70-5f16-0410-b530-b9f4589650da
2010-05-07 02:05:26 +00:00
Joshua Drake 873f8bd1ed added a couple of convenience methods
not sure if these are correct, but they worked for me

git-svn-id: file:///home/svn/framework3/trunk@9230 4d416f70-5f16-0410-b530-b9f4589650da
2010-05-05 20:07:15 +00:00
James Lee 9fe0186ddb document in a comment the fact that vulns don't have service info yet
git-svn-id: file:///home/svn/framework3/trunk@9213 4d416f70-5f16-0410-b530-b9f4589650da
2010-05-03 18:16:23 +00:00
James Lee 1ab399d0ea use a stream parser to import NeXpose raw xml, short-circuit find_or_create_ref to avoid going to the task queue when possible
git-svn-id: file:///home/svn/framework3/trunk@9199 4d416f70-5f16-0410-b530-b9f4589650da
2010-05-02 19:16:52 +00:00
HD Moore 7631b193fd Glue to tie Metasploit mixins into Rex::Script::Meterpreter
git-svn-id: file:///home/svn/framework3/trunk@9193 4d416f70-5f16-0410-b530-b9f4589650da
2010-05-02 00:09:01 +00:00
HD Moore 5bc9a572e6 Add a close method to the file output
git-svn-id: file:///home/svn/framework3/trunk@9189 4d416f70-5f16-0410-b530-b9f4589650da
2010-05-01 17:13:14 +00:00
HD Moore 4308689fd9 Remove diagnostic line
git-svn-id: file:///home/svn/framework3/trunk@9165 4d416f70-5f16-0410-b530-b9f4589650da
2010-04-27 23:08:06 +00:00
HD Moore 49635c4ab0 Call the right select:
git-svn-id: file:///home/svn/framework3/trunk@9164 4d416f70-5f16-0410-b530-b9f4589650da
2010-04-27 22:55:17 +00:00
HD Moore 936190125e Bug fix for Ruby 1.9 (error can close the server socket, not the client socket). Small jRuby compatibility improvement
git-svn-id: file:///home/svn/framework3/trunk@9155 4d416f70-5f16-0410-b530-b9f4589650da
2010-04-27 14:39:09 +00:00
Joshua Drake a953c47cfb remove carriage returns
git-svn-id: file:///home/svn/framework3/trunk@9140 4d416f70-5f16-0410-b530-b9f4589650da
2010-04-26 18:29:24 +00:00
James Lee 01f9c0b616 only do the UA string search in firefox if we don't have a perfect match on buildId
git-svn-id: file:///home/svn/framework3/trunk@9129 4d416f70-5f16-0410-b530-b9f4589650da
2010-04-24 21:31:12 +00:00
James Lee 13171ad1c6 add a fingerprint for ff 3.6.3 on windows
git-svn-id: file:///home/svn/framework3/trunk@9128 4d416f70-5f16-0410-b530-b9f4589650da
2010-04-24 19:36:58 +00:00
James Lee 928389e8b0 update comments to explain the reason for not running init_ui
git-svn-id: file:///home/svn/framework3/trunk@9114 4d416f70-5f16-0410-b530-b9f4589650da
2010-04-20 07:01:46 +00:00
James Lee 4243ce5bf4 preliminary fix for the meterpreter-breaks-tab-completion bug pending some testing, see #1180
git-svn-id: file:///home/svn/framework3/trunk@9113 4d416f70-5f16-0410-b530-b9f4589650da
2010-04-20 03:59:27 +00:00
James Lee 8919688e1a don't truncate the version when it doesn't contain a string, fixes #1711, thanks Peorth Yggdrasil
git-svn-id: file:///home/svn/framework3/trunk@9104 4d416f70-5f16-0410-b530-b9f4589650da
2010-04-19 22:12:35 +00:00
James Lee 6d788a9437 add print_good methods to rex input shells, fixes #1703
git-svn-id: file:///home/svn/framework3/trunk@9103 4d416f70-5f16-0410-b530-b9f4589650da
2010-04-19 22:09:55 +00:00
James Lee af901888d2 add detection for FF 3.6, thanks Peorth Yggdrasil
git-svn-id: file:///home/svn/framework3/trunk@9102 4d416f70-5f16-0410-b530-b9f4589650da
2010-04-19 19:33:09 +00:00
Joshua Drake 32cd6b2101 fix reference to readline_compatible
git-svn-id: file:///home/svn/framework3/trunk@9060 4d416f70-5f16-0410-b530-b9f4589650da
2010-04-13 17:09:42 +00:00
James Lee 6507c4fcea clarify comments about what the checks for a deceitful UA are doing
git-svn-id: file:///home/svn/framework3/trunk@9054 4d416f70-5f16-0410-b530-b9f4589650da
2010-04-12 04:44:33 +00:00
James Lee 548e242e75 add firefox detection based on navigator.buildID. Thanks, Mark Fioravanti\!
git-svn-id: file:///home/svn/framework3/trunk@9053 4d416f70-5f16-0410-b530-b9f4589650da
2010-04-12 04:21:42 +00:00
HD Moore 108362cf95 Switch to recvfrom_nonsock, solves a hang with win32 + 1.9.1
git-svn-id: file:///home/svn/framework3/trunk@9045 4d416f70-5f16-0410-b530-b9f4589650da
2010-04-10 17:31:40 +00:00
HD Moore 3ad0560d00 Use the kernel select in 1.9, its less buggy and doesn't have the issues that lead us to create our own in the first place
git-svn-id: file:///home/svn/framework3/trunk@9044 4d416f70-5f16-0410-b530-b9f4589650da
2010-04-09 22:48:31 +00:00
Joshua Drake df16eec4d7 revert r9038, see r9039, fixes #1531, fixes #531
git-svn-id: file:///home/svn/framework3/trunk@9040 4d416f70-5f16-0410-b530-b9f4589650da
2010-04-07 23:42:04 +00:00
Joshua Drake 9a8d14a5ec use RL_PROMPT_ constants for places where a prompt is colorized (only)
git-svn-id: file:///home/svn/framework3/trunk@9039 4d416f70-5f16-0410-b530-b9f4589650da
2010-04-07 23:37:49 +00:00
James Lee a502c2647d tell readline that the color escapes shouldn't be counted as part of the line length, thanks to Niklas Baumstark. fixes 1531, fixes 531
git-svn-id: file:///home/svn/framework3/trunk@9038 4d416f70-5f16-0410-b530-b9f4589650da
2010-04-07 23:24:54 +00:00
HD Moore 3c4024a0c6 Expose the server client list, set the keepalive
git-svn-id: file:///home/svn/framework3/trunk@8992 4d416f70-5f16-0410-b530-b9f4589650da
2010-04-03 06:05:06 +00:00
HD Moore c6c956ab46 Small patch to enable a new stager
git-svn-id: file:///home/svn/framework3/trunk@8984 4d416f70-5f16-0410-b530-b9f4589650da
2010-04-03 05:21:15 +00:00
HD Moore 5f3def5bee License corrections
git-svn-id: file:///home/svn/framework3/trunk@8982 4d416f70-5f16-0410-b530-b9f4589650da
2010-04-02 21:34:15 +00:00
Joshua Drake 71a2064520 closes #1408 - merge patch from Mike Ryan
git-svn-id: file:///home/svn/framework3/trunk@8963 4d416f70-5f16-0410-b530-b9f4589650da
2010-03-31 02:25:44 +00:00
HD Moore 09dd8c1fcc Adds portlist_to_portspec and portspec_to_portlist. Merges in Qualys XML support from Sertan Kolat
git-svn-id: file:///home/svn/framework3/trunk@8949 4d416f70-5f16-0410-b530-b9f4589650da
2010-03-28 23:02:28 +00:00
HD Moore 432f1676aa Increase LocalRelay block size, return exploit_uuid in sessions
git-svn-id: file:///home/svn/framework3/trunk@8939 4d416f70-5f16-0410-b530-b9f4589650da
2010-03-27 15:44:33 +00:00
HD Moore cd71cfbad1 Handle buggy HTTP servers better
git-svn-id: file:///home/svn/framework3/trunk@8921 4d416f70-5f16-0410-b530-b9f4589650da
2010-03-25 21:35:37 +00:00
HD Moore 3e29a2fd2f Adds bgrun, bglist, bgkill to run Meterpreter scripts in the background
git-svn-id: file:///home/svn/framework3/trunk@8917 4d416f70-5f16-0410-b530-b9f4589650da
2010-03-25 15:54:43 +00:00
James Lee 2a2682052b patch from Mark Fioravanti for detecting chrome vs safari
git-svn-id: file:///home/svn/framework3/trunk@8897 4d416f70-5f16-0410-b530-b9f4589650da
2010-03-24 16:13:59 +00:00
HD Moore bb0db3cdf6 Closes command and meterpreter sessions in a much more consistent way
git-svn-id: file:///home/svn/framework3/trunk@8865 4d416f70-5f16-0410-b530-b9f4589650da
2010-03-21 04:24:27 +00:00
HD Moore eb31c8f24b Fixes up SunRPC to use proper timeouts and track the socket context (needed for pivoting)
git-svn-id: file:///home/svn/framework3/trunk@8845 4d416f70-5f16-0410-b530-b9f4589650da
2010-03-17 23:02:35 +00:00
Tod Beardsley a29ff6f435 Adding a Rex library method for generating an array of mixed case strings.
git-svn-id: file:///home/svn/framework3/trunk@8841 4d416f70-5f16-0410-b530-b9f4589650da
2010-03-17 17:47:08 +00:00
HD Moore 5dd404abd6 Fix an issue with 1.9.1 compat
git-svn-id: file:///home/svn/framework3/trunk@8818 4d416f70-5f16-0410-b530-b9f4589650da
2010-03-14 16:20:24 +00:00
Joshua Drake b6851b8ee4 modify cmd stager to take a raw payload string instead of a payload instance
git-svn-id: file:///home/svn/framework3/trunk@8805 4d416f70-5f16-0410-b530-b9f4589650da
2010-03-12 21:47:01 +00:00
HD Moore aa12dc912f Add a file output type
git-svn-id: file:///home/svn/framework3/trunk@8792 4d416f70-5f16-0410-b530-b9f4589650da
2010-03-11 18:58:20 +00:00
Stephen Fewer be93341cff Commit the ruby side for the new screenshot/session stuff.
git-svn-id: file:///home/svn/framework3/trunk@8788 4d416f70-5f16-0410-b530-b9f4589650da
2010-03-11 17:11:27 +00:00
HD Moore 89c62bc838 Fixes #1079. Handle a closed SSL socket gracefully
git-svn-id: file:///home/svn/framework3/trunk@8783 4d416f70-5f16-0410-b530-b9f4589650da
2010-03-11 14:13:53 +00:00
HD Moore 6bd2a954cf Lots of small changes, the big one is moving from sysread -> readpartial in the stream base class
git-svn-id: file:///home/svn/framework3/trunk@8764 4d416f70-5f16-0410-b530-b9f4589650da
2010-03-10 06:43:46 +00:00
Stephen Fewer 195d1ab4b8 Commit snojobs jpeg patch for espia with an x64 build and some minor changes on the ruby side (The 'screenshot' command is now 'screengrab' to avoid a future conflict with changes happening in stdapi).
git-svn-id: file:///home/svn/framework3/trunk@8726 4d416f70-5f16-0410-b530-b9f4589650da
2010-03-05 15:50:24 +00:00
Joshua Drake 73da75a931 big update to cmd stager
1. returns array of commands instead of big blob of lines
2. combine lines together when possible (to reduce # of commands to execute)
3. add cmd stager usage in mssql_payload
4. remove extraneous stuff here and there

git-svn-id: file:///home/svn/framework3/trunk@8721 4d416f70-5f16-0410-b530-b9f4589650da
2010-03-05 00:29:44 +00:00
Stephen Fewer a44358df67 Simple fix for #1013 and the migration permission error message.
git-svn-id: file:///home/svn/framework3/trunk@8714 4d416f70-5f16-0410-b530-b9f4589650da
2010-03-04 19:31:36 +00:00
James Lee f40a9a5c4b new ie fingerprint
git-svn-id: file:///home/svn/framework3/trunk@8707 4d416f70-5f16-0410-b530-b9f4589650da
2010-03-04 07:17:10 +00:00
James Lee dea2ba3420 try a little harder not to break things by making sure there's a space in front of comments before removing them
git-svn-id: file:///home/svn/framework3/trunk@8704 4d416f70-5f16-0410-b530-b9f4589650da
2010-03-04 03:20:52 +00:00
James Lee 506fdb63ff remove comments after obfuscating strings so things like 'http://example.com' in a string doesn't get mangled. will still have problems with a string like that and no string obfu
git-svn-id: file:///home/svn/framework3/trunk@8702 4d416f70-5f16-0410-b530-b9f4589650da
2010-03-03 20:51:29 +00:00
James Lee 7d348c3593 honor the SSL option in HttpServer, fixes #1001
git-svn-id: file:///home/svn/framework3/trunk@8699 4d416f70-5f16-0410-b530-b9f4589650da
2010-03-03 18:47:04 +00:00
Joshua Drake 9148068acc pass unlink_now flag to close for Tempfile instances
git-svn-id: file:///home/svn/framework3/trunk@8697 4d416f70-5f16-0410-b530-b9f4589650da
2010-03-03 04:58:12 +00:00
James Lee 15b13d2472 make string obfuscation produce correct code more often (should be 100% now, but no guarantees). stops doing hex-encoding (more hassle than it's worth) and adds random split/concats (jduck's idea)
git-svn-id: file:///home/svn/framework3/trunk@8690 4d416f70-5f16-0410-b530-b9f4589650da
2010-03-02 14:36:09 +00:00
James Lee b16a08c4cd whitespace
git-svn-id: file:///home/svn/framework3/trunk@8687 4d416f70-5f16-0410-b530-b9f4589650da
2010-03-02 11:10:23 +00:00
HD Moore ac517fafea Remove the db dependency from Meterpreter scripts
git-svn-id: file:///home/svn/framework3/trunk@8676 4d416f70-5f16-0410-b530-b9f4589650da
2010-02-28 19:29:43 +00:00
HD Moore d03c26430c Max is 32k
git-svn-id: file:///home/svn/framework3/trunk@8670 4d416f70-5f16-0410-b530-b9f4589650da
2010-02-26 21:18:58 +00:00
James Lee c4fe7193f1 print_raw receives color-substituted strings, don't override print
git-svn-id: file:///home/svn/framework3/trunk@8669 4d416f70-5f16-0410-b530-b9f4589650da
2010-02-26 20:10:18 +00:00
HD Moore 303d99650a Store the workspace in the script object
git-svn-id: file:///home/svn/framework3/trunk@8668 4d416f70-5f16-0410-b530-b9f4589650da
2010-02-26 19:50:33 +00:00
James Lee 3b0c82b131 args should be an array, fixes 981
git-svn-id: file:///home/svn/framework3/trunk@8666 4d416f70-5f16-0410-b530-b9f4589650da
2010-02-26 19:26:34 +00:00
Stephen Fewer 88cc851a41 Commit the stager_sysenter_hook win32 kernel shellcode source and mixin patch, resolves #405.
git-svn-id: file:///home/svn/framework3/trunk@8655 4d416f70-5f16-0410-b530-b9f4589650da
2010-02-26 13:41:16 +00:00
HD Moore c1609d0db1 Woops!
git-svn-id: file:///home/svn/framework3/trunk@8631 4d416f70-5f16-0410-b530-b9f4589650da
2010-02-24 23:15:01 +00:00
HD Moore 2f195694f4 Switch shell to a base class, allow the base class to use a null sink for output when no user_output is set.
git-svn-id: file:///home/svn/framework3/trunk@8630 4d416f70-5f16-0410-b530-b9f4589650da
2010-02-24 23:07:08 +00:00
James Lee 999feb879f setup the input/output handles correctly for meterpreter sessions so we can get the output from scripts
git-svn-id: file:///home/svn/framework3/trunk@8618 4d416f70-5f16-0410-b530-b9f4589650da
2010-02-24 16:46:47 +00:00
Joshua Drake b391abd32d adds scripting for command shell sessions
1. InitialAutoRunScript and AutoRunScript vars work
2. scripts/shells was created to hold them
3. *_shell methods were renamed shell_*
4. added "shell_command" method to command shell sessions
5. converted all uses of *_shell to shell_*
6. all payloads that produce command shell sessions include Msf::Sessions::CommandShellOptions



git-svn-id: file:///home/svn/framework3/trunk@8615 4d416f70-5f16-0410-b530-b9f4589650da
2010-02-24 01:19:59 +00:00
HD Moore a71e8d2af0 Fix up meterpreter script changes
git-svn-id: file:///home/svn/framework3/trunk@8611 4d416f70-5f16-0410-b530-b9f4589650da
2010-02-23 20:16:45 +00:00
HD Moore 4220c33675 Stuff meterpreter scripts into a dedicated object
git-svn-id: file:///home/svn/framework3/trunk@8603 4d416f70-5f16-0410-b530-b9f4589650da
2010-02-23 17:59:35 +00:00
James Lee 455434a9f2 typo fix, thanks SubINacls for catching it
git-svn-id: file:///home/svn/framework3/trunk@8597 4d416f70-5f16-0410-b530-b9f4589650da
2010-02-23 06:25:19 +00:00
James Lee 4ad6c24a95 look for dead sesions with a reaper thread instead of on other session events, add Session#alive accessor for all session types; still need to figure out when a shell session is dead and set it accordingly. Add a reason argument to on_session_close to distinguish between killed sessions and dead sessions
git-svn-id: file:///home/svn/framework3/trunk@8596 4d416f70-5f16-0410-b530-b9f4589650da
2010-02-23 05:59:30 +00:00
James Lee 06b369a79b add a class method for route_exists?
git-svn-id: file:///home/svn/framework3/trunk@8591 4d416f70-5f16-0410-b530-b9f4589650da
2010-02-22 22:30:37 +00:00
James Lee a12670b311 check for existence before stat'ing. fixes #893
git-svn-id: file:///home/svn/framework3/trunk@8581 4d416f70-5f16-0410-b530-b9f4589650da
2010-02-22 17:27:54 +00:00
Joshua Drake b5e1e56f44 fix slicing of compressed deflate data
git-svn-id: file:///home/svn/framework3/trunk@8572 4d416f70-5f16-0410-b530-b9f4589650da
2010-02-21 01:37:04 +00:00
Joshua Drake 4800d6841c commit cmd stager stuff from bannedit
git-svn-id: file:///home/svn/framework3/trunk@8518 4d416f70-5f16-0410-b530-b9f4589650da
2010-02-16 16:38:19 +00:00
Stephen Fewer 17de90a902 Modify the client core to use compression for the loading of extensions and migration for a speed boost.
git-svn-id: file:///home/svn/framework3/trunk@8517 4d416f70-5f16-0410-b530-b9f4589650da
2010-02-16 15:01:06 +00:00
Stephen Fewer 4b4b2d62b1 Commit the Ruby side for channel/TLV compression.
git-svn-id: file:///home/svn/framework3/trunk@8516 4d416f70-5f16-0410-b530-b9f4589650da
2010-02-16 14:58:23 +00:00
HD Moore 2539a6fc09 Updated nmap parsing, store notes for last boot and os matches
git-svn-id: file:///home/svn/framework3/trunk@8494 4d416f70-5f16-0410-b530-b9f4589650da
2010-02-14 19:07:15 +00:00
HD Moore bfa3ae28cb Import OS and hostname information
git-svn-id: file:///home/svn/framework3/trunk@8491 4d416f70-5f16-0410-b530-b9f4589650da
2010-02-14 18:32:37 +00:00
HD Moore 5dff9c4efc Fixes #807. Make the html encoded output standards compliant
git-svn-id: file:///home/svn/framework3/trunk@8462 4d416f70-5f16-0410-b530-b9f4589650da
2010-02-12 05:08:16 +00:00
Joshua Drake d4d271eef3 add OLE library as Rex::OLE
git-svn-id: file:///home/svn/framework3/trunk@8457 4d416f70-5f16-0410-b530-b9f4589650da
2010-02-11 18:36:38 +00:00
Joshua Drake 7285e7a2bb whitespace fixed, also see r8452 which fixes #805
git-svn-id: file:///home/svn/framework3/trunk@8453 4d416f70-5f16-0410-b530-b9f4589650da
2010-02-11 07:48:56 +00:00
Joshua Drake a3bf0fd94f handle arch parameters passed as array
oops, these other two functions didn't benefit from the same level of checking as endian? did.

git-svn-id: file:///home/svn/framework3/trunk@8452 4d416f70-5f16-0410-b530-b9f4589650da
2010-02-11 07:42:26 +00:00
Joshua Drake 13f837c340 fix zip module samples
git-svn-id: file:///home/svn/framework3/trunk@8447 4d416f70-5f16-0410-b530-b9f4589650da
2010-02-11 00:18:37 +00:00
Joshua Drake 2c100083bf add a zip implementation, Rex::Zip, see lib/rex/zip/samples for more info
git-svn-id: file:///home/svn/framework3/trunk@8439 4d416f70-5f16-0410-b530-b9f4589650da
2010-02-10 17:27:40 +00:00
Stephen Fewer 6335fde3e1 Commit the Ruby side for the UDP socket pivoting. Change the TCP client channel so the respective StreamAbstraction is responsible for monitoring its own rsock.
git-svn-id: file:///home/svn/framework3/trunk@8431 4d416f70-5f16-0410-b530-b9f4589650da
2010-02-09 16:45:46 +00:00
Joshua Drake 79d2ecc227 don't slice a nil buffer
git-svn-id: file:///home/svn/framework3/trunk@8403 4d416f70-5f16-0410-b530-b9f4589650da
2010-02-08 01:42:11 +00:00
HD Moore c8af3431b6 Typo
git-svn-id: file:///home/svn/framework3/trunk@8401 4d416f70-5f16-0410-b530-b9f4589650da
2010-02-08 01:02:46 +00:00
HD Moore 5f76353e8e Woops, add the missing support files
git-svn-id: file:///home/svn/framework3/trunk@8400 4d416f70-5f16-0410-b530-b9f4589650da
2010-02-08 00:59:29 +00:00
Stephen Fewer e19633354b Bug fix for a rare edge case with channels. When creating a Rex::Post::Meterpreter::Stream instance we should initialize_abstraction() before super() as we can get a scenario where dio_write_handler() is called with data to write to the rsock but rsock has not yet been initialized. This happens if the channel is registered (client.add_channel(self) in Channel.initialize) to a session and a 'core_channel_write' request comes in before we have called self.initialize_abstraction()
git-svn-id: file:///home/svn/framework3/trunk@8386 4d416f70-5f16-0410-b530-b9f4589650da
2010-02-06 20:12:52 +00:00
Stephen Fewer fd2469db24 Commit the Ruby end for TCP server channels, the modified TCP client channels and the support for pivoting a reverse_tcp meterpreter.
git-svn-id: file:///home/svn/framework3/trunk@8384 4d416f70-5f16-0410-b530-b9f4589650da
2010-02-06 17:59:25 +00:00
HD Moore b3a588b8cc Adds a module for kcope's samba filesystem traversal
git-svn-id: file:///home/svn/framework3/trunk@8369 4d416f70-5f16-0410-b530-b9f4589650da
2010-02-05 06:38:24 +00:00
Joshua Drake a052340703 a few fixes to sunrpc code
this fixes a couple of errors handling error messages
also, some whitespace/indenting adjustments



git-svn-id: file:///home/svn/framework3/trunk@8365 4d416f70-5f16-0410-b530-b9f4589650da
2010-02-03 20:30:09 +00:00
Tod Beardsley 3fe8d0375b Adds a print_debug message handler -- mostly useful during development to easily inspect objects.
git-svn-id: file:///home/svn/framework3/trunk@8353 4d416f70-5f16-0410-b530-b9f4589650da
2010-02-02 21:03:07 +00:00
James Lee 55a82c1642 add simple detection for Chrome
git-svn-id: file:///home/svn/framework3/trunk@8330 4d416f70-5f16-0410-b530-b9f4589650da
2010-01-30 21:09:38 +00:00
HD Moore 42b331b47f Fix #790. Initialize the client state to be alive, tweak a few things on the meterpreter side
git-svn-id: file:///home/svn/framework3/trunk@8327 4d416f70-5f16-0410-b530-b9f4589650da
2010-01-29 18:52:44 +00:00
HD Moore 7d88f394b4 Use the impersonated token to spawn the shell by default
git-svn-id: file:///home/svn/framework3/trunk@8326 4d416f70-5f16-0410-b530-b9f4589650da
2010-01-29 17:35:30 +00:00