@@ -53,6 +53,34 @@ def load_file(fname)
53
53
end
54
54
55
55
56
+ def report_cred ( opts )
57
+ service_data = {
58
+ address : opts [ :ip ] ,
59
+ port : opts [ :port ] ,
60
+ service_name : opts [ :service_name ] ,
61
+ protocol : 'tcp' ,
62
+ workspace_id : myworkspace_id
63
+ }
64
+
65
+ credential_data = {
66
+ module_fullname : fullname ,
67
+ post_reference_name : self . refname ,
68
+ session_id : session_db_id ,
69
+ origin_type : :session ,
70
+ private_data : opts [ :password ] ,
71
+ private_type : :password ,
72
+ username : opts [ :user ]
73
+ } . merge ( service_data )
74
+
75
+ login_data = {
76
+ core : create_credential ( credential_data ) ,
77
+ status : Metasploit ::Model ::Login ::Status ::UNTRIED ,
78
+ } . merge ( service_data )
79
+
80
+ create_credential_login ( login_data )
81
+ end
82
+
83
+
56
84
#
57
85
# Extracts client, server, secret, and IP addresses
58
86
#
@@ -77,15 +105,14 @@ def extract_secrets(data)
77
105
secret = ( found [ 2 ] || '' ) . strip
78
106
ip = ( found [ 3 , found . length ] * ", " || '' ) . strip
79
107
80
- report_auth_info ( {
81
- :host => session . session_host ,
82
- :port => 1723 , #PPTP port
83
- :sname => 'pptp' ,
84
- :user => client ,
85
- :pass => secret ,
86
- :type => 'password' ,
87
- :active => true
88
- } )
108
+ report_cred (
109
+ ip : session . session_host ,
110
+ port : 1723 , # PPTP port
111
+ service_name : 'pptp' ,
112
+ user : client ,
113
+ password : secret ,
114
+
115
+ )
89
116
90
117
tbl << [ client , server , secret , ip ]
91
118
end
0 commit comments