All notable changes to this project will be documented in this file.
- JDBC Sink Taxonomy:
- Reclassified
java.sql.DriverManager.getConnection(...)from genericSSRFtoJDBC_Driver_RCEindefault_rules.yaml. - Scoring now treats
jdbc_driver_rceas a critical category; exploitability remains a human-triage decision based on actual driver and URL semantics.
- Reclassified
- False Positive: Taint Explosion via Broad Setter Tainting:
IntraTaintAnalysis.flowThrough: Receiver tainting forInvokeStmtis now restricted to setter-like methods (set*,add*,put*,append*,insert*,with*,push*,enqueue*,load*,init*,configure*,update*,register*) and constructors. Previously, ANYInstanceInvokeExprwith a tainted argument would taint the receiver, causing taint to explode through service-layer objects (repositories, HTTP clients, APM agents) and generate hundreds of false positives.
- False Positive:
URL.<init>/URI.<init>as SSRF Sinks:- Removed
<java.net.URL: void <init>(java.lang.String)>and<java.net.URI: void <init>(java.lang.String)>from SSRF sinks indefault_rules.yaml. Object construction alone does not make a network request; the real sinks (URL.openStream(),URL.openConnection()) are retained.
- Removed
- False Positive:
ObjectMapper.readValue(String, Class)as Deserialization Sink:- Removed
<com.fasterxml.jackson.databind.ObjectMapper: java.lang.Object readValue(java.lang.String,java.lang.Class)>from deserialization sinks. Jackson'sreadValuewith an explicit target class is standard safe JSON parsing, not arbitrary deserialization. Dangerous Jackson deserialization requiresenableDefaultTyping()+ polymorphic type handling, which is not modeled by this sink.
- Removed
- False Positive: Overly Broad Instance-Method Return Value Taint:
IntraTaintAnalysis.applyDefinition: ForInstanceInvokeExpr(instance method calls whose return value is assigned),arg tainted → return taintedis now restricted to setter-like methods (sameisSetterLike()predicate as the receiver-tainting rule). General pass-through instance calls are handled correctly by the inter-procedural scheduler (callee is analyzed with tainted params). Thereceiver tainted → return taintedrule (for getters and chain calls) is unchanged.- Static invocations (
StaticInvokeExpr) retain fullarg → returnpropagation, which is correct for transformation functions (String.format,Paths.get, etc.).
- False Positive: Receiver-Tainted Sink Check for SQL Injection:
WorklistEngine.checkSink()andInterproceduralTaintAnalysis: Receiver-based sink triggering (taintedObj.sinkMethod()) is now disabled for thesqlicategory. SQLi requires a tainted SQL string argument; triggering on a taintedStatementorConnectionreceiver generates false positives from taint reaching database objects via field propagation. SSRF, Path_Traversal, RCE, and other categories retain receiver-based detection.
- Field Taint Propagation (Phase 8.5):
IntraTaintAnalysis.flowThrough: AnyInstanceInvokeExpr(virtual, interface, or special/constructor) with a tainted argument now taints the receiver object. This covers the common setter pattern:obj.setUrl(tainted)propagates taint ontoobjso that subsequent reads (obj.getUrl(),obj.field) stay tainted through the rest of the method.IntraTaintAnalysis: AddedtaintedStaticFields: Set<SootField>to track writes of the formSomeClass.field = tainted. Subsequent readsx = SomeClass.fieldwithin the same method body are now correctly tainted. The set is monotone (only grows) consistent with MAY-analysis semantics.WorklistEngine.checkSink+InterproceduralTaintAnalysis: Sink detection now also fires when the receiver of an instance-method sink is tainted (e.g.,taintedStmt.execute()), in addition to the existing argument check. This closes a class of false negatives for builder/fluent API sink patterns.
- False Negatives: Interprocedural Receiver Taint (Phase 8.5 pre-work, commit
1ca012a):AnalysisState: AddedthisTaintedboolean to the memoization key (equals/hashCode). Previously, a method entered with a tainted receiver and without a tainted receiver mapped to the same state; the second visit was silently skipped, dropping real flows.WorklistEngine.scheduleCallee+InterproceduralTaintAnalysis: When anInstanceInvokeExprbase object is tainted, the callee'sthislocal is now seeded as tainted before scheduling. This enablessource → obj (tainted) → callee(this tainted) → sinkchains.IntraTaintAnalysis.applyDefinition: Constructor calls (SpecialInvokeExpr.isConstructor()) with tainted arguments now taint the base object (previously missed, leavingnew Obj(tainted)chains broken).IntraTaintAnalysis.applyDefinition: Static method calls (StaticInvokeExpr) with tainted arguments now taint the return-value local, coveringx = Utils.process(tainted)chains that were previously dropped.
- False Negatives: Missing JDBC URL / Connection Sinks (Phase 8.4, commit
1ca012a):- Added
java.sql.DriverManager.getConnection(String),getConnection(String, Properties), andgetConnection(String, String, String)as SSRF/JDBC-URL-Injection sinks indefault_rules.yaml.
- Added
- Config Merge (commit
1ca012a):ConfigManager: When a workspacerules.yamlexists, its source/sink rules are now merged with the bundled defaults instead of replacing them. Rules present in the workspace file take precedence; rules only in defaults are appended. This prevents sink/source coverage regressions when users customize their rule files.
- Graph Stability (commits
b9fc2ef,6e8f79b,ef8bc48):- Auto-resolve dangling Soot classes during call-graph construction to reduce phantom-class noise.
- Bulk resolution pass for recurring dangling packages.
- Tightened retry budget for dangling resolution to avoid runaway retries.
- JAX-RS Route Extraction:
RouteExtractor: POJO parameters annotated with JAX-RS path/query annotations are now correctly captured inapi.txt.- Added support for
@Path,@GET/@POST/@PUT/@DELETE/@PATCHon JAX-RS controllers.
- Legacy Web App Support (Phase 10.1):
- Implemented
WebXmlParserto extract Servlet mappings fromweb.xmlfiles in JAR/WAR archives. - Updated
RouteExtractorto mergeweb.xmlroutes with Spring annotation-based routes. - Enhanced
DiscoveryEngineto scan all available JARs (including libraries) forweb.xmldefinitions, ensuring routes in dependencies (e.g.,bos-resources.jar) are discovered. - Fixes issue where legacy Servlet routes were missed in hybrid Spring Boot + Servlet applications.
- Implemented
- Smart PoC Generator (Phase 8.3):
- Implemented
PoCGeneratorto automatically create ready-to-use HTTP request payloads for discovered vulnerabilities. - Context-Aware Generation: Generates correct
Content-Type(JSON, Form-UrlEncoded, Multipart) based on Spring annotations (@RequestBody,@RequestParam). - Payload Injection: Automatically injects vulnerability-specific payloads (e.g.,
whoamifor RCE,1=1for SQLi) into the appropriate parameters. - ApiRoute Metadata: Enhanced
api.txtandDiscoveryEngineto capture and persist parameter types, names, and annotations. - Generates
generated_pocs.txtwhich can be directly imported into Burp Suite Repeater.
- Implemented
- Secret Scanner (Phase 8.1):
- Implemented a new "Tactical Intelligence" module for discovering hardcoded secrets.
- Config Scan: Automatically scans
application.properties,.yml,.xmlinside JARs/Fat JARs for passwords, tokens, and keys. - Code Scan: Iterates over String constants in the bytecode to find AWS keys, JDBC credentials, and other secrets using Regex.
- Entropy Analysis: Implemented Shannon Entropy calculation to detect high-entropy strings (e.g., random keys, large payloads).
- Base64 Decoding: Detects Base64 strings, decodes them, and recursively scans the decoded content for secrets.
- Context-Aware Hash Detection: Identifies hardcoded Hash credentials (MD5/SHA) by analyzing their usage context (e.g.,
token.equals("hash")or assignment to sensitive variables likesecret,admin). - Integrated seamlessly into the main scan flow; generates
secrets.txtin the workspace.
- Vulnerability Scorer (Phase 8.2):
- Introduced R-S-A-C Scoring Model: Calculates vulnerability risk based on Sink Severity, Reachability, Auth Barrier, and Confidence.
- Authentication Detection: Heuristic analysis of Spring Security/Shiro annotations (
@PreAuthorize,@Secured, customAuth) to identify protected endpoints. - Rule Categories: Enhanced
rules.yamlwith categories (e.g.,code-exec,cmd-exec,sqli) and default severity scores. - Risk Grading: Vulnerabilities are now graded as
CRITICAL,HIGH,MEDIUM,LOW, orINFOin the SARIF report.
- Gadget Suggestion Engine (Phase 9.2):
- Implemented
GadgetInspectorto analyze library dependencies and suggest usable Deserialization Gadget Chains. - Database: Integrated a database of 400+ known gadgets extracted from
java-chainstool. - SCA: Implemented lightweight SCA (Software Composition Analysis) to parse
pom.propertiesand JAR filenames for dependency versioning. - Reporting: Generates a grouped report
gadgets.txtmapping available libraries to potential exploit chains.
- Implemented
- Worklist Analysis Engine (Phase 7.2):
- Introduced
WorklistEngineto replace the recursiveInterproceduralTaintAnalysis. - Solves potential StackOverflowError on deep call chains.
- Implemented "Leaf Summary Optimization": Automatically identifies leaf methods in the Call Graph and applies cached summaries instead of scheduling them for analysis.
- Switched
TaintEngineto useWorklistEngineby default.
- Introduced
- Method Summary Integration (Phase 7.1):
- Integrated
SummaryGeneratorintoInterproceduralTaintAnalysisloop. - Implemented caching of method summaries (
MethodSummary) during analysis to support future worklist-based engine. - Summaries now capture intra-procedural taint flow (params to return/sinks) for each visited method.
- Integrated
- Refactor AnalysisState (Phase 6.1):
- Replaced inefficient String-based memoization key in
InterproceduralTaintAnalysiswith a structuredAnalysisStateobject. - Utilized
BitSetfor efficient storage of tainted parameter indices, reducing memory footprint during deep recursion.
- Replaced inefficient String-based memoization key in
- Strict Dependency Isolation (Phase 6.3):
- Refactored
JarLoaderto explicitly distinguish between "Target Jars" (matchingscan_packages) and "Library Jars". - Target Jars are now loaded into Soot's
process_dir(generating Jimple bodies), while Library Jars are loaded intoclasspath(signatures only). - This architecture prevents crashes and significantly improves stability when analyzing complex third-party libraries (e.g.,
com.itextpdf,org.bouncycastle). - Spring Boot
BOOT-INF/classesis automatically treated as Target.
- Refactored
- Call Graph Generation (Strategy A):
- Optimized
SootManagerto apply strict exclusions before loading classes. - Extended the default exclusion list to filter out massive frameworks (Spring internals, AWS/Azure SDKs, Netty, etc.) from analysis scope.
- Significantly reduced
wjtpphase execution time and memory usage.
- Optimized
- NPE in RuleManager: Fixed
NullPointerExceptionwhen processing CallGraph edges wheretarget()method is null during Backward Reachability Analysis. - DiscoveryEngine Compilation: Fixed variable reference error (
appJars->targetAppJars). - Secret Scanner Regex: Improved regex to better capture keys like
encrypt.key,private_key.