Skip to navigation Skip to content
Hackercool Magazine
  • Home
  • 12 Free eBooks
  • Subscription
  • Products
  • Login
  • Blog
  • Contact us
    • Our services
  • Home
  • About us
  • Blog
  • Cart
  • Checkout
  • Contact us
  • Customer Login
  • FAQ
  • Our services
  • Privacy Policy
  • Products
  • Refund and Cancellation
  • Terms & Conditions
  • $0.00 0 items
Home / Posts tagged “Login Bypass”

Tag: Login Bypass

Posted on August 9, 2013June 24, 2024 by kanishka10 — 12 Comments

Beginners guide to login bypass

Hello, aspiring ethical hackers. In this blogpost, you will learn about login bypass.

What is Login bypass?

Many resources like websites Routers, Gateways, file messengers use authentication to ensure security of the resources what if this login in bypass. The process of Login bypass refers to any action on current which allows a user to directly access the resources without the use of credentials. Many techniques can be used to bypass login of a page. Some of the techniques are,

  1. SQL injection
  2. Forced browsing
  3. URL parameters manipulation.

Let’s learn about each of them in detail.

1. SQL Injection:

Acunetix describes this as ” the type of attack that takes advantage of improper coding of your web applications that allows hacker to inject SQL commands into say a login form to allow them to gain access to the data held within your database. In essence, SQL Injection arises because the fields available for user input allow SQL statements to pass through and query the database directly.

In this article, I am going to show you how login bypass attack can be done on websites using SQL injection. For this I am going to use Vulnerawa and WAMP server. You can download Vulnerawa from here. To see what is Vulnerawa, go here. To learn how to setup Vulnerawa in Wamp Server, go here. When you finish successfully setting up Vulnerawa, it should be as below. The first page of a website is the  “index.php”   which is as shown below.

Now click on the “Login” button. You should see a login form as below.

Now insert a single quote character( ‘ ) into the form as shown below.

Click on “Submit”. You should get the error as shown below. This shows that the webpage is vulnerable to SQL injection. Notice that the URL has changed  to a page “process.php”. Remember this for now.

Now enter the query

1′ or ‘1’=’1 

as shown below in both username and password fields.

login bypass

Click on “Submit”. If you got the below webpage, then you have successfully bypassed the login screen.

The query we entered above validates the  user  even without checking the password. There are some other queries which can work similarly. Two of them are here.

‘ or ‘1’=’1;
‘ or ‘1’=’1”

When a hacker enters these two queries, the username field becomes

” or ‘1’=’1;

which transforms to validate the user if username is empty or 1=1. Now whatever may happen, one will always be equal to one. We can find many more using trial and error. This vulnerability exists because we are supplying raw data to our application.

Now let’s go to the page “process.php” to understand how this sql injection worked. Go to the root directory of Vulnerawa. That would be “C://Wamp/www/vulnerawa1.0.2“. You should see the list of below pages.  These are all the webpages which make the webapp vulnerawa1.0.2.

But we are interested in the page process.php. Right click on the page and select “edit” option to view the file. To put simply, open the process.php file with notepad. You should see it as below.  We are interested in the two lines of code, $myusername=$_POST[‘username’] and  $mypassword=$_POST[‘password’]. These are the two queries to take username and password from the user. You can observe that they are taking input directly aka without sanitization.

Now just below these two lines, we have two lines commented. These are

$myusername = mysqli_real_escape_string($connect, $myusername);

$mypassword = mysqli_real_escape_string($connect, $mypassword);

Now, uncomment those two lines by removing the two backward slashes as shown below.

Save the file and restart the WAMP server. Now try to bypass the login screen as explained above. You should get something as shown below.

The “mysqli_real_escape_string” escapes any escapes any special characters entered in the input fields thus rendering injection harmless.

2. Forced browsing:

The page that is accessed after your login into any resource is also part of all the web pages that belong to that website. Sometimes, login can be bypassed by directly going to this page on browser. This is known as forced browsing and this page can be searched using web directory busting or fuzzing.

3. URL parameter tampering:

The login screen can also be bypassed by tampering with the URL parameter.

Category: Website Hacking
Tags: Login Bypass, SQL Injection
Our Latest Posts
  • Beginners guide to SIEM
  • Beginners guide to Incident response
  • Beginners guide to malware analysis
  • Beginners guide to digital forensics
  • Beginners guide to Threat Intelligence

Categories

  • ►Basics (18)
  • ►Hacking (164)
    • ►Footprinting (21)
    • ►Scanning (6)
    • ►Enumeration (10)
    • ►Vulnerability Assessment (1)
    • ►Password Cracking (9)
    • ►Website Hacking (36)
    • ►WiFi Hacking (21)
    • ►MiTM (8)
    • ►Gaining Access (22)
      • ►Social Engineering (6)
      • ►Windows Hacking (6)
      • ►Linux Hacking (1)
    • ►POST-Exploitation (21)
      • ►Privilege Escalation (13)
        • ►Linux Privilege Escalation (8)
        • ►Windows Privilege Escalation (4)
      • ►Maintaining Access (2)
      • ►Windows POST Exploitation (4)
      • ►Linux POST Exploitation (1)
    • ►DoS (2)
    • ►AV Evasion (5)
  • ►Metasploitable2 (4)
  • ►Hacking Tools (75)
    • ►Footprinting tools (7)
    • ►Scanning tools (3)
    • ►Enumeration tools (2)
    • ►Password cracking tools (5)
    • ►MiTM tools (4)
    • ►Initial access tools (6)
    • ►Privilege escalation tools (5)
    • ►Stress testing tools (1)
  • ►Vulnerabilities (12)
    • ►Windows vulnerabilities (3)
    • ►Linux vulnerabilities (5)
    • ►Other vulnerabilities (4)
  • ►Hacking Labs (4)
  • ►Uncategorized (52)
  • ►Digital forensics (4)
  • ►Installations (7)
  • ►Vulnerawa (2)
Contact Us
  • Hackercool Cybersecurity (OPC) Pvt Ltd.
  • Address: Hyderabad, India
  • WhatsApp : 9505658443
  • Mail: admin@hackercoolmagazine.com
Menu
  • Refund and Cancellation
  • Terms & Conditions
  • Privacy Policy
  • FAQ
  • About us
Follow Us
Follow Us
  • Facebook
  • Twitter
  • Instagram
  • LinkedIn
© Hackercool Magazine 2025
Built with WooCommerce.
  • My Account
  • Search
  • Cart 0
Select your currency
AED United Arab Emirates dirham
AFN Afghan afghani
ALL Albanian lek
AMD Armenian dram
ANG Netherlands Antillean guilder
AOA Angolan kwanza
ARS Argentine peso
AUD Australian dollar
AWG Aruban florin
AZN Azerbaijani manat
BAM Bosnia and Herzegovina convertible mark
BBD Barbadian dollar
BDT Bangladeshi taka
BGN Bulgarian lev
BHD Bahraini dinar
BIF Burundian franc
BMD Bermudian dollar
BND Brunei dollar
BOB Bolivian boliviano
BRL Brazilian real
BSD Bahamian dollar
BTC Bitcoin
BTN Bhutanese ngultrum
BWP Botswana pula
BYR Belarusian ruble (old)
BYN Belarusian ruble
BZD Belize dollar
CAD Canadian dollar
CDF Congolese franc
CHF Swiss franc
CLP Chilean peso
CNY Chinese yuan
COP Colombian peso
CRC Costa Rican colón
CUC Cuban convertible peso
CUP Cuban peso
CVE Cape Verdean escudo
CZK Czech koruna
DJF Djiboutian franc
DKK Danish krone
DOP Dominican peso
DZD Algerian dinar
EGP Egyptian pound
ERN Eritrean nakfa
ETB Ethiopian birr
EUR Euro
FJD Fijian dollar
FKP Falkland Islands pound
GBP Pound sterling
GEL Georgian lari
GGP Guernsey pound
GHS Ghana cedi
GIP Gibraltar pound
GMD Gambian dalasi
GNF Guinean franc
GTQ Guatemalan quetzal
GYD Guyanese dollar
HKD Hong Kong dollar
HNL Honduran lempira
HRK Croatian kuna
HTG Haitian gourde
HUF Hungarian forint
IDR Indonesian rupiah
ILS Israeli new shekel
IMP Manx pound
INR Indian rupee
IQD Iraqi dinar
IRR Iranian rial
IRT Iranian toman
ISK Icelandic króna
JEP Jersey pound
JMD Jamaican dollar
JOD Jordanian dinar
JPY Japanese yen
KES Kenyan shilling
KGS Kyrgyzstani som
KHR Cambodian riel
KMF Comorian franc
KPW North Korean won
KRW South Korean won
KWD Kuwaiti dinar
KYD Cayman Islands dollar
KZT Kazakhstani tenge
LAK Lao kip
LBP Lebanese pound
LKR Sri Lankan rupee
LRD Liberian dollar
LSL Lesotho loti
LYD Libyan dinar
MAD Moroccan dirham
MDL Moldovan leu
MGA Malagasy ariary
MKD Macedonian denar
MMK Burmese kyat
MNT Mongolian tögrög
MOP Macanese pataca
MRU Mauritanian ouguiya
MUR Mauritian rupee
MVR Maldivian rufiyaa
MWK Malawian kwacha
MXN Mexican peso
MYR Malaysian ringgit
MZN Mozambican metical
NAD Namibian dollar
NGN Nigerian naira
NIO Nicaraguan córdoba
NOK Norwegian krone
NPR Nepalese rupee
NZD New Zealand dollar
OMR Omani rial
PAB Panamanian balboa
PEN Sol
PGK Papua New Guinean kina
PHP Philippine peso
PKR Pakistani rupee
PLN Polish złoty
PRB Transnistrian ruble
PYG Paraguayan guaraní
QAR Qatari riyal
RON Romanian leu
RSD Serbian dinar
RUB Russian ruble
RWF Rwandan franc
SAR Saudi riyal
SBD Solomon Islands dollar
SCR Seychellois rupee
SDG Sudanese pound
SEK Swedish krona
SGD Singapore dollar
SHP Saint Helena pound
SLL Sierra Leonean leone
SOS Somali shilling
SRD Surinamese dollar
SSP South Sudanese pound
STN São Tomé and Príncipe dobra
SYP Syrian pound
SZL Swazi lilangeni
THB Thai baht
TJS Tajikistani somoni
TMT Turkmenistan manat
TND Tunisian dinar
TOP Tongan paʻanga
TRY Turkish lira
TTD Trinidad and Tobago dollar
TWD New Taiwan dollar
TZS Tanzanian shilling
UAH Ukrainian hryvnia
UGX Ugandan shilling
USD United States (US) dollar
UYU Uruguayan peso
UZS Uzbekistani som
VEF Venezuelan bolívar (2008–2018)
VES Venezuelan bolívar
VND Vietnamese đồng
VUV Vanuatu vatu
WST Samoan tālā
XAF Central African CFA franc
XCD East Caribbean dollar
XOF West African CFA franc
XPF CFP franc
YER Yemeni rial
ZAR South African rand
ZMW Zambian kwacha
LTC Litecoin
ETH Ethereum
ZWD Zimbabwe Dollar
ZWL Zimbabwe