PDA

View Full Version : Kali - problem with sparta and run python exploit



PawelC
2020-02-02, 18:29
Hello,
I have a problem with the kali system, specifically running anything on it. When I start Sparta and start scanning the host, they get port 80 as a result, after a while of further scanning I get an error:

{"time": "2020-02-02 19:05:48,181", "name": "Storing process output into db: <db.database.process_output object at 0x7f04cc17ba50>", "level": "INFO", "data": {"logger_name": "legion"}, "context": {"module": "logic", "filename": "logic.py", "line": 526}}
Processing script obj <parsers.Script.Script object at 0x7f04cc5299d0>
Processing script obj <parsers.Script.Script object at 0x7f04cc529b10>
-----------------------SCR: http-server-header
-----------------------*http-server-header
-----------------------SCR: vulners
------------------------VULNERS
Loading database...
Traceback (most recent call last):
File "/usr/share/legion/app/logic.py", line 841, in run
scrProcessorResults = scr.scriptSelector(db_host)
File "/usr/share/legion/parsers/Script.py", line 123, in scriptSelector
cveResults = self.getCves()
File "/usr/share/legion/parsers/Script.py", line 97, in getCves
cvesResults = self.processVulnersScriptOutput(cveOutput)
File "/usr/share/legion/parsers/Script.py", line 45, in processVulnersScriptOutput
pyExploitDb.openFile()
File "/usr/lib/python3/dist-packages/pyExploitDb/__init__.py", line 44, in openFile
with open(self.cachePath + "/" + exploitMap, encoding="utf-8") as fileData:
FileNotFoundError: [Errno 2] No such file or directory: '/home/pawel/.cache/pyexploitdb/cveToEdbid.json'

Second problem is when i have run exploit for example 45210.py and 45233.py

when i run 45233.py i receive:
Traceback (most recent call last): File "ssh.py", line 30, in <module> old_parse_service_accept = paramiko.auth_handler.AuthHandler._handler_table[paramiko.common.MSG_SERVICE_ACCEPT] TypeError: 'property' object has no attribute '__getitem__'
ssh.py is 45233.py, but when i have run 45210.py i have:

File "45210.py", line 40, in <module> paramiko.common.MSG_SERVICE_ACCEPT]


I have kali linux installed on virtualbox as well as a second disk system and the firing effect is the same. Am I doing something wrong, or am I missing something in the system? I have Kali 2020. Anyone have idea?

GuthDC
2020-02-09, 20:43
Hello,
I have a problem with the kali system, specifically running anything on it. When I start Sparta and start scanning the host, they get port 80 as a result, after a while of further scanning I get an error:

{"time": "2020-02-02 19:05:48,181", "name": "Storing process output into db: <db.database.process_output object at 0x7f04cc17ba50>", "level": "INFO", "data": {"logger_name": "legion"}, "context": {"module": "logic", "filename": "logic.py", "line": 526}}
Processing script obj <parsers.Script.Script object at 0x7f04cc5299d0>
Processing script obj <parsers.Script.Script object at 0x7f04cc529b10>
-----------------------SCR: http-server-header
-----------------------*http-server-header
-----------------------SCR: vulners
------------------------VULNERS
Loading database...
Traceback (most recent call last):
File "/usr/share/legion/app/logic.py", line 841, in run
scrProcessorResults = scr.scriptSelector(db_host)
File "/usr/share/legion/parsers/Script.py", line 123, in scriptSelector
cveResults = self.getCves()
File "/usr/share/legion/parsers/Script.py", line 97, in getCves
cvesResults = self.processVulnersScriptOutput(cveOutput)
File "/usr/share/legion/parsers/Script.py", line 45, in processVulnersScriptOutput
pyExploitDb.openFile()
File "/usr/lib/python3/dist-packages/pyExploitDb/__init__.py", line 44, in openFile
with open(self.cachePath + "/" + exploitMap, encoding="utf-8") as fileData:
FileNotFoundError: [Errno 2] No such file or directory: '/home/pawel/.cache/pyexploitdb/cveToEdbid.json'

Second problem is when i have run exploit for example 45210.py and 45233.py

when i run 45233.py i receive:
Traceback (most recent call last): File "ssh.py", line 30, in <module> old_parse_service_accept = paramiko.auth_handler.AuthHandler._handler_table[paramiko.common.MSG_SERVICE_ACCEPT] TypeError: 'property' object has no attribute '__getitem__'
ssh.py is 45233.py, but when i have run 45210.py i have:

File "45210.py", line 40, in <module> paramiko.common.MSG_SERVICE_ACCEPT]


I have kali linux installed on virtualbox as well as a second disk system and the firing effect is the same. Am I doing something wrong, or am I missing something in the system? I have Kali 2020. Anyone have idea?

I had the same issue. Search your installation for the missing file and copy it to /home/user/.cache/pyexploitdb/
This is how I found the file:

cd /
sudo find -name cveToE*

Then I copied it:

cp ./usr/lib/python3/dist-packages/pyExploitDb/cveToEdbid.json /home/user/.cache/pyexploitdb/cveToEdbid.json

After this, Sparta ran without any issues.

Manoj25
2020-03-02, 16:08
nice .. it's working :)