Commit Graph

51 Commits

Author SHA1 Message Date
Brent Cook 90766ceceb remove more unusual raise RuntimeError patterns 2017-11-01 05:59:12 -05:00
Brent Cook f69b4a330e handle Ruby 2.4 Fixnum/Bignum -> Integer deprecations 2017-01-22 10:20:03 -06:00
root 0dd987d873 Updated as per jlee-r7 feedback 2015-04-03 10:17:54 +05:00
root 4ba761986f Correct YARD doc comments 2015-04-02 16:14:25 +05:00
Meatballs d2bc0baa87 Merge remote-tracking branch 'upstream/master' into extapi_service_post
Conflicts:
	lib/msf/core/post/windows/services.rb
2014-08-24 19:46:19 +01:00
HD Moore c9b6c05eab Fix improper use of host-endian or signed pack/unpack
Note that there are some cases of host-endian left, these
are intentional because they operate on host-local memory
or services.

When in doubt, please use:

```
ri pack
```
2014-06-30 02:50:10 -05:00
James Lee 4c557a1401 Add Post::Windows::Services#each_service
Also cleans up some style issues and adds yardoc comments for some stuff
in Post::File

Note that windows/local/service_permissions is still using
`service_list` because it now builds a Rex::Table, which has to have
all the data up front, anyway.
2014-02-18 18:24:23 -06:00
Meatballs d0031c2ffa change_startup can now be run remotely 2014-01-03 16:25:15 +00:00
Meatballs 22163a5096 Tidy change_startup 2014-01-03 16:02:10 +00:00
Meatballs 9028060f7d Refactor service_create 2014-01-03 15:44:59 +00:00
Meatballs 1dacab6c03 service_restart should allow start_type to be defined 2013-12-18 12:17:24 +00:00
Meatballs 42bc5ab75f Use Services calls in enable_rdp
Update calls to change_service_config to check success
2013-12-18 11:34:12 +00:00
Meatballs 67cb5dad27 Fixes after testing 2013-12-17 23:47:58 +00:00
Meatballs 067e6d89bb Use service_restart in IKEEXT and ServicePermissions
Service_restart is aggressive so should attempt to leave as Auto
2013-12-17 17:21:35 +00:00
Meatballs ba335d6c91 Update Service Tests
And small fixes
2013-12-17 14:03:19 +00:00
Meatballs 70caacd631 Corrections to service_handle 2013-12-17 12:21:20 +00:00
Meatballs ca90815fb3 Ensure all handles are closed
And stop repeating the adv definition
2013-12-17 12:15:59 +00:00
Meatballs a33721f444 service_change_config keys should match extapi 2013-12-17 01:48:09 +00:00
Meatballs 484bf2f8fc close_service_handle 2013-12-17 01:02:35 +00:00
Meatballs 560080fa21 Update start_service return value
Add service_restart
2013-12-17 00:43:35 +00:00
Meatballs f39bc0b07a Update service_stop return 2013-12-17 00:22:37 +00:00
Meatballs f58a26033a Add missing underscore 2013-12-17 00:10:15 +00:00
Meatballs 45a03cc805 Use Error mixin 2013-12-17 00:03:10 +00:00
Meatballs 2fafdcbb89 Use railgun string constants
Remove unnecessary constants
Bit of tidying
2013-12-16 23:59:51 +00:00
Meatballs fd19881433 Docs 2013-12-16 19:39:36 +00:00
Meatballs 5be9622782 Tidy and constants 2013-12-16 18:35:24 +00:00
Meatballs c97e8d3817 Return hash for service_info and use ErrorMessage 2013-12-15 17:59:57 +00:00
Meatballs d9ce80d4d0 Add service_change_config 2013-12-15 04:00:27 +00:00
Meatballs ddf23ae8e8 Refactor service_list to return array of hashes
Update trusted_service_path, service_permissions,
net_runtime_modify and enum_services to handle change.

Refactor enum_services to tidy it up a bit
2013-12-15 03:00:29 +00:00
Meatballs 6763d1fbd8 Refactor services for extapi 2013-12-15 02:09:25 +00:00
Meatballs 77dd7ec290 Include ExtAPI Mixin
Move ExtAPI above services require
2013-12-15 01:32:58 +00:00
Meatballs 819ba30a33 msftidy
Conflicts:
	lib/msf/core/post/windows/services.rb
