The Web Application Hacker’s Handbook Discovering and Exploiting Security Flaws



Download 5,76 Mb.
Pdf ko'rish
bet434/875
Sana01.01.2022
Hajmi5,76 Mb.
#293004
1   ...   430   431   432   433   434   435   436   437   ...   875
Bog'liq
3794 1008 4334

Bypassing a Login

In some situations, a simple SQL injection vulnerability may have an immedi-

ately critical impact, regardless of any further attacks that could be built upon

it. Many applications that implement a forms-based login function use a data-

base to store user credentials and perform a simple SQL query to validate each

login attempt. A typical example of this query is:

SELECT * FROM users WHERE username = ‘marcus’ and password = ‘secret’

This query causes the database to check every row within the users table

and extract each record where the 

username


column has the value 

marcus


and

the 


password

column has the value 

secret

. If a user’s details are returned to



the application, then the login attempt is successful, and the application cre-

ates an authenticated session for that user.

As with the search function, an attacker can inject into either the username

or the password field to modify the query performed by the application, and

so subvert its logic. For example, if an attacker knows that the username of the

application administrator is 

admin

, he can log in as that user by supplying any



password and the following username:

admin’-- 

This causes the application to perform the following query:

SELECT * FROM users WHERE username = ‘admin’--‘ AND password = ‘foo’




Download 5,76 Mb.

Do'stlaringiz bilan baham:
1   ...   430   431   432   433   434   435   436   437   ...   875




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish