applied security research
Wesley Neelen - 16 sep 2021

Public SharePoint sites – the new open shares

During one of our engagements we were investigating a Microsoft 365 environment. My colleague Rik discovered that many SharePoint sites were publicly available within the organization. We were surprised by the amount sites that were wide open this way. A lot of sensitive information was located on those sites, for example PII-information and passwords for critical systems.

Let’s go back in time

As penetration testers we performed many internal tests on the local networks of organizations. After gaining more and more experience, we developed a standard way of working. We would start by scanning the network for low hanging fruit. At the time I wrote a tool to automate this phase using Metasploit to make live easier.

One of the easiest low hanging fruit issues were open SMB-shares available on the internal network. The approach: scanning for open shares, than analyze the information that’s within those share. Such information might be useful in compromising other machines within the network.

Similar attacks

As you probably already noticed, both attacks (SharePoint and open shares) are pretty similar. Because of a misconfiguration, sensitive information is available to the attacker that may be used during the attack. This might be crucial information for an adversary to be successful.

The issue

So, why does this SharePoint issue occur? If a regular user creates a SharePoint website, he has the option to assign the Public option within the Privacy settings. Whenever a user selects this option, anyone within the organization can access the site. In other words: all authenticated users in the tenant.

Public Teams create Open Shares

Now in most organizations, it might not be very common for a regular user to create SharePoint sites at all. But this has changed with the rapid adoption of Microsoft Teams. And here comes the kicker: a Public Team creates a Public SharePoint site for it’s filestorage. In other words: Public Teams are Open Shares. Let that sink in.

As Teams is now the defacto standard for collaboration within many organizations, lots of employees have developed the habit to quickly spin up a new team for all kinds of reasons. A new project, a multidisciplinary team, an event, partner or customer engagement. To name a few. Such teams might start quite meaningless in terms of sensitive information. But they might just as well grow to become a huge trove of knowledge right there for grabs to an attacker snooping around.

Discovering public SharePoint sites within your organization

As an (SharePoint) administrator it is possible to view the sites that are set to public. Through the portal youncan find all Active Sites through the admin portal, select “SharePoint” -> Sites -> Active Sites. By clicking a specific site, its possible to view the Site members at the Permissions tab. If “Everyone except external users” is listed, it means the site is public within your organization.

As an alternative I wrote a Powershell one-liner. This Powershell query returns a list of all public available sites within your organizations tenant:

Get-SPOSite | ForEach-Object { try { $res = Get-SPOSiteGroup -Site $_.url | Where-Object {$_.Users -Match “spo-grid-all-users”}; if ($res -ne $null) { write-host $_.url } } Catch {} }

Detecting the creation of Public sites using Sentinel

For our SMB security app Attic we also decided to write a Sentinel query. The query detects the creation of a new public SharePoint sites. Whenever a user creates a public SharePoint site, the rule triggers. This allows an organization to monitor for misconfigured SharePoint sites and take particular measurements if needed (make it private). We have shared the rule on our GitHub page here.

Its important to note that the query currently only works for tenants with the English or Dutch language. If your tenants uses another language, add the correct group name to the Translations dynamic. It sucks, but it works for now ;-).

Using Graph API to find sites.

We can also use the OfficeActivity log to detect new sites being created. However that way we will miss the sites that already existed before starting the monitoring.

We looked into Graph API in order to find all the SharePoint sites and whether they are public. The interesting thing is that we could find the sites but were unable to see whether they are public or private. After digging for a while we found that we could detect sites based on the groups in the tenant. We use the Graph API “/v1.0/groups” endpoint. The endpoint returns different groups, you can detect SharePoint sites by searching for “SPO_<GUID>” in the proxyAddresses property.

A SharePoint Group with the visibility set to public.

We wrote a simple script to check whether your organization has SharePoint sites set to public using the Graph API:

Listing sites via Graph API.

Preventing users from creating Public SharePoint sites

The best solution would be to completely prevent the creation of new sites with the Public privacy settings. At time of writing this blog, we haven’t found a nice solution to completely prevent this, which kind of surprised us. Please let us know if you read this blog and do have a solution.

Rik made a statement which I kind of liked, because it seems true as more and more companies are moving to the cloud:

Public SharePoint sites are the new open shares

Attic and SharePoint sites

We added CHK-1520 to Attic. Every new SharePoint site that gets created with the access set to public will result in an alert. We’re currently looking to expand these types of checks and are looking into:

  1. Detect sites that haven’t been used for a while. Possibly combined with the fact that they are public.
  2. Detect public OneDrive libraries.
  3. Detect files being shared with direct links instead of based on email address or password.
Blogs

Attic Security voegt gratis AITM detectie toe  

