I work on web applications and as you know, having an administrator panel is a must in most cases. We can see that a lot of web applications have a specific login page for administrators in which there is a form (usually POST method) that admins can use to login their panel.
But because the field names are known, a hacker can attempt to crack the passwords even if some security methods are implemented.
So what is the problem with a simple GET key (as username) and its value (as password)? Why it's not used a lot or at least, is not suggested in many articles?
For administrators, user-friendly login pages are not really needed! Data will be logged in both cases (GET/POST) if there is a MiTM attacker.
But using this method, fields will be unknown expect for admins themselves. Here is a sample PHP code:
"category.php": (A meaningless page name)
<?php
if (isset($_GET['meaningless_user']) && $_GET['meaningless_word'] == "something"){
session_start();
$_SESSION["user"] = "test";
header('Location: category.php'); // Redirect to same or other page so GET parameters will disappear from the url
} else {
die(); // So it'll be like a blank page
}
?>
?myusername=mypassword? Why couldn't you do the same with POST? – Bergi Jan 04 '17 at 11:17POSTversusGETis not a *major* stumbling block in the way of hackers, but it helps. Every little bit ... helps – Mawg says reinstate Monica Jan 04 '17 at 13:32https://user:pass@example.com/. This way, you can link to something requiring auth, but the actually auth process is done via request headers and won't typically appear in a log. – Brad Jan 05 '17 at 23:24field names are known: it doesn't really matter unless you are using weak passwords.admins doesn't need user-friendly login: Then, just set authentication through your web server (e.g. apache). You can either use basic authentication and store passwords in browser (using master key), or install client certificates on browsers (no passwords needed). Either way, its much more safer than using GET. – lepe Jan 06 '17 at 02:11