Пример #1
0
    def __init__(self):
        OutputPlugin.__init__(self)

        # These attributes hold the file pointers
        self._file = None

        # User configured parameters
        self._file_name = '~/report.xml'
        self._timeFormat = '%a %b %d %H:%M:%S %Y'
        self._longTimestampString = str(
            time.strftime(self._timeFormat, time.localtime()))
        self._timestampString = str(int(time.time()))

        # List with additional xml elements
        self._errorXML = []

        # xml
        self._xmldoc = xml.dom.minidom.Document()
        self._topElement = self._xmldoc.createElement("w3afrun")
        self._topElement.setAttribute("start", self._timestampString)
        self._topElement.setAttribute("startstr", self._longTimestampString)
        self._topElement.setAttribute("xmloutputversion", "2.0")
        # Add in the version details
        version_element = self._xmldoc.createElement("w3af-version")
        version_data = self._xmldoc.createTextNode(
            str(get_w3af_version.get_w3af_version()))
        version_element.appendChild(version_data)
        self._topElement.appendChild(version_element)

        self._scanInfo = self._xmldoc.createElement("scaninfo")

        # HistoryItem to get requests/responses
        self._history = HistoryItem()
Пример #2
0
    def __init__(self):
        OutputPlugin.__init__(self)

        # These attributes hold the file pointers
        self._file = None

        # User configured parameters
        self._file_name = '~/report.xml'
        self._timestamp = str(int(time.time()))
        self._long_timestamp = str(time.strftime(TIME_FORMAT,
                                                 time.localtime()))

        # List with additional xml elements
        self._errorXML = []

        # xml root
        self._xmldoc = xml.dom.minidom.Document()
        self._topElement = self._xmldoc.createElement('w3af-run')
        self._topElement.setAttribute('start', self._timestamp)
        self._topElement.setAttribute('start-long', self._long_timestamp)
        self._topElement.setAttribute('version', self.XML_OUTPUT_VERSION)

        # Add in the version details
        version_element = self._xmldoc.createElement('w3af-version')
        version = xml_str(get_w3af_version.get_w3af_version())
        version_data = self._xmldoc.createTextNode(version)
        version_element.appendChild(version_data)
        self._topElement.appendChild(version_element)

        self._scaninfo = self._xmldoc.createElement('scan-info')

        # HistoryItem to get requests/responses
        self._history = HistoryItem()
Пример #3
0
    def __init__(self):
        OutputPlugin.__init__(self)

        # These attributes hold the file pointers
        self._file = None

        # User configured parameters
        self._file_name = '~/report.xml'
        self._timestamp = str(int(time.time()))
        self._long_timestamp = str(time.strftime(TIME_FORMAT, time.localtime()))

        # List with additional xml elements
        self._errorXML = []

        # xml root
        self._xmldoc = xml.dom.minidom.Document()
        self._topElement = self._xmldoc.createElement('w3af-run')
        self._topElement.setAttribute('start', self._timestamp)
        self._topElement.setAttribute('start-long', self._long_timestamp)
        self._topElement.setAttribute('version', self.XML_OUTPUT_VERSION)

        # Add in the version details
        version_element = self._xmldoc.createElement('w3af-version')
        version = xml_str(get_w3af_version.get_w3af_version())
        version_data = self._xmldoc.createTextNode(version)
        version_element.appendChild(version_data)
        self._topElement.appendChild(version_element)

        self._scaninfo = self._xmldoc.createElement('scan-info')

        # HistoryItem to get requests/responses
        self._history = HistoryItem()
Пример #4
0
    def __init__(self):
        OutputPlugin.__init__(self)

        # These attributes hold the file pointers
        self._file = None

        # User configured parameters
        self._file_name = '~/report.xml'
        self._timeFormat = '%a %b %d %H:%M:%S %Y'
        self._longTimestampString = str(
            time.strftime(self._timeFormat, time.localtime()))
        self._timestampString = str(int(time.time()))

        # List with additional xml elements
        self._errorXML = []

        # xml
        self._xmldoc = xml.dom.minidom.Document()
        self._topElement = self._xmldoc.createElement("w3afrun")
        self._topElement.setAttribute("start", self._timestampString)
        self._topElement.setAttribute("startstr", self._longTimestampString)
        self._topElement.setAttribute("xmloutputversion", "2.0")
        # Add in the version details
        version_element = self._xmldoc.createElement("w3af-version")
        version_data = self._xmldoc.createTextNode(
            str(get_w3af_version.get_w3af_version()))
        version_element.appendChild(version_data)
        self._topElement.appendChild(version_element)

        self._scanInfo = self._xmldoc.createElement("scaninfo")

        # HistoryItem to get requests/responses
        self._history = HistoryItem()
