Skip to content

Instantly share code, notes, and snippets.

publicExposedPorts = function() {
//
var PubServices ={
'http' : true,
'https' : true,
'https-alt' : true,
'http-proxy' : true,
'www' : true,
'ftp' : true,
'echo' : true,
clearTextPorts = function() {
//
var PubServices ={
'telnet' : true,
'finger' : true,
'rexec' : true,
'X11' : true,
'xdmcp' : true,
'login' : true,
'nsexecd' : true,
var listHostsByVulnerabilityRegex = function(title,score) {
// Retrieves all host, port, protocol instances afflicted by a certain vulnerability Regex
//
// Created by: Matt Burch
// Usage: listHostsByVulnerabilityRegex(/Self-[Ss]igned/,'high')
// Requires client-side updates: false
score = score.toLowerCase();
var RATING = {
'hightop' : 10.0,
'highbot' : 7.0,
var mergeVulnerabilityDetails = function(vulnerabilityName, vulnerabilityRegex, score) {
//
//
// Usage: mergeVulnerabilityDetails("Obsolete Version of the Java Runtime Environment",/Java/,'high')
//
// Created by: Matt Burch
// Requires client-side updates: false
score = score.toLowerCase();
var RATING = {
var listVulnerabilitiesByHostIP = function(addr) {
//
// Created by: Matt Burch
// Usage: listVulnerabilitiesByHostIP("x.x.x.x");
// Requires client-side updates: false
var PROJECT_ID = Session.get('projectId');
var vulnerabilities = Vulnerabilities.find({"project_id": PROJECT_ID, "hosts": {"$elemMatch": {"string_addr": addr}}}).fetch();
if (!vulnerabilities) {
return("Vulnerability not found");
var deliverableUniquePortList = function(protocol) {
// Generates a of reports for deliverable template
// Usages: deliverableUniquePortList()
// Created by: Matt Burch
// Requires client-side updates: false
var PROJECT_ID = Session.get('projectId');
var unique = {};
var portServiceToColor = function(portnum, product, color) {
// Changes the status of provided port to provided color by Array of hosts
// for lair-blue, lair-orange, lair-red; Host status is updated to COLOR also
//
// Created by: Matt Burch
// Usage: portServiceToColor(47001, 'Microsoft HTTPAPI httpd 2.0', 'lair-green');
// Supported Colors: console.log(STATUS_MAP)
//
// Requires client-side updates: false
var PROJECT_ID = Session.get('projectId');
var deliverableUniquePortSummary = function(protocol) {
// Generates a of reports for deliverable template
// Usages: deliverableUniquePortSummary()
// Created by: Matt Burch
// Requires client-side updates: false
var PROJECT_ID = Session.get('projectId');
var unique = {};
function dumpIssueCVE(title) {
var projectId = Session.get('projectId')
var issue = Issues.findOne({
'projectId': projectId,
'title': title,
})
issue.cves.forEach( function(cve) {
console.log(cve)
})
function hostValidation(title1, title2) {
// Usage:
function checklist(l1, l2) {
var list = []
var list2 = []
l1.forEach( function(h1) {
var check = false
l2.forEach( function(h2) {
if ([h1.ipv4, h1.port, h1.protocol].join(":") == [h2.ipv4, h2.port, h2.protocol].join(":") ) {