r00t-3xp10it

[ under develop ] post-exploitation M$_POLICIES

Jan 20th, 2015
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
R 5.73 KB | None | 0 0
  1. # ---------------------------------------------------------------------
  2. #  New upgrade to 'my-auxiliary.rb' metasploit post-exploitation module
  3. #  Author: r00t-3xp10it  DisclosureDate: 20-01-2015  Target: Windows
  4. # ---------------------------------------------------------------------
  5. #  This file its only one atempt to store registry values for later
  6. #  beeing used to build ruby funtions and inserted into my-auxiliary.rb
  7. # ---------------------------------------------------------------------
  8. #  The new funtions will going to use targets 'regedit' to activate
  9. #  restrictions, clear tracks or run your payload inside 'WINLOGON'
  10. #  proccess (similar to meterpreter 'migrate' funtion)...
  11. # ---------------------------------------------------------------------
  12.  
  13.  
  14.  
  15.  
  16. 1 - CHANGE RECICLE BIN NAME
  17. [HKCU/softwear/microsoft/windows/current version/explorer/CLSI/{645FF040-5081-101B-9F08-00AA002F954E}]
  18. "change the name by altering the 'predefinition' value"
  19.  
  20.  
  21. 2 - DISABLE CONTROL PANEL ACCESS
  22. [HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
  23. REG_DWORD "NoControlPanel" 0X00000001(1)
  24.  
  25.  
  26. 3 - HIDE DRIVES UNDER 'MY COMPUTER'
  27. [HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
  28. REG_DWORD "NoDrives" 67108863
  29.  
  30.  
  31. 4 - HIDE TASKBAR CLOCK
  32. [HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
  33. REG_DWORD "HideClock" REG_DWORD 0x00000001(1)
  34.  
  35.  
  36. 5 - ACTIVATE 'REMOTE ACCESS' TO REGEDIT FROM NETWORK (REMOTE)
  37. [HKCU/softwear/microsoft/regedt32/settings]
  38. REG_SZ "remote access" 0X00000001(1)
  39.  
  40.  
  41. 6 - This setting stops Windows from recording user tracking information including
  42. which applications a user runs and which files and documents are being accessed.
  43. [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
  44. [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
  45. REG_DWORD "NoInstrumentation" 0X00000001(1)
  46.  
  47.  
  48. 7 - Specify Executable Files to be Lauched by Winlogon (Windows NT/2000/XP)
  49. This setting specifies a list of executable files to be run by Winlogon
  50. in the system context when Windows starts.
  51. [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
  52. REG_SZ value name: "system" Value Data: "default = payload.exe"
  53.  
  54.  
  55. 8 - Restricting Writing to USB Drives
  56. [HKLM\SYSTEM\Current Control Set\Control\StorageDevicePolicies]
  57. REG_DWORD "WriteProtect" REG_DWORD 0x00000001(1)
  58.  
  59.  
  60. 9 - Clears history of Documents
  61. [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
  62. REG_DWORD "NoRecentDocsHistory" 0X00000001(1)
  63. REG_DWORD "ClearRecentDocsOnExit" 0X00000001(1)
  64.  
  65.  
  66.  
  67. 10 - Preventing Data Creation
  68. Prevent the creation of certain data in the first place.
  69. Data which was never there, obviously cannot be restored with forensic methods.
  70.  
  71. For example, a partition can be mounted read-only or accessed through the raw device
  72. to prevent the file access times from being updated. The Windows registry key
  73. [HKLM\SYSTEM\CurrentControlSet\Control\FileSystem\NtfsDisableLastAccessUpdate]
  74. can be set to “1” to disable updating of the last-accessed timestamp;
  75. this setting is default under Windows Vista (Microsoft 2006).
  76.  
  77.  
  78.  
  79. 11. Activate registry changes in HKEY_CURRENT_USER without logging off (Windows 2000 and later):
  80. (option A): RUNDLL32.EXE USER32.DLL,UpdatePerUserSystemParameters ,1 ,True
  81.  
  82. (option B): Automatic Screen Refresh
  83. When you make changes to your file system and use Explorer,
  84. the changes are not usually displayed until you press the F5 key
  85. To refresh automatically:
  86. [HKLM\System\CurrentControlSet\Control\Update
  87. REG_DWORD "UpdateMode" 0X00000001(1)
  88.  
  89.  
  90.  
  91.  
  92. 12 - Change the Registered Change the User Information
  93. You can change the Registered Owner or Registered Organization
  94. to anything you want even after Windows is installed.
  95. [HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion]
  96. Change the value of "RegisteredOrganization" or "RegisteredOwner", to what ever you want
  97.  
  98.  
  99.  
  100. 13- The Windows 7 Temp folder is located at:
  101. C:\Users\(UserName)\AppData\Local\Temp
  102. %temp% <-- var to access temp folders
  103.  
  104.  
  105.  
  106.  
  107. 14 - clear temporary internet files and cookies
  108. del /F /Q "%Userprofile%\Local Settings\Temporary Internet Files\*.*"
  109.  
  110.  
  111.  
  112. 15 - EnableInstallerDetection (UAC) affects the way that software is installed.
  113. When it is set to one, the default, it automatically detects programs that
  114. try to install using admin rights and a UAC dialog is displayed. If it is set
  115. to zero then no warning is given when programs try to install.
  116. [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
  117. REG_DWORD "EnableInstallerDetection" 0X00000001(1)
  118.  
  119.  
  120.  
  121. 16 - Change timestamp on a file (linux)
  122. touch -amct [[CC]YY]MMDDhhmm[.ss] FILE
  123. -a for access time, -m for modification time, -c do not create any files, -t timestamp
  124.  
  125. #Change timestamp on a file
  126. touch --date "2010-01-05" /tmp/filename
  127.  
  128. #Change timestamp on a file interactive
  129. touch -d $(zenity --calendar --date-format=%F) filename
  130.  
  131.  
  132.  
  133.  
  134. 17 - Change timestamp on a file (windows)
  135. meterpreter > timestomp -h
  136. usage: timestomp <file_path> options
  137.  
  138. # set all 4 attributes (modify|entry modify|accessed|created)
  139. meterpreter > timestomp pentesting.txt -z "1/15/2013 15:15:25"
  140.  
  141. # set timestomp recursive on a directory
  142. meterpreter > timestomp C:\test -r "1/15/2013 15:15:25"
  143.  
  144.  
  145.  
  146.  
  147. 18 - busca de senhas em arquivos (disk)
  148. find / -type f -exec grep -li "senha" {} \;
  149.  
  150.  
  151. 19 - Export Local Wireless Passwords (In Plaintext)
  152. netsh wlan export profile key=clear
  153.  
  154. # --------------------------------------
  155. more info: http://www.onecomputerguy.com/registry_tips.htm
  156. http://www.irongeek.com/i.php?page=security/windows-forensics-registry-and-file-system-spots
  157.  
  158. http://tim3warri0r.blogspot.pt/2012/09/windows-post-exploitation-command-list.html
  159.  
  160. #_EOF
Advertisement
Add Comment
Please, Sign In to add comment