Class: Mdm::User

Inherits:
ApplicationRecord
  • Object
show all
Extended by:
MetasploitDataModels::SerializedPrefs
Defined in:
app/models/mdm/user.rb

Overview

A user of metasploit-framework or metasploit-pro.

HTTP Proxy collapse

Nexpose collapse

Nexpose Authenticated Scan Credentials collapse

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from MetasploitDataModels::SerializedPrefs

serialized_prefs_attr_accessor

Instance Attribute Details

#adminfalse, true

Whether this user is an administrator. Administrator permissions are only enforced in metasploit-pro through the controllers.

Returns:

  • (false)

    if this is a normal user that must be added to each workspace.

  • (true)

    if this user is an administrator and have access to all workspaces without being added to the workspace explicitly. User is also allowed to add other users to workspaces or make other users admins.



# File 'app/models/mdm/user.rb', line 47

#companyString?

Company at which user works.

Returns:

  • (String, nil)


# File 'app/models/mdm/user.rb', line 55

#created_atDateTime

When the user was created.

Returns:

  • (DateTime)


# File 'app/models/mdm/user.rb', line 60

#crypted_passwordString

Hashed password (salted with #password_salt) by Authlogic in metasploit-pro.

Returns:

  • (String)


# File 'app/models/mdm/user.rb', line 65

#emailString?

The user's email address.

Returns:

  • (String, nil)


# File 'app/models/mdm/user.rb', line 70

#fullnameString?

The user's normal human name.

Returns:

  • (String, nil)


# File 'app/models/mdm/user.rb', line 75

#http_proxy_hostString?

Proxy host.

Returns:

  • (String, nil)


152
# File 'app/models/mdm/user.rb', line 152

serialized_prefs_attr_accessor :http_proxy_host

#http_proxy_passString?

Password used to login as #http_proxy_user to proxy.

Returns:

  • (String, nil)


158
# File 'app/models/mdm/user.rb', line 158

serialized_prefs_attr_accessor :http_proxy_pass

#http_proxy_portString, ...

Port on which proxy run on #http_proxy_host.

Returns:

  • (String, Integer, nil)


164
# File 'app/models/mdm/user.rb', line 164

serialized_prefs_attr_accessor :http_proxy_port

#http_proxy_userString?

User used to log into proxy.

Returns:

  • (String, nil)


170
# File 'app/models/mdm/user.rb', line 170

serialized_prefs_attr_accessor :http_proxy_user

#last_login_addressString?

Note:

specifically NOT last_login_ip to prevent confusion with AuthLogic magic columns (which dont work for serialized fields)

Last IP address from which this user logged in. Used to report currently active user session's IP when the user is logged off because theire session[:session_id] does not match #session_key.

Returns:

  • (String, nil)


132
# File 'app/models/mdm/user.rb', line 132

serialized_prefs_attr_accessor :last_login_address

#nexpose_creds_passString?

Returns:

  • (String, nil)


214
# File 'app/models/mdm/user.rb', line 214

serialized_prefs_attr_accessor :nexpose_creds_pass

#nexpose_creds_typeString?

Returns:

  • (String, nil)


218
# File 'app/models/mdm/user.rb', line 218

serialized_prefs_attr_accessor :nexpose_creds_type

#nexpose_creds_userString?

Returns:

  • (String, nil)


222
# File 'app/models/mdm/user.rb', line 222

serialized_prefs_attr_accessor :nexpose_creds_user

#nexpose_hostString?

Host name for server running Nexpose.

Returns:

  • (String, nil)


184
# File 'app/models/mdm/user.rb', line 184

serialized_prefs_attr_accessor :nexpose_host

#nexpose_passString?

Password to log into Nexpose.

Returns:

  • (String, nil)


190
# File 'app/models/mdm/user.rb', line 190

serialized_prefs_attr_accessor :nexpose_pass

#nexpose_portString, Integer. nil

Port on #nexpose_host on which Nexpose is running.

Returns:

  • (String, Integer. nil)


196
# File 'app/models/mdm/user.rb', line 196

serialized_prefs_attr_accessor :nexpose_port

#nexpose_userString?

User used to log into Nexpose.

Returns:

  • (String, nil)


202
# File 'app/models/mdm/user.rb', line 202

serialized_prefs_attr_accessor :nexpose_user

#password_saltString

Salt used when hashing password into #crypted_password by Authlogic in metasploit-pro.

Returns:

  • (String)


# File 'app/models/mdm/user.rb', line 80

#persistence_tokenString

Token used for session and cookie when user is logged using Authlogic in metasploit-pro.

Returns:

  • (String)


# File 'app/models/mdm/user.rb', line 85

#phoneString?

Phone number for user.

Returns:

  • (String, nil)


# File 'app/models/mdm/user.rb', line 90

#session_keyString?

Holds session[:session_id] so user can only be logged in once. Only enforced in metasploit-pro.

Returns:

  • (String, nil)


138
# File 'app/models/mdm/user.rb', line 138

serialized_prefs_attr_accessor :session_key

#time_zoneString?

User's preferred time zone.

Returns:

  • (String, nil)


118
# File 'app/models/mdm/user.rb', line 118

serialized_prefs_attr_accessor :time_zone

#updated_atDateTime

When the user was last updated.

Returns:

  • (DateTime)


# File 'app/models/mdm/user.rb', line 95

#usernameString

Username for this user. Used to log into metasploit-pro.

Returns:

  • (String)


# File 'app/models/mdm/user.rb', line 100

Instance Method Details

#prefsHash

Hash of user preferences

Returns:

  • (Hash)


112
# File 'app/models/mdm/user.rb', line 112

serialize :prefs, MetasploitDataModels::Base64Serializer.new