internet gdpr european-union
Identifying attackers and GDPR. In which cases is it legal?
<p>Various techniques can be used to identify stalkers, malicious hackers et al. that are either gathering data for their target or use the target's digital items without consent.</p>
<h2>Canary files</h2>
<p>They are 'normal'  files (e.g. PDF, word) that can be used to identify an attacker without his knowledge or consent. When the attacker copies the canary file (without permission) and opens it in his computer, he could -unknowingly- send his IP address to the victim.</p>
<h2>Google Drive</h2>
<p>A victim can upload a big file that most people wouldn't bother searching for, let alone download, yet an attacker doing research on the victim probably will.
By doing so (and under certain circumstances) the following become <a href="https://support.google.com/a/answer/4579696?hl=en#zippy=%2Cdata-you-can-view" rel="nofollow noreferrer">available</a> to the victim:</p>
<blockquote>
<p>User action such as View, Rename, Create, Edit, Preview, Print, Update, Delete, Upload, Download, or Share a Drive file.</p>
</blockquote>
<h2>Google analytics</h2>
<p>It can sometimes be used to gather information of would-be stalkers. E.g. if a victim creates a website and enables Google Analytics he could place a 'bait' in his webpage like his real name, assuming it's not too common. Then the attacker by searching &quot;Jake Anderson home address&quot; would leave traces like:</p>
<ul>
<li>approximate age</li>
<li>approximate location (e.g. city)</li>
<li>search term used to find the site in Google</li>
</ul>
<p>This of course requires that the attacker is reckless with his privacy settings which is quite common.</p>
<p>What limitations does the GDPR create in the use of such techniques when done with the sole purpose of identifying or getting a hint on the attacker's identity?</p>
<p>Note that in some of the cases above the attacker has given consent to his data being used (e.g. being visible to the google drive account owner).</p>

