Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it dangerous to leave your Django admin directory under the default url of admin?

Is it dangerous to have your admin interface in a Django app accessible by using just a plain old admin url? For security should it be hidden under an obfuscated url that is like a 64 bit unique uuid?

Also, if you create such an obfuscated link to your admin interface, how can you avoid having anyone find out where it is? Does the google-bot know how to find that url if there is no link to that url anywhere on your site or the internet?

like image 996
MikeN Avatar asked Jan 17 '09 16:01

MikeN


2 Answers

You might want to watch out for dictionary attacks. The safest thing to do is IP restrict access to that URL using your web server configuration. You could also rate limit access to that URL - I posted an article about this last week.

like image 55
Simon Willison Avatar answered Nov 15 '22 10:11

Simon Willison


If a URL is nowhere on the internet "the googlebot" can't know about it ... unless somebody tells it about it. Unfortunately many users have toolbars installed in their browser, which submit all URLs visited by the browser to various Servers (e.g. Alexa, Google).

So keeping an URL secret will not work in the long run.

Also an uuid is hard to remember and to type - leading to additional support ("What was the URL again?").

But I still strongly suggest to change the URL (e.g. to /myadmin/). This will foil automatic scanning and attack tools. So If one day an "great Django worm" hits the Internet, you have a much lower chance of being hit.

People using PHPmyAdmin had this experience for the last few years: changing the default URL avoids most attacks.

like image 23
max Avatar answered Nov 15 '22 10:11

max