File tree Expand file tree Collapse file tree 1 file changed +32
-7
lines changed
modules/exploits/linux/http Expand file tree Collapse file tree 1 file changed +32
-7
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,32 @@ def initialize(info = {})
73
73
] , self . class )
74
74
end
75
75
76
+ def report_cred ( opts )
77
+ service_data = {
78
+ address : opts [ :ip ] ,
79
+ port : opts [ :port ] ,
80
+ service_name : opts [ :service_name ] ,
81
+ protocol : 'tcp' ,
82
+ workspace_id : myworkspace_id
83
+ }
84
+
85
+ credential_data = {
86
+ module_fullname : fullname ,
87
+ post_reference_name : self . refname ,
88
+ private_data : opts [ :password ] ,
89
+ origin_type : :service ,
90
+ private_type : :password ,
91
+ username : opts [ :user ]
92
+ } . merge ( service_data )
93
+
94
+ login_data = {
95
+ core : create_credential ( credential_data ) ,
96
+ status : Metasploit ::Model ::Login ::Status ::UNTRIED ,
97
+ } . merge ( service_data )
98
+
99
+ create_credential_login ( login_data )
100
+ end
101
+
76
102
def check
77
103
return Exploit ::CheckCode ::Safe unless webcommand_exists?
78
104
return Exploit ::CheckCode ::Safe if exploit_sqli ( 1 , bad_char ( 0 ) )
@@ -94,13 +120,12 @@ def exploit
94
120
@session = send_login
95
121
fail_with ( Failure ::NoAccess , "#{ peer } - Login with admin/#{ @password } failed..." ) if @session . nil?
96
122
97
- report_auth_info (
98
- :host => rhost ,
99
- :port => rport ,
100
- :user => 'admin' ,
101
- :pass => @password ,
102
- :type => 'password' ,
103
- :sname => ( ssl ? 'https' : 'http' )
123
+ report_cred (
124
+ ip : rhost ,
125
+ port : rport ,
126
+ user : 'admin' ,
127
+ service_name : 'http' ,
128
+ password : @password
104
129
)
105
130
106
131
print_status ( "#{ peer } - Retrieving the server name..." )
You can’t perform that action at this time.
0 commit comments