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



Download 5,76 Mb.
Pdf ko'rish
bet510/875
Sana01.01.2022
Hajmi5,76 Mb.
#293004
1   ...   506   507   508   509   510   511   512   513   ...   875
Bog'liq
3794 1008 4334

288

Chapter 9 



Injecting Code

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



ability of any user with the 

FILE_PRIV

permission to read and write to the file

system.


The 

LOAD_FILE

command can be used to retrieve the contents of any file. For

example:


select load_file(‘/etc/passwd’)

The 


SELECT ... INTO OUTFILE

command can be used to pipe the results of

any query into a file. For example

create table test (a varchar(200))

insert into test(a) values (‘+ +’)

select * from test into outfile ‘/etc/hosts.equiv’

In addition to reading and writing key operating system files, this capability

can also be used to perform other attacks:

■■

Because MySQL stores its data in plaintext files, to which the database



must have read access, an attacker with 

FILE_PRIV

permissions can

simply open the relevant file and read arbitrary data from within the

database, bypassing any access controls enforced within the database

itself.


■■

MySQL enables users to create user-defined functions (UDFs), by 

calling out to a compiled library file that contains the function’s 

implementation. This file must be located within the normal path from

which MySQL loads dynamic libraries. An attacker can use the preced-

ing method to create an arbitrary binary file within this path and then

create a UDF that uses it. See Chris Anley’s paper “Hackproofing

MySQL” for more details of this technique.




Download 5,76 Mb.

Do'stlaringiz bilan baham:
1   ...   506   507   508   509   510   511   512   513   ...   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