Mirror of metasploit
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

windows_constants.rb 5.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. module Msf
  2. module Exploit::Windows_Constants
  3. ##
  4. #
  5. # Access Types
  6. # winnt.h
  7. #
  8. ##
  9. STANDARD_RIGHTS_REQUIRED = 0x000F0000
  10. ##
  11. #
  12. # SVCCTL Protocol Functions
  13. # http://msdn.microsoft.com/en-us/library/cc245920.aspxa
  14. #
  15. ##
  16. CLOSE_SERVICE_HANDLE = 0x00
  17. CONTROL_SERVICE = 0x01
  18. DELETE_SERVICE = 0x02
  19. QUERY_SERVICE_STATUS = 0x05
  20. CHANGE_SERVICE_CONFIG_W = 0x0b
  21. CREATE_SERVICE_W = 0x0c
  22. OPEN_SC_MANAGER_W = 0x0f
  23. OPEN_SERVICE_W = 0x10
  24. CHANGE_SERVICE_CONFIG2_W = 0x25
  25. ##
  26. #
  27. # Services
  28. # winsvc.h
  29. ##
  30. SERVICE_WIN32_OWN_PROCESS = 0x10
  31. SERVICE_INTERACTIVE_PROCESS = 0x100
  32. SERVICE_BOOT_START = 0x00
  33. SERVICE_SYSTEM_START = 0x01
  34. SERVICE_AUTO_START = 0x02
  35. SERVICE_DEMAND_START = 0x03
  36. SERVICE_DISABLED = 0x04
  37. SERVICE_ERROR_IGNORE = 0x0
  38. SERVICE_NO_CHANGE = 0xffffffff
  39. SERVICE_ACTIVE = 0x00000001
  40. SERVICE_INACTIVE = 0x00000002
  41. SERVICE_STATE_ALL = (SERVICE_ACTIVE |
  42. SERVICE_INACTIVE)
  43. SERVICE_CONTROL_STOP = 0x00000001
  44. SERVICE_CONTROL_PAUSE = 0x00000002
  45. SERVICE_CONTROL_CONTINUE = 0x00000003
  46. SERVICE_CONTROL_INTERROGATE = 0x00000004
  47. SERVICE_CONTROL_SHUTDOWN = 0x00000005
  48. SERVICE_CONTROL_PARAMCHANGE = 0x00000006
  49. SERVICE_CONTROL_NETBINDADD = 0x00000007
  50. SERVICE_CONTROL_NETBINDREMOVE = 0x00000008
  51. SERVICE_CONTROL_NETBINDENABLE = 0x00000009
  52. SERVICE_CONTROL_NETBINDDISABLE = 0x0000000A
  53. SERVICE_CONTROL_DEVICEEVENT = 0x0000000B
  54. SERVICE_CONTROL_HARDWAREPROFILECHANGE =0x0000000C
  55. SERVICE_CONTROL_POWEREVENT = 0x0000000D
  56. SERVICE_CONTROL_SESSIONCHANGE = 0x0000000E
  57. SERVICE_CONTROL_PRESHUTDOWN = 0x0000000F
  58. SERVICE_CONTROL_TIMECHANGE = 0x00000010
  59. SERVICE_CONTROL_TRIGGEREVENT = 0x00000020
  60. SERVICE_STOPPED = 0x00000001
  61. SERVICE_START_PENDING = 0x00000002
  62. SERVICE_STOP_PENDING = 0x00000003
  63. SERVICE_RUNNING = 0x00000004
  64. SERVICE_CONTINUE_PENDING = 0x00000005
  65. SERVICE_PAUSE_PENDING = 0x00000006
  66. SERVICE_PAUSED = 0x00000007
  67. SERVICE_ACCEPT_STOP = 0x00000001
  68. SERVICE_ACCEPT_PAUSE_CONTINUE = 0x00000002
  69. SERVICE_ACCEPT_SHUTDOWN = 0x00000004
  70. SERVICE_ACCEPT_PARAMCHANGE = 0x00000008
  71. SERVICE_ACCEPT_NETBINDCHANGE = 0x00000010
  72. SERVICE_ACCEPT_HARDWAREPROFILECHANGE = 0x00000020
  73. SERVICE_ACCEPT_POWEREVENT = 0x00000040
  74. SERVICE_ACCEPT_SESSIONCHANGE = 0x00000080
  75. SERVICE_ACCEPT_PRESHUTDOWN = 0x00000100
  76. SERVICE_ACCEPT_TIMECHANGE = 0x00000200
  77. SERVICE_ACCEPT_TRIGGEREVENT = 0x00000400
  78. SC_MANAGER_CONNECT = 0x0001
  79. SC_MANAGER_CREATE_SERVICE = 0x0002
  80. SC_MANAGER_ENUMERATE_SERVICE = 0x0004
  81. SC_MANAGER_LOCK = 0x0008
  82. SC_MANAGER_QUERY_LOCK_STATUS = 0x0010
  83. SC_MANAGER_MODIFY_BOOT_CONFIG = 0x0020
  84. SC_MANAGER_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED |
  85. SC_MANAGER_CONNECT |
  86. SC_MANAGER_CREATE_SERVICE |
  87. SC_MANAGER_ENUMERATE_SERVICE |
  88. SC_MANAGER_LOCK |
  89. SC_MANAGER_QUERY_LOCK_STATUS |
  90. SC_MANAGER_MODIFY_BOOT_CONFIG)
  91. SERVICE_QUERY_CONFIG = 0x0001
  92. SERVICE_CHANGE_CONFIG = 0x0002
  93. SERVICE_QUERY_STATUS = 0x0004
  94. SERVICE_ENUMERATE_DEPENDENTS = 0x0008
  95. SERVICE_START = 0x0010
  96. SERVICE_STOP = 0x0020
  97. SERVICE_PAUSE_CONTINUE = 0x0040
  98. SERVICE_INTERROGATE = 0x0080
  99. SERVICE_USER_DEFINED_CONTROL = 0x0100
  100. SERVICE_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED | \
  101. SERVICE_QUERY_CONFIG | \
  102. SERVICE_CHANGE_CONFIG | \
  103. SERVICE_QUERY_STATUS | \
  104. SERVICE_ENUMERATE_DEPENDENTS | \
  105. SERVICE_START | \
  106. SERVICE_STOP | \
  107. SERVICE_PAUSE_CONTINUE | \
  108. SERVICE_INTERROGATE | \
  109. SERVICE_USER_DEFINED_CONTROL)
  110. SERVICE_RUNS_IN_SYSTEM_PROCESS = 0x00000001
  111. SERVICE_CONFIG_DESCRIPTION = 1
  112. SERVICE_CONFIG_FAILURE_ACTIONS = 2
  113. SERVICE_CONFIG_DELAYED_AUTO_START_INFO = 3
  114. SERVICE_CONFIG_FAILURE_ACTIONS_FLAG = 4
  115. SERVICE_CONFIG_SERVICE_SID_INFO = 5
  116. SERVICE_CONFIG_REQUIRED_PRIVILEGES_INFO = 6
  117. SERVICE_CONFIG_PRESHUTDOWN_INFO = 7
  118. SERVICE_CONFIG_TRIGGER_INFO = 8
  119. SERVICE_CONFIG_PREFERRED_NODE = 9
  120. SERVICE_CONFIG_LAUNCH_PROTECTED = 12
  121. end
  122. end