diff --git a/docs/en/taint-analysis.adoc b/docs/en/taint-analysis.adoc index 26e290483..fb3eb1076 100644 --- a/docs/en/taint-analysis.adoc +++ b/docs/en/taint-analysis.adoc @@ -15,6 +15,7 @@ Taint analysis can be enabled in one of two ways, or both approaches together: * using the programmatic configuration provider. +[[yaml-configuration-file]] === YAML Configuration File In Tai-e, taint analysis is designed and implemented as a plugin of pointer analysis framework. @@ -513,3 +514,95 @@ then you can open the TFG with your web browser and examine it. NOTE: We plan to develop more user-friendly mechanisms for examining taint analysis results in the future. // TODO: == Troubleshooting + +== Pre-prepared Commonly Used Taint Configuration + +Manually collecting and writing taint analysis configurations for different vulnerability types can be time-consuming and challenging, especially for developers and security researchers with limited experience. +To help users streamline this process and improve the efficiency and accuracy of vulnerability detection, we have curated _Commonly Used Taint Configuration_. +When creating or modifying your own taint analysis configuration, you can refer to this configuration for guidance in your process. + +Commonly Used Taint Configuration is a comprehensive collection of source, sink, and transfer rules tailored for various common vulnerability types. + Currently, this collection contains 327 source rules, 920 sink rules, and 138 transfer rules, enabling users to adapt and extend them to detect 13 types of vulnerabilities. + +To further enhance the user experience, we have also carefully organized the project structure by packages and vulnerability types to ensure clarity and ease of understanding of the rules, allowing users to quickly locate and apply the relevant rules. + + +=== Organizational structure + +The structure of this project is as follows: + +[source] +---- +Tai-e/src/main/resources/commonly-used-taint-config +├── sink +│ ├── infoleak # contains 141 sinks +│ │ └── java-io +│ └── injection # contains 779 sinks +│ ├── android +│ │ └── sql-injection +│ ├── java +│ │ ├── crlf +│ │ ├── path-traversal +│ │ ├── rce +│ │ └── ... +│ └── ... +├── source +│ ├── infoleak # contains 158 sources +│ │ └── java +│ └── injection # contains 169 sources +│ ├── apache-struts2 +│ ├── javax +│ │ ├── javax-portlet +│ │ ├── javax-servlet +│ │ └── javax-swing +│ └── ... +└── transfer # contains 138 transfers about String +---- + +Specifically, this project firstly categorizes the configuration files into three main categories: sink, source, and transfer. + +* `sink` category: Contains sinks configurations files related to information leakage and injection vulnerabilities, further subdivided into two subdirectories: +** `infoleak`: Categorized by package name. +** `injection`: Categorized by vulnerability type. + +* `source` category: Contains sources configurations related to information leakage and injection vulnerabilities, further subdivided into two subdirectories: +** `infoleak`: Categorized by package name. +** `injection`: Categorized by package name. + +* `transfer` category: Contains transfers. + +Additionally, each subdirectory contains a corresponding `README` file that provides a brief overview of the relevant vulnerability types. + +=== How to Use it? (An Example) + +Users can directly integrate the configuration files from this collection into the <>, +or modify and extend them as needed to better meet specific analysis requirements. + +Here is an example of how to use the configuration files from this collection. +If the user needs to detect an RCE (Remote Code Execution) injection vulnerability in a Java project using the *Jetty software library*, the following steps can be taken to modify the taint configuration file: + +1. Add the source rules related to the *Jetty software library* from the file `source/injection/jetty/jetty-http/jetty-http.yml`. +2. Add the sink rules related to the *RCE type injection vulnerability* from the file `sink/injection/java/rce/command.yml`. +3. Add the transfer rules related to *String type* from the file `transfer/string-transfers.yml`. + +After these steps, the taint configuration file will be as follows: + +```YAML +source: + - { kind: call, method: "", index: result, type: "java.lang.String" } + - { kind: call, method: "", index: result, type: "java.lang.String" } + - { kind: call, method: "", index: result, type: "java.lang.String" } +#... + +sinks: + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } +#... + +transfer: + - { method: "", from: base, to: result } + - { method: "", from: base, to: result } +#... +``` + diff --git a/src/main/resources/commonly-used-taint-config/sink/infoleak/java-io/README.adoc b/src/main/resources/commonly-used-taint-config/sink/infoleak/java-io/README.adoc new file mode 100644 index 000000000..b208f0ef8 --- /dev/null +++ b/src/main/resources/commonly-used-taint-config/sink/infoleak/java-io/README.adoc @@ -0,0 +1,10 @@ += Description + +- **Overview**: + The sinks in this directory are composed of output-related APIs from the Java standard library's `io` package, primarily including the `write` functions in various output component classes. + +- **Common Use Cases**: + These APIs are commonly used to output data carried by parameters to specified locations, such as files or command lines. + +- **Security Risks**: + Information Disclosure: Attackers can use these APIs to output sensitive information to a specified location, allowing them to exploit the acquired data for illegal activities such as extortion. \ No newline at end of file diff --git a/src/main/resources/commonly-used-taint-config/sink/infoleak/java-io/java-io.yml b/src/main/resources/commonly-used-taint-config/sink/infoleak/java-io/java-io.yml new file mode 100644 index 000000000..c762ad10d --- /dev/null +++ b/src/main/resources/commonly-used-taint-config/sink/infoleak/java-io/java-io.yml @@ -0,0 +1,172 @@ +sinks: + - { method: "", index: 0 } + - { method: "", index: 0 } + + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + + + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + + - { method: "", index: 0 } + - { method: "", index: 0 } + + - { method: "", index: 0 } + - { method: "", index: 0 } + + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + + - { method: "", index: 2 } + - { method: "", index: 1 } + + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + + - { method: "", index: 1 } + - { method: "", index: 2 } + + - { method: "", index: 0 } + - { method: "", index: 0 } + + + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0} + + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + + - { method: "", index: 2 } + - { method: "", index: 1 } + + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } diff --git a/src/main/resources/commonly-used-taint-config/sink/injection/android/sql-injection/ContentProvider.yml b/src/main/resources/commonly-used-taint-config/sink/injection/android/sql-injection/ContentProvider.yml new file mode 100644 index 000000000..351c9845f --- /dev/null +++ b/src/main/resources/commonly-used-taint-config/sink/injection/android/sql-injection/ContentProvider.yml @@ -0,0 +1,5 @@ +sinks: + - { method: "", index: 2 } + - { method: "", index: 3 } + - { method: "", index: 1 } + - { method: "", index: 1 } diff --git a/src/main/resources/commonly-used-taint-config/sink/injection/android/sql-injection/DatabaseUtils.yml b/src/main/resources/commonly-used-taint-config/sink/injection/android/sql-injection/DatabaseUtils.yml new file mode 100644 index 000000000..3e4ead79a --- /dev/null +++ b/src/main/resources/commonly-used-taint-config/sink/injection/android/sql-injection/DatabaseUtils.yml @@ -0,0 +1,6 @@ +sinks: + - { method: "", index: 1 } + - { method: "", index: 1 } + - { method: "", index: 1 } + - { method: "", index: 0 } + diff --git a/src/main/resources/commonly-used-taint-config/sink/injection/android/sql-injection/README.adoc b/src/main/resources/commonly-used-taint-config/sink/injection/android/sql-injection/README.adoc new file mode 100644 index 000000000..2edb66c65 --- /dev/null +++ b/src/main/resources/commonly-used-taint-config/sink/injection/android/sql-injection/README.adoc @@ -0,0 +1,10 @@ += Description + +- **Overview**: + The sinks in this directory consist of Android database SQL-related APIs, including but not limited to `query`, `update`, `delete`, and other methods. Their main functionality is to perform database queries and update operations. + +- **Common Use Cases**: + These APIs are commonly used for handling user-inputted data for queries, data insertion, data updates, data deletion, and SQL statement execution. Users typically have some level of control over the parameters. + +- **Security Risks**: + SQL Injection: Attackers can exploit these APIs by constructing malicious input to inject SQL commands, thereby gaining control over the database. \ No newline at end of file diff --git a/src/main/resources/commonly-used-taint-config/sink/injection/android/sql-injection/SQLiteDatabase.yml b/src/main/resources/commonly-used-taint-config/sink/injection/android/sql-injection/SQLiteDatabase.yml new file mode 100644 index 000000000..49d80f38a --- /dev/null +++ b/src/main/resources/commonly-used-taint-config/sink/injection/android/sql-injection/SQLiteDatabase.yml @@ -0,0 +1,58 @@ +sinks: + - { method: "", index: 0 } + + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 2 } + - { method: "", index: 3 } + - { method: "", index: 5 } + - { method: "", index: 7 } + - { method: "", index: 1 } + - { method: "", index: 2 } + - { method: "", index: 3 } + - { method: "", index: 4 } + - { method: "", index: 6 } + - { method: "", index: 8 } + + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 2 } + - { method: "", index: 3 } + - { method: "", index: 5 } + - { method: "", index: 7 } + - { method: "", index: 1 } + - { method: "", index: 2 } + - { method: "", index: 3 } + - { method: "", index: 4 } + - { method: "", index: 6 } + - { method: "", index: 8 } + + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 2 } + - { method: "", index: 4 } + - { method: "", index: 6 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 2 } + - { method: "", index: 3 } + - { method: "", index: 5 } + - { method: "", index: 7 } + + - { method: "", index: 1 } + - { method: "", index: 2 } + + - { method: "", index: 0 } + - { method: "", index: 2 } + - { method: "", index: 1 } + - { method: "", index: 3 } + + - { method: "", index: 1 } + - { method: "", index: 2 } + - { method: "", index: 1 } + - { method: "", index: 3 } + - { method: "", index: 2 } + - { method: "", index: 4 } + + - { method: "", index: 0 } + - { method: "", index: 1 } diff --git a/src/main/resources/commonly-used-taint-config/sink/injection/android/sql-injection/SQLiteQueryBuilder.yml b/src/main/resources/commonly-used-taint-config/sink/injection/android/sql-injection/SQLiteQueryBuilder.yml new file mode 100644 index 000000000..103856665 --- /dev/null +++ b/src/main/resources/commonly-used-taint-config/sink/injection/android/sql-injection/SQLiteQueryBuilder.yml @@ -0,0 +1,45 @@ +sinks: + - { method: "", index: 0 } + + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 2 } + - { method: "", index: 3 } + - { method: "", index: 4 } + - { method: "", index: 6 } + + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 2 } + - { method: "", index: 4 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 2 } + - { method: "", index: 3 } + - { method: "", index: 5 } + - { method: "", index: 1 } + - { method: "", index: 2 } + - { method: "", index: 3 } + - { method: "", index: 4 } + - { method: "", index: 6 } + + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 2 } + - { method: "", index: 3 } + - { method: "", index: 4 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 2 } + - { method: "", index: 3 } + - { method: "", index: 5 } + + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 2 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 3 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 2 } \ No newline at end of file diff --git a/src/main/resources/commonly-used-taint-config/sink/injection/apache-Xalan/xpath-injection/README.adoc b/src/main/resources/commonly-used-taint-config/sink/injection/apache-Xalan/xpath-injection/README.adoc new file mode 100644 index 000000000..514a937bd --- /dev/null +++ b/src/main/resources/commonly-used-taint-config/sink/injection/apache-Xalan/xpath-injection/README.adoc @@ -0,0 +1,10 @@ += Description + +- **Overview**: + Apache Xalan provides a set of methods for evaluating XPath expressions and selecting nodes within XML documents. These methods enable developers to easily locate, filter, and process specific nodes and data within XML documents. + +- **Common Use Cases**: + These APIs are commonly used to parse and execute XPath expressions, returning corresponding results based on the content of XML documents. + +- **Security Risks**: + XPath Injection: Similar to SQL injection attacks, attackers can craft malicious XPath expressions to reveal the structure of XML data or access data that would normally be restricted. If the XML data is used for user authentication, attackers could even escalate their privileges. diff --git a/src/main/resources/commonly-used-taint-config/sink/injection/apache-Xalan/xpath-injection/xpath.yml b/src/main/resources/commonly-used-taint-config/sink/injection/apache-Xalan/xpath-injection/xpath.yml new file mode 100644 index 000000000..85961226f --- /dev/null +++ b/src/main/resources/commonly-used-taint-config/sink/injection/apache-Xalan/xpath-injection/xpath.yml @@ -0,0 +1,10 @@ +sinks: + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 1 } diff --git a/src/main/resources/commonly-used-taint-config/sink/injection/apache-log4j/log4j_1x/crlf/Category.yml b/src/main/resources/commonly-used-taint-config/sink/injection/apache-log4j/log4j_1x/crlf/Category.yml new file mode 100644 index 000000000..6e72952f6 --- /dev/null +++ b/src/main/resources/commonly-used-taint-config/sink/injection/apache-log4j/log4j_1x/crlf/Category.yml @@ -0,0 +1,18 @@ +sinks: + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 1 } + - { method: "", index: 2 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 1 } + - { method: "", index: 3 } + - { method: "", index: 0 } + - { method: "", index: 1 } diff --git a/src/main/resources/commonly-used-taint-config/sink/injection/apache-log4j/log4j_1x/crlf/Logger.yml b/src/main/resources/commonly-used-taint-config/sink/injection/apache-log4j/log4j_1x/crlf/Logger.yml new file mode 100644 index 000000000..c6d8c1004 --- /dev/null +++ b/src/main/resources/commonly-used-taint-config/sink/injection/apache-log4j/log4j_1x/crlf/Logger.yml @@ -0,0 +1,20 @@ +sinks: + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 1 } + - { method: "", index: 2 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 1 } + - { method: "", index: 3 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 1 } \ No newline at end of file diff --git a/src/main/resources/commonly-used-taint-config/sink/injection/apache-log4j/log4j_1x/crlf/README.adoc b/src/main/resources/commonly-used-taint-config/sink/injection/apache-log4j/log4j_1x/crlf/README.adoc new file mode 100644 index 000000000..c6474d293 --- /dev/null +++ b/src/main/resources/commonly-used-taint-config/sink/injection/apache-log4j/log4j_1x/crlf/README.adoc @@ -0,0 +1,12 @@ += Description + +- **Overview**: + Apache Log4j is a logging library for Java applications. The APIs in this directory provide various methods to log different levels of log information, including debug, info, warning, error, and fatal errors. + +- **Common Use Cases**: + These APIs are typically used to log various types of information, such as recording errors and exceptions, tracking runtime information, issuing warnings, and integrating with log auditing systems. + +- **Security Risks**: + CRLF Injection: Attackers can exploit these APIs by constructing malicious input with CRLF (Carriage Return and Line Feed) sequences to forge log messages, mislead monitoring personnel, or even affect the auditing system. Attackers can also flood logs with errors or irrelevant information, potentially damaging the log integrity. + +*Note*: Apache Log4j version 1.x is no longer maintained. \ No newline at end of file diff --git a/src/main/resources/commonly-used-taint-config/sink/injection/apache-log4j/log4j_2/crlf/Logger.yml b/src/main/resources/commonly-used-taint-config/sink/injection/apache-log4j/log4j_2/crlf/Logger.yml new file mode 100644 index 000000000..74edb348b --- /dev/null +++ b/src/main/resources/commonly-used-taint-config/sink/injection/apache-log4j/log4j_2/crlf/Logger.yml @@ -0,0 +1,104 @@ +sinks: + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 1 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 1 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 1 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 1 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 1 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 1 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 1 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 1 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 1 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 1 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 1 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 1 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 1 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 1 } + - { method: "", index: 1 } diff --git a/src/main/resources/commonly-used-taint-config/sink/injection/apache-log4j/log4j_2/crlf/README.adoc b/src/main/resources/commonly-used-taint-config/sink/injection/apache-log4j/log4j_2/crlf/README.adoc new file mode 100644 index 000000000..eeff6ec37 --- /dev/null +++ b/src/main/resources/commonly-used-taint-config/sink/injection/apache-log4j/log4j_2/crlf/README.adoc @@ -0,0 +1,11 @@ += Description + +- **Overview**: + Apache Log4j is a logging library for Java applications. The APIs in this directory offer various methods to log different levels of information, including debug, info, warning, error, and fatal errors. + +- **Common Use Cases**: + These APIs are commonly used for logging various types of information, such as recording errors and exceptions, tracking runtime information, issuing warnings, and integrating with log auditing systems. + +- **Security Risks**: + CRLF Injection: Attackers can exploit these APIs by crafting malicious input containing CRLF (Carriage Return and Line Feed) sequences to forge log entries, mislead monitoring personnel, and even affect auditing systems. Additionally, attackers can flood logs with excessive errors or irrelevant information, potentially corrupting the log data. + diff --git a/src/main/resources/commonly-used-taint-config/sink/injection/apache-santuario-xml-security/xpath/RAEDME.adoc b/src/main/resources/commonly-used-taint-config/sink/injection/apache-santuario-xml-security/xpath/RAEDME.adoc new file mode 100644 index 000000000..5c0618ac7 --- /dev/null +++ b/src/main/resources/commonly-used-taint-config/sink/injection/apache-santuario-xml-security/xpath/RAEDME.adoc @@ -0,0 +1,11 @@ += Description + +- **Overview**: + The Apache XML Security API provides functionality for processing XPath expressions within XML documents. This primarily involves two classes: `XPathAPI` and `JDKXPathAPI`, which are used to evaluate XPath expressions and select node lists within XML documents. + +- **Common Use Cases**: + These APIs are commonly used to parse and execute XPath expressions, returning corresponding results based on the content of XML documents. + +- **Security Risks**: + XPath Injection: Similar to SQL injection attacks, attackers can craft malicious XPath expressions to gain insights into the structure of XML data or access data that is normally restricted. If the XML data is used for user authentication, attackers could even escalate their privileges. + diff --git a/src/main/resources/commonly-used-taint-config/sink/injection/apache-santuario-xml-security/xpath/xpath.yml b/src/main/resources/commonly-used-taint-config/sink/injection/apache-santuario-xml-security/xpath/xpath.yml new file mode 100644 index 000000000..24d9fcbcd --- /dev/null +++ b/src/main/resources/commonly-used-taint-config/sink/injection/apache-santuario-xml-security/xpath/xpath.yml @@ -0,0 +1,5 @@ +sinks: + - { method: "", index: 1 } + - { method: "", index: 1 } + - { method: "", index: 1 } + - { method: "", index: 1 } diff --git a/src/main/resources/commonly-used-taint-config/sink/injection/apache-struts/file-disclosure/README.adoc b/src/main/resources/commonly-used-taint-config/sink/injection/apache-struts/file-disclosure/README.adoc new file mode 100644 index 000000000..0ab4da0d9 --- /dev/null +++ b/src/main/resources/commonly-used-taint-config/sink/injection/apache-struts/file-disclosure/README.adoc @@ -0,0 +1,11 @@ += Description + +- **Overview**: + These APIs are methods from the Apache Struts framework, used for creating and manipulating `ActionForward` objects. `ActionForward` is a class in Apache Struts used to specify the forwarding path for a request. + +- **Common Use Cases**: + These APIs are commonly used to create and manipulate `ActionForward` objects, specifying forwarding paths and determining whether a redirect is needed. + +- **Security Risks**: + File Disclosure: Once an attacker can control the creation of `ActionForward` objects, they can craft malicious requests to modify the forwarding path, potentially gaining access to sensitive files such as configuration files, application class files, or JAR files. + diff --git a/src/main/resources/commonly-used-taint-config/sink/injection/apache-struts/file-disclosure/struts-file-disclosure.yml b/src/main/resources/commonly-used-taint-config/sink/injection/apache-struts/file-disclosure/struts-file-disclosure.yml new file mode 100644 index 000000000..dbc8e5999 --- /dev/null +++ b/src/main/resources/commonly-used-taint-config/sink/injection/apache-struts/file-disclosure/struts-file-disclosure.yml @@ -0,0 +1,6 @@ +sinks: + - { method: "(java.lang.String)>", index: 0 } + - { method: "(java.lang.String,boolean)>", index: 1 } + - { method: "(java.lang.String,java.lang.String,boolean)>", index: 1 } + - { method: "(java.lang.String,java.lang.String,boolean,boolean)>", index: 2 } + - { method: "", index: 0 } diff --git a/src/main/resources/commonly-used-taint-config/sink/injection/apache-struts/ognl-injection/OgnlUtil.yml b/src/main/resources/commonly-used-taint-config/sink/injection/apache-struts/ognl-injection/OgnlUtil.yml new file mode 100644 index 000000000..59f99b6ef --- /dev/null +++ b/src/main/resources/commonly-used-taint-config/sink/injection/apache-struts/ognl-injection/OgnlUtil.yml @@ -0,0 +1,20 @@ +sink: + - { method: "", index: 2 } + - { method: "", index: 2 } + + - { method: "", index: 2 } + - { method: "", index: 3 } + - { method: "", index: 1 } + - { method: "", index: 2 } + - { method: "", index: 3 } + - { method: "", index: 4 } + - { method: "", index: 3 } + - { method: "", index: 2 } + - { method: "", index: 2 } + - { method: "", index: 3 } + + - { method: "", index: 0 } + - { method: "", index: 2 } + - { method: "", index: 2 } + - { method: "", index: 1 } + diff --git a/src/main/resources/commonly-used-taint-config/sink/injection/apache-struts/ognl-injection/README.adoc b/src/main/resources/commonly-used-taint-config/sink/injection/apache-struts/ognl-injection/README.adoc new file mode 100644 index 000000000..61a524b27 --- /dev/null +++ b/src/main/resources/commonly-used-taint-config/sink/injection/apache-struts/ognl-injection/README.adoc @@ -0,0 +1,11 @@ += Description + +- **Overview**: + OGNL (Object-Graph Navigation Language) is a language designed to provide a higher-level syntax for navigating Java object graphs. + OGNL can access static methods, properties, and object methods, including classes such as `java.lang.Runtime` that can perform malicious actions like command execution. When OGNL expressions are externally controllable, attackers can craft malicious OGNL expressions to make the program perform malicious operations, which is the basis of the OGNL injection vulnerability. + +- **Common Use Cases**: + These APIs are commonly used to parse and execute OGNL expressions, replace variables in text, and set class member variables and methods. + +- **Security Risks**: + Remote Command Execution: When OGNL expressions are externally controllable, attackers can craft OGNL expressions to trigger reverse shells, execute system commands, and perform other malicious actions. diff --git a/src/main/resources/commonly-used-taint-config/sink/injection/apache-struts/ognl-injection/TextParseUtil.yml b/src/main/resources/commonly-used-taint-config/sink/injection/apache-struts/ognl-injection/TextParseUtil.yml new file mode 100644 index 000000000..a237c823e --- /dev/null +++ b/src/main/resources/commonly-used-taint-config/sink/injection/apache-struts/ognl-injection/TextParseUtil.yml @@ -0,0 +1,13 @@ +sink: + - { method: "", index: 1 } + - { method: "", index: 2 } + - { method: "", index: 1 } + - { method: "", index: 2 } + - { method: "", index: 3 } + - { method: "", index: 3 } + - { method: "", index: 4 } + - { method: "", index: 4 } + - { method: "", index: 3 } + - { method: "", index: 4 } + - { method: "", index: 1 } + - { method: "", index: 0 } \ No newline at end of file diff --git a/src/main/resources/commonly-used-taint-config/sink/injection/apache-struts/ognl-injection/reflection-relative.yml b/src/main/resources/commonly-used-taint-config/sink/injection/apache-struts/ognl-injection/reflection-relative.yml new file mode 100644 index 000000000..3b5b1f075 --- /dev/null +++ b/src/main/resources/commonly-used-taint-config/sink/injection/apache-struts/ognl-injection/reflection-relative.yml @@ -0,0 +1,29 @@ +sinks: + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 2 } + - { method: "", index: 3 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 2 } + - { method: "", index: 3 } + - { method: "", index: 4 } + - { method: "", index: 2 } + - { method: "", index: 3 } + + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 2 } + - { method: "", index: 3 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 4 } + - { method: "", index: 2 } + - { method: "", index: 4 } + - { method: "", index: 3 } + - { method: "", index: 0 } + - { method: "", index: 2 } + - { method: "", index: 3 } + - { method: "", index: 0 } \ No newline at end of file diff --git a/src/main/resources/commonly-used-taint-config/sink/injection/apache-struts/other/other.yml b/src/main/resources/commonly-used-taint-config/sink/injection/apache-struts/other/other.yml new file mode 100644 index 000000000..2f3000870 --- /dev/null +++ b/src/main/resources/commonly-used-taint-config/sink/injection/apache-struts/other/other.yml @@ -0,0 +1,25 @@ +sinks: + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 2 } + - { method: "", index: 3 } + - { method: "", index: 1 } + + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 1 } + - { method: "", index: 2 } + - { method: "", index: 1 } + - { method: "", index: 2 } + - { method: "", index: 1 } \ No newline at end of file diff --git a/src/main/resources/commonly-used-taint-config/sink/injection/apache-turbine/sql-injection/README.adoc b/src/main/resources/commonly-used-taint-config/sink/injection/apache-turbine/sql-injection/README.adoc new file mode 100644 index 000000000..1c57cea19 --- /dev/null +++ b/src/main/resources/commonly-used-taint-config/sink/injection/apache-turbine/sql-injection/README.adoc @@ -0,0 +1,10 @@ += Description + +- **Overview**: + The APIs in this directory provide multiple ways to execute SQL queries and return results. These methods are used to interact with databases by executing SQL queries to retrieve data. + +- **Common Use Cases**: + These APIs are commonly used for handling user-input data queries and executing SQL statements. Users typically have some level of control over the parameters. + +- **Security Risks**: + SQL Injection: Attackers can exploit these APIs by crafting malicious input to inject SQL commands, allowing them to manipulate the database. diff --git a/src/main/resources/commonly-used-taint-config/sink/injection/apache-turbine/sql-injection/sql-turbine.yml b/src/main/resources/commonly-used-taint-config/sink/injection/apache-turbine/sql-injection/sql-turbine.yml new file mode 100644 index 000000000..b0dc213d0 --- /dev/null +++ b/src/main/resources/commonly-used-taint-config/sink/injection/apache-turbine/sql-injection/sql-turbine.yml @@ -0,0 +1,14 @@ +sinks: + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 2 } + - { method: "", index: 2 } + - { method: "", index: 4 } + - { method: "", index: 4 } + + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 2 } + - { method: "", index: 2 } + - { method: "", index: 4 } + - { method: "", index: 4 } diff --git a/src/main/resources/commonly-used-taint-config/sink/injection/apahce-commons/beanutils2/attribute-injection/README.adoc b/src/main/resources/commonly-used-taint-config/sink/injection/apahce-commons/beanutils2/attribute-injection/README.adoc new file mode 100644 index 000000000..81f5ad374 --- /dev/null +++ b/src/main/resources/commonly-used-taint-config/sink/injection/apahce-commons/beanutils2/attribute-injection/README.adoc @@ -0,0 +1,10 @@ += Description + +- **Overview**: + Apache Commons BeanUtils provides a set of utility methods for manipulating Java Beans. The APIs in this directory can be used for common tasks such as property copying, property setting, and object population. + +- **Common Use Cases**: + These APIs are commonly used for copying, populating, and setting properties of Java Bean objects. + +- **Security Risks**: + Property Injection: If an attacker gains control over the objects being populated or the property names being set, they can inject unexpected and malicious property values, leading to property injection vulnerabilities. diff --git a/src/main/resources/commonly-used-taint-config/sink/injection/apahce-commons/beanutils2/attribute-injection/beans.yml b/src/main/resources/commonly-used-taint-config/sink/injection/apahce-commons/beanutils2/attribute-injection/beans.yml new file mode 100644 index 000000000..f4d465d4f --- /dev/null +++ b/src/main/resources/commonly-used-taint-config/sink/injection/apahce-commons/beanutils2/attribute-injection/beans.yml @@ -0,0 +1,14 @@ +sinks: + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 1 } + + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 1 } \ No newline at end of file diff --git a/src/main/resources/commonly-used-taint-config/sink/injection/apahce-commons/logging/crlf/README.adoc b/src/main/resources/commonly-used-taint-config/sink/injection/apahce-commons/logging/crlf/README.adoc new file mode 100644 index 000000000..5ba66c731 --- /dev/null +++ b/src/main/resources/commonly-used-taint-config/sink/injection/apahce-commons/logging/crlf/README.adoc @@ -0,0 +1,10 @@ += Description + +- **Overview**: + The APIs in this directory are interfaces from the Apache Commons Logging library, used for logging. They provide various methods to log different levels of information, including debug, info, warning, and error. + +- **Common Use Cases**: + These APIs are commonly used to log various types of information, such as recording errors and exceptions, tracking runtime information, issuing warnings, and integrating with log auditing systems. + +- **Security Risks**: + CRLF Injection: Attackers can exploit these APIs by crafting malicious input containing CRLF (Carriage Return and Line Feed) sequences to forge log entries, mislead monitoring personnel, and even affect auditing systems. Additionally, attackers can flood logs with excessive errors or irrelevant information, potentially corrupting the log data. diff --git a/src/main/resources/commonly-used-taint-config/sink/injection/apahce-commons/logging/crlf/crlf-logs.yml b/src/main/resources/commonly-used-taint-config/sink/injection/apahce-commons/logging/crlf/crlf-logs.yml new file mode 100644 index 000000000..cfc98acc8 --- /dev/null +++ b/src/main/resources/commonly-used-taint-config/sink/injection/apahce-commons/logging/crlf/crlf-logs.yml @@ -0,0 +1,13 @@ +sinks: + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 1 } \ No newline at end of file diff --git a/src/main/resources/commonly-used-taint-config/sink/injection/java/crlf/README.adoc b/src/main/resources/commonly-used-taint-config/sink/injection/java/crlf/README.adoc new file mode 100644 index 000000000..e90b33d1d --- /dev/null +++ b/src/main/resources/commonly-used-taint-config/sink/injection/java/crlf/README.adoc @@ -0,0 +1,10 @@ += Description + +- **Overview**: + The APIs in this directory are from the Java standard library's logging utilities, used to generate, record, and manage application logs. They provide various methods to log messages at different levels, support formatting log content, record exception information, and output logs to various targets. + +- **Common Use Cases**: + These APIs are commonly used for logging various types of information, such as recording errors and exceptions, tracking runtime information, issuing warnings, and integrating with log auditing systems. + +- **Security Risks**: + CRLF Injection: Attackers can exploit these APIs by crafting malicious input containing CRLF (Carriage Return and Line Feed) sequences to forge log entries, mislead monitoring personnel, and even affect auditing systems. Additionally, attackers can flood logs with excessive errors or irrelevant information, potentially corrupting the log data. diff --git a/src/main/resources/commonly-used-taint-config/sink/injection/java/crlf/crlf-logs.yml b/src/main/resources/commonly-used-taint-config/sink/injection/java/crlf/crlf-logs.yml new file mode 100644 index 000000000..7122e7001 --- /dev/null +++ b/src/main/resources/commonly-used-taint-config/sink/injection/java/crlf/crlf-logs.yml @@ -0,0 +1,89 @@ +sinks: + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 2 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 2 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 2 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 2 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 2 } + - { method: "", index: 3 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 2 } + - { method: "", index: 3 } + - { method: "", index: 1 } + - { method: "", index: 2 } + - { method: "", index: 3 } + - { method: "", index: 1 } # no in Supplier? + - { method: "", index: 2 } + - { method: "", index: 2 } + - { method: "", index: 3 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 3 } + - { method: "", index: 4 } + - { method: "", index: 1 } + - { method: "", index: 3 } + - { method: "", index: 4 } + - { method: "", index: 0 } + - { method: "", index: 2 } + - { method: "", index: 3 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 3 } + - { method: "", index: 4 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 3 } + - { method: "", index: 4 } + - { method: "", index: 1 } + - { method: "", index: 3 } + - { method: "", index: 4 } + + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 2 } + - { method: "", index: 0 } + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/commonly-used-taint-config/sink/injection/java/path-traversal/README.adoc b/src/main/resources/commonly-used-taint-config/sink/injection/java/path-traversal/README.adoc new file mode 100644 index 000000000..9f5f12e3e --- /dev/null +++ b/src/main/resources/commonly-used-taint-config/sink/injection/java/path-traversal/README.adoc @@ -0,0 +1,10 @@ += Description + +- **Overview**: + The APIs in this directory involve file operations from the Java standard library, including file creation, reading, writing, and path handling. These classes and methods allow developers to perform various file operations, such as creating temporary files, reading file content, and writing data to files. If the parameters are unconstrained and controlled externally, attackers can exploit path traversal vulnerabilities to read and write arbitrary files. + +- **Common Use Cases**: + These APIs are commonly used for creating files and directories, reading files, writing files, and handling file paths. + +- **Security Risks**: + Path Traversal: Attackers can exploit malicious input to perform arbitrary file operations or access unsafe locations, potentially leading to unauthorized file read and write access. diff --git a/src/main/resources/commonly-used-taint-config/sink/injection/java/path-traversal/path-traversal.yml b/src/main/resources/commonly-used-taint-config/sink/injection/java/path-traversal/path-traversal.yml new file mode 100644 index 000000000..c82164eb0 --- /dev/null +++ b/src/main/resources/commonly-used-taint-config/sink/injection/java/path-traversal/path-traversal.yml @@ -0,0 +1,36 @@ +sinks: + # in + - { method: "(java.lang.String)>", index: 0 } + - { method: "(java.lang.String,java.lang.String)>", index: 0 } + - { method: "(java.lang.String,java.lang.String)>", index: 1 } + - { method: "(java.io.File,java.lang.String)>", index: 0 } + - { method: "(java.net.URI)>", index: 0 } + - { method: "(java.lang.String,java.lang.String)>", index: 1 } + + - { method: "(java.lang.String)>", index: 0 } + - { method: "(java.lang.String)>", index: 0 } + + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 0 } + + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 2 } + + - { method: "(java.lang.String)>", index: 0 } + + - { method: "", index: 1 } + - { method: "", index: 2 } + - { method: "", index: 1 } + - { method: "", index: 2 } + - { method: "", index: 1 } + - { method: "", index: 1 } + + # out + - { method: "(java.lang.String)>", index: 0 } + - { method: "(java.lang.String,boolean)>", index: 1 } + - { method: "(java.lang.String)>", index: 0 } + - { method: "(java.lang.String,boolean)>", index: 1 } diff --git a/src/main/resources/commonly-used-taint-config/sink/injection/java/rce/README.adoc b/src/main/resources/commonly-used-taint-config/sink/injection/java/rce/README.adoc new file mode 100644 index 000000000..19dfff8ec --- /dev/null +++ b/src/main/resources/commonly-used-taint-config/sink/injection/java/rce/README.adoc @@ -0,0 +1,10 @@ += Description + +- **Overview**: + The APIs in this directory involve operations for creating and managing processes in Java. They are used to start and control external processes, suitable for various scenarios such as executing system commands and launching external applications. If their parameters are subject to unlimited external input, attackers can execute arbitrary commands on the local machine. + +- **Common Use Cases**: + These APIs are commonly used to create and manage processes, and to execute system commands. + +- **Security Risks**: + Command Injection: Attackers can exploit these methods to execute arbitrary commands on the local machine, potentially compromising the system and accessing confidential information. diff --git a/src/main/resources/commonly-used-taint-config/sink/injection/java/rce/command.yml b/src/main/resources/commonly-used-taint-config/sink/injection/java/rce/command.yml new file mode 100644 index 000000000..6c09b9388 --- /dev/null +++ b/src/main/resources/commonly-used-taint-config/sink/injection/java/rce/command.yml @@ -0,0 +1,17 @@ +sinks: + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 1 } + - { method: "", index: 2 } + - { method: "", index: 1 } + - { method: "", index: 2 } + + - { method: "(java.lang.String[])>", index: 0 } + - { method: "(java.util.List)>", index: 0 } + - { method: "", index: 0 } + - { method: "", index: 0 } + diff --git a/src/main/resources/commonly-used-taint-config/sink/injection/java/xpath-injection/README.adoc b/src/main/resources/commonly-used-taint-config/sink/injection/java/xpath-injection/README.adoc new file mode 100644 index 000000000..992fb6bb9 --- /dev/null +++ b/src/main/resources/commonly-used-taint-config/sink/injection/java/xpath-injection/README.adoc @@ -0,0 +1,10 @@ += Description + +- **Overview**: + The Java standard library provides a set of methods for evaluating XPath expressions and selecting nodes within XML documents. Using these methods, developers can easily locate, filter, and process specific nodes and data within XML documents. + +- **Common Use Cases**: + These APIs are commonly used to parse and execute XPath expressions, returning corresponding results based on the content of XML documents. + +- **Security Risks**: + XPath Injection: Similar to SQL injection attacks, attackers can craft malicious XPath expressions to reveal the structure of XML data or access data that is normally restricted. If the XML data is used for user authentication, attackers could even escalate their privileges. diff --git a/src/main/resources/commonly-used-taint-config/sink/injection/java/xpath-injection/xpath.yml b/src/main/resources/commonly-used-taint-config/sink/injection/java/xpath-injection/xpath.yml new file mode 100644 index 000000000..0c0ca312d --- /dev/null +++ b/src/main/resources/commonly-used-taint-config/sink/injection/java/xpath-injection/xpath.yml @@ -0,0 +1,10 @@ +sinks: + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 1 } + - { method: "", index: 0 } + - { method: "", index: 1 } diff --git a/src/main/resources/commonly-used-taint-config/sink/injection/java/xss/README.adoc b/src/main/resources/commonly-used-taint-config/sink/injection/java/xss/README.adoc new file mode 100644 index 000000000..e4ba95a5b --- /dev/null +++ b/src/main/resources/commonly-used-taint-config/sink/injection/java/xss/README.adoc @@ -0,0 +1,10 @@ += Description + +- **Overview**: + The Java standard library provides a set of formatting and output APIs that are used to format data into specific string forms and output these strings to various targets. + +- **Common Use Cases**: + These APIs are commonly used to format strings, write text to output streams, and other similar tasks. + +- **Security Risks**: + XSS (Cross-Site Scripting) Attacks: If the formatted string or parameters include user input data and are not properly encoded, it may lead to XSS vulnerabilities. For example, if user input contains a `