def __init__(self): BaseLogging.__init__(self) SampleLogging.__init__(self) self.Shellcode = Shellcode() self.VirusTotal = VirusTotal() self.HoneyAgent = HoneyAgent() self.Features = Features() self.ContextAnalyzer = ContextAnalyzer() self.Screenshot = Screenshot() self.AWIS = AWIS() self.baseDir = None self.windows = dict() self.shellcodes = set() self.shellcode_urls = set() self.retrieved_urls = set() self.methods_cache = dict() self.formats = set() self.meta = dict() self.frames = dict() self.url = "" self.__init_hook_symbols() self.__init_pyhooks() self.__init_config()
def test_submit(self, caplog): log.configuration_path = "/etc/thug" log.personalities_path = "/etc/thug/personalities" vt = VirusTotal() assert vt.enabled is True data, sample = self.build_sample() vt.submit(data, sample)
def __init__(self, thug_version): BaseLogging.__init__(self) SampleLogging.__init__(self) self.thug_version = thug_version self.VirusTotal = VirusTotal() self.HoneyAgent = HoneyAgent() self.baseDir = None self.windows = dict() self.shellcodes = set() self.shellcode_urls = set() self.methods_cache = dict() self.formats = set() self.__init_config()
def test_invalid_conf(self, caplog): expected = [ '[WARNING] VirusTotal disabled (no configuration file found)', ] log.configuration_path = "/etc/invalid" log.personalities_path = "/etc/thug/personalities" vt = VirusTotal() assert vt.enabled is False data, sample = self.build_sample() vt.analyze(data, sample, '/tmp') self.do_perform_test(caplog, expected)
def __init__(self, thug_version): BaseLogging.__init__(self) SampleLogging.__init__(self) self.thug_version = thug_version self.VirusTotal = VirusTotal() self.HoneyAgent = HoneyAgent() self.Features = Features() self.ContextAnalyzer = ContextAnalyzer() self.baseDir = None self.windows = dict() self.shellcodes = set() self.shellcode_urls = set() self.methods_cache = dict() self.formats = set() self.url = "" self.__init_hook_symbols() self.__init_config()