当前位置:网站首页>CISP-PTE实操练习讲解
CISP-PTE实操练习讲解
2022-07-06 08:19:00 【炫彩@之星】
CISP-PTE实操练习讲解
前言
这次给大家讲解一下考试的各个题型
一、文件上传
这道题就很简单,上传一个木马进行蚁剑连接就可以了
答案就在key.php文件中
我们创建一个文件,注入一段一句话木马,改成zhi.jpg文件上传
GIF89a?
写GIF89a?这个的目的是为了证明是图片文件
上传之后进行抓包重发即可,但是要修改后缀名为.php,且要修改为大小写绕过,就是将eval改为Eval就可以了
我们打开图片看看是否可不可以打开
http://150.158.27.164:82/zhi.php
发现可以打开,我们用蚁剑进行连接
答案就是:key2:adahhsh8
二、反序列化漏洞
反序列化漏洞就是一些php魔法函数导致出现的一些漏洞,具体的原理和方法在我之前的渗透测试的课程有讲过,同样,大家要回头好好复习,这里就不在讲了。
接下来,我们进行答题
先简单的讲解一下php反序列化的形成原因
首先是php中的魔法函数如下
__construct()当一个对象创建时被调用
__destruct()当一个对象销毁时被调用
__toString()当一个对象被当作一个字符串使用
__sleep() 在对象在被序列化之前运行
__wakeup将在序列化之后立即被调用
这些就是我们要关注的几个魔术方法了,如果服务器能够接收我们反序列化过的字符串、并且未经过滤的把其中的变量直接放进这些魔术方法里面的话,就容易造成很严重的漏洞了。
此时代码里看不到方法或者是数组,这样的话反而简单很多;他只有一个unserialize()
unserialize() 函数用于将通过 serialize() 函数序列化后的对象或数组进行反序列化,并返回原始的对象结构
我们构造如下 vul.php?str=s:8:“CISP-PTE”;
进行代码审计,可以看到
if (unserialize( s t r ) = = = " str) === " str)==="PTE")
{
echo “$key4”;
}
符合这个条件就可以输出答案了,在网址后面加上这个条件,就可以了
http://49.232.193.10:84/start/vul.php?str=s:8:“CISP-PTE”;
进行重发之后
答案就是:key4:pw3yx7fa
三.失效的访问控制
看题目就知道了,需要管理员用户访问,那么说白了就是伪造管理员身份权限,SSO越权?
二话不说,刷新浏览器,抓包
直接把false改成true;吧username字段改成admin对应的base64编码即可
答案就是:key5:m9gbqjr6
总结
本次总结了考试中常见的几种考试题型,接下来会为大家讲解第二次实操练习的讲解。
边栏推荐
猜你喜欢
Chinese Remainder Theorem (Sun Tzu theorem) principle and template code
The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
Easy to use tcp-udp_ Debug tool download and use
Asia Pacific Financial Media | "APEC industry +" Western Silicon Valley invests 2trillion yuan in Chengdu Chongqing economic circle to catch up with Shanghai | stable strategy industry fund observatio
[cloud native] teach you how to build ferry open source work order system
在 uniapp 中使用阿里图标
Zhong Xuegao, who cannot be melted, cannot escape the life cycle of online celebrity products
The State Economic Information Center "APEC industry +" Western Silicon Valley will invest 2trillion yuan in Chengdu Chongqing economic circle, which will surpass the observation of Shanghai | stable
[research materials] 2021 Research Report on China's smart medical industry - Download attached
Epoll and IO multiplexing of redis
随机推荐
Configuring OSPF load sharing for Huawei devices
指针进阶---指针数组,数组指针
使用 BR 备份 TiDB 集群数据到兼容 S3 的存储
"Designer universe" APEC design +: the list of winners of the Paris Design Award in France was recently announced. The winners of "Changsha world center Damei mansion" were awarded by the national eco
21. Delete data
Secure captcha (unsafe verification code) of DVWA range
"Designer universe": "benefit dimension" APEC public welfare + 2022 the latest slogan and the new platform will be launched soon | Asia Pacific Financial Media
Data governance: misunderstanding sorting
TiDB备份与恢复简介
Introduction to number theory (greatest common divisor, prime sieve, inverse element)
CAD ARX gets the current viewport settings
Artcube information of "designer universe": Guangzhou implements the community designer system to achieve "great improvement" of urban quality | national economic and Information Center
[research materials] 2021 live broadcast annual data report of e-commerce - Download attached
使用 BR 恢复 S3 兼容存储上的备份数据
Go learning notes (3) basic types and statements (2)
你想知道的ArrayList知识都在这
NFT smart contract release, blind box, public offering technology practice -- jigsaw puzzle
The resources of underground pipe holes are tight, and the air blowing micro cable is not fragrant?
ESP系列引脚說明圖匯總
[secretly kill little partner pytorch20 days -day01- example of structured data modeling process]