-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add commonly used taint configuration (#136)
Co-authored-by: auroraberry <[email protected]> Co-authored-by: Isla-top <[email protected]>
- Loading branch information
1 parent
10efc00
commit 36fc4f7
Showing
97 changed files
with
2,126 additions
and
0 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
10 changes: 10 additions & 0 deletions
10
src/main/resources/commonly-used-taint-config/sink/infoleak/java-io/README.adoc
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,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. |
172 changes: 172 additions & 0 deletions
172
src/main/resources/commonly-used-taint-config/sink/infoleak/java-io/java-io.yml
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,172 @@ | ||
sinks: | ||
- { method: "<java.io.BufferedOutputStream: void write(byte[],int,int)>", index: 0 } | ||
- { method: "<java.io.BufferedOutputStream: void write(int)>", index: 0 } | ||
|
||
- { method: "<java.io.BufferedWriter: void write(char[],int,int)>", index: 0 } | ||
- { method: "<java.io.BufferedWriter: void write(int)>", index: 0 } | ||
- { method: "<java.io.BufferedWriter: void write(java.lang.String,int,int)>", index: 0 } | ||
|
||
- { method: "<java.io.ByteArrayOutputStream: void write(byte[],int,int)>", index: 0 } | ||
- { method: "<java.io.ByteArrayOutputStream: void write(int)>", index: 0 } | ||
- { method: "<java.io.ByteArrayOutputStream: void writeTo(java.io.OutputStream)>", index: 0 } | ||
|
||
- { method: "<java.io.CharArrayWriter: void write(char[],int,int)>", index: 0 } | ||
- { method: "<java.io.CharArrayWriter: void write(int)>", index: 0 } | ||
- { method: "<java.io.CharArrayWriter: void write(java.lang.String,int,int)>", index: 0 } | ||
- { method: "<java.io.CharArrayWriter: void writeTo(java.io.Writer)>", index: 0 } | ||
- { method: "<java.io.CharArrayWriter: java.lang.CharSequence append(java.lang.CharSequence)>", index: 0 } | ||
- { method: "<java.io.CharArrayWriter: java.lang.CharSequence append(java.lang.CharSequence,int,int)>", index: 0 } | ||
- { method: "<java.io.CharArrayWriter: java.lang.CharSequence append(char)>", index: 0 } | ||
|
||
|
||
- { method: "<java.io.DataOutputStream: void write(int)>", index: 0 } | ||
- { method: "<java.io.DataOutputStream: void write(byte[],int,int)>", index: 0 } | ||
- { method: "<java.io.DataOutputStream: void writeBoolean(boolean)>", index: 0 } | ||
- { method: "<java.io.DataOutputStream: void writeByte(int)>", index: 0 } | ||
- { method: "<java.io.DataOutputStream: void writeBytes(java.lang.String)>", index: 0 } | ||
- { method: "<java.io.DataOutputStream: void writeChar(int)>", index: 0 } | ||
- { method: "<java.io.DataOutputStream: void writeChars(java.lang.String)>", index: 0 } | ||
- { method: "<java.io.DataOutputStream: void writeDouble(double)>", index: 0 } | ||
- { method: "<java.io.DataOutputStream: void writeFloat(float)>", index: 0 } | ||
- { method: "<java.io.DataOutputStream: void writeInt(int)>", index: 0 } | ||
- { method: "<java.io.DataOutputStream: void writeLong(long)>", index: 0 } | ||
- { method: "<java.io.DataOutputStream: void writeShort(int)>", index: 0 } | ||
- { method: "<java.io.DataOutputStream: void writeUTF(java.lang.String)>", index: 0 } | ||
|
||
- { method: "<java.io.FileOutputStream: void write(byte[],int,int)>", index: 0 } | ||
- { method: "<java.io.FileOutputStream: void write(int)>", index: 0 } | ||
- { method: "<java.io.FileOutputStream: void write(byte[])>", index: 0 } | ||
|
||
- { method: "<java.io.FilterOutputStream: void write(byte[])>", index: 0 } | ||
- { method: "<java.io.FilterOutputStream: void write(byte[],int,int)>", index: 0 } | ||
- { method: "<java.io.FilterOutputStream: void write(int)>", index: 0 } | ||
|
||
- { method: "<java.io.ObjectOutputStream: void write(int)>", index: 0 } | ||
- { method: "<java.io.ObjectOutputStream: void write(byte[])>", index: 0 } | ||
- { method: "<java.io.ObjectOutputStream: void write(byte[],int,int)>", index: 0 } | ||
- { method: "<java.io.ObjectOutputStream: void writeBoolean(boolean)>", index: 0 } | ||
- { method: "<java.io.ObjectOutputStream: void writeByte(int)>", index: 0 } | ||
- { method: "<java.io.ObjectOutputStream: void writeBytes(java.lang.String)>", index: 0 } | ||
- { method: "<java.io.ObjectOutputStream: void writeChar(int)>", index: 0 } | ||
- { method: "<java.io.ObjectOutputStream: void writeChars(java.lang.String)>", index: 0 } | ||
- { method: "<java.io.ObjectOutputStream: void writeDouble(double)>", index: 0 } | ||
- { method: "<java.io.ObjectOutputStream: void writeFloat(float)>", index: 0 } | ||
- { method: "<java.io.ObjectOutputStream: void writeInt(int)>", index: 0 } | ||
- { method: "<java.io.ObjectOutputStream: void writeLong(long)>", index: 0 } | ||
- { method: "<java.io.ObjectOutputStream: void writeObject(java.lang.Object)>", index: 0 } | ||
- { method: "<java.io.ObjectOutputStream: void writeShort(int)>", index: 0 } | ||
- { method: "<java.io.ObjectOutputStream: void writeUTF(java.lang.String)>", index: 0 } | ||
- { method: "<java.io.ObjectOutputStream: void defaultWriteObject()>", index: 0 } | ||
- { method: "<java.io.ObjectOutputStream: void writeUnshared(java.lang.Object)>", index: 0 } | ||
|
||
- { method: "<java.io.ObjectOutputStream.PutFiled: void put(java.lang.String,boolean)>", index: 0 } | ||
- { method: "<java.io.ObjectOutputStream.PutFiled: void put(java.lang.String,byte)>", index: 0 } | ||
- { method: "<java.io.ObjectOutputStream.PutFiled: void put(java.lang.String,char)>", index: 0 } | ||
- { method: "<java.io.ObjectOutputStream.PutFiled: void put(java.lang.String,short)>", index: 0 } | ||
- { method: "<java.io.ObjectOutputStream.PutFiled: void put(java.lang.String,int)>", index: 0 } | ||
- { method: "<java.io.ObjectOutputStream.PutFiled: void put(java.lang.String,long)>", index: 0 } | ||
- { method: "<java.io.ObjectOutputStream.PutFiled: void put(java.lang.String,float)>", index: 0 } | ||
- { method: "<java.io.ObjectOutputStream.PutFiled: void put(java.lang.String,double)>", index: 0 } | ||
- { method: "<java.io.ObjectOutputStream.PutFiled: void put(java.lang.String,java.lang.Object)>", index: 0 } | ||
- { method: "<java.io.ObjectOutputStream.PutFiled: void write(java.io.ObjectOutput)>", index: 0 } | ||
|
||
- { method: "<java.io.RandomAccessFile: void write(byte[],int,int)>", index: 0 } | ||
- { method: "<java.io.RandomAccessFile: void write(int)>", index: 0 } | ||
- { method: "<java.io.RandomAccessFile: void write(byte[])>", index: 0 } | ||
|
||
- { method: "<java.io.OutputStream: void write(byte[],int,int)>", index: 0 } | ||
- { method: "<java.io.OutputStream: void write(byte[])>", index: 0 } | ||
- { method: "<java.io.OutputStream: void write(int)>", index: 0 } | ||
|
||
- { method: "<java.io.OutputStreamWriter: void write(java.lang.String,int,int)>", index: 0 } | ||
- { method: "<java.io.OutputStreamWriter: void write(char[],int,int)>", index: 0 } | ||
- { method: "<java.io.OutputStreamWriter: void write(int)>", index: 0 } | ||
|
||
- { method: "<java.io.PipedOutputStream: void write(byte[],int,int)>", index: 0 } | ||
- { method: "<java.io.PipedOutputStream: void write(int)>", index: 0 } | ||
|
||
- { method: "<java.io.PipedWriter: void write(char[],int,int)>", index: 0 } | ||
- { method: "<java.io.PipedWriter: void write(int)>", index: 0 } | ||
|
||
- { method: "<java.io.PrintStream: void print(boolean)>", index: 0 } | ||
- { method: "<java.io.PrintStream: void print(char)>", index: 0 } | ||
- { method: "<java.io.PrintStream: void print(int)>", index: 0 } | ||
- { method: "<java.io.PrintStream: void print(long)>", index: 0 } | ||
- { method: "<java.io.PrintStream: void print(float)>", index: 0 } | ||
- { method: "<java.io.PrintStream: void print(double)>", index: 0 } | ||
- { method: "<java.io.PrintStream: void print(char[])>", index: 0 } | ||
- { method: "<java.io.PrintStream: void print(java.lang.String)>", index: 0 } | ||
- { method: "<java.io.PrintStream: void print(java.lang.Object)>", index: 0 } | ||
|
||
- { method: "<java.io.PrintStream: void println(boolean)>", index: 0 } | ||
- { method: "<java.io.PrintStream: void println(char)>", index: 0 } | ||
- { method: "<java.io.PrintStream: void println(int)>", index: 0 } | ||
- { method: "<java.io.PrintStream: void println(long)>", index: 0 } | ||
- { method: "<java.io.PrintStream: void println(float)>", index: 0 } | ||
- { method: "<java.io.PrintStream: void println(double)>", index: 0 } | ||
- { method: "<java.io.PrintStream: void println(char[])>", index: 0 } | ||
- { method: "<java.io.PrintStream: void println(java.lang.String)>", index: 0 } | ||
- { method: "<java.io.PrintStream: void println(java.lang.Object)>", index: 0 } | ||
|
||
- { method: "<java.io.PrintStream: java.io.PrintStream printf(java.util.Locale,java.lang.String,java.lang.Object[])>", index: 2 } | ||
- { method: "<java.io.PrintStream: java.io.PrintStream printf(java.lang.String,java.lang.Object[])>", index: 1 } | ||
|
||
- { method: "<java.io.PrintStream: java.io.PrintStream append(java.lang.CharSequence)>", index: 0 } | ||
- { method: "<java.io.PrintStream: java.io.PrintStream append(java.lang.CharSequence,int,int)>", index: 0 } | ||
- { method: "<java.io.PrintStream: java.io.PrintStream append(char)>", index: 0 } | ||
|
||
- { method: "<java.io.PrintStream: java.io.PrintStream format(java.lang.String,java.lang.Object[])>", index: 1 } | ||
- { method: "<java.io.PrintStream: java.io.PrintStream format(java.util.Locale,java.lang.String,java.lang.Object[])>", index: 2 } | ||
|
||
- { method: "<java.io.PrintStream: void write(int)>", index: 0 } | ||
- { method: "<java.io.PrintStream: void write(byte[],int,int)>", index: 0 } | ||
|
||
|
||
- { method: "<java.io.PrintWriter: void print(boolean)>", index: 0 } | ||
- { method: "<java.io.PrintWriter: void print(char)>", index: 0 } | ||
- { method: "<java.io.PrintWriter: void print(int)>", index: 0 } | ||
- { method: "<java.io.PrintWriter: void print(long)>", index: 0 } | ||
- { method: "<java.io.PrintWriter: void print(float)>", index: 0} | ||
|
||
- { method: "<java.io.PrintWriter: void write(char[],int,int)>", index: 0 } | ||
- { method: "<java.io.PrintWriter: void write(int)>", index: 0 } | ||
- { method: "<java.io.PrintWriter: void write(java.lang.String,int,int)>", index: 0 } | ||
- { method: "<java.io.PrintWriter: void write(java.lang.String)>", index: 0 } | ||
- { method: "<java.io.PrintWriter: void write(char[])>", index: 0 } | ||
|
||
- { method: "<java.io.PrintWriter: void println(boolean)>", index: 0 } | ||
- { method: "<java.io.PrintWriter: void println(char)>", index: 0 } | ||
- { method: "<java.io.PrintWriter: void println(char[])>", index: 0 } | ||
- { method: "<java.io.PrintWriter: void println(double)>", index: 0 } | ||
- { method: "<java.io.PrintWriter: void println(float)>", index: 0 } | ||
- { method: "<java.io.PrintWriter: void println(int)>", index: 0 } | ||
- { method: "<java.io.PrintWriter: void println(long)>", index: 0 } | ||
- { method: "<java.io.PrintWriter: void println(java.lang.Object)>", index: 0 } | ||
- { method: "<java.io.PrintWriter: void println(java.lang.String)>", index: 0 } | ||
|
||
- { method: "<java.io.PrintWriter: java.io.PrintWriter append(java.lang.CharSequence)>", index: 0 } | ||
- { method: "<java.io.PrintWriter: java.io.PrintWriter append(java.lang.CharSequence,int,int)>", index: 0 } | ||
- { method: "<java.io.PrintWriter: java.io.PrintWriter append(char)>", index: 0 } | ||
|
||
- { method: "<java.io.PrintWrite: java.io.PrintWrite printf(java.util.Locale,java.lang.String,java.lang.Object[])>", index: 2 } | ||
- { method: "<java.io.PrintWrite: java.io.PrintWrite printf(java.lang.String,java.lang.Object[])>", index: 1 } | ||
|
||
- { method: "<java.io.StringWriter: java.io.StringWriter append(java.lang.CharSequence)>", index: 0 } | ||
- { method: "<java.io.StringWriter: java.io.StringWriter append(java.lang.CharSequence,int,int)>", index: 0 } | ||
- { method: "<java.io.StringWriter: java.io.StringWriter append(char)>", index: 0 } | ||
|
||
- { method: "<java.io.StringWriter: void write(char[],int,int)>", index: 0 } | ||
- { method: "<java.io.StringWriter: void write(int)>", index: 0 } | ||
- { method: "<java.io.StringWriter: void write(java.lang.String,int,int)>", index: 0 } | ||
- { method: "<java.io.StringWriter: void write(java.lang.String)>", index: 0 } | ||
- { method: "<java.io.StringWriter: void write(char[])>", index: 0 } | ||
|
||
- { method: "<java.io.Writer: java.io.Writer append(java.lang.CharSequence)>", index: 0 } | ||
- { method: "<java.io.Writer: java.io.Writer append(java.lang.CharSequence,int,int)>", index: 0 } | ||
- { method: "<java.io.Writer: java.io.Writer append(char)>", index: 0 } | ||
|
||
- { method: "<java.io.Writer: void write(char[],int,int)>", index: 0 } | ||
- { method: "<java.io.Writer: void write(int)>", index: 0 } | ||
- { method: "<java.io.Writer: void write(java.lang.String,int,int)>", index: 0 } | ||
- { method: "<java.io.Writer: void write(java.lang.String)>", index: 0 } | ||
- { method: "<java.io.Writer: void write(char[])>", index: 0 } |
5 changes: 5 additions & 0 deletions
5
...urces/commonly-used-taint-config/sink/injection/android/sql-injection/ContentProvider.yml
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,5 @@ | ||
sinks: | ||
- { method: "<android.content.ContentProvider: android.database.Cursor query(android.net.Uri,java.lang.String[],java.lang.String[],java.lang.String,java.lang.String)>", index: 2 } | ||
- { method: "<android.content.ContentProvider: android.database.Cursor query(android.net.Uri,java.lang.String[],java.lang.String[],java.lang.String,java.lang.String,android.os.CancellationSignal)>", index: 3 } | ||
- { method: "<android.content.ContentProvider: int delete(android.net.Uri,java.lang.String,java.lang.String[])>", index: 1 } | ||
- { method: "<android.content.ContentProvider: int update(android.net.Uri,android.content.ContentValues,java.lang.String,java.lang.String[])>", index: 1 } |
6 changes: 6 additions & 0 deletions
6
...sources/commonly-used-taint-config/sink/injection/android/sql-injection/DatabaseUtils.yml
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,6 @@ | ||
sinks: | ||
- { method: "<android.database.DatabaseUtils: long longForQuery(android.database.sqlite.SQLiteDatabase,java.lang.String,java.lang.String[])>", index: 1 } | ||
- { method: "<android.database.DatabaseUtils: java.lang.String stringForQuery(android.database.sqlite.SQLiteDatabase,java.lang.String,java.lang.String[])>", index: 1 } | ||
- { method: "<android.database.DatabaseUtils: android.os.ParcelFileDescriptor blobFileDescriptorForQuery(android.database.sqlite.SQLiteDatabase,java.lang.String,java.lang.String[])>", index: 1 } | ||
- { method: "<android.database.DatabaseUtils: void createDbFromSqlStatements(android.content.Context,java.lang.String,int,java.lang.String)>", index: 0 } | ||
|
10 changes: 10 additions & 0 deletions
10
...ces/commonly-used-taint-config/sink/injection/android/sql-injection/README.adoc
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,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. |
Oops, something went wrong.