MANSPIDER icon indicating copy to clipboard operation
MANSPIDER copied to clipboard

File Tree Feature

Open glynx opened this issue 3 years ago • 2 comments

During our engagements I often noticed that it is not only nice to have the directory of looted files but also some context like a directory listing. As the data is already present during spidering I implemented this file indexing into MANSPIDER. It takes a separate directory like the loot dir and creates files per host. Each host gets a txt and a json file. The json file is meant for some kind of fancy HTML viewer to be implemented. Tested the feature in multiple rather large environments and received great benefit from it.

glynx avatar Jul 07 '22 19:07 glynx

Thanks for your patience, I wish I could have got to this sooner. I agree this would be a great feature to have.

After a little testing I kept running into this error:

[!] Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/man_spider/lib/spiderling.py", line 86, in __init__
    self.go()
  File "/usr/local/lib/python3.11/site-packages/man_spider/lib/spiderling.py", line 118, in go
    for file in self.files:
  File "/usr/local/lib/python3.11/site-packages/man_spider/lib/spiderling.py", line 173, in files
    for remote_file in self.list_files(share_name, file_tree_node=file_tree_share_node):
  File "/usr/local/lib/python3.11/site-packages/man_spider/lib/spiderling.py", line 251, in list_files
    file_tree_node[name]["_meta"]["smbclient_cmd"] = self.get_smbclient_command(share, f'{path}/{name}')
    ~~~~~~~~~~~~~~^^^^^^
TypeError: 'NoneType' object is not subscriptable

Here's the command I used:

manspider 10.0.0.1 -d evilcorp -u bob -p P@ssw0rd -e xml -v

Overall good work on this, I am happy to merge it as soon as the bugs are worked out.

TheTechromancer avatar Jun 20 '23 19:06 TheTechromancer

Alright that was quite some time ago. I will rebase the branch and have a look at what fails.

glynx avatar Jun 20 '23 22:06 glynx