metasploit-payloads 2.0.144 → 2.0.145

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/data/android/meterpreter.jar +0 -0
  4. data/data/android/metstage.jar +0 -0
  5. data/data/android/shell.jar +0 -0
  6. data/data/meterpreter/dump_sam.x64.debug.dll +0 -0
  7. data/data/meterpreter/dump_sam.x64.dll +0 -0
  8. data/data/meterpreter/dump_sam.x86.debug.dll +0 -0
  9. data/data/meterpreter/dump_sam.x86.dll +0 -0
  10. data/data/meterpreter/elevator.x64.debug.dll +0 -0
  11. data/data/meterpreter/elevator.x64.dll +0 -0
  12. data/data/meterpreter/elevator.x86.debug.dll +0 -0
  13. data/data/meterpreter/elevator.x86.dll +0 -0
  14. data/data/meterpreter/ext_server_bofloader.x64.debug.dll +0 -0
  15. data/data/meterpreter/ext_server_bofloader.x64.dll +0 -0
  16. data/data/meterpreter/ext_server_bofloader.x86.debug.dll +0 -0
  17. data/data/meterpreter/ext_server_bofloader.x86.dll +0 -0
  18. data/data/meterpreter/ext_server_espia.x64.debug.dll +0 -0
  19. data/data/meterpreter/ext_server_espia.x64.dll +0 -0
  20. data/data/meterpreter/ext_server_espia.x86.debug.dll +0 -0
  21. data/data/meterpreter/ext_server_espia.x86.dll +0 -0
  22. data/data/meterpreter/ext_server_extapi.x64.debug.dll +0 -0
  23. data/data/meterpreter/ext_server_extapi.x64.dll +0 -0
  24. data/data/meterpreter/ext_server_extapi.x86.debug.dll +0 -0
  25. data/data/meterpreter/ext_server_extapi.x86.dll +0 -0
  26. data/data/meterpreter/ext_server_incognito.x64.debug.dll +0 -0
  27. data/data/meterpreter/ext_server_incognito.x64.dll +0 -0
  28. data/data/meterpreter/ext_server_incognito.x86.debug.dll +0 -0
  29. data/data/meterpreter/ext_server_incognito.x86.dll +0 -0
  30. data/data/meterpreter/ext_server_kiwi.x64.debug.dll +0 -0
  31. data/data/meterpreter/ext_server_kiwi.x64.dll +0 -0
  32. data/data/meterpreter/ext_server_kiwi.x86.debug.dll +0 -0
  33. data/data/meterpreter/ext_server_kiwi.x86.dll +0 -0
  34. data/data/meterpreter/ext_server_lanattacks.x64.debug.dll +0 -0
  35. data/data/meterpreter/ext_server_lanattacks.x64.dll +0 -0
  36. data/data/meterpreter/ext_server_lanattacks.x86.debug.dll +0 -0
  37. data/data/meterpreter/ext_server_lanattacks.x86.dll +0 -0
  38. data/data/meterpreter/ext_server_peinjector.x64.debug.dll +0 -0
  39. data/data/meterpreter/ext_server_peinjector.x64.dll +0 -0
  40. data/data/meterpreter/ext_server_peinjector.x86.debug.dll +0 -0
  41. data/data/meterpreter/ext_server_peinjector.x86.dll +0 -0
  42. data/data/meterpreter/ext_server_powershell.x64.debug.dll +0 -0
  43. data/data/meterpreter/ext_server_powershell.x64.dll +0 -0
  44. data/data/meterpreter/ext_server_powershell.x86.debug.dll +0 -0
  45. data/data/meterpreter/ext_server_powershell.x86.dll +0 -0
  46. data/data/meterpreter/ext_server_priv.x64.debug.dll +0 -0
  47. data/data/meterpreter/ext_server_priv.x64.dll +0 -0
  48. data/data/meterpreter/ext_server_priv.x86.debug.dll +0 -0
  49. data/data/meterpreter/ext_server_priv.x86.dll +0 -0
  50. data/data/meterpreter/ext_server_python.x64.debug.dll +0 -0
  51. data/data/meterpreter/ext_server_python.x64.dll +0 -0
  52. data/data/meterpreter/ext_server_python.x86.debug.dll +0 -0
  53. data/data/meterpreter/ext_server_python.x86.dll +0 -0
  54. data/data/meterpreter/ext_server_sniffer.x64.dll +0 -0
  55. data/data/meterpreter/ext_server_sniffer.x86.dll +0 -0
  56. data/data/meterpreter/ext_server_stdapi.py +21 -13
  57. data/data/meterpreter/ext_server_stdapi.x64.debug.dll +0 -0
  58. data/data/meterpreter/ext_server_stdapi.x64.dll +0 -0
  59. data/data/meterpreter/ext_server_stdapi.x86.debug.dll +0 -0
  60. data/data/meterpreter/ext_server_stdapi.x86.dll +0 -0
  61. data/data/meterpreter/ext_server_unhook.x64.debug.dll +0 -0
  62. data/data/meterpreter/ext_server_unhook.x64.dll +0 -0
  63. data/data/meterpreter/ext_server_unhook.x86.debug.dll +0 -0
  64. data/data/meterpreter/ext_server_unhook.x86.dll +0 -0
  65. data/data/meterpreter/ext_server_winpmem.x64.debug.dll +0 -0
  66. data/data/meterpreter/ext_server_winpmem.x64.dll +0 -0
  67. data/data/meterpreter/ext_server_winpmem.x86.debug.dll +0 -0
  68. data/data/meterpreter/ext_server_winpmem.x86.dll +0 -0
  69. data/data/meterpreter/metsrv.x64.debug.dll +0 -0
  70. data/data/meterpreter/metsrv.x64.dll +0 -0
  71. data/data/meterpreter/metsrv.x86.debug.dll +0 -0
  72. data/data/meterpreter/metsrv.x86.dll +0 -0
  73. data/data/meterpreter/screenshot.x64.debug.dll +0 -0
  74. data/data/meterpreter/screenshot.x64.dll +0 -0
  75. data/data/meterpreter/screenshot.x86.debug.dll +0 -0
  76. data/data/meterpreter/screenshot.x86.dll +0 -0
  77. data/lib/metasploit-payloads/version.rb +1 -1
  78. data.tar.gz.sig +0 -0
  79. metadata +2 -2
  80. metadata.gz.sig +3 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e1085ae5db328e0de9a3339e6fa48234274ba1c152d75ac3a58c4820165e641d
