I am running a server with Django and Nginx. I tried to hide the admin panel by assigning it a 50digit random string as URL (something like https://mydomain/asidfhifuerbdsi...). Now someone found this URL and I am wondering if this was possible without hacking my page.
More information:
- There is a sitemap, but the URL is not on the sitemap
- There is no robots.txt
- Directory listing was enabled for a subdirectory /static but the URL in question was not part of this subdirectory
- I am using PostHog to keep track of the traffic
- I am using the Google Search Console but the URL in question is not shown there
In my understanding, one would have to "guess" the correct URL in order to find it which should be pretty much impossible given the length of the random string. All other options would include one of my accounts (github, posthog) or the server being compromised. Is this true?
Edit: Addressing the comments:
- debug mode is turned off
- https is being enforced
- I know someone accessed it because I can see some other IP accessing it in the nginx log
- I can't see any evidence of brute-forcing. The correct URL was accessed directly without any trial and error
So I agree that there won't be a definite answer because I lack some required information. But to summarize for future readers, these are possible reasons for someone finding the URL:
- Access to the server
- Access to my code repository
- Malicious browser extension
- Access to my machine through malware
- Antivirus / Web extension crawling my browsing history
- Through a Referer HTTP header