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

Verbeteringen in API's en toekomstige wijzigingen bij Attic

- 24 mei 2023
Microsoft heeft recentelijk enkele verbeteringen doorgevoerd in de API’s die toegang verlenen tot uw tenant. GDAP Op dit moment maakt Attic gebruik van DAP, oftewel Delegated Admin Privileges, om toegang te verkrijgen tot uw omgeving. Microsoft heeft onlangs een verbeterde versie van deze functionaliteit geïntroduceerd, genaamd GDAP, oftewel granular delegated admin privileges. Deze nieuwe versie […] Lees verder

Attic voegt website clone monitor toe

Wesley Neelen - 08 mei 2023
Attic is een krachtig platform wat heel veel mogelijkheden biedt. Attic is modulair opgebouwd zodat het platform aangevuld kan worden met extra diensten, ontwikkeld door Zolder, maar in de toekomst ook door externe leveranciers. Enkele maanden geleden heb ik een gratis applicatie gelanceerd genaamd didsomeoneclone.me. Deze service is gebaseerd op Microsoft Azure en volledig cloud […] Lees verder

Attic als SOC

Zolder B.V. - 11 apr 2023
Bijna is het zover: roadmap-technisch naderen we het punt dat we de koppeling van Attic met Microsoft Sentinel gaan afronden. En daarmee de gelegenheid om op grote schaal organisaties te voorzien van een betaalbare SOC dienst. Tijdens onze deelname aan de RSA conferentie zullen we bezoekers van onze stand en website aanbieden zich alvast te […] Lees verder

Internetoplichters richten pijlen op Hockeyvereniging

Erik Remmelzwaal - 10 mrt 2023
De penningmeester van Hockeyclub Zevenbergen ontving een poging tot oplichting. Gelukkig werd het herkend, maar zal dat overal gebeuren, nu internetoplichters hun pijlen blijkbaar op sportverenigingen hebben gericht? Lees verder

Microsoft Digital Defense Report

Erik Remmelzwaal - 14 nov 2022
Het Digital Defense Report 2022 van Microsoft is uitgekomen. Wat zijn de highlights en key takeaways? Lees verder

TBX2022 Throwback & Masterclass

Erik Remmelzwaal - 07 nov 2022
Op 2 en 3 november vond in de Jaarbeurs Utrecht de TBX2022 beurs plaats. Zolder was net als vorig jaar aanwezig als exposant, en was op beide dagen de host van een masterclass. Ons voornaamste doel was om ons nieuwe propositie van Attic for MSPs bekend te maken. Met deze nieuwe release, stellen we andere […] Lees verder

Hacking my Helium Crypto Miner

Wesley Neelen - 05 sep 2022
Recently I came across an interesting cryptocurrency project called Helium. Its a wireless network built by people all around the world. The people that help expanding the network by adding a hotspot receive the Helium cryptocurrency coin by providing the coverage. During my research I decided to order one of those Helium miners. I ordered […] Lees verder

PEN-300 / OSEP review

Wesley Neelen - 19 jul 2022
This year I decided to start a new study, the PEN-300 course of Offensive Security. In 2012 I did the OSCP course and in 2013 OSCE. In 2016 I took the OSEE class in Vegas, unfortunately never took the exam (one of my biggest mistakes ever🥴). I liked all the courses very much at that […] Lees verder

Deze 3 misverstanden blokkeren het ontwikkelen van cyberweerbaarheid

Zolder B.V. - 04 jul 2022
Het NCTV heeft weer het jaarlijkse Cybersecuritybeeld Nederland gepubliceerd. Het CSBN-2022. Mooie aanleiding om eens op te schrijven waar ik al langer mee in mijn hoofd zit. Drie hardnekkige en foute aannames die mensen hebben bij digitale dreigingen. Drie misverstanden dus, die in mijn ervaring de belangrijkste reden zijn dat we nauwelijks vooruit komen met […] Lees verder

Cyberweerbaarheid en Operational Technology

Erik Remmelzwaal - 02 jun 2022
Onlangs nam Erik Remmelzwaal, co-owner en Managing Director van Zolder BV, deel aan een tafelgesprek van Data Value Center – Smart Industry (DVC-SI). Het thema was Cyberweerbaarheid en Operational Technology, en het gesprek werd opgenomen in de campus van Breda Robotics, waar Zolder lid van is. De opname is inmiddels beschikbaar en terug te kijken […] Lees verder

