public function getData(string $name = null){if (is_null($name)) {return $this->data;}$fieldName = $this->getRealFieldName($name);if (array_key_exists($fieldName, $this->data)) {return $this->data[$fieldName];} elseif (array_key_exists($fieldName, $this->relation)) {return ...
注意这个字符串拼接符号$this->name . $this->suffix,可以利用其触发__toString 全局搜索__toString,芜湖,来到了熟悉的conversion类里 继续跟进__toArray 前面的遍历先不看,跟进getAttr() 先看返回值 的$this->getValue 这里的 $closure = $this->withAttr[$fieldName]; $value = $closure($value, $this->...
跟进src/model/concern/Conversion.php 中的toJson() 方法,继续跟进 toJson() 方法发现在返回值中进一步调用了 toArray() 方法跟进toArray() 方法中的 getAttr() 方法 跟进getAttr() 方法,发现在 try-catch 结构中会进一步调用 getData() 方法 跟进getData() 方法后绕过第一个 if 判断后进一步调用 getReal...
() think\Model --> db() 后半部分利用链(同tp 5.2后半部分利用链) think\model\concern\Conversion --> __toString() think\model\concern\Conversion --> __toJson() think\model\concern\Conversion --> __toArray() think\model\concern\Attribute --> getAttr() think\model\concern\Attribute --...
() think\Model --> db() 后半部分利用链(同tp 5.2后半部分利用链) think\model\concern\Conversion --> __toString() think\model\concern\Conversion --> __toJson() think\model\concern\Conversion --> __toArray() think\model\concern\Attribute --> getAttr() think\model\concern\Attribute --...
=null 第一个条件上面已经满足,现在看第二个条件$data,查看$data是怎么来的,跟进getChangedData方法,src/model/concern/Attribute.php 因为$force没定义默认为 null ,所以进入array_udiff_assoc,由于$this-data和$this-origin默认也为null,所以不符合第一个if判断,最终$data=0,也即满足前面所提的第二个条件,$...
[]) Conversion类为trait类,需要寻找使用了它的类,这里可以用Pivot类 上下文总结如下 $Model->lasySave = true; $Model->exists = true; $Model->withEvent = false; $Model->force = true; $Model->name = new Pivot(); $Model->data = array('azhe'=>'whoami'); $Model->withAttr = array('a...
() think\Model --> db() 后半部分利用链(同tp 5.2后半部分利用链) think\model\concern\Conversion --> __toString() think\model\concern\Conversion --> __toJson() think\model\concern\Conversion --> __toArray() think\model\concern\Attribute --> getAttr() think\model\concern\Attribute --...
序列化是开发语言中将某个对象转换为一串字节流的过程,转换后的字节流可以方便存储在数据库中,也可以方便在网络中进行传输。而反序列化则是将数据库... 洞源实验室 146198围观2024-05-15 CTF中的反序列化考点总结从0到1 Web安全 对CTF web 中的反序列化漏洞知识点进行总结并附相关例题练习,从0到1,从 PHP类...
CNCERTCNNVD 会员体系(甲方)会员体系(厂商)产品名录企业空间 漏洞 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8