Commit Graph

481 Commits (4be0361f6965747f11831b6a0bdbbad6bca0bd5e)

Author SHA1 Message Date
James Lee a170d37c62 make it a little clearer what getprivs actually does
git-svn-id: file:///home/svn/framework3/trunk@12492 4d416f70-5f16-0410-b530-b9f4589650da
2011-05-01 22:28:09 +00:00
HD Moore 39cab9b076 Correct use of select and expand the listen queue for TCP Servers
git-svn-id: file:///home/svn/framework3/trunk@12484 4d416f70-5f16-0410-b530-b9f4589650da
2011-04-30 18:08:52 +00:00
HD Moore 96ac0fd51a Swap out exceptions
git-svn-id: file:///home/svn/framework3/trunk@12481 4d416f70-5f16-0410-b530-b9f4589650da
2011-04-30 08:47:32 +00:00
HD Moore 5758f2ab46 Add support for non-blocking OpenSSL sockets when the Ruby version supports them (1.9.2+ or with openssl-nonblock gem).
git-svn-id: file:///home/svn/framework3/trunk@12480 4d416f70-5f16-0410-b530-b9f4589650da
2011-04-30 07:59:33 +00:00
James Lee 0978047673 clean up help a little for several meterpreter file commands
git-svn-id: file:///home/svn/framework3/trunk@12451 4d416f70-5f16-0410-b530-b9f4589650da
2011-04-27 00:38:15 +00:00
Jonathan Cran 56049012cb remove my code out of the tree, tests all passing. thanks chao-mu!
git-svn-id: file:///home/svn/framework3/trunk@12413 4d416f70-5f16-0410-b530-b9f4589650da
2011-04-23 02:49:14 +00:00
Jonathan Cran c9ab8f248d commit the rest of chao's patch :/
git-svn-id: file:///home/svn/framework3/trunk@12412 4d416f70-5f16-0410-b530-b9f4589650da
2011-04-23 01:10:49 +00:00
Jonathan Cran 0437d20f9d Commit railgun tests from chao-mu: http://blog.minorcrash.com/2011/04/railgun-update-1st-milestone-almost.html
~/framework$ ruby lib/rex/post/meterpreter/extensions/stdapi/railgun.rb.ts.rb 
Loaded suite lib/rex/post/meterpreter/extensions/stdapi/railgun.rb.ts
Started
.............
Finished in 8.804126009 seconds.
13 tests, 30 assertions, 0 failures, 0 errors