2013-12-15 01:12:46 +00:00
Meatballs a930056d7f Added service status checks to Post::Windows::Services
Added QueryServiceStatus to Railgun Advapi32 Definitions
Added Checks to module

Conflicts:
	lib/msf/core/post/windows/services.rb
	lib/rex/post/meterpreter/extensions/stdapi/railgun/def/def_advapi32.rb
2013-12-15 01:12:45 +00:00
Tab Assassin 7e5e0f7fc8 Retab lib 2013-08-30 16:28:33 -05:00
Tod Beardsley 7e539332db Reverting disaster merge to 593363c5f with diff
There was a disaster of a merge at 6f37cf22eb that is particularly
difficult to untangle (it was a bad merge from a long-running local
branch).

What this commit does is simulate a hard reset, by doing thing:

 git checkout -b reset-hard-ohmu
 git reset --hard 593363c5f9
 git checkout upstream-master
 git checkout -b revert-via-diff
 git diff --no-prefix upstream-master..reset-hard-ohmy > patch
 patch -p0 < patch

Since there was one binary change, also did this:

 git checkout upstream-master data/exploits/CVE-2012-1535/Main.swf

Now we have one commit that puts everything back. It screws up
file-level history a little, but it's at least at a point where we can
move on with our lives. Sorry.
2013-07-29 21:47:52 -05:00
Meatballs 2bfe8b3b29 msftidy 2013-07-05 22:35:22 +01:00
Meatballs 0ce3fe2e7c Added service status checks to Post::Windows::Services
Added QueryServiceStatus to Railgun Advapi32 Definitions
Added Checks to module
2013-07-05 22:25:04 +01:00
James Lee 7a6ccb92ab Unfubar the threading for #service_list
Also makes the test for service_start a little more resilient in case
W32Time is already started
2012-11-06 18:29:42 -06:00
James Lee 34bc92584b Refactor WindowsServices
* Pulls common code up from several methods into #open_sc_manager
* Deprecates the name Windows::WindowsServices in favor of
  Windows::Services. The platform is already clear from the namespace.
* Makes the post/test/services test module actually work

[See #1007]
[See #1012]
2012-11-06 17:30:04 -06:00
James Lee 46312d9035 Add a comment describing function prototype 2012-08-01 00:28:18 -06:00
HD Moore d656e3185f Mark all libraries as defaulting to 8-bit strings 2012-06-29 00:18:28 -05:00
James Lee 16f0d6cbee Fix a misplaced comma in a comment 2011-11-14 16:06:45 +11:00
James Lee 8ac4479b13 Use railgun for deleting services.
The registry method will make Windows to delete it on reboot, but this
causes it to happen right away.
2011-11-13 21:05:40 -07:00
James Lee f7ff350ebb doesn't work without backslashes 2011-11-12 15:15:09 -07:00
James Lee 07e170f4e4 Add a server argument to the service management methods. Allows
creating/starting/stopping services on another machine using the current
session's token for authentication.
2011-11-12 14:40:15 -07:00
Carlos Perez 6865c10662 Patch railgun entries for services
git-svn-id: file:///home/svn/framework3/trunk@13417 4d416f70-5f16-0410-b530-b9f4589650da
2011-07-30 03:26:22 +00:00
Carlos Perez 68e3691411 Change Post Mixin for Windows platform in its own separate class and minor fixes on modules and scripts
git-svn-id: file:///home/svn/framework3/trunk@12990 4d416f70-5f16-0410-b530-b9f4589650da
2011-06-21 00:38:04 +00:00
James Lee d7eecc9d67 make sure registry is there before including it, fixes #3806, fixes #3726
git-svn-id: file:///home/svn/framework3/trunk@11840 4d416f70-5f16-0410-b530-b9f4589650da
2011-02-26 23:52:28 +00:00
Matt Weeks eba4b05237 Make sure registry functions are always present (errors when rerunning post modules)
git-svn-id: file:///home/svn/framework3/trunk@11732 4d416f70-5f16-0410-b530-b9f4589650da
2011-02-09 02:41:22 +00:00
Carlos Perez 64c5393a10 Corrected mispelled word
git-svn-id: file:///home/svn/framework3/trunk@11702 4d416f70-5f16-0410-b530-b9f4589650da
2011-02-02 23:40:15 +00:00