Пример #5
0
    def __init__(self):
        OutputPlugin.__init__(self)

        self.targets = []
        self._exec = False

        self.smtpServer = 'localhost'
        self.smtpPort = 25
        self.toAddrs = ''
        self.fromAddr = ''
Пример #6
0
    def __init__(self):
        OutputPlugin.__init__(self)

        self.targets = []
        self._exec = False

        self.smtpServer = 'localhost'
        self.smtpPort = 25
        self.toAddrs = ''
        self.fromAddr = ''
Пример #7
0
    def __init__(self):
        OutputPlugin.__init__(self)
        self.output_file = '~/output-w3af.json'
        self._timestamp = str(int(time.time()))
        self._long_timestamp = str(time.strftime(TIME_FORMAT, time.localtime()))

        # Set defaults for scan metadata
        self._plugins_dict = {}
        self._options_dict = {}        
        self._enabled_plugins = {}        
Пример #8
0
    def __init__(self):
        OutputPlugin.__init__(self)
        self.output_file = '~/output-w3af.json'
        self._timestamp = str(int(time.time()))
        self._long_timestamp = str(time.strftime(TIME_FORMAT, time.localtime()))

        # Set defaults for scan metadata
        self._plugins_dict = {}
        self._options_dict = {}        
        self._enabled_plugins = {}        
    def __init__(self):
        OutputPlugin.__init__(self)

        # Internal variables
        self._initialized = False
        self._style_output_file = os.path.join(ROOT_PATH, "plugins", "output", "html_file", "style.css")

        # These attributes hold the file pointers
        self._file = None
        self._aditional_info = DiskList()

        # User configured parameters
        self._verbose = False
        self._output_file_name = "~/report.html"
Пример #10
0
    def __init__(self):
        OutputPlugin.__init__(self)

        # Internal variables
        self._initialized = False
        self._additional_info = DiskList(table_prefix='html_file')
        self._enabled_plugins = {}
        self.template_root = os.path.join(ROOT_PATH, 'plugins', 'output',
                                          'html_file', 'templates')

        # User configured parameters
        self._verbose = False
        self._output_file_name = '~/report.html'
        self._template = os.path.join(self.template_root, 'complete.html')
Пример #11
0
    def __init__(self):
        OutputPlugin.__init__(self)

        # Internal variables
        self._initialized = False
        self._additional_info = DiskList(table_prefix='html_file')
        self._enabled_plugins = {}
        self.template_root = os.path.join(ROOT_PATH, 'plugins', 'output',
                                          'html_file', 'templates')

        # User configured parameters
        self._verbose = False
        self._output_file_name = './report.html'
        self._template = os.path.join(self.template_root, 'complete.html')
Пример #12
0
    def __init__(self):
        OutputPlugin.__init__(self)

        # Internal variables
        self._initialized = False
        self._style_output_file = os.path.join(ROOT_PATH, 'plugins', 'output',
                                               'html_file', 'style.css')

        # These attributes hold the file pointers
        self._file = None
        self._aditional_info = DiskList()

        # User configured parameters
        self._verbose = False
        self._output_file_name = '~/report.html'
Пример #13
0
    def __init__(self):
        OutputPlugin.__init__(self)

        # Internal variables
        self._initialized = False
        self._style_output_file = os.path.join(ROOT_PATH, 'plugins', 'output',
                                               'html_file', 'style.css')

        # These attributes hold the file pointers
        self._file = None
        self._aditional_info = DiskList(table_prefix='html_file')

        # User configured parameters
        self._verbose = False
        self._output_file_name = '~/report.html'
