RedByte1337 / GraphSpy

Initial Access and Post-Exploitation Tool for AAD and O365 with a browser-based GUI
BSD 3-Clause "New" or "Revised" License
541 stars 59 forks source link

Add OneDrive & SharePoint upload capability #2

Closed pwnf closed 5 months ago

pwnf commented 5 months ago

This PR adds the ability to upload files to OneDrive directly from the application:

Frontend: Added a file upload section in OneDrive.html. Created a form with file input and upload button. Updated JavaScript to handle file uploads and refresh file list.

Backend: Added /api/generic_graph_upload endpoint. Implemented graph_upload_request function using Microsoft Graph API.

Testing: Verified uploads with various files. Ensured file list refreshes post-upload.

Additional Notes: Utilises existing access token system for authentication.

RedByte1337 commented 5 months ago

This looks great! Thanks for the PR! Will try to test it this weekend :)

RedByte1337 commented 5 months ago

Added some additional changes in commit 85efe51797cabef0e1a7331973b2580af2a1ede5 to also implement this for SharePoint. Additionally, I moved the upload section to the top right of the page and added a loading indicator when the upload is in progress (mostly useful for bigger uploads).

Note: I accidentally commit it to this repository instead of adding the commit to this pull request, so I am referencing it here for completion.