git-svn-id: file:///home/svn/framework3/trunk@12366 4d416f70-5f16-0410-b530-b9f4589650da
2011-04-19 14:15:45 +00:00
HD Moore 1b63d36c85 Fix typo reported by mubix
git-svn-id: file:///home/svn/framework3/trunk@12346 4d416f70-5f16-0410-b530-b9f4589650da
2011-04-18 04:40:06 +00:00
Mario Ceballos 1d0d6195bd fixes a load error
git-svn-id: file:///home/svn/framework3/trunk@12344 4d416f70-5f16-0410-b530-b9f4589650da
2011-04-17 02:08:42 +00:00
James Lee c14580adf3 add help for several meterp commands and allow the channel command to do everything the associated with channels (list, interact, read, write, close)
git-svn-id: file:///home/svn/framework3/trunk@12341 4d416f70-5f16-0410-b530-b9f4589650da
2011-04-17 00:34:45 +00:00
James Lee 9c1b4ddca5 add a load command. this will later deprecate the use command under meterpreter for 3.7 release
git-svn-id: file:///home/svn/framework3/trunk@12334 4d416f70-5f16-0410-b530-b9f4589650da
2011-04-16 13:59:57 +00:00
James Lee d294f511b6 add logging for interactive meterpreter channels
git-svn-id: file:///home/svn/framework3/trunk@12328 4d416f70-5f16-0410-b530-b9f4589650da
2011-04-15 21:10:15 +00:00
HD Moore 50155919ea Add File.exists? as a wrapper to File.stat
git-svn-id: file:///home/svn/framework3/trunk@12324 4d416f70-5f16-0410-b530-b9f4589650da
2011-04-15 15:29:57 +00:00
Carlos Perez 904e7af88b added API call for extracting keystrokes from client.ui.keyscan_dump
git-svn-id: file:///home/svn/framework3/trunk@12323 4d416f70-5f16-0410-b530-b9f4589650da
2011-04-15 02:21:40 +00:00
James Lee f43fe6e31b clarify the help for getprivs
git-svn-id: file:///home/svn/framework3/trunk@12309 4d416f70-5f16-0410-b530-b9f4589650da
2011-04-13 16:01:40 +00:00
James Lee 05e47166a3 push the check for msf up to the main meterpreter command dispatcher and fire events for file upload/download.
git-svn-id: file:///home/svn/framework3/trunk@12307 4d416f70-5f16-0410-b530-b9f4589650da
2011-04-12 20:39:46 +00:00
Jonathan Cran 3c6b33bd80 continuation of tests / fixes from chao.
git-svn-id: file:///home/svn/framework3/trunk@12155 4d416f70-5f16-0410-b530-b9f4589650da
2011-03-27 00:37:54 +00:00
Jonathan Cran d18f14de4e add a test suite for railgun
git-svn-id: file:///home/svn/framework3/trunk@12152 4d416f70-5f16-0410-b530-b9f4589650da
2011-03-26 19:49:08 +00:00
Jonathan Cran 35c33020ca merge in test updates from chao-mu
git-svn-id: file:///home/svn/framework3/trunk@12150 4d416f70-5f16-0410-b530-b9f4589650da
2011-03-26 19:29:59 +00:00
Jonathan Cran 4892a67fa1 small tweaks, remove model - no longer necessary
git-svn-id: file:///home/svn/framework3/trunk@12143 4d416f70-5f16-0410-b530-b9f4589650da
2011-03-26 00:46:55 +00:00
James Lee cf3fbdad71 unneeded require in comments
git-svn-id: file:///home/svn/framework3/trunk@12142 4d416f70-5f16-0410-b530-b9f4589650da
2011-03-26 00:45:52 +00:00
Jonathan Cran 50d573f282 doh! commit the rest of chao's railgun work
git-svn-id: file:///home/svn/framework3/trunk@12141 4d416f70-5f16-0410-b530-b9f4589650da
2011-03-26 00:33:05 +00:00
Jonathan Cran 29061c5799 merge in chao-mu's changes. all tests passing :)
git-svn-id: file:///home/svn/framework3/trunk@12138 4d416f70-5f16-0410-b530-b9f4589650da
2011-03-25 21:16:41 +00:00
James Lee 3527aa2472 correct width calculation for sysinfo
git-svn-id: file:///home/svn/framework3/trunk@12057 4d416f70-5f16-0410-b530-b9f4589650da
2011-03-21 16:58:24 +00:00
Carlos Perez b5bd7599fd Updated usage message to reflect that more than one resource file can be used
git-svn-id: file:///home/svn/framework3/trunk@12017 4d416f70-5f16-0410-b530-b9f4589650da
2011-03-18 02:47:58 +00:00
Carlos Perez 3416862f13 Resource command for Meterpreter Sessions
git-svn-id: file:///home/svn/framework3/trunk@12016 4d416f70-5f16-0410-b530-b9f4589650da
2011-03-18 02:44:15 +00:00
James Lee dbcb02b8de future-proof the sysinfo command by generically looping over the values returned by the server instead of hardcoding keys
git-svn-id: file:///home/svn/framework3/trunk@11925 4d416f70-5f16-0410-b530-b9f4589650da
2011-03-10 17:23:47 +00:00
James Lee 5db118fa9b add support for reading various WinAPI data structures, thanks, chao-mu! fixes #3721
git-svn-id: file:///home/svn/framework3/trunk@11778 4d416f70-5f16-0410-b530-b9f4589650da
2011-02-18 19:23:36 +00:00
James Lee 64529011a0 add the meterpreter platform to the output of sysinfo command
git-svn-id: file:///home/svn/framework3/trunk@11772 4d416f70-5f16-0410-b530-b9f4589650da
2011-02-18 00:29:43 +00:00
James Lee f8c2fa6b72 aesthetic
git-svn-id: file:///home/svn/framework3/trunk@11771 4d416f70-5f16-0410-b530-b9f4589650da
2011-02-18 00:25:36 +00:00
James Lee d6b8ef4c16 don't show meta type for packets (since they don't have one)
git-svn-id: file:///home/svn/framework3/trunk@11768 4d416f70-5f16-0410-b530-b9f4589650da
2011-02-17 20:04:46 +00:00
James Lee b7d1ccb304 add packet-type to meterpreter packets' inspect
git-svn-id: file:///home/svn/framework3/trunk@11767 4d416f70-5f16-0410-b530-b9f4589650da
2011-02-17 19:59:12 +00:00
James Lee e8e0841afc don't error out if we previously loaded the client extension
git-svn-id: file:///home/svn/framework3/trunk@11763 4d416f70-5f16-0410-b530-b9f4589650da
2011-02-17 04:32:26 +00:00
James Lee b56f6293a3 stupid debugging
git-svn-id: file:///home/svn/framework3/trunk@11760 4d416f70-5f16-0410-b530-b9f4589650da
2011-02-17 02:09:32 +00:00
James Lee 24f37e25de add a search path for client extensions
git-svn-id: file:///home/svn/framework3/trunk@11758 4d416f70-5f16-0410-b530-b9f4589650da
2011-02-16 21:13:44 +00:00
James Lee 257fe9d47c add more descriptive usage for meterpreter run command
git-svn-id: file:///home/svn/framework3/trunk@11751 4d416f70-5f16-0410-b530-b9f4589650da
2011-02-15 22:34:46 +00:00
James Lee 648214cad2 make help work the same in meterpreter as main console
git-svn-id: file:///home/svn/framework3/trunk@11690 4d416f70-5f16-0410-b530-b9f4589650da
2011-02-01 01:20:55 +00:00
James Lee 13f7ad406a make it more obvious when portfwd usage is wrong, add a help cmd for it
git-svn-id: file:///home/svn/framework3/trunk@11689 4d416f70-5f16-0410-b530-b9f4589650da
2011-02-01 01:14:25 +00:00
James Lee 8da92a7bb9 don't bomb out when given no args or an invalid module for the info command, fixes #3558, thanks chao-mu for the patch!
git-svn-id: file:///home/svn/framework3/trunk@11672 4d416f70-5f16-0410-b530-b9f4589650da
2011-01-29 18:07:30 +00:00
James Lee 05022b6fe4 client.framework, there's no top-level framework obj in rex. see #3557
git-svn-id: file:///home/svn/framework3/trunk@11670 4d416f70-5f16-0410-b530-b9f4589650da
2011-01-29 16:46:41 +00:00
James Lee 88a5b1982e always reload post modules when run from meterpreter prompt, fail and error out instead of running the old one when a reload fails. Fixes #3557
git-svn-id: file:///home/svn/framework3/trunk@11659 4d416f70-5f16-0410-b530-b9f4589650da
2011-01-28 17:02:26 +00:00
Carlos Perez 05fd7b4e57 Patch for railgun and post mixin; and module from cha-mou to add capability to delete users on windows hosts.
git-svn-id: file:///home/svn/framework3/trunk@11638 4d416f70-5f16-0410-b530-b9f4589650da
2011-01-25 13:02:35 +00:00
HD Moore 3794ed35cc Apply patches from Matthew Weeks (scriptjunkie) to fix traversal flaws outlined in his Black Hat DC talk:
https://media.blackhat.com/bh-dc-11/Weeks/BlackHat_DC_2011_Weeks_Counterattack-wp.pdf
https://media.blackhat.com/bh-dc-11/Weeks/BlackHat_DC_2011_Weeks_Counterattack-Slides.pdf



git-svn-id: file:///home/svn/framework3/trunk@11636 4d416f70-5f16-0410-b530-b9f4589650da
2011-01-25 02:24:37 +00:00
Joshua Drake 3346a30023 See #1936, Add FreeSid definition and convert several PSID* out params to PDWORD
git-svn-id: file:///home/svn/framework3/trunk@11628 4d416f70-5f16-0410-b530-b9f4589650da
2011-01-24 05:36:38 +00:00
Tod Beardsley 8b5f0f6559 Allow getsystem to report its success as a host note.
git-svn-id: file:///home/svn/framework3/trunk@11622 4d416f70-5f16-0410-b530-b9f4589650da
2011-01-22 00:08:35 +00:00
Joshua Drake b8b3d9e00f See #1936, Apply patch from Chao Mu - PSID is kind of opaque, so we treat it as a pointer only (not a blob)
git-svn-id: file:///home/svn/framework3/trunk@11618 4d416f70-5f16-0410-b530-b9f4589650da
2011-01-21 22:05:28 +00:00
Joshua Drake 987ce12ba8 Fixes #3552, add ConvertStringSidtoSid
git-svn-id: file:///home/svn/framework3/trunk@11604 4d416f70-5f16-0410-b530-b9f4589650da
2011-01-19 23:15:42 +00:00
James Lee d120892e7c post modules working for shell sessions, fixes #3541
git-svn-id: file:///home/svn/framework3/trunk@11599 4d416f70-5f16-0410-b530-b9f4589650da
2011-01-19 02:24:21 +00:00
James Lee 0158cd28f1 tab complete local filenames for upload command
git-svn-id: file:///home/svn/framework3/trunk@11575 4d416f70-5f16-0410-b530-b9f4589650da
2011-01-13 20:22:13 +00:00
James Lee 7226a43bea move tab completion helpers up to ShellDispatcher to avoid copy-paste and allow non-msf shells to complete filenames
git-svn-id: file:///home/svn/framework3/trunk@11562 4d416f70-5f16-0410-b530-b9f4589650da
2011-01-12 22:09:32 +00:00
Joshua Drake 855f8b0752 fix more silly tab completion behavior
git-svn-id: file:///home/svn/framework3/trunk@11546 4d416f70-5f16-0410-b530-b9f4589650da
2011-01-11 18:55:37 +00:00
James Lee 87cdaa4ea5 add an info command + tab completion for post modules. fixes #3478
git-svn-id: file:///home/svn/framework3/trunk@11534 4d416f70-5f16-0410-b530-b9f4589650da
2011-01-10 18:37:23 +00:00
James Lee eb4ae0e5b7 add tab-completion for post modules in the meterpreter run command
git-svn-id: file:///home/svn/framework3/trunk@11498 4d416f70-5f16-0410-b530-b9f4589650da
2011-01-06 22:16:24 +00:00
James Lee dbeae8df24 add support for running post modules from the meterpreter prompt. options are set in the same way as the -o arg to run, e.g. run post/escalate/bypassuac LHOST=192.168.0.1
git-svn-id: file:///home/svn/framework3/trunk@11496 4d416f70-5f16-0410-b530-b9f4589650da
2011-01-06 21:28:00 +00:00
Tod Beardsley 925e4a66f0 See #3371. Uncommits the database logging of smb_hash credentials.
This kind of meterpreter update may not actually be desirable, given the introduction of a dependency on Metasploit Framework in to the stand-alone Rex library.

