Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File Tree Feature #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

glynx
Copy link

@glynx glynx commented Jul 7, 2022

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.

@TheTechromancer
Copy link
Collaborator

TheTechromancer commented Jun 20, 2023

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.

@glynx
Copy link
Author

glynx commented Jun 20, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants