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.



268
269
270
271
272
273
274
275
276
277
278
279
280
281
# File 'lib/nexpose/vuln.rb', line 268

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.



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

def console_id
  @console_id
end

#cvss_scoreObject (readonly)

Returns the value of attribute cvss_score.



253
254
255
# File 'lib/nexpose/vuln.rb', line 253

def cvss_score
  @cvss_score
end

#cvss_vectorObject (readonly)

Returns the value of attribute cvss_vector.



254
255
256
# File 'lib/nexpose/vuln.rb', line 254

def cvss_vector
  @cvss_vector
end

#exploitObject (readonly)

Main published exploit module against this vulnerability, if any.



262
263
264
# File 'lib/nexpose/vuln.rb', line 262

def exploit
  @exploit
end

#idObject (readonly)

Unique identifier of the vulnerability.



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

def id
  @id
end

#instancesObject (readonly)

Number of instances of this vulnerabilty finding on an asset.



260
261
262
# File 'lib/nexpose/vuln.rb', line 260

def instances
  @instances
end

#malwareObject (readonly)

Whether known malware kits exploit this vulnerability.



264
265
266
# File 'lib/nexpose/vuln.rb', line 264

def malware
  @malware
end

#publishedObject (readonly)

Date this exploit was published.



257
258
259
# File 'lib/nexpose/vuln.rb', line 257

def published
  @published
end

#riskObject (readonly)

Returns the value of attribute risk.



255
256
257
# File 'lib/nexpose/vuln.rb', line 255

def risk
  @risk
end

#severityObject (readonly)

Returns the value of attribute severity.



258
259
260
# File 'lib/nexpose/vuln.rb', line 258

def severity
  @severity
end

#titleObject (readonly)

Vulnerability title.



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

def title
  @title
end

#verifiedObject (readonly)

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



266
267
268
# File 'lib/nexpose/vuln.rb', line 266

def verified
  @verified
end