Hack A Php Login Form

Posted on by
  1. Php Login Form Tutorial
  2. Hack A Php Login Form
Active7 years, 2 months ago
  • How to hack the form? SQL Injection. This method was really effective before frameworks become so trendy in PHP world. But might be still dangerous if the application doesn’t use ORMs or other data objects extensions. The code doesn’t check the data against some threats or wrong characters. Values are passed from the login form.
  • Login Bypass using SQL Injection. Hacker to inject SQL commands into say a login form to allow them to gain access to the data held within your database.

Php Login Form Tutorial

In a nutshell, I have a test server/website where I uploaded a folder called 'private' with PHP scripts. The flow of the program is as follows: login -> search for an item number -> display item im. WonderHowTo Null Byte. To be able to hack web form usernames and passwords, we need to determine the parameters of the web form login page as well as how the form. How to bypass php login form? (self.HowToHack) submitted 1 year ago * by jack9883. I believe those are beginner steps to learn how to hack, and you would be what is known as a 'script kiddy', but don't let that discourage you, everyone's gotta start somewhere. Permalink; embed.

In a nutshell, I have a test server/website where I uploaded a folder called 'private' with PHP scripts. The flow of the program is as follows: login -> search for an item number -> display item image --> logout or search again.

Epson Perfection 2580 Photo. Epson Perfection 2580 Photo. Downloads; FAQs; Manuals and Warranty; Registration. Epson Scan ICM Updater v1.20 (PSB.2008.07.001) PDF. This Bulletin contains information regarding the Epson Scan ICM Updater. Epson perfection 2850 photo scan drivers

In the future the item pages will display a large amount of database information about each specific item, but for the time being it only displays an image. The link to the test website is below:

My main question is about security and vulnerabilities. the login.html page has a form which posts information to a php script called 'ProcessLogin.php', which redirects you back to the login page with the wrong credentials. The username and password is hardcoded into that script for the time being.

Hack A Php Login Form

Other than adding an SSL (Secure Socket Layer), is this secure 'enough'? How is hard coding the username and password into ProcessLogin.php insecure when users can't read php code?

The username and password isn't really hard to guess if you really want to try :P But even if it was a real username and password, how can a login such as this be hacked to display the images?

PS: username and password are the same, i'm just wondering if anyone can hack this login without any effort..

Edit: My login function is as follows:

which occurs after the username and password are verified with ' in php.

5122 gold badges7 silver badges16 bronze badges

2 Answers

The important question is what happens after the login. Are you setting a cookie to identify the user? What is in that cookie? How easy is it to fake that cookie? How easy is it to intercept that cookie (hint: without SSL, pretty easy)? Is a valid cookie required to open any of your protected pages? Or can I simply go to one of your 'protected' pages if I know the URL and there'll be no check at all? Is there any flaw in how the cookie is checked on those protected pages that may allow me to bypass the check? etc. etc..

414k67 gold badges580 silver badges727 bronze badges

What will it secure as security is relative to what it is you are protecting. IE consider the scenario that i put a list together with my favourite sports teams on it and stick that on the internet with the edit form behind a login screen would ssl be enough to protect this data? probably as the information is meaningless to anyone else. However if it were a list of my bank account details i'd probably want to go further, and do more checks such as look at implementing a one time password such as yubikey http://www.yubico.com/yubikey look at the server config strengthen up the security of the server the site is hosted on and maybe look at some more complex encryption/decryption on the login form. So if these images are of you walking your dog or such an other then in all likely hood the security you have placed on the form is adequate. However if they are design plans or something that is vitaly more important/critical to you/your company you would probably want to look at implementing some other security procedures.

Nicholas KingNicholas King

Not the answer you're looking for? Browse other questions tagged phpsecuritytesting or ask your own question.

Now here is a real hacking tutorial in which I am going to hack a real website,and that too in less than 20 seconds.and I am not kidding. Actually sites with PHP 4.4 have a SQL injection vulnerability in them which makes their Admin control panel easily accessible,and I mean in one big shot,you will be admin of that site.

Remember,this tutorial is applicable on PHP4.4 machines with Apache running in parallel with them.Also,since I will be hacking REAL websites,I will not be displaying their URL’s or else I will be gunned down (by law of course :P).It will be partial in nature,that is I WILL not be teaching each and everything to you,I assume you know basics of SQL injection/PHP injection/Google searching,and if you don't then read these articles first -

In the mean time,here is how you can start -

Step 1 – Search for them

Yep,make a Google dork to find sites running Apache and PHP 4.4 . Its quite easy.

Step 2 – Scan them

Start by scanning them using Nmap,Do and intense scan and find the open ports. If you find port 2000 open,then you have almost got it. most websites running PHP4.4 have this port for admin login.

Now just login using port 2000 ie -


and you will be comfortably login into admin page like this -

Step 3 – Hack them

Now in the fields,you have to type -

username – admin

password – a’ or 1=1 or ‘b

domain - a’ or 1=1 or ‘b

and press go,you will login into admin

voila.you have hacked into admin. Actually sites based on PHP 4.4 have the vulnerability in them that they are vulnerable to SQL injection.It will literally take 20 seconds.

I hope that was informative :P go learn something.



Technorati Tags: hacking,how to,security,tutorials,rdhacker,prohack,php injection,sql injection