PHP审计-存储XSS挖掘

简介: PHP审计-存储XSS挖掘
+关注继续查看

明确目的 存储XSS

直接在页面内搜索

留言板  评论区等

image

image

没有分类 后台添加

640.png

640.png

添加了但是还是没有显示 定位代码

if($act == 'select')
{
  $cats = get_cat_list();
  $here = array('name'=>'选择分类', 'url'=>'post.php');
  
  $seo['title'] = '选择分类' . ' - Power'.'ed by Php'.'mps';
  $seo['keywords'] = $CFG['keywords'];
  $seo['description'] = $CFG['description'];
  
  include template('select');
}
elseif($act == 'post')
{
  $catid = intval($_REQUEST['id']);
  if(empty($catid)) {
    showmsg('没有选择分类');
  }

  $catinfo = get_cat_info($catid);
  if(empty($catinfo)) showmsg('不存在此分类');
  
  $verf = get_one_ver();
  $member = member_info($_userid);
  $custom = cat_post_custom($catid);
  $mappoint = $CFG['map'] ? explode(',', $CFG['map']) : '';
  
  $seo['title'] = '发布信息 - Powered by Phpmps';
  $seo['keywords'] = $CFG['keywords'];
  $seo['description'] = $CFG['description'];

  include template('post');
}
elseif($act == 'postok')
{
  $catid     = $_POST['catid'] ? intval($_POST['catid']) : '';
  $title     = $_POST['title'] ? htmlspecialchars(trim($_POST['title'])) : '';
  $areaid    = $_POST['areaid'] ? intval($_POST['areaid']) : '';
  $postdate  = time();
  $enddate   = $_POST['enddate']>0 ? (intval($_POST['enddate']*3600*24)) + time() : '0';
  $content   = $_POST['content'] ? htmlspecialchars(trim($_POST['content'])) : '';
  $keywords  = $_POST['keyword'] ? htmlspecialchars(trim($_POST['keyword'])) : '';
  $description = cut_str($content,100);
  $linkman   = $_POST['linkman'] ? htmlspecialchars(trim($_POST['linkman'])) : '';
  $phone     = $_POST['phone'] ? htmlspecialchars($_POST['phone']) : '';
  $qq        = $_POST['qq'] ? intval($_POST['qq']) : '';
  $email     = $_POST['email'] ? htmlspecialchars(trim($_POST['email'])) : '';
  $password  = $_POST['password'] ? trim($_POST['password']) : '';
  $address   = $_POST['address'] ? trim($_POST['address']) : '';
  $mappoint  = $_POST['mappoint'] ? trim($_POST['mappoint']) : '';
  $checkcode = $_POST['checkcode'] ? trim($_POST['checkcode']) : '';
  $number    = $_POST['number'] ? intval($_POST['number']) : '';
  $top_type  = $_POST['top_type'] ? intval($_POST['top_type']) : '';
  $is_type   = $_POST['is_top'] ? intval($_POST['is_top']) : '';
  $is_check  = $CFG['post_check'] == '1' ?  '0' : '1';
  $title = censor($title);
  $content = censor($content);

640.png

如果act=postok 则显示下面的信息 

image

有提示标题不能为空 继续审查代码

image

http://192.168.5.8/phpmps/post.php?act=post&id=1

image


image

相关文章
|
4月前
|
安全 PHP
PHP审计-动态调试-文件安全
PHP审计-动态调试-文件安全
|
4月前
|
SQL 监控 关系型数据库
PHP审计-SQL注入技巧
PHP审计-SQL注入技巧
|
4月前
|
安全 PHP 数据安全/隐私保护
PHP审计-实战变量覆盖漏洞
PHP审计-实战变量覆盖漏洞
|
4月前
|
SQL PHP 数据安全/隐私保护
PHP审计-后台绕过登录
PHP审计-后台绕过登录
|
5月前
|
存储 PHP 开发工具
PHP:将本地文件上传到阿里云OSS存储
PHP:将本地文件上传到阿里云OSS存储
632 0
|
6月前
|
存储 JSON NoSQL
为什么PHP存储redis的hash不需要json_encode?
为什么PHP存储redis的hash不需要json_encode?
|
6月前
|
存储 NoSQL PHP
redis的hash可以直接存储PHP的数组吗?底层原理是什么?
redis的hash可以直接存储PHP的数组吗?底层原理是什么?
131 0
|
7月前
|
监控 安全 网络安全
【代码审计-PHP】审计方法、敏感函数、功能点
【代码审计-PHP】审计方法、敏感函数、功能点
42 0
【代码审计-PHP】审计方法、敏感函数、功能点
|
9月前
|
存储 NoSQL 网络协议
配置 PHP 的 Session 存储到 Redis
配置 PHP 的 Session 存储到 Redis
|
10月前
|
存储 PHP
php序列化闭包函数,php反序列化闭包函数,php如何序列化/存储闭包(Closure)
php序列化闭包函数,php反序列化闭包函数,php如何序列化/存储闭包(Closure)
158 0
相关产品
云迁移中心
推荐文章
更多