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



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

Chapter 9 



Injecting Code



243

70779c09.qxd:WileyRed  9/14/07  3:13 PM  Page 243




which because of the comment symbol is equivalent to

SELECT * FROM users WHERE username = ‘admin’

and so the password check has been bypassed altogether.

Suppose that the attacker does not know the username of the administrator.

In most applications, the first account in the database is an administrative user,

because this account is normally created manually and then used to generate

all other accounts via the application. Further, if the query returns the details

for more than one user, most applications will simply process the first user

whose details are returned. An attacker can often exploit this behavior to log in

as the first user in the database by supplying the username:

‘ OR 1=1-- 

This causes the application to perform the query

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

which because of the comment symbol is equivalent to

SELECT * FROM users WHERE username = ‘’ OR 1=1

which will return the details of all application users.




Download 5,76 Mb.

Do'stlaringiz bilan baham:
1   ...   431   432   433   434   435   436   437   438   ...   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