redcanaryco / surveyor

A cross-platform baselining, threat hunting, and attack surface analysis tool for security teams.
MIT License
170 stars 59 forks source link

Surveyor - query error #48

Closed forensic65x closed 3 years ago

forensic65x commented 3 years ago

The surveyor script works fine when using definition files.

/opt/surveyor# python3 surveyor.py --deffile definitions/file-transfer.json Processing definition file for definitions/file-transfer.json -->CyberDuck: 0 results -->Filezilla: 0 results -->FTP: 4 results -->pushd: 0 results -->robocopy: 4 results -->SCP: 17 results -->SFTP: 0 results

When we attempt to perform a query using the --query option, we get the error below:

/opt/surveyor# python3 surveyor.py --query 'process_name:explorer.exe AND username:joebob' Running Query: process_name:explorer.exe AND username:joebob Traceback (most recent call last): File "surveyor.py", line 154, in cli() File "/usr/lib/python3/dist-packages/click/core.py", line 764, in call return self.main(args, kwargs) File "/usr/lib/python3/dist-packages/click/core.py", line 717, in main rv = self.invoke(ctx) File "/usr/lib/python3/dist-packages/click/core.py", line 1114, in invoke return Command.invoke(self, ctx) File "/usr/lib/python3/dist-packages/click/core.py", line 956, in invoke return ctx.invoke(self.callback, ctx.params) File "/usr/lib/python3/dist-packages/click/core.py", line 555, in invoke return callback(args, *kwargs) File "/usr/lib/python3/dist-packages/click/decorators.py", line 17, in new_func return f(get_current_context(), args, **kwargs) File "surveyor.py", line 93, in cli if utils.validate_input(query, hostname, username): TypeError: validate_input() missing 2 required positional arguments: 'days' and 'minutes'

Version information below:

uname -a Linux kali 5.4.0-kali3-amd64 #1 SMP Debian 5.4.13-1kali1 (2020-01-20) x86_64 GNU/Linux

python3 -V Python 3.7.6

rc-abodkins commented 3 years ago

This was fixed. Please test and try again.