#3371 will remain open until this debate is resolved. In the meantime, need to back this out. :/



git-svn-id: file:///home/svn/framework3/trunk@11351 4d416f70-5f16-0410-b530-b9f4589650da
2010-12-16 16:53:28 +00:00
Carlos Perez 9627194330 Hashdump will now save found credentials to the database.
git-svn-id: file:///home/svn/framework3/trunk@11347 4d416f70-5f16-0410-b530-b9f4589650da
2010-12-16 02:42:45 +00:00
HD Moore 2192d06189 Handle cases where the class has already been loaded
git-svn-id: file:///home/svn/framework3/trunk@11242 4d416f70-5f16-0410-b530-b9f4589650da
2010-12-07 13:45:49 +00:00
Matt Weeks 2e72926638 Add audio (microphone) recording support to stdapi.
git-svn-id: file:///home/svn/framework3/trunk@11087 4d416f70-5f16-0410-b530-b9f4589650da
2010-11-22 00:32:39 +00:00
Matt Weeks 9d0cf722fa Spelling!
git-svn-id: file:///home/svn/framework3/trunk@11042 4d416f70-5f16-0410-b530-b9f4589650da
2010-11-14 20:00:52 +00:00
HD Moore a12d9f8dbf This patch adds detailed thread tracking across the metasploit framework, along with a new console command (threads) to manage these. This level of tracking is required to accurately monitor background tasks, assist with debugging, and kill orphaned threads.
git-svn-id: file:///home/svn/framework3/trunk@11003 4d416f70-5f16-0410-b530-b9f4589650da
2010-11-12 06:19:49 +00:00
Carlos Perez b171d5192e Changes to handle errors and to output print
git-svn-id: file:///home/svn/framework3/trunk@11001 4d416f70-5f16-0410-b530-b9f4589650da
2010-11-12 01:27:15 +00:00
Matt Weeks 594a46bfc7 Merge webcam extension into stdapi.
git-svn-id: file:///home/svn/framework3/trunk@10997 4d416f70-5f16-0410-b530-b9f4589650da
2010-11-11 22:36:54 +00:00
HD Moore 8afc9ebb41 Revert, this is causing threading issues with Windows.
git-svn-id: file:///home/svn/framework3/trunk@10989 4d416f70-5f16-0410-b530-b9f4589650da
2010-11-11 19:54:27 +00:00
Carlos Perez 3edccbc118 fix help message
git-svn-id: file:///home/svn/framework3/trunk@10986 4d416f70-5f16-0410-b530-b9f4589650da
2010-11-11 16:55:36 +00:00
Matt Weeks db602dd478 Add functional in-memory webcam support.
git-svn-id: file:///home/svn/framework3/trunk@10954 4d416f70-5f16-0410-b530-b9f4589650da
2010-11-09 02:24:28 +00:00
HD Moore 97d7290440 Fix an inadvertant change to close_key()
git-svn-id: file:///home/svn/framework3/trunk@10878 4d416f70-5f16-0410-b530-b9f4589650da
2010-11-03 04:20:42 +00:00
HD Moore 1e4eed0559 Let recursive downloads skip over locked files
git-svn-id: file:///home/svn/framework3/trunk@10877 4d416f70-5f16-0410-b530-b9f4589650da
2010-11-03 03:16:23 +00:00
HD Moore fba2cb6d2d Remove the response wait for close calls triggered by the finalizer, should help in a few corner cases that currently result in a timeout or hang.
git-svn-id: file:///home/svn/framework3/trunk@10876 4d416f70-5f16-0410-b530-b9f4589650da
2010-11-03 03:03:29 +00:00
James Lee 2dbf731946 fix ArgumentError in everything that closes a process handle
git-svn-id: file:///home/svn/framework3/trunk@10776 4d416f70-5f16-0410-b530-b9f4589650da
2010-10-21 17:10:46 +00:00
HD Moore 0e04505232 Fixes #3027, a set of bugs introduced during the meterpreter posix work.
git-svn-id: file:///home/svn/framework3/trunk@10773 4d416f70-5f16-0410-b530-b9f4589650da
2010-10-21 04:43:54 +00:00
HD Moore 9d99bf1039 Store the original error code in the RequestError object as well, use this code to determine whether to raise a connect error or not
git-svn-id: file:///home/svn/framework3/trunk@10759 4d416f70-5f16-0410-b530-b9f4589650da
2010-10-20 01:05:50 +00:00
HD Moore 3e09fc30ae Fixes #2070 by adding finalizers to process, event, thread, registry, and channels.
git-svn-id: file:///home/svn/framework3/trunk@10711 4d416f70-5f16-0410-b530-b9f4589650da
2010-10-16 19:39:11 +00:00
HD Moore 0b82de4846 Force binmode for Tempfile use to prevent issues with Windows
git-svn-id: file:///home/svn/framework3/trunk@10650 4d416f70-5f16-0410-b530-b9f4589650da
2010-10-12 01:48:42 +00:00
Joshua Drake e408d5a155 add windows error messages for windows meterpreter sessions, minor cleanups
git-svn-id: file:///home/svn/framework3/trunk@10605 4d416f70-5f16-0410-b530-b9f4589650da
2010-10-08 19:36:34 +00:00
HD Moore 41183d3395 Bump the packet queue timeout as well (10 minutes), which should handle even the worst lag
git-svn-id: file:///home/svn/framework3/trunk@10598 4d416f70-5f16-0410-b530-b9f4589650da
2010-10-08 05:00:03 +00:00
HD Moore 2e9138ebbc This commit overhauls much of the meterpreter timeouts and staging processes. This fixes a bug with concurrent session handling, reduces CPU load by caching a single SSL certificate for all sessions, increases all of the critical timeouts, and generally makes mass ownage work better. We still need to limit the maximum number of concurrent on_session() threads to something sane to prevent sesssion spikes from dragging out the process even longer. The C-side meterpreter change is minimal and will only help with future compatibility if we move to non-blocking fd's for the SSL socket.
git-svn-id: file:///home/svn/framework3/trunk@10595 4d416f70-5f16-0410-b530-b9f4589650da
2010-10-08 04:11:47 +00:00
pks 754225a80d Implement per dispatch run channel_write of packets, remove __FUNCTION__ due to dprintf changes, and fix shutting down networkpug interfaces. Re-add networkpug binary.
git-svn-id: file:///home/svn/framework3/trunk@10586 4d416f70-5f16-0410-b530-b9f4589650da
2010-10-07 11:52:38 +00:00
Tod Beardsley 4e7e69f768 Avoid GC issue with Tempfiles in meterpreter's command dispatcher.
git-svn-id: file:///home/svn/framework3/trunk@10567 4d416f70-5f16-0410-b530-b9f4589650da
2010-10-06 17:26:33 +00:00
pks 14cabd2611 Allow debugging to be enabled.
This will make it easier to hopefully track down bugs.