Пример #14
0
    def __init__(self):
        OutputPlugin.__init__(self)

        # These attributes hold the file pointers
        self._file = None

        # User configured parameters
        self._file_name = '/tmp/f5_asm_import.xml'
        self._timeFormat = '%a %b %d %H:%M:%S %Y'
        self._longTimestampString = str(
            time.strftime(self._timeFormat, time.localtime()))
        self._timestampString = str(int(time.time()))

        # List with additional xml elements
        # xml
        # HistoryItem to get requests/responses
        self._history = HistoryItem()
        self._attack_type = {}
        # attack type matrix
        self._attack_type["US Social Security"] = "Information Leakage - SSN"
        self._attack_type["XPATH"] = "XPath Injection"
        self._attack_type["Response splitting"] = "HTTP Response Splitting"
        self._attack_type["path disclosure"] = "Path Traversal"
        self._attack_type[
            "Cross Site Request Forgery"] = "Cross-site Request Forgery"
        self._attack_type["SQL injection"] = "SQL-Injection"
        self._attack_type[
            "credit card number"] = "Information Leakage - Credit Card"
        self._attack_type[
            "Cross Site Scripting"] = "Cross Site Scripting (XSS)"
        self._attack_type["OS Commanding"] = "Command Execution"
        self._attack_type["SSI"] = "Server Side Code Injection"
        self._attack_type["input injection"] = "Injection Attempt"
        self._attack_type["LDAP injection"] = "LDAP Injection"
        self._attack_type["remote file inclusion"] = "Remote File Include"
        self._attack_type["file upload"] = "Malicious File Upload"
        self._attack_type["authentication cred"] = "Brute Force Attack"
        self._attack_type[
            "requires authentication"] = "Authentication/Authorization Attacks"
        self._attack_type["buffer-overflow"] = "Buffer Overflow"
        # start xml file
        self._asmfile = xml.dom.minidom.Document()
        self._topElement = self._asmfile.createElement(
            "scanner_vulnerabilities")
        self._topElement.setAttribute("version", self._timestampString)
Пример #15
0
    def __init__(self):
        OutputPlugin.__init__(self)

        # User configured parameters
        self._output_file_name = '~/output.txt'
        self._http_file_name = '~/output-http.txt'
        self.verbose = True

        # Internal variables
        self._initialized = False

        # File handlers
        self._file = None
        self._http = None

        # XXX Only set '_show_caller' to True for debugging purposes. It
        # causes the execution of potentially slow code that handles
        # with introspection.
        self._show_caller = False
Пример #16
0
    def __init__(self):
        OutputPlugin.__init__(self)

        # User configured parameters
        self._output_file_name = '~/output.txt'
        self._http_file_name = '~/output-http.txt'
        self.verbose = True

        # Internal variables
        self._initialized = False

        # File handlers
        self._file = None
        self._http = None

        # XXX Only set '_show_caller' to True for debugging purposes. It
        # causes the execution of potentially slow code that handles
        # with introspection.
        self._show_caller = False
Пример #17
0
    def __init__(self):
        OutputPlugin.__init__(self)

        # User configured parameters
        self._file_name = '~/report.xml'
        self._timestamp = str(int(time.time()))
        self._long_timestamp = str(time.strftime(TIME_FORMAT, time.localtime()))

        # Set defaults for scan metadata
        self._plugins_dict = {}
        self._options_dict = {}
        self._scan_targets = None

        # Keep internal state
        self._is_working = False
        self._jinja2_env = self._get_jinja2_env()

        # List with additional xml elements
        self._errors = DiskList()
Пример #18
0
    def __init__(self):
        OutputPlugin.__init__(self)

        # These attributes hold the file pointers
        self._file = None

        # User configured parameters
        self._file_name = '~/report.xml'
        self._timestamp = str(int(time.time()))
        self._long_timestamp = str(time.strftime(TIME_FORMAT, time.localtime()))

        # Set defaults for scan metadata
        self._plugins_dict = {}
        self._options_dict = {}

        # Keep internal state
        self._is_working = False
        self._jinja2_env = self._get_jinja2_env()

        # List with additional xml elements
        self._errors = DiskList()
