Octoberfest7 / TeamsPhisher

Send phishing messages and attachments to Microsoft Teams users
998 stars 129 forks source link

Issue with file upload #6

Closed amit-sec closed 1 year ago

amit-sec commented 1 year ago

Hi i am having issues with file uploading here is the log

[+] Try to personalize greeting by using targets first name [-] Sending file link that is accessible by anyone with the link [-] No delay between messages [+] Using greeting: Hi, --personalize greeting: Hi , [+] Logging TeamsPhisher output at: /root/10-26_06Jul23_teamsphisher.log

Operational mode: Sending phishing messages to targets!

Authenticating, verifying files, and uploading attachment

Fetching Bearer token for Teams............................................[+] SUCCESS! Fetching Skype token.......................................................[+] SUCCESS! Fetching sender info.......................................................[+] SUCCESS! Fetching Bearer token for SharePoint.......................................[+] SUCCESS! Uploading file: test.txt...................................................[-] Error uploading file: 404

Octoberfest7 commented 1 year ago

Drop me a DM on discord at octoberfest (Octoberfest#0860) or on Twitter @Octoberfest73

LaRancion commented 1 year ago

could it be a problem of wrong path/missing file or wrong permissions on the file and the program cant read it?

Octoberfest7 commented 1 year ago

The 404 error is related to the tenant having a custom domain specified that differs significantly from the original one registered with the tenant.

I.e the original tenant name was mytestfrance.onmicrosoft.com but the custom domain now used is mytest.io

This results in users authenticating with testuser@mytest.io, and the sharepoint url being assembled as mytest-my.sharepoint.com. This is probably querying someone elses sharepoint entirely. The sender's actual sharepoint is at mytestfrance-my.sharepoint.com

I am looking at ways to resolve the sharepoint address in situations where the users domain name differs from the sharepoint link

Octoberfest7 commented 1 year ago

Some of the causes of 404 errors are addressed in 22b521a. Pull and let me know if you still have issues.

amit-sec commented 1 year ago

it worked for me thanks