exploitme-posix.c - make complete stack executable. On some kernel versions, execstack doesn't do the trick.

git-svn-id: file:///home/svn/framework3/trunk@10485 4d416f70-5f16-0410-b530-b9f4589650da
2010-09-26 05:58:59 +00:00
pks 784e355d93 Networkpug improvements
git-svn-id: file:///home/svn/framework3/trunk@10484 4d416f70-5f16-0410-b530-b9f4589650da
2010-09-26 05:58:48 +00:00
HD Moore cdc97316b5 Automatically close dead sessions (finally), also, automatically mark meterpreter sessions as dead when writes start to trigger exceptions
git-svn-id: file:///home/svn/framework3/trunk@10475 4d416f70-5f16-0410-b530-b9f4589650da
2010-09-25 03:57:30 +00:00
James Lee 54c1ec843d tab complete on scripts in ~/.msf3/scripts/meterpreter/ as well. fixes #2403
git-svn-id: file:///home/svn/framework3/trunk@10468 4d416f70-5f16-0410-b530-b9f4589650da
2010-09-24 23:05:10 +00:00
pks 50241faa57 Implement a sniffer for posix meterpreter using libpcap.
This version of the sniffer supports packet filtering after the packet count variable, like so:

meterpreter > sniffer_interfaces

