You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This framework was developed as part of a research project to test and prevent security and privacy issues in web applications.
11
11
12
12
### Cite Us!
13
-
The study was published at [ACM CCS 2023](https://www.sigsac.org/ccs/CCS2023/program.html), and the paper can be found [here](https://loxo.ias.cs.tu-bs.de/papers/2023_CCS_GDPR_tainting.pdf).
13
+
The study was published at [ACM CCS 2023](https://www.sigsac.org/ccs/CCS2023/), and the paper can be found [here](https://www.ias.cs.tu-bs.de/publications/gdpr_tainting.pdf).
14
14
You can cite our paper using the following bibtex entry:
15
15
16
16
```
17
-
@inproceedings{10.1145/3576915.3616604,
18
-
author = {Klein, David and Rolle, Benny and Barber, Thomas and Karl, Manuel and Johns, Martin},
19
-
title = {General Data Protection Runtime: Enforcing Transparent GDPR Compliance for Existing Applications},
20
-
year = {2023},
21
-
isbn = {9798400700507},
22
-
publisher = {Association for Computing Machinery},
23
-
address = {New York, NY, USA},
24
-
url = {https://doi.org/10.1145/3576915.3616604},
25
-
doi = {10.1145/3576915.3616604},
26
-
booktitle = {Proceedings of the 2023 ACM SIGSAC Conference on Computer and Communications Security},
title = {{General Data Protection Runtime: Enforcing Transparent GDPR Compliance for Existing Applications}},
19
+
author = {David Klein AND Benny Rolle AND Thomas Barber AND Manuel Karl AND Martin Johns},
20
+
booktitle = {Proc. of the ACM Conference on Computer and Communications Security (CCS)},
21
+
year = {2023},
22
+
doi = {10.1145/3576915.3616604},
32
23
}
33
24
```
34
25
35
26
36
27
## Requirements and Setup
37
28
38
-
For building the framework execute the gradle task ``shadowJar`` or ``publishToMavenLocal``. Afterwards you will find the Framework JAR in ``./fontus/build/libs``
29
+
For building the framework execute the gradle task ``shadowJar`` or ``publishToMavenLocal``. Afterwards, you will find the Framework JAR in ``./fontus/build/libs``
39
30
40
31
## Building additional tools
41
32
@@ -85,14 +76,14 @@ It is also possible to pass multiple parameters to the agent
85
76
-**config**: Specifies a path for a config file
86
77
-**blacklisted_main_classes**: Specifies a filepath to a file which contains blacklisted main classes
87
78
-**abort**: Specifies what happens if a tainted string reaches a sink. For all options see [Abort types](#Abort types). The default is *stderr_logging*
88
-
-**taintloss_handler**: Specifies what happens if a method is called which potentially causes taintloss (e.g. String.toCharArray()). For all options see [Taintloss handler types](#Taintloss handler types). By default no taintloss handler is used
79
+
-**taintloss_handler**: Specifies what happens if a method is called which potentially causes taintloss (e.g. String.toCharArray()). For all options see [Taintloss handler types](#Taintloss handler types). By default, no taintloss handler is used
89
80
90
-
The arguments are appended to the agent path like this: ``-javaagent:jarpath[=options]``. Therefore options are defined as ``key=value`` pair and ``,`` is used as delimiter between key-value-pairs.
81
+
The arguments are appended to the agent path like this: ``-javaagent:jarpath[=options]``. Therefore, options are defined as ``key=value`` pair and ``,`` is used as delimiter between key-value-pairs.
91
82
92
83
An example for parameters passed to the agent ``-javaagent:"fontus-0.0.1-SNAPSHOT.jar=taintmethod=range,use_caching=false,verbose"``.
93
84
94
85
## Available Tainting Methods
95
-
Currently there are 5 different tainting mechanisms available:
86
+
Currently, there are 5 different tainting mechanisms available:
96
87
-**boolean**: Only tainting per string. Differentiation which character is tainted is *not* possible. Very fast, little memory overhead, but more false positives
97
88
-**array**: Naive tainting per character. Differentiation which character is tainted *is* possible. Linear overhead regarding length for CPU and memory (slow and expensive), nearly no false positives.
98
89
-**range**: Optimized tainting per character. Differentiation which character is tainted *is* possible. Linear overhead regarding count of taints per string for CPU and memory (most times a lot more efficient than *array*). As precise as *array*.
@@ -101,16 +92,16 @@ Currently there are 5 different tainting mechanisms available:
101
92
-**untainted**: An wrapper class is used to redirect all calls to the original classes. No taint calculation is performed! The taint is always "false"
102
93
103
94
## Abort types
104
-
Currently there are four possibilities what can happen, if a tainted string reaches a sink:
95
+
Currently, there are four possibilities what can happen, if a tainted string reaches a sink:
105
96
106
97
-**exit**: Exits the application through System.exit(int). Beforehand the string is printed to stderr
107
98
-**nothing**: Nothing happens if a tainted string reaches a sink
108
-
-**stderr_logging**: Logs the tainted string to stderr as well as an stacktrace
99
+
-**stderr_logging**: Logs the tainted string to stderr as well as a stacktrace
109
100
-**json_logging**: Logs the tainted string to a JSON file in ``./fontus-results.json``
110
101
111
102
## Taintloss handler types
112
103
-**stderr_logging**: Logs to stderr if a potentially taintlossy method is called
113
-
-**file_logging**: Logs to file``./taintloss.log`` formatted in the same way we stderr_logging
104
+
-**file_logging**: Logs to file``./taintloss.log`` formatted in the same way as stderr_logging
114
105
-**statistics_logging**: Logs to the statistics MXBean in the format "Caller.method -> Taintloss.method: Hits"
115
106
116
107
## Inspect Bytecode of a class
@@ -119,7 +110,7 @@ To see the Bytecode for a class file, run ``javap -l -v -p -s TestString.class``
119
110
120
111
## Troubleshoot
121
112
122
-
Have a look in the [docs folder](./docs)!
113
+
Have a look in the [docs](./docs) folder, if anything is still unclear please open an issue.
Copy file name to clipboardExpand all lines: docs/Getting_Started.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
## General Remarks
4
4
5
-
If you have an issue with the documentation or there is a mistake, feel free to fix it or open [an issue](https://git.ias.cs.tu-bs.de/GDPR_Tainting/Fontus/issues) (tagged with documentation please)!
5
+
If you have an issue with the documentation or there is a mistake, feel free to fix it or open [an issue](https://github.com/SAP/project-fontus/issues) (tagged with documentation please)!
6
6
7
7
## Preliminary Steps
8
8
@@ -17,7 +17,7 @@ We publish to Maven local as it simplifies the following steps.
17
17
18
18
0. Ensure the application runs regularly.
19
19
20
-
If there are issues in the first place, Fontus will be of little help to fix them ;) It will only get more annoying..
20
+
If there are issues in the first place, Fontus will be of little help to fix them ;) It will only get more annoying...
21
21
22
22
1. Prepare your configuration
23
23
@@ -39,15 +39,15 @@ I use the following shell script:
The JVM will now suspend execution and wait for a remote debugger to be attached on port 5005 before running the application.
84
84
85
-
Please be aware that your favorite IDE will probably show you the application's source code, which is not what the JVM executes! Fontus adds/changes methods so you have to be aware on how the instrumentation actually changes the code underneath.
85
+
Please be aware that your favorite IDE will probably show you the application's source code, which is not what the JVM executes! Fontus adds/changes methods, so you have to be aware on how the instrumentation actually changes the code underneath.
86
86
87
-
Example: IntelliJ allows for conditional break points and to evaluate expressions in the debugger. Assume you want to conditionally trigger a breakpoint if a string variable's (called `v`) value is equal to say `"java.lang.String"`. The straightforward approach (`v.equals("java.lang.String")` will always be false. Fontus has changed `v`to be of the type `IASString` and thus it can't be equal to a regular String literal. Instead you have to look for a method taking a `CharSequence` for the comparison to work. So the condition `v.conentEquals("java.lang.String")` should work.
87
+
Example: IntelliJ allows for conditional break points and to evaluate expressions in the debugger. Assume you want to conditionally trigger a breakpoint if a string variable's (called `v`) value is equal to say `"java.lang.String"`. The straightforward approach (`v.equals("java.lang.String")` will always be false. Fontus has changed `v`to be of the type `IASString` and thus it can't be equal to a regular String literal. Instead, you have to look for a method taking a `CharSequence` for the comparison to work. So the condition `v.conentEquals("java.lang.String")` should work.
88
88
89
89
7. I'm still stuck!
90
90
91
-
Open a [Git Issue](https://git.ias.cs.tu-bs.de/GDPR_Tainting/Fontus/issues). The more detailed the input, the more likely we can help you. Important is a workable way to reproduce the bug on one of our machines!
91
+
Open a [Git Issue](https://github.com/SAP/project-fontus/issues). The more detailed the input, the more likely we can help you. Important is a workable way to reproduce the bug on one of our machines!
Copy file name to clipboardExpand all lines: docs/Taint_persistence.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ Adjust the configuration accordingly! In theory other DBMS are also supported, b
8
8
9
9
2. Dump the Database
10
10
11
-
With something like `mysqldump -u $USER -p "$DBNAME" >> "$DBNAME.sql"` you can dump the database to a SQL file. Before continuing ensure the dump contains both the creation of the schema (all DDL required to setup the tables) as well as the data (a bunch of insert statements).
11
+
With something like `mysqldump -u $USER -p "$DBNAME" >> "$DBNAME.sql"` you can dump the database to a SQL file. Before continuing: Ensure the dump contains both the schema (all DDL required to set up the tables), as well as the data (a bunch of insert statements).
12
12
13
13
To do this with a running docker container, you can run:
14
14
```
@@ -23,23 +23,23 @@ If this worked without errors (haha), go to step 5.
23
23
24
24
4. There were a bunch of errors...
25
25
26
-
Sadly this is somewhat expected too. The used parser does not understand every bit of weird SQL Syntax and does not support some normal statements either.. So try fixing up the `dump.sql` file before running the tainter again.
26
+
Sadly this is somewhat expected too. The used parser does not understand every bit of weird SQL Syntax and does not support some normal statements either. So try fixing up the `dump.sql` file before running the tainter again.
27
27
28
28
Some things I noticed:
29
29
30
30
-`LOCK <FOO>` and `UNLOCK <FOO>` cause the tainter to crash. As you surely are not importing the dump while using the DB, just remove those statements.
31
31
- Some DB specific index syntax. Remove and add back manually.
32
32
33
-
Those are all crashes in the frontend (the SQL Parser). Sadly we can't do much here without rewriting it to work with a different/better parser. If you have suggestions on a better library or how to fix JSQLParser (The grammar is insane) this, please get in touch!
33
+
Those are all crashes in the frontend (the SQL Parser). Sadly we can't do much here without rewriting it to work with a different/better parser. If you have suggestions on a better library or how to fix JSQLParser (The grammar is insane), please get in touch!
34
34
35
35
5. Reimport the tainted SQL
36
36
37
37
Restore the dump via something like ``mysql -u $USER -p "$DBNAME" < "tainted_$DBNAME.sql"``
38
38
39
39
If this fails, there are two options:
40
40
41
-
- You missed something in step 4 and thus there are missing statements, e.g., you try to insert something into a table where the create statement is missing. Go directly back to to Step 4. Do not pass GO, do not collect 200 bucks.
42
-
- The Tainter mangled something badly, please open [an issue](https://git.ias.cs.tu-bs.de/GDPR_Tainting/Fontus/issues?labels=123)
41
+
- You missed something in step 4 and thus there are missing statements, e.g., you try to insert something into a table which does not exist (i.e., missing`CREATE` statement). Go back to Step 4 and repeat.
42
+
- The Tainter mangled something badly, please check the open [issues](https://github.com/SAP/project-fontus/issues) and if this case is new: Please open an issue, we will look into it.
43
43
44
44
6. Adjust the application to use taint persistence
45
45
@@ -98,7 +98,7 @@ Example for fixing a spring boot application using spring data-jpa:
98
98
</dependency>
99
99
```
100
100
101
-
Additionally please add the following to your `application.properties`:
101
+
Additionally, please add the following to your `application.properties`:
@@ -114,5 +114,5 @@ The taint driver has a weird issue with empty taint fields. I actually have no i
114
114
115
115
9. It works but there are exceptions inside the taint driver
116
116
117
-
Please check that the columns don't have empty values (see Step 8.). If that is not the case, please open [an issue](https://git.ias.cs.tu-bs.de/GDPR_Tainting/Fontus/issues?labels=123) with a minimal working example for us to reproduce. Just based on a stack trace it is impossible to fix.
117
+
Please check that the columns don't have empty values (see Step 8.). If that is not the case, please open [an issue](https://github.com/SAP/project-fontus/issues) with a minimal working example for us to reproduce. Just based on a stack trace it is impossible to fix.
0 commit comments