Ekultek / Ekultek/Zeus-Scanner
Unhandled exception (664559bb)
- Dominant language
- Python
- Stars
- 999
- Forks
- 245
- PR merge metrics
- No merged PRs in 30d
Description
Zeus version:
`1.5.2.21b875`
Firefox version:
`(57, 0)`
Geckodriver version:
`geckodriver-v0.19.0-linux64.tar.gz`
Error info:
```Traceback (most recent call last):
File "/home/pako/zeus-scanner/lib/attacks/sqlmap_scan/__init__.py", line 222, in sqlmap_scan_main
sqlmap_scan.show_sqlmap_log(api_id)
File "/home/pako/zeus-scanner/lib/attacks/sqlmap_scan/__init__.py", line 126, in show_sqlmap_log
log_json = json.loads(log_req.content)
File "/usr/lib/python2.7/json/__init__.py", line 339, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
```
Running details:
`Linux-5.1.0-parrot1-3t-amd64-x86_64-with-Parrot-4.7-stable`
Commands used:
`./zeus.py -d index.php?ID= -s -W -E --verbose`
Log file info:
```2019-08-11 16:19:06,164;zeus-log;INFO;detecting target charset
2019-08-11 16:19:06,167;zeus-log;INFO;target charset appears to be 'UTF-8'
2019-08-11 16:19:06,168;zeus-log;DEBUG;loading XML data
2019-08-11 16:19:06,169;zeus-log;INFO;attempting to get request headers for 'http://www.sedimental.com/catalog/index.php?ID=67'
2019-08-11 16:19:06,169;zeus-log;DEBUG;fetched {'Content-Length': '6164', 'Upgrade': 'h2', 'Content-Encoding': 'gzip', 'Vary': 'Accept-Encoding', 'Keep-Alive': 'timeout=2, max=100', 'Server': 'Apache', 'Connection': 'Upgrade, Keep-Alive', 'Date': 'Sun, 11 Aug 2019 13:18:56 GMT', 'Content-Type': 'text/html; charset=UTF-8'}
2019-08-11 16:19:06,169;zeus-log;INFO;writing found headers to log file
2019-08-11 16:19:06,170;zeus-log;INFO;successfully wrote found items to '/home/pako/zeus-scanner/log/header-log/www.sedimental.com-headers.json'
2019-08-11 16:36:17,743;zeus-log;INFO;creating arguments for sqlmap
2019-08-11 16:36:17,818;zeus-log;INFO;initializing new sqlmap scan with given URL 'http://www.sedimental.com/catalog/index.php?ID=67'
2019-08-11 16:36:17,827;zeus-log;DEBUG;scan initialized
2019-08-11 16:36:17,827;zeus-log;INFO;gathering sqlmap API scan ID
2019-08-11 16:36:17,835;zeus-log;DEBUG;current sqlmap scan ID: '064a719ba9829abc'
2019-08-11 16:36:17,835;zeus-log;INFO;starting sqlmap scan on url: 'http://www.sedimental.com/catalog/index.php?ID=67'
2019-08-11 16:36:17,835;zeus-log;DEBUG;no arguments passed, skipping
2019-08-11 16:36:17,836;zeus-log;WARNING;please keep in mind that this is the API, output will not be saved to log file, it may take a little longer to finish processing, launching sqlmap
2019-08-11 16:37:22,240;zeus-log;INFO;currently running on 'https://www.architecturalpapers.ch/index.php?ID=10' (target #3)
2019-08-11 16:37:22,241;zeus-log;INFO;fetching target meta-data
2019-08-11 16:37:23,665;zeus-log;INFO;detecting target charset
2019-08-11 16:37:23,666;zeus-log;INFO;target charset appears to be 'UTF-8'
2019-08-11 16:37:23,667;zeus-log;DEBUG;loading XML data
2019-08-11 16:37:23,669;zeus-log;INFO;attempting to get request headers for 'https://www.architecturalpapers.ch/index.php?ID=10'
2019-08-11 16:37:23,670;zeus-log;DEBUG;fetched {'Upgrade': 'h2,h2c', 'X-Powered-By': 'PHP/5.6.40', 'Transfer-Encoding': 'chunked', 'Keep-Alive': 'timeout=5, max=100', 'Server': 'Apache', 'Connection': 'Upgrade, Keep-Alive', 'Date': 'Sun, 11 Aug 2019 13:37:12 GMT', 'Content-Type': 'text/html; charset=utf-8'}
2019-08-11 16:37:23,671;zeus-log;INFO;writing found headers to log file
2019-08-11 16:37:23,672;zeus-log;INFO;successfully wrote found items to '/home/pako/zeus-scanner/log/header-log/www.architecturalpapers.ch-headers.json'
2019-08-11 16:37:27,851;zeus-log;INFO;creating arguments for sqlmap
2019-08-11 16:37:27,927;zeus-log;INFO;initializing new sqlmap scan with given URL 'https://www.architecturalpapers.ch/index.php?ID=10'
2019-08-11 16:37:27,938;zeus-log;DEBUG;scan initialized
2019-08-11 16:37:27,939;zeus-log;INFO;gathering sqlmap API scan ID
2019-08-11 16:37:27,949;zeus-log;DEBUG;current sqlmap scan ID: 'f9632d21dc1df2f3'
2019-08-11 16:37:27,950;zeus-log;INFO;starting sqlmap scan on url: 'https://www.architecturalpapers.ch/index.php?ID=10'
2019-08-11 16:37:27,950;zeus-log;DEBUG;no arguments passed, skipping
2019-08-11 16:37:27,950;zeus-log;WARNING;please keep in mind that this is the API, output will not be saved to log file, it may take a little longer to finish processing, launching sqlmap
2019-08-11 16:42:00,340;zeus-log;ERROR;[7;31;31mran into error 'No JSON object could be decoded', seems something went wrong, error has been saved to current log file.
Traceback (most recent call last):
File "/home/pako/zeus-scanner/lib/attacks/sqlmap_scan/__init__.py", line 222, in sqlmap_scan_main
sqlmap_scan.show_sqlmap_log(api_id)
File "/home/pako/zeus-scanner/lib/attacks/sqlmap_scan/__init__.py", line 126, in show_sqlmap_log
log_json = json.loads(log_req.content)
File "/usr/lib/python2.7/json/__init__.py", line 339, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
2019-08-11 16:42:01,138;zeus-log;INFO;[32mZeus got an unexpected error and will automatically create an issue for this error, please wait[0m
2019-08-11 16:42:01,138;zeus-log;INFO;[32mgetting authorization[0m
2019-08-11 16:42:01,142;zeus-log;INFO;[32mextracting traceback from log file[0m
2019-08-11 16:42:01,143;zeus-log;INFO;[32mattempting to get firefox browser version[0m
```
Contributor guide
Research direction
Start at lib/attacks/sqlmap_scan/__init__.py lines 126 and 222, where the sqlmap response is parsed and the exception reaches the main scan flow. Reproduce the issue with the reported ./zeus.py command and inspect the response before JSON decoding; done means this failure no longer produces an unhandled exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100