-
Notifications
You must be signed in to change notification settings - Fork 416
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add database vendor blind fingerprinting
- Improve falsy/truthy lists on Oracle - Improve failsafe on Oracle - Improve mode order on Blind/Time - Improve characters insertion order - Remove intermediate jdk20 from GH workflow - Add TryHackMe and Burp labs to Scan list - Upgrade dependencies version
- Loading branch information
Showing
57 changed files
with
559 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
model/src/main/java/com/jsql/model/exception/JSqlRuntimeException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.jsql.model.exception; | ||
|
||
public class JSqlRuntimeException extends RuntimeException { | ||
|
||
public JSqlRuntimeException(String message) { | ||
super(message); | ||
} | ||
|
||
public JSqlRuntimeException(String message, Throwable e) { | ||
super(message, e); | ||
} | ||
|
||
public JSqlRuntimeException(Throwable e) { | ||
super(null, e); // get only original implicit reason | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
model/src/main/java/com/jsql/model/injection/strategy/blind/CallableVendor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
package com.jsql.model.injection.strategy.blind; | ||
|
||
import com.jsql.model.injection.strategy.blind.patch.Diff; | ||
import com.jsql.model.injection.strategy.blind.patch.DiffMatchPatch; | ||
|
||
import java.util.LinkedList; | ||
import java.util.List; | ||
import java.util.concurrent.CopyOnWriteArrayList; | ||
|
||
public class CallableVendor extends AbstractCallableBoolean<CallableVendor> { | ||
|
||
// List of differences found between the reference page, and the present page | ||
private LinkedList<Diff> opcodes = new LinkedList<>(); | ||
|
||
private static final DiffMatchPatch DIFF_MATCH_PATCH = new DiffMatchPatch(); | ||
|
||
private final InjectionVendor injectionCharInsertion; | ||
|
||
private final String metadataInjectionProcess; | ||
|
||
public CallableVendor(String inj, InjectionVendor injectionCharInsertion, String metadataInjectionProcess) { | ||
|
||
this.injectionCharInsertion = injectionCharInsertion; | ||
this.metadataInjectionProcess = metadataInjectionProcess; | ||
this.booleanUrl = inj; | ||
} | ||
|
||
@Override | ||
public boolean isTrue() { | ||
|
||
List<Diff> copyTrueMarks = new CopyOnWriteArrayList<>(this.injectionCharInsertion.getConstantTrueMark()); | ||
for (Diff trueDiff: copyTrueMarks) { | ||
if (!this.opcodes.contains(trueDiff)) { | ||
return false; | ||
} | ||
} | ||
|
||
return true; | ||
} | ||
|
||
@Override | ||
public CallableVendor call() { | ||
|
||
String source = this.injectionCharInsertion.callUrl(this.booleanUrl, this.metadataInjectionProcess, this); | ||
|
||
this.opcodes = CallableVendor.DIFF_MATCH_PATCH.diffMain( | ||
this.injectionCharInsertion.getBlankFalseMark(), | ||
source, | ||
false | ||
); | ||
|
||
CallableVendor.DIFF_MATCH_PATCH.diffCleanupEfficiency(this.opcodes); | ||
|
||
return this; | ||
} | ||
|
||
public List<Diff> getOpcodes() { | ||
return this.opcodes; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.