Ik trof vandaag de volgende mail aan in mijn postbus:
Hello Team,
I am Keyur Maheta, and I have discovered a security issue in your system.
Vulnerability Description:
Exposed .apdisk Files Revealing Internal Metadata
Affected URLs:
https://imap.xxxx.nl/.apdisk
https://smtp.xxxxx.nl/.apdisk
https://triskel.xxxx.nl/.apdisk
Vulnerability Type:
Information Disclosure via Publicly Accessible .apdisk Files
Description:
The .apdisk files are publicly accessible on your servers. These files are metadata files created by Appleās AFP (Apple Filing Protocol) systems and may contain internal volume or disk information that is not intended for public exposure.
Exposing .apdisk files can leak internal directory structure or system information that aids attackers in reconnaissance.
Steps to Reproduce:
Access the URLs listed above in a web browser.
The contents of the .apdisk files are displayed without any authentication.
Impact of the Vulnerability:
Information Disclosure:
Reveals internal metadata about your file systems or servers.
Reconnaissance Aid:
Attackers can use this data to better understand your infrastructure and plan further attacks.
Increased Attack Surface:
Detailed system knowledge can increase the likelihood of targeted exploits.
Remediation:
Remove or Restrict Access:
Remove .apdisk files from public web directories or block access via web server configuration.
Audit Public Files:
Review and restrict exposure of other hidden or metadata files.
Harden Server Configurations:
Ensure only necessary files are accessible and implement strict access controls.
Best Regards,
Keyur Maheta
Het lijkt me duidelijk een legitieme mail van een veiligheidsonderzoeker. Het komt er op neer dat als ik de web share mount op de mac, de mac een hidden file met ".appdiks" wegschrijft op die share. In die file staan een paar systeemspecifieke parameters. Ik kan die file wel wissen, maar zodra ik de web share weer mount komt die file weer terug.
Ik heb dus even lopen zoeken hoe ik die file kan blokkeren met de ".htaccess" file. Blijkbaar zijn er heel veel methoden, maar voor Apache 2.4 en nieuwer werkt het volgende:
# blokkeer de folgende files
<Files ".apdisk">
Require all denied
</Files>
Ik heb even niet opgezocht wat de paramters precies betekenen, maar het blokkeert effectief de webtoegang tot deze hidden file.
Dit als tip voor anderen waar hetzelfde gebeurd.