@@ -101,7 +101,7 @@ def __orderByTest(cols):
101
101
pages = {}
102
102
103
103
for count in xrange (lowerCount , upperCount + 1 ):
104
- query = agent .forgeInbandQuery ('' , - 1 , count , comment , prefix , suffix , kb .uChar , where )
104
+ query = agent .forgeUnionQuery ('' , - 1 , count , comment , prefix , suffix , kb .uChar , where )
105
105
payload = agent .payload (place = place , parameter = parameter , newValue = query , where = where )
106
106
page , headers = Request .queryPage (payload , place = place , content = True , raise404 = False )
107
107
if not isNullValue (kb .uChar ):
@@ -166,16 +166,16 @@ def __unionPosition(comment, place, parameter, prefix, suffix, count, where=PAYL
166
166
167
167
# For each column of the table (# of NULL) perform a request using
168
168
# the UNION ALL SELECT statement to test it the target url is
169
- # affected by an exploitable inband SQL injection vulnerability
169
+ # affected by an exploitable union SQL injection vulnerability
170
170
for position in positions :
171
171
# Prepare expression with delimiters
172
172
randQuery = randomStr (UNION_MIN_RESPONSE_CHARS )
173
173
phrase = "%s%s%s" .lower () % (kb .chars .start , randQuery , kb .chars .stop )
174
174
randQueryProcessed = agent .concatQuery ("\' %s\' " % randQuery )
175
175
randQueryUnescaped = unescaper .unescape (randQueryProcessed )
176
176
177
- # Forge the inband SQL injection request
178
- query = agent .forgeInbandQuery (randQueryUnescaped , position , count , comment , prefix , suffix , kb .uChar , where )
177
+ # Forge the union SQL injection request
178
+ query = agent .forgeUnionQuery (randQueryUnescaped , position , count , comment , prefix , suffix , kb .uChar , where )
179
179
payload = agent .payload (place = place , parameter = parameter , newValue = query , where = where )
180
180
181
181
# Perform the request
@@ -196,8 +196,8 @@ def __unionPosition(comment, place, parameter, prefix, suffix, count, where=PAYL
196
196
randQueryProcessed2 = agent .concatQuery ("\' %s\' " % randQuery2 )
197
197
randQueryUnescaped2 = unescaper .unescape (randQueryProcessed2 )
198
198
199
- # Confirm that it is a full inband SQL injection
200
- query = agent .forgeInbandQuery (randQueryUnescaped , position , count , comment , prefix , suffix , kb .uChar , where , multipleUnions = randQueryUnescaped2 )
199
+ # Confirm that it is a full union SQL injection
200
+ query = agent .forgeUnionQuery (randQueryUnescaped , position , count , comment , prefix , suffix , kb .uChar , where , multipleUnions = randQueryUnescaped2 )
201
201
payload = agent .payload (place = place , parameter = parameter , newValue = query , where = where )
202
202
203
203
# Perform the request
@@ -210,7 +210,7 @@ def __unionPosition(comment, place, parameter, prefix, suffix, count, where=PAYL
210
210
fromTable = " FROM (%s) AS %s" % (" UNION " .join ("SELECT %d%s%s" % (_ , FROM_DUMMY_TABLE .get (Backend .getIdentifiedDbms (), "" ), " AS %s" % randomStr () if _ == 0 else "" ) for _ in xrange (LIMITED_ROWS_TEST_NUMBER )), randomStr ())
211
211
212
212
# Check for limited row output
213
- query = agent .forgeInbandQuery (randQueryUnescaped , position , count , comment , prefix , suffix , kb .uChar , where , fromTable = fromTable )
213
+ query = agent .forgeUnionQuery (randQueryUnescaped , position , count , comment , prefix , suffix , kb .uChar , where , fromTable = fromTable )
214
214
payload = agent .payload (place = place , parameter = parameter , newValue = query , where = where )
215
215
216
216
# Perform the request
@@ -239,11 +239,11 @@ def __unionConfirm(comment, place, parameter, prefix, suffix, count):
239
239
validPayload = None
240
240
vector = None
241
241
242
- # Confirm the inband SQL injection and get the exact column
242
+ # Confirm the union SQL injection and get the exact column
243
243
# position which can be used to extract data
244
244
validPayload , vector = __unionPosition (comment , place , parameter , prefix , suffix , count )
245
245
246
- # Assure that the above function found the exploitable full inband
246
+ # Assure that the above function found the exploitable full union
247
247
# SQL injection position
248
248
if not validPayload :
249
249
validPayload , vector = __unionPosition (comment , place , parameter , prefix , suffix , count , where = PAYLOAD .WHERE .NEGATIVE )
@@ -252,7 +252,7 @@ def __unionConfirm(comment, place, parameter, prefix, suffix, count):
252
252
253
253
def __unionTestByCharBruteforce (comment , place , parameter , value , prefix , suffix ):
254
254
"""
255
- This method tests if the target url is affected by an inband
255
+ This method tests if the target url is affected by an union
256
256
SQL injection vulnerability. The test is done up to 50 columns
257
257
on the target database table
258
258
"""
@@ -297,7 +297,7 @@ def __unionTestByCharBruteforce(comment, place, parameter, value, prefix, suffix
297
297
298
298
def unionTest (comment , place , parameter , value , prefix , suffix ):
299
299
"""
300
- This method tests if the target url is affected by an inband
300
+ This method tests if the target url is affected by an union
301
301
SQL injection vulnerability. The test is done up to 3*50 times
302
302
"""
303
303
0 commit comments