4
- data.tar.gz: ca0176e08ad724ec6b98632ea1786c86e34d22562e958aef903547641f69e6d9
3
+ metadata.gz: ffd87ebcc6ca35bec62287f50170774f4b0f92244d321dcdce2291e55138a6d2
4
+ data.tar.gz: 5cea86e080f355c43ddbda321dd1bb90fa6682467a98e2e2ccf8f35491bd4ba6
5
5
  SHA512:
6
- metadata.gz: fb33cf98cee7b73de2e0b6835de9a3b1c04524827dbfe70561d12c1c1ed63b4a52160ac1b609a23b146ce90113ba9e68486294b2a423cd2d5de710efbccb6e72
7
- data.tar.gz: 43c40ed267a4bf5311342eb84dd5ec22a92a7061eab60eaef51c63e65110d68ae248cbd3db9f4f14026a59cd30779d0b15c2eb91c5c5e5df98e11ae3cfb9a153
6
+ metadata.gz: 5bc2f82c0209ecfa78c16fd6d352a40f114d36c2151a4c5124790ab415801ff89d7c7e53e2fb4b9a3495bbbed4b55c092700b629e0b3f48461123f82a05acaa3
7
+ data.tar.gz: 83df15304238d68d71cefb16e20009262a46f517bd3128636bcc1b9216a3419da19aa1d69533ef5d6303979764cedba628e9f6e11a84a24d75ce3fd5e3c9e7e3
checksums.yaml.gz.sig CHANGED
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -899,7 +899,7 @@ def get_stat_buffer(path):
899
899
  st_buf += struct.pack('<QQQQ', long(si.st_size), long(si.st_atime), long(si.st_mtime), long(si.st_ctime))
900
900
  return st_buf
901
901
 
902
- def get_token_user(handle):
902
+ def get_token_user_sid(handle):
903
903
  TokenUser = 1
904
904
  advapi32 = ctypes.windll.advapi32
905
905
  advapi32.OpenProcessToken.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)]
@@ -913,9 +913,17 @@ def get_token_user(handle):
913
913
  ctypes.windll.kernel32.CloseHandle(token_handle)
914
914
  if not result:
915
915
  return None
916
- return ctstruct_unpack(TOKEN_USER, token_user_buffer)
916
+ token_user = ctstruct_unpack(TOKEN_USER, token_user_buffer)
917
917
 
918
- def get_username_from_token(token_user):
918
+ GetLengthSid = ctypes.windll.advapi32.GetLengthSid
919
+ GetLengthSid.argtypes = [ctypes.c_void_p]
920
+ GetLengthSid.restype = ctypes.c_uint32
921
+ sid_length = GetLengthSid(token_user.User.Sid)
922
+ sid_bytes = ctypes.string_at(token_user.User.Sid, sid_length)
923
+
924
+ return sid_bytes
925
+
926
+ def get_username_from_sid(sid):
919
927
  user = (ctypes.c_char * 512)()
920
928
  domain = (ctypes.c_char * 512)()
921
929
  user_len = ctypes.c_uint32()
@@ -926,7 +934,7 @@ def get_username_from_token(token_user):
926
934
  use.value = 0
927
935
  LookupAccountSid = ctypes.windll.advapi32.LookupAccountSidA
928
936
  LookupAccountSid.argtypes = [ctypes.c_void_p] * 7