<p>While some aspects of this might be OK, this sounds like a bad idea overall: such <a href="https://en.wikipedia.org/wiki/Honeypot_(computing)" rel="nofollow noreferrer">honeypot</a> strategies are unlikely to yield useful information in a legal manner.</p>
<p>I asked about this topic on the <a href="https://dpboard.org/t/can-a-honeypot-to-identify-a-stalker-be-gdpr-compliant/42" rel="nofollow noreferrer">data protection board</a> and would like to highlight some relevant aspects here.</p>
<h2>What is the exact purpose?</h2>
<p>Under GDPR, every processing of personal data must have a clear purpose. Collecting personal data because it might come in handy is not OK. Your suggested purpose is to identify stalkers or hackers. However, this is still fairly vague. What would you do with potentially identifying information?</p>
<p>For this answer, I'll assume that the goal is to collect enough information in order to file charges. Typically, an IP address is sufficient for this and the court can then subpoena the internet service provider for information on the subscriber for that IP address.</p>
<h2>Do you have a Legitimate Interest for such measures?</h2>
<p>The GDPR requires that every processing of personal data has a “legal basis”. Consent of the data subject is the most famous basis, but is not useful here.</p>
<p>Instead, we can consider whether this could be a <em>legitimate interest</em> (LI).
Art 6(1)(f) GDPR provides three criteria for a LI:
the purpose must be legitimate,
the processing must be necessary for this purpose,
and this interest must not be overridden by the rights and freedoms of the data subject.
This last point requires a balancing test between the different interests and rights:
your interest to make a police report, the stalkers interest in privacy.</p>
<p>To determine whether the purpose of collecting this data is legitimate, I think it is important to consider whether the threat posed by a stalker or hacker is real and current, or speculative. In a similar context – video surveillance – the EDPB writes in its guidelines 3/2019:</p>
<blockquote>
<p>20. The legitimate interest needs to be of real existence and has to be a present issue (i.e. it must not be fictional or speculative). A real-life situation of distress needs to be at hand – such as damages or serious incidents in the past – before starting the surveillance. In light of the principle of accountability, controllers would be well advised to document relevant incidents […] and related criminal charges.</p>
</blockquote>
<p>So I do not think it is compliant to say “<em>if</em> there are any stalkers, I want to gather any data about them”. However, if there have been stalking or hacking incidents in the past which you haven't been able to pursue due to lack of evidence, then this would shift the balance of the LI test to your favour.</p>
<p>In general, the GDPR does recognize that security measures (cf. Recital 49) and data necessary to establish legal claims <em>can</em> be covered by a LI – but this doesn't absolve you from carrying out the balancing test.</p>
<h2>Which concrete measures would be compliant?</h2>
<p>You have suggested various measures in order to identify attackers. However, the GDPR will only cover measures that are adequate and necessary to achieve the stated purpose, see also the Art 5(1)(b) data minimization principle. Here, “adequate” means that that the measure is actually able to achieve the stated purpose. And you are only allowed to collect what is necessary for your purpose, not more.</p>
<p>Files with tracking pixels are adequate to disclose the attacker's public IP and will not yield unnecessary data. However, the same information could be obtained without tracking pixels by logging the IP in the web server's access logs when the attacker accesses a web page. Under certain circumstances, technologies like WebRTC might yield the visitor's real IP address even if they use a VPN.</p>
<p>Google Drive might not actually yield any useful information – this approach might not be adequate. In particular, it will not log certain information from visitors that are external to the Google Workspace domain. The Drive Audit Log is also only available at higher Google Workspace subscription tiers and is not part of Google's B2C free tier. I don't buy the argument that the stalker would have given consent to tracking through the Google Drive user interface. “Consent” has a very specific meaning in a GDPR context.</p>
<p>Google Analytics is quite unlikely to produce useful information. For starters, many browsers block such analytics outright. Even if the analytics work, the data is unlikely to enable identification. GA will not show you the visitor's IP address. The estimated location is derived from the IP address, but often extremely inaccurate (I've seen errors of ~300km, due to network topologies of residential ISPs). Demographics information are an extremely rough estimate that relies on sharing visitor data with Google, which goes beyond what is necessary. This estimate will be too unreliable to assist with prosecution.</p>
<h2>What other compliance hurdles could there be?</h2>
<p>Some of the data you would collect would fall under the scope of the ePrivacy directive. For example, you can only set cookies if this is strictly necessary for the service explicitly requested by the user, or when the user has given their consent. For example, this means your proposed Google Analytics solution would require the purported stalker's consent to properly work.</p>
<p>Speaking of using Google services, it should be noted that these involve processing of personal data in countries that do not offer an adequate level of data protection. The continued use of such services might not be compliant following the 2020 “Schrems II” ruling.</p>
<p>I also have doubts how you could fulfil your transparency requirements in this context. Per Art 13 GDPR, the data subject must receive transparent information about what is being done with their data. Usually, this would be satisfied with a privacy notice that is linked from every web page. However, this will mean that your honeypot cannot be fully covert.</p>
<h2>Conclusion</h2>
<p>Some aspects of these proposed honeypots sound quite reasonable.
For example, keeping web server access logs for a short duration is likely to fall under a legitimate interest, likely to be permitted by ePrivacy, and likely to yield an IP address that could help with a useful police report.</p>
<p>Other proposed methods such as misusing Google Analytics is less likely to work for technical reasons. All these methods must consider what is adequate and necessary for the actual purpose, and not just speculatively gather data.</p>
<p>Finally, all of the compliance work should be done before the honeypot is set up. Done carelessly, such surveillance measures could be illegal which could backfire.</p>
<p>This answer has focused on stalkers because identifying those might be useful and possible. In contrast, professional hackers will know how to cover their tracks and will often be beyond the reach of the law. It is very good cybersecurity practice to detect attacks, and honeypots could be part of that. But in that context, it wouldn't be very useful to identify the persons behind an attack.</p>