- 25 mrt 2024
GRATIS bescherming tegen phishing voor Microsoft365  Goed nieuws! We hebben de gratis versie van Attic uitgebreid met een nieuwe oplossing: AITM Detectie. AiTM is een methode van cybercriminelen om (Microsoft) accounts te hacken en tweestapsverificatie te omzeilen. Met de AITM-functie in Attic kun jij als gebruiker eenvoudig je Microsoft365 omgeving beveiligen tegen phishingaanvallen. Het stelt […] Lees verder

Microsoft AITM honeytoken: warning the victims

Wesley Neelen - 18 mrt 2024
In January we launched new functionality for Attic to detect AiTM attacks targeting the Microsoft 365 tenant of customers. Using the platform of didsomeoneclone.me and custom CSS in the Microsoft login page. Since then, our approach has been implemented by other companies, such as EYE, CIPP and even de honey-heroes at Thinkst. This is amazing, because like this, our approach has more […] Lees verder

Attic Release Notes 2024.3.13

Erik Remmelzwaal - 13 mrt 2024
We are preparing Attic to become multi-lingual. For now this has led to the following (semi-)related new features. Furthermore we added some non-related additions particularly to Partner Portal and security content. Attic App Mail Layout Our backend consists of several functions that may generate email messages to users. We have unified the email templates in […] Lees verder

Building an AITM attack tool in Cloudflare Workers (174 LOC)

Wesley Neelen - 11 mrt 2024
In January we launched new functionality for Attic to detect AiTM attacks targeting the Microsoft 365 tenant of customers. Using the platform of didsomeoneclone.me and custom CSS in the Microsoft login page. Since then we are monitoring new detections and obviously, as security researchers, we deepdive into any detection that involves previously unseen TTPs.  Our […] Lees verder

Zolder B.V. ontvangt CCV Pentest Certificaat van DEKRA

Rik van Duijn - 16 feb 2024
Op 15 februari 2024 heeft Zolder B.V. het certificaat voor Certified Cybersecurity Vulnerability Pentest (CCV Pentest) van het test- en certificeringsbedrijf DEKRA ontvangen. Dit certificaat bevestigt dat Zolder B.V. voldoet aan de normen voor cybersecurity pentesting, wat onze klanten zekerheid biedt over de kwaliteit en professionaliteit van onze diensten. Het CCV Pentest Certificaat is van […] Lees verder

Microsoft 365 AiTM detection: the lessons learned

Wesley Neelen - 12 feb 2024
The beginning of January we released a new way to detect AiTM attacks on your Microsoft 365 environment. In just one month, we are protecting over 100 tenants with this new approach. We were able to protect so many tenants in a short time due to our existing customers of the Attic app. Also, our […] Lees verder

Attic Release Notes 2024.2.2

Erik Remmelzwaal - 08 feb 2024
In deze release van Attic introduceren wij een nieuwe manier van onboarding van diensten. Daardoor is het eenvoudiger geworden om TRIAL versies van onze diensten, met name die voor Microsoft365, toe te voegen. Het enige wat je nu nog nodig hebt om 2 weken met Attic for M365 te testen, is een (gratis) Attic account. […] Lees verder

Using honeytokens to detect (AiTM) phishing attacks on your Microsoft 365 tenant

Wesley Neelen - 09 jan 2024
Phishing attacks are rapidly increasing against Microsoft 365 tenants. Why? Microsoft is used by many company’s and users, so targetting it is very attractive. Also, techniques to bypass Multi-Factor Authentication (MFA) during a phishing attack are gaining popularity (AiTM phishing attacks). This allows attackers to even compromise accounts protected by MFA. At Zolder we are […] Lees verder

Pentesting-as-a-Service: rapporten zijn ouderwets

- 18 dec 2023
De manier van rapporteren van pentestresultaten lijkt stil te staan. Dat terwijl pentesten in feite de ideale manier is om risico’s en kwetsbaarheden te identificeren. Maar terwijl de cyberdreigingen in een hoog tempo veranderen, lijkt de manier waarop we het pentestproces inrichten soms stil te staan. Bij Zolder zijn we ervan overtuigd dat deze cruciale […] Lees verder

Storm-1575 AITM platform used to target cybersecurity experts

Zolder B.V. - 21 nov 2023
This morning we received a phishing mail containing a QR code. The mail caught our attention because it bypassed our spam filter and came straight into our inbox. Also, our company name “Zolder” was mentioned multiple times in the phishing mail, which indicates a more targeted campaign, although probably still highly automated. Last year Zolder […] Lees verder

Microsoft 365 review: onze hackers controleren jouw Microsoft 365 omgeving!

- 31 okt 2023
Heb je Attic inmiddels aangeschaft, of overweeg je om het te kopen? Maar heb je toch behoefte aan ondersteuning van onze security experts? Maak kennis met onze Microsoft 365 review dienst, ontworpen om jou te ondersteunen bij het optimaal benutten van Attic en je bedrijf te beschermen tegen digitale bedreigingen. Loop je vast met Attic? […] Lees verder