1 - 'eth0' ( type:0 mtu:1514 usable:false dhcp:false wifi:false )
2 - 'any' ( type:0 mtu:1514 usable:false dhcp:false wifi:false )
3 - 'lo' ( type:0 mtu:1514 usable:false dhcp:false wifi:false )

meterpreter > use sniffer
Loading extension sniffer...success.
meterpreter > sniffer_start 1 500000 icmp <-- picks up only icmp packets.
[*] Capture started on interface 1 (500000 packet buffer)
meterpreter > sniffer_stop 1
[*] Capture stopped on interface 1

git-svn-id: file:///home/svn/framework3/trunk@10424 4d416f70-5f16-0410-b530-b9f4589650da
2010-09-21 11:43:30 +00:00
pks a179836fca Initial import of networkpug, a pivoting interface using libpcap to monitor/inject packets on a interface on the remote machine.
git-svn-id: file:///home/svn/framework3/trunk@10423 4d416f70-5f16-0410-b530-b9f4589650da
2010-09-21 09:35:46 +00:00
HD Moore 21d734201a Closes #2520. Merges Rob's patch to check admin privs on start
git-svn-id: file:///home/svn/framework3/trunk@10341 4d416f70-5f16-0410-b530-b9f4589650da
2010-09-16 21:44:25 +00:00
Stephen Fewer 6f4eaeb8e3 Delete the ruby side railgun meterpreter extension and add in the new stdapi railgun stuff. Railgun with stdapi works the same (e.g. just use client.railgun.user32.MesageBoxA(...) ). The module definitions are lazy loaded on demand to avoid the performance hit if we load them all at once when stdapi is initially loaded.
git-svn-id: file:///home/svn/framework3/trunk@10319 4d416f70-5f16-0410-b530-b9f4589650da
2010-09-14 23:28:52 +00:00
Stephen Fewer e85b8adcf8 Add Ruby side meterpreter packet support for QWORD Tlv's.
git-svn-id: file:///home/svn/framework3/trunk@10318 4d416f70-5f16-0410-b530-b9f4589650da
2010-09-14 23:23:15 +00:00
HD Moore 792285cb87 Clean up monitor threads
git-svn-id: file:///home/svn/framework3/trunk@10309 4d416f70-5f16-0410-b530-b9f4589650da
2010-09-13 21:07:02 +00:00
HD Moore 778132ad02 Remove the select spin loop in favor of a thread.join
git-svn-id: file:///home/svn/framework3/trunk@10308 4d416f70-5f16-0410-b530-b9f4589650da
2010-09-13 20:57:38 +00:00
Stephen Fewer a0f86c62e3 Meterpreter search support to leverage the index on older systems (2000/XP/2003) via Windows Desktop Search v2.
git-svn-id: file:///home/svn/framework3/trunk@10187 4d416f70-5f16-0410-b530-b9f4589650da
2010-08-30 09:50:41 +00:00
Joshua Drake 6d333eb185 style compliance fixes
git-svn-id: file:///home/svn/framework3/trunk@10173 4d416f70-5f16-0410-b530-b9f4589650da
2010-08-27 21:26:59 +00:00
Stephen Fewer fbf64adf2a Commit the ruby side for meterpreter file search. If available, will leverage Windows Search to speed up searching an indexed directory. Examples of usage as follows:
Find all .PDF files on the host system:
    meterpreter>search *.pdf

