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



Download 5,76 Mb.
Pdf ko'rish
bet814/875
Sana01.01.2022
Hajmi5,76 Mb.
#293004
1   ...   810   811   812   813   814   815   816   817   ...   875
Bog'liq
3794 1008 4334

478

Chapter 13 



Automating Bespoke Attacks

70779c13.qxd:WileyRed  9/14/07  3:14 PM  Page 478



The 

nextPayload

method can be used to advance the state of the source, and

returns 


true

until all of its payloads are used up. The 

reset

method returns



the state to its initial point. The 

getPayload

method returns the value of the

current payload.

In the document enumeration example, the parameter we want to vary con-

tains a numeric value, and so our first implementation of the 

PayloadSource

interface is a class to generate numeric payloads. This class allows us to spec-

ify the range of numbers which we want to test:

class PSNumbers implements PayloadSource

{

int from, to, step, current;



PSNumbers(int from, int to, int step)

{

this.from = from;



this.to = to;

this.step = step;

reset();

}

public boolean nextPayload()



{

current += step;

return current <= to;

}

public void reset()



{

current = from - step;

}

public String getPayload()



{

return Integer.toString(current);

}

}

Equipped with the concept of a request parameter and a payload source, we



have sufficient resources to generate actual requests and process the server’s

responses. First, let’s specify some configuration for our first attack:

class JAttack

{

// attack config



String host = “wahh-app.com”;

int port = 80;

String method = “GET”;

String url = “/ShowDoc.jsp”;




Download 5,76 Mb.

Do'stlaringiz bilan baham:
1   ...   810   811   812   813   814   815   816   817   ...   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