Detecting MFASweep using Azure Sentinel

Zolder B.V. - 01 nov 2021
Many companies are using cloud services such as Microsoft 365 for email, file sharing and communicating. If an attacker gains access to valid credentials that allows them to authenticate to the account, all information within the account is usually instantly accessible. Therefor, implementing multi factor authentication is one of the most important steps while securing […] Lees verder

Public SharePoint sites - the new open shares

Wesley Neelen - 16 sep 2021
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 […] Lees verder

Decrypt passwords from Xerox Workcentre config backups

Rik van Duijn - 29 aug 2021
During a recent engagement we encountered Xerox WorkCentre printers using default credentials (admin:1111). Usually it’s just another finding, but this time we noticed the printer had SMB and e-mail credentials configured. For LDAP we usually point the printer to our own IP and get access to the plaintext creds that way. But in the case […] Lees verder

Office 365 audit logging

Rik van Duijn - 19 aug 2021
It’s important to enable audit logging for o365 even if you are not monitoring them actively. Atleast if you get hacked there’s logging to investigate :). The audit log is not always enabled by default, it seems to rely on license levels. However there are some important things to take into consideration. You can enable […] Lees verder

Ransomware, nationale crisis?

Erik Remmelzwaal - 04 aug 2021
Als er 1 digitale dreiging is die veel in het nieuws komt, dan is het ransomware. Er wordt zelfs gesproken van een nationale crisis. Lees verder

Mijlpalen en hoe het gaat

Zolder B.V. - 02 jul 2021
Vandaag gebeurden er op Zolder toch een paar dingen die blogwaardig zijn. Dus prima aanleiding om nog maar eens de laptop open te klappen en te vertellen hoe het gaat. Nieuwe collega’s Het is 1 juli 2021 en we zijn ruim een jaartje onderweg als Zolder. De belangrijkste stap die we vandaag zetten, is dat […] Lees verder

Zolder wordt hoofdsponsor HCZ

Zolder B.V. - 01 jul 2021
Vandaag is bekend geworden dat Zolder de nieuwe hoofdsponsor is van HCZ – Hockeyclub Zevenbergen. De komende drie seizoenen zal het logo van Zolder daarom voorop de shirts van alle HCZ leden prijken. We zijn heel erg trots op deze nieuwe stap voor ons jonge bedrijf, en hopen zo de relatie met onze regio te […] Lees verder

Breda Robotics

Erik Remmelzwaal - 10 mei 2021
Zolder BV is toegetreden tot het netwerk van Breda Robotics. Deze vereniging brengt organisaties bij elkaar die actief zijn rondom robotisering in de regio West-Brabant. Voor Zolder geeft Breda Robotics de mogelijkheid om samen te werken met de robotiseringsindustrie. Te begrijpen hoe die sector precies werk en op welke vlakken cybersecurity kennis kan worden ingezet […] Lees verder

27% .nl domeinen slecht beschermd tegen spoofing

Erik Remmelzwaal - 29 apr 2021
TLDR: We scanden de DNS records van 1,6 miljoen .nl domeinen en vonden uit: 9% is rechtstreeks gekoppeld aan Microsoft 365, daarmee is Microsoft veruit de grootste Google is nr2 en heeft 4% van de domeinen aan zich verbonden, nagenoeg gelijk aan een aantal andere spelers. Van alle mail-enabled domeinen heeft 27% geen SPF record […] Lees verder

Zolder biedt MKB betaalbare en eenvoudige security-app

Zolder B.V. - 12 apr 2021
“Attic voorkomt dat security een luchtbel wordt” Security is bij mkb-bedrijven vaak het ondergeschoven kindje. Ze hebben er de mensen en het budget niet voor. Dat maakt deze doelgroep een aantrekkelijk doelwit voor cybercriminelen. Voor de vier doorgewinterde cybersecurity-experts van start-up Zolder reden om Attic te introduceren. Deze eenvoudige, goedkope en toekomstbestendige app maakt mkb’ers […] Lees verder