Find all files on bob's desktop:
    meterpreter>search -d 'c:\users\bob\desktop' -f *

Find all files in the root drive c: but don't search subdirectories:
    meterpreter>search -d c: -r false -f *

If Windows Search is available (Vista and above by default, XP/2003 by addon) we can also search any indexed IE history and indexed email
    meterpreter>search -d iehistory -f *
    meterpreter>search -d mapi -f *


git-svn-id: file:///home/svn/framework3/trunk@10167 4d416f70-5f16-0410-b530-b9f4589650da
2010-08-27 14:59:38 +00:00
Stephen Fewer a9a4e3f2da Add meterpreter client side support for cleaning up loaded extensions upon server termination by calling the loaded extensions cleanup() method if available.
git-svn-id: file:///home/svn/framework3/trunk@10055 4d416f70-5f16-0410-b530-b9f4589650da
2010-08-19 11:37:22 +00:00
Jonathan Cran 10c2bfb64e added validation for the meterpreter route command - thanks robin for pointing it out
git-svn-id: file:///home/svn/framework3/trunk@9993 4d416f70-5f16-0410-b530-b9f4589650da
2010-08-13 06:12:05 +00:00
Carlos Perez 1ae81367ac Forgot, TABS not spaces for indent
git-svn-id: file:///home/svn/framework3/trunk@9921 4d416f70-5f16-0410-b530-b9f4589650da
2010-07-25 01:54:29 +00:00
Carlos Perez d279123b77 Added functions for managing services in the railgun api and created new calls to use this functions for starting, stopping and creating services, Thanks to Scriptjunkie for the calls and example code that I used to base the mixin calls on
git-svn-id: file:///home/svn/framework3/trunk@9920 4d416f70-5f16-0410-b530-b9f4589650da
2010-07-25 01:32:50 +00:00
HD Moore e765553d26 Fix BufferItem references
git-svn-id: file:///home/svn/framework3/trunk@9811 4d416f70-5f16-0410-b530-b9f4589650da
2010-07-13 19:34:32 +00:00
HD Moore 9d859e4dce Implements the client side of multi-call railgun
git-svn-id: file:///home/svn/framework3/trunk@9807 4d416f70-5f16-0410-b530-b9f4589650da
2010-07-13 19:19:36 +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 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
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
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
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
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
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
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
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
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 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
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
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 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 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
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
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
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
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
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
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
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
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
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 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
Stephen Fewer 47b08fa6ef simple patch to get all privileges after a successful getsystem
git-svn-id: file:///home/svn/framework3/trunk@8321 4d416f70-5f16-0410-b530-b9f4589650da
2010-01-29 11:04:24 +00:00
Stephen Fewer 77da632e61 update the ruby side.
git-svn-id: file:///home/svn/framework3/trunk@8319 4d416f70-5f16-0410-b530-b9f4589650da
2010-01-29 01:13:28 +00:00
James Lee c396129d41 add a liveness test to meterpreter, fixes 698
git-svn-id: file:///home/svn/framework3/trunk@8314 4d416f70-5f16-0410-b530-b9f4589650da
2010-01-28 23:53:15 +00:00
Stephen Fewer b36fe815f3 Add in the ruby side for the priv extensions getsystem command.
git-svn-id: file:///home/svn/framework3/trunk@8296 4d416f70-5f16-0410-b530-b9f4589650da
2010-01-28 13:55:19 +00:00
James Lee cdaeb27933 spaces -> tabs
git-svn-id: file:///home/svn/framework3/trunk@8232 4d416f70-5f16-0410-b530-b9f4589650da
2010-01-26 00:01:55 +00:00
Stephen Fewer b7fb95b302 fix for ps bug on OSX
git-svn-id: file:///home/svn/framework3/trunk@8220 4d416f70-5f16-0410-b530-b9f4589650da
2010-01-25 10:49:51 +00:00
Stephen Fewer 651fd5e834 fix for ps bug where the wrong arch was sometimes defaulted to if no arch was returned.
git-svn-id: file:///home/svn/framework3/trunk@8211 4d416f70-5f16-0410-b530-b9f4589650da
2010-01-23 16:50:44 +00:00
James Lee 7e5ad7bfa3 log more info about script failures
git-svn-id: file:///home/svn/framework3/trunk@8205 4d416f70-5f16-0410-b530-b9f4589650da
2010-01-22 23:09:41 +00:00
Stephen Fewer 7b34b46b68 Commit the ruby side for the meterpreter migration overhaul.
git-svn-id: file:///home/svn/framework3/trunk@8199 4d416f70-5f16-0410-b530-b9f4589650da
2010-01-22 19:47:36 +00:00
Stephen Fewer 538d44aa8d commit the changes on the ruby side for new ps command. We now get the process architecture and parent pid (when possible) of each process.
git-svn-id: file:///home/svn/framework3/trunk@8157 4d416f70-5f16-0410-b530-b9f4589650da
2010-01-19 10:47:01 +00:00
HD Moore 6e45d1e32f Sort by creation order vs pid
git-svn-id: file:///home/svn/framework3/trunk@8059 4d416f70-5f16-0410-b530-b9f4589650da
2010-01-02 11:35:57 +00:00
HD Moore 1623b59a0c Decrease indents to save screen space
git-svn-id: file:///home/svn/framework3/trunk@8058 4d416f70-5f16-0410-b530-b9f4589650da
2010-01-02 11:28:43 +00:00
HD Moore 42b3a5774d Adds the process username to the ps output (when possible).
git-svn-id: file:///home/svn/framework3/trunk@8056 4d416f70-5f16-0410-b530-b9f4589650da
2010-01-02 03:41:21 +00:00
HD Moore 4d7aec7c2d Fixes #745. This commit changes how token manipulation works, adds the steal_token, drop_token, and getprivs commands. Tested on NT 4.0, 2000 SP4, XP SP3, 2003 SP2, Vista, and Windows 7
git-svn-id: file:///home/svn/framework3/trunk@8055 4d416f70-5f16-0410-b530-b9f4589650da
2010-01-02 00:35:10 +00:00
HD Moore 98f83bbab1 Adds reg queryclass
git-svn-id: file:///home/svn/framework3/trunk@8046 4d416f70-5f16-0410-b530-b9f4589650da
2009-12-31 15:52:30 +00:00
Joshua Drake 2283e029db crossing fingers, big cr removal batch
git-svn-id: file:///home/svn/framework3/trunk@8038 4d416f70-5f16-0410-b530-b9f4589650da
2009-12-30 22:24:22 +00:00
HD Moore e731426666 Fixes #662. The socket pivoting is still not perfect, but this goes a long way
git-svn-id: file:///home/svn/framework3/trunk@7792 4d416f70-5f16-0410-b530-b9f4589650da
2009-12-10 05:40:26 +00:00
HD Moore 54c10c0c3d Fixes #623 and fixes #622, implements a number of changes to the core channel dispatch code, sets timeouts on unmatched responses, and handles tcp relay writes with a threaded/timeout wrapper to avoid delays.
git-svn-id: file:///home/svn/framework3/trunk@7753 4d416f70-5f16-0410-b530-b9f4589650da
2009-12-08 18:32:26 +00:00
Stephen Fewer 4fb212b54e Go back to using select instead of sleep for the waiters.
git-svn-id: file:///home/svn/framework3/trunk@7729 4d416f70-5f16-0410-b530-b9f4589650da
2009-12-07 12:55:31 +00:00