929
- if not LookupAccountSid(None, token_user.User.Sid, user, ctypes.byref(user_len), domain, ctypes.byref(domain_len), ctypes.byref(use)):
937
+ if not LookupAccountSid(None, sid, user, ctypes.byref(user_len), domain, ctypes.byref(domain_len), ctypes.byref(use)):
930
938
  return None
931
939
  return str(ctypes.string_at(domain)) + '\\' + str(ctypes.string_at(user))
932
940
 
@@ -1232,13 +1240,13 @@ def stdapi_sys_config_getenv(request, response):
1232
1240
 
1233
1241
  @register_function_if(has_windll)
1234
1242
  def stdapi_sys_config_getsid(request, response):
1235
- token = get_token_user(ctypes.windll.kernel32.GetCurrentProcess())
1236
- if not token:
1243
+ sid = get_token_user_sid(ctypes.windll.kernel32.GetCurrentProcess())
1244
+ if not sid:
1237
1245
  return error_result_windows(), response
1238
1246
  sid_str = ctypes.c_char_p()
1239
1247
  ConvertSidToStringSid = ctypes.windll.advapi32.ConvertSidToStringSidA
1240
1248
  ConvertSidToStringSid.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
1241
- if not ConvertSidToStringSid(token.User.Sid, ctypes.byref(sid_str)):
1249
+ if not ConvertSidToStringSid(sid, ctypes.byref(sid_str)):
1242
1250
  return error_result_windows(), response
1243
1251
  sid_str = str(ctypes.string_at(sid_str))
1244
1252
  response += tlv_pack(TLV_TYPE_SID, sid_str)
@@ -1249,10 +1257,10 @@ def stdapi_sys_config_getuid(request, response):
1249
1257
  if has_pwd:
1250
1258
  username = pwd.getpwuid(os.getuid()).pw_name
1251
1259
  elif has_windll:
1252
- token = get_token_user(ctypes.windll.kernel32.GetCurrentProcess())
1253
- if not token:
1260
+ sid = get_token_user_sid(ctypes.windll.kernel32.GetCurrentProcess())
1261
+ if not sid:
1254
1262
  return error_result_windows(), response
1255
- username = get_username_from_token(token)
1263
+ username = get_username_from_sid(sid)
1256
1264
  if not username:
1257
1265
  return error_result_windows(), response
1258
1266
  else:
@@ -1607,9 +1615,9 @@ def stdapi_sys_process_get_processes_via_windll(request, response):
1607
1615
  else:
1608
1616
  exe_path = ''
1609
1617
  process_username = ''
1610
- process_token_user = get_token_user(proc_h)
1611
- if process_token_user:
1612
- process_username = get_username_from_token(process_token_user) or ''
1618
+ process_token_user_sid = get_token_user_sid(proc_h)
1619
+ if process_token_user_sid:
1620
+ process_username = get_username_from_sid(process_token_user_sid) or ''
1613
1621
  parch = windll_GetNativeSystemInfo()
1614
1622
  is_wow64 = ctypes.c_ubyte()
1615
1623
  is_wow64.value = 0
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1,6 +1,6 @@
1
1
  # -*- coding:binary -*-
2
2
  module MetasploitPayloads
3
- VERSION = '2.0.144'
3
+ VERSION = '2.0.145'
4
4
 
5
5
  def self.version
6
6
  VERSION
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metasploit-payloads
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.144
4
+ version: 2.0.145
5
5
  platform: ruby
6
6
  authors:
7
7
  - OJ Reeves
@@ -96,7 +96,7 @@ cert_chain:
96
96
  EknWpNgVhohbot1lfVAMmIhdtOVaRVcQQixWPwprDj/ydB8ryDMDosIMcw+fkoXU
97
97
  9GJsSaSRRYQ9UUkVL27b64okU8D48m8=
98
98
  -----END CERTIFICATE-----
99
- date: 2023-06-21 00:00:00.000000000 Z
99
+ date: 2023-06-23 00:00:00.000000000 Z
100
100
  dependencies:
101
101
  - !ruby/object:Gem::Dependency
102
102
  name: rake
metadata.gz.sig CHANGED
@@ -1 +1,3 @@
1
-  �!X��ȡ���tg��4Bs~�X�!Y^�^�:6W��\M����._Ty�`��B]}9��f�� D9����FSv|�IŲgUG�? ��7��̱�О�lz�"�!1MMϛ�f`$ؙ` bk��iF*DDV�E���U59�E��
1
+ �g�D sr�V�qT�rIg���lT�Y��<�
2
+ ɏLU��o'�G{������ܰ���ᶢ؄����w���J���(�0m׊�
3
+ � �䑮ʶS%����a��>��r�X��_T��Q%k^�jY���U��gCn[[\���1���1�U3����)x����(�6�8�z/hQ0�� ̜oRi6�n'��{:���3IPat��Bm�#Rn ZBm��ݢ�]kN�ŗ��Wv|���\�O���l6�8d��}y�:a���