Пример #19
0
    def __init__(self):
        OutputPlugin.__init__(self)

        # These attributes hold the file pointers
        self._file = None

        # User configured parameters
        self._file_name = '/tmp/f5_asm_import.xml'
        self._timeFormat = '%a %b %d %H:%M:%S %Y'
        self._longTimestampString = str(
            time.strftime(self._timeFormat, time.localtime()))
        self._timestampString = str(int(time.time()))

        # List with additional xml elements
        # xml
        # HistoryItem to get requests/responses
        self._history = HistoryItem()
	self._attack_type = {}
	# attack type matrix 
	self._attack_type["US Social Security"] = "Information Leakage - SSN"
	self._attack_type["XPATH"] = "XPath Injection"
	self._attack_type["Response splitting"] = "HTTP Response Splitting"
	self._attack_type["path disclosure"] = "Path Traversal"
	self._attack_type["Cross Site Request Forgery"] = "Cross-site Request Forgery"
	self._attack_type["SQL injection"] = "SQL-Injection"
	self._attack_type["credit card number"] = "Information Leakage - Credit Card"
	self._attack_type["Cross Site Scripting"] = "Cross Site Scripting (XSS)"
	self._attack_type["OS Commanding"] = "Command Execution"
	self._attack_type["SSI"] = "Server Side Code Injection"
	self._attack_type["input injection"] = "Injection Attempt"
	self._attack_type["LDAP injection"] = "LDAP Injection"
	self._attack_type["remote file inclusion"] = "Remote File Include"
	self._attack_type["file upload"] = "Malicious File Upload"
	self._attack_type["authentication cred"] = "Brute Force Attack"
	self._attack_type["requires authentication"] = "Authentication/Authorization Attacks"
	self._attack_type["buffer-overflow"] = "Buffer Overflow"
	# start xml file
	self._asmfile = xml.dom.minidom.Document()
	self._topElement = self._asmfile.createElement("scanner_vulnerabilities")
	self._topElement.setAttribute("version", self._timestampString)
Пример #20
0
    def __init__(self):
        OutputPlugin.__init__(self)

        # These attributes hold the file pointers
        self._file = None

        # User configured parameters
        self._file_name = '~/report.xml'
        self._timestamp = str(int(time.time()))
        self._long_timestamp = str(time.strftime(TIME_FORMAT, time.localtime()))

        # Set defaults for scan metadata
        self._plugins_dict = {}
        self._options_dict = {}

        # List with additional xml elements
        self._errors = DiskList()

        # xml document that helps with the creation of new elements
        # this is an empty document until we want to write to the
        # output file, where we populate it, serialize it to the file,
        # and empty it again
        self._xml = None
Пример #21
0
    def __init__(self):
        OutputPlugin.__init__(self)

        # These attributes hold the file pointers
        self._file = None

        # User configured parameters
        self._file_name = '~/report.xml'
        self._timestamp = str(int(time.time()))
        self._long_timestamp = str(time.strftime(TIME_FORMAT,
                                                 time.localtime()))

        # Set defaults for scan metadata
        self._plugins_dict = {}
        self._options_dict = {}

        # List with additional xml elements
        self._errors = DiskList()

        # xml document that helps with the creation of new elements
        # this is an empty document until we want to write to the
        # output file, where we populate it, serialize it to the file,
        # and empty it again
        self._xml = None
Пример #22
0
 def __init__(self):
     OutputPlugin.__init__(self)
     self.output_file = '~/output-w3af.csv'
Пример #23
0
 def __init__(self):
     OutputPlugin.__init__(self)
     self.output_file = '~/output-requests.csv'
Пример #24
0
    def __init__(self):
        OutputPlugin.__init__(self)

        # User configured setting
        self.verbose = False
Пример #25
0
 def __init__(self):
     OutputPlugin.__init__(self)
     self.output_file = "~/output-w3af.csv"
Пример #26
0
 def __init__(self):
     OutputPlugin.__init__(self)
     self.output_file = '~/output-requests.csv'
Пример #27
0
 def __init__(self):
     OutputPlugin.__init__(self)
     self.output_file = './trace-http.xlsx'
     self._is_initialized = False