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

Copilot Studio helpers dir not copied on pip install and additional installation fixes #74

Closed
mbrg opened this issue Oct 28, 2024 · 2 comments · Fixed by #86
Closed
Assignees
Labels
bug Something isn't working

Comments

@mbrg
Copy link
Owner

mbrg commented Oct 28, 2024

Trying to run powerpwn copilot-studio-hunter deep-scan I got the following error. This is because the directory helpers doesn't get created and its content not copied.

vscode ➜ /workspaces/power-pwn (install-all-prereqs) $ powerpwn copilot-studio-hunter deep-scan -d <domain> -tb 300


------------------------------------------------------------
                                                            
 _ __    ___  __      __  ___  _ __  _ __  __      __ _ __  
| '_ \  / _ \ \ \ /\ / / / _ \| '__|| '_ \ \ \ /\ / /| '_ \ 
| |_) || (_) | \ V  V / |  __/| |   | |_) | \ V  V / | | | |
| .__/  \___/   \_/\_/   \___||_|   | .__/   \_/\_/  |_| |_|
|_|                                 |_|                     

Hacker Summer Camp 2024 edition


------------------------------------------------------------


Domain:  zenitystage.com
2024-10-28 17:49:25 | root | INFO | Tenant ID: <tenantid>
2024-10-28 17:49:25 | root | INFO | Use the following URL to access the CoPilotStudio demo website: 
https://copilotstudio.microsoft.com/environments/Default-<tenantid>/bots/
2024-10-28 17:49:25 | root | INFO | Endpoint for the default environment bots schema: https://default<tenantid>.b3.environment.api.powerplatform.com/powervirtualagents/botsbyschema/
Checking if an existing solution publisher prefix value exists for this domain.
No existing solution publisher prefix value found for this domain, starting prefix scan.
Encountered error(s): 2 errors occured.
        * stat /home/vscode/.local/lib/python3.8/site-packages/powerpwn/copilot_studio/helpers/prefix_wordlist_char_fix_basic.txt: no such file or directory
        * stat /home/vscode/.local/lib/python3.8/site-packages/powerpwn/copilot_studio/helpers/suffix_wordlist_basic_1.txt: no such file or directory

Encountered error(s): 2 errors occured.
        * stat /home/vscode/.local/lib/python3.8/site-packages/powerpwn/copilot_studio/helpers/prefix_wordlist_char_fix_basic.txt: no such file or directory
        * stat /home/vscode/.local/lib/python3.8/site-packages/powerpwn/copilot_studio/helpers/suffix_wordlist_basic_1.txt: no such file or directory

Traceback (most recent call last):
  File "/home/vscode/.local/bin/powerpwn", line 8, in <module>
    sys.exit(main())
  File "/home/vscode/.local/lib/python3.8/site-packages/powerpwn/main.py", line 54, in main
    run_copilot_studio_command(args)
  File "/home/vscode/.local/lib/python3.8/site-packages/powerpwn/cli/runners.py", line 221, in run_copilot_studio_command
    DeepScan(args)
  File "/home/vscode/.local/lib/python3.8/site-packages/powerpwn/copilot_studio/modules/deep_scan.py", line 549, in __init__
    self.run()
  File "/home/vscode/.local/lib/python3.8/site-packages/powerpwn/copilot_studio/modules/deep_scan.py", line 737, in run
    for value, popen in get_ffuf_results_prefix(
  File "/home/vscode/.local/lib/python3.8/site-packages/powerpwn/copilot_studio/modules/deep_scan.py", line 416, in get_ffuf_results_prefix
    raise subprocess.CalledProcessError(return_code, command)
subprocess.CalledProcessError: Command '['ffuf', '-v', '-w', '/home/vscode/.local/lib/python3.8/site-packages/powerpwn/copilot_studio/helpers/prefix_wordlist_char_fix_basic.txt:FUZZ1', '-w', '/home/vscode/.local/lib/python3.8/site-packages/powerpwn/copilot_studio/helpers/suffix_wordlist_basic_1.txt:FUZZ2', '-u', 'https://default<tenantid>.b3.environment.api.powerplatform.com/powervirtualagents/botsbyschema/FUZZ1_FUZZ2/canvassettings?api-version=2022-03-01-preview', '-fr', '"demoWebsiteErrorCode": "404"', '-ac', '-rate', '0', '-t', '40', '-se', '-maxtime-job', '300', '-H', 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36', '-H', 'Accept: application/json, text/plain, */*', '-H', 'Accept-Language: en-US,en;q=0.5', '-H', 'Accept-Encoding: gzip, deflate, br, zstd', '-H', 'Origin: https://copilotstudio.microsoft.com', '-H', 'DNT: 1', '-H', 'Connection: keep-alive', '-H', 'Sec-Fetch-Dest: empty', '-H', 'Sec-Fetch-Mode: cors', '-H', 'Sec-Fetch-Site: cross-site', '-H', 'Sec-GPC: 1', '-H', 'Via: 1.1 103.230.38.175', '-H', 'TE: trailers']' returned non-zero exit status 1.
@mbrg mbrg added the bug Something isn't working label Oct 28, 2024
@AvishaiEZen AvishaiEZen self-assigned this Oct 29, 2024
@AvishaiEZen
Copy link
Collaborator

Thanks. I suspect this might be related to the Python project file location not being set up correctly in some cases and so the helper files can't being located by FFUF (searching for them in an incorrec location) - will verify ASAP.

@AvishaiEZen
Copy link
Collaborator

AvishaiEZen commented Nov 23, 2024

  1. Updating PPWN's package with the missing related Copilot Hunter helper files has been handled here: https://github.com/mbrg/power-pwn/pull/77/files
  2. Adding additional related changes for improved installation as part of this issue:
  • Updated readme (changes from Readme & Docs updates #78 and more)
  • Fixing missing init.py for the Power Pages module
  • Updating the init_repo.py

The sum of these changes should hopefully resolve the issue reported here and other seen issues regarding the project's modules.

@AvishaiEZen AvishaiEZen changed the title Copilot Studio helpers dir not copied on pip install Copilot Studio helpers dir not copied on pip install and additional installation fixes Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants