Class: Nexpose::VulnFinding

Inherits:
Object
  • Object
show all
Defined in:
lib/nexpose/vuln.rb

Overview

Vulnerability finding information pulled from AJAX requests. Data uses a numeric, console-specific vuln ID, which may need to be cross-referenced to the String ID to be used elsewhere.

Direct Known Subclasses

VulnSynopsis

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ VulnFinding

Returns a new instance of VulnFinding.



253
254
255
256
257
258
259
260
261
262
263
264
265
266
# File 'lib/nexpose/vuln.rb', line 253

def initialize(json)
  @id = json['nexVulnID']
  @console_id = json['vulnID']
  @title = json['title']
  @cvss_vector = json['cvssBase']
  @cvss_score = json['cvssScore']
  @risk = json['riskScore']
  @published = Time.at(json['publishedDate'] / 1000)
  @severity = json['severity']
  @instances = json['vulnInstanceCount']
  @exploit = json['mainExploit']
  @malware = json['malwareCount']
  @verified = DateTime.iso8601(json['verifiedDate'].slice(0, 15)).to_time if json['verifiedDate']
end

Instance Attribute Details

#console_idObject (readonly)

Unique, console-specific identifier of the vulnerability.



235
236
237
# File 'lib/nexpose/vuln.rb', line 235

def console_id
  @console_id
end

#cvss_scoreObject (readonly)

Returns the value of attribute cvss_score.



238
239
240
# File 'lib/nexpose/vuln.rb', line 238

def cvss_score
  @cvss_score
end

#cvss_vectorObject (readonly)

Returns the value of attribute cvss_vector.



239
240
241
# File 'lib/nexpose/vuln.rb', line 239

def cvss_vector
  @cvss_vector
end

#exploitObject (readonly)

Main published exploit module against this vulnerability, if any.



247
248
249
# File 'lib/nexpose/vuln.rb', line 247

def exploit
  @exploit
end

#idObject (readonly)

Unique identifier of the vulnerability.



233
234
235
# File 'lib/nexpose/vuln.rb', line 233

def id
  @id
end

#instancesObject (readonly)

Number of instances of this vulnerabilty finding on an asset.



245
246
247
# File 'lib/nexpose/vuln.rb', line 245

def instances
  @instances
end

#malwareObject (readonly)

Whether known malware kits exploit this vulnerability.



249
250
251
# File 'lib/nexpose/vuln.rb', line 249

def malware
  @malware
end

#publishedObject (readonly)

Date this exploit was published.



242
243
244
# File 'lib/nexpose/vuln.rb', line 242

def published
  @published
end

#riskObject (readonly)

Returns the value of attribute risk.



240
241
242
# File 'lib/nexpose/vuln.rb', line 240

def risk
  @risk
end

#severityObject (readonly)

Returns the value of attribute severity.



243
244
245
# File 'lib/nexpose/vuln.rb', line 243

def severity
  @severity
end

#titleObject (readonly)

Vulnerability title.



237
238
239
# File 'lib/nexpose/vuln.rb', line 237

def title
  @title
end

#verifiedObject (readonly)

Date that a vuln was verified, if validation has been carried out.



251
252
253
# File 'lib/nexpose/vuln.rb', line 251

def verified
  @verified
end