Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

PHP 

best way to secure admin pages?

(Oct 19, 2011 04:06 PM)-"h3l1m@n"- Wrote:  I've done pretty much of all the, synonyms in the DB and such. but are there anything codewise i could use to increase the security?

I use an If statement that looks wether the user is admin or not and the displays either "Admin Panel" or "Your Profile"

this is an example and not the real code ofc

If(Admin== 0){
echo "Admin Panel";
else
{
echo "Your Profile";
}
End if

Edit: i will take a look at that nu11byte
Thanks for the fast responds by the way

make sure it isn't easy to SQL inject with OR '1' == '1' or whatever it is that you do.
On a old site that I had to login the user had to enter their:
+Username
+Password
+A second Password
+Answer a secret question
+IP had to be white-listed
+And they had to enter a randomly generated code that was emailed to them once every 24hrs (using a cron job)

I think it was fairly secure, I never had any breaches in security and I constantly invited people to try to hack it.
I had a friend named potaters that made a PHP script to where if you try to access /admin/ you're prompted for a code, if you enter it successfully you're added to the allow list, if not, you're redirected to gtfo.php


Possibly Related Threads...
Thread / Author Replies Views Last Post
[PHP] by Internet SecurityDec 27, 2014 08:28 AM 11 517 Dec 27, 2014 08:28 AM
Last Post: Internet Security
[PHP] by Webman.ioJun 8, 2012 06:38 AM 9 236 Jun 8, 2012 06:38 AM
Last Post: systemcarnage