Abacus-Group-RTO / legion

Legion is an open source, easy-to-use, super-extensible and semi-automated network penetration testing tool that aids in discovery, reconnaissance and exploitation of information systems.
GNU General Public License v3.0
1.03k stars 170 forks source link

KeyError edbid #240

Closed Warlord711 closed 1 year ago

Warlord711 commented 1 year ago

Running a scan against a handful of targets during a pentest results in a crash:

{"time": "2023-05-22 10:46:58,940", "name": "Process 32 is done!", "level": "INFO", "data": {"logger_name": "legion"}, "context": {"module": "controller", "filename": "controller.py", "line": 839}} Processing service result *********** name=ssh prod=OpenSSH ver=7.9 extra=FreeBSD 20200214; protocol 2.0 fing= Did not find service *********** name=ssh prod=OpenSSH ver=7.9 extra=FreeBSD 20200214; protocol 2.0 fing= Processing service result *********** name=http prod=nginx ver= extra= fing= Processing service result *********** name=http prod=nginx ver= extra= fing= Processing script obj <parsers.Script.Script object at 0x7f66c5977610> -----------------------SCR: vulners ------------------------VULNERS Loading database... 1337DAY-ID-32009 [] EDB-ID:46193 [] EDB-ID:46516 [] EXPLOITPACK:5330EA02EBDE345BFC9D6DDDD97F9E97 [] EXPLOITPACK:98FE96309F9524B8C84C508837551A19 [] CVE-2019-6111 {'id': '46193', 'file': 'exploits/multiple/remote/46193.py', 'description': 'SCP Client - Multiple Vulnerabilities (SSHtranger Things)', 'date': '2019-01-18', 'author': 'Mark E. Haase', 'type': 'remote', 'platform': 'multiple', 'port': '', 'date_updated': '2019-01-18', 'verified': '0', 'codes': 'CVE-2019-6111;CVE-2019-6110', 'tags': '', 'aliases': 'SSHtranger Things', 'app_url': '', 'src_url': 'https://gist.github.com/mehaase/63e45c17bdbbd59e8e68d02ec58f4ca2'} Traceback (most recent call last): File "/opt/legion/app/importers/NmapImporter.py", line 283, in run scrProcessorResults = scr.scriptSelector(db_host) File "/opt/legion/parsers/Script.py", line 122, in scriptSelector cveResults = self.getCves() File "/opt/legion/parsers/Script.py", line 96, in getCves cvesResults = self.processVulnersScriptOutput(cveOutput) File "/opt/legion/parsers/Script.py", line 80, in processVulnersScriptOutput resultCveDict['exploitId'] = exploitResults['edbid'] KeyError: 'edbid' ./startLegion.sh: Zeile 38: 6815 Abgebrochen /usr/bin/env python3 legion.py

sscottgvit commented 1 year ago

Looks like your pyExploitDb database was corrupted. Try removing legion and reinstalling it. This will force the recreation of that database.