Subsidieregeling voor kleine bedrijven

Erik Remmelzwaal - 09 okt 2023
Uit onderzoek over cyberveiligheid onder kleinere bedrijven komt naar voren dat maar liefst 19% geen enkele cybersecuritymaatregel treft. Dit maakt kleine ondernemers kwetsbaar voor cyberaanvallen. Het Digital Trust Center (DTC) lanceerde eerder dit jaar de CyberVeilig Check voor mkb en zzp. De cyberorganisatie opent nu tijdelijk ook een subsidieregeling ‘Mijn Cyberweerbare Zaak’ om mogelijke financiële […] Lees verder

Attic versie 2023.9.0 - Release Notes

- 21 sep 2023
Een nieuwe Attic #release bomvol nieuwe checks, geïnspireerd door de #CIS Benchmark voor #Microsoft365. Deze release zit vol met nieuwe Checks en Fixes. Want we zijn hard bezig om te zorgen dat Attic “CIS-certified” raakt als assessment tool voor Microsoft365 en hebben nu bijna alle checks gebouwd die daarvoor nog nodig waren. Daarnaast is er […] Lees verder

Microsoft Sentinel: Wapen tegen Cyberdreigingen

Erik Remmelzwaal - 19 sep 2023
In de wereld van cybersecurity sta je voor een belangrijke uitdaging: het beschermen van je organisatie tegen digitale bedreigingen. Gelukkig is er een krachtig hulpmiddel tot je beschikking: Microsoft Sentinel. Wij praten er veel over vanwege onze dienstverlening, maar wat is het nu eigenlijk? in dit blog deel ik graag mijn inzichten met jou, zodat je een solide basisbegrip krijgt van wat dit product is en hoe je het kunt inzetten. Lees verder

Door NIS2 moet je iets gaan doen wat je nu nog niet doet...

Erik Remmelzwaal - 03 aug 2023
Als je onder een steen hebt geleefd: NIS2 komt eraan. De 2e versie van de Network and Information Security richtlijn van de EU. Het duurt nog even voordat dit in Nederlandse wetgeving is omgezet en daarin kunnen nog belangrijke details gaan schuiven, maar in grote lijnen weten we wat er op ons af komt. Door […] Lees verder

5 tips voor MKB'ers om zichzelf weerbaar te  maken tegen misleiding via internet

- 21 jul 2023
In de digitale wereld worden MKB’ers steeds vaker geconfronteerd met de dreiging van social engineering. In deze blogpost delen we waardevolle inzichten over twee veelvoorkomende vormen van social engineering, phishing en CEO-fraude. We benadrukken echter de praktische tips die MKB’ers kunnen volgen om zichzelf effectief te beschermen tegen deze cyberdreigingen. Phishing en CEO-fraude Phishing omvat […] Lees verder

Using MiTMProxy as a scriptable pre-proxy for BurpSuite

Rik van Duijn - 11 jul 2023
TLDR: you can use mitmproxy to modify stuff before it sent to Burp Proxy. Instruction below. Recently we were asked to asses a oldschool Java client server application. After configuring BurpSuite as a proxy and trusting the CA cert, we noticed the client communication still gave an error. It turned out the client and server […] Lees verder

Wat leren we uit het NCTV Cybersecuritybeeld en Verizon DBIR 2023

Zolder B.V. - 04 jul 2023
De samengestelde conclusie die ik haal uit CSBN en DBIR is dat organisaties (nog steeds) vooral slachtoffer worden via gelekte inloggegevens en e-mail en dat ze datalekken bijna altijd kunnen voorkomen door het implementeren van basismaatregelen. En de basismaatregel die past bij gelekte inloggegevens is Multi-Factor Authentication (MFA). Lees verder

Weerbaar tegen CEO-Fraude met Logs in Microsoft365

Erik Remmelzwaal - 22 jun 2023
Veel organisaties kunnen maar 7 dagen terugkijken in hun Microsoft365 logboeken. Veel te weinig, om adequaat te reageren op incidenten zoals CEO-Fraude en Ransomware. Belangrijk dus om te begrijpen welke mogelijkheden er zijn om die termijn uit te breiden. Lees verder

Attic voor de zorg: De toekomst van beveiliging met partnerschap Z-CERT

- 06 jun 2023
Attic voor de zorg is momenteel in ontwikkeling. We richten ons vooral op de toekomstige beschikbaarheid van deze krachtige beveiligingsoplossing en we nodigen zorginstellingen uit om deel te nemen aan onze beta-testfase. Partnerschap met Z-CERT In samenwerking met Z-CERT, de toonaangevende leverancier van dreigingsinformatie in de Nederlandse zorgsector, biedt Attic voor de zorg een unieke […] Lees verder

Ontdek meer van Zolder B.V.

Abonneer je nu om meer te lezen en toegang te krijgen tot het volledige archief.

Lees verder