Skip to content

Commit 10b6511

Browse files
leeNtmbrbr
authored andcommitted
Post Release Documentation Changes
Some fixes to the documentation for the public version of Fontus, including: - Spelling & Grammar - Changed internal URLs to GitHub ones
1 parent 30a57b9 commit 10b6511

File tree

4 files changed

+34
-44
lines changed

4 files changed

+34
-44
lines changed

README.md

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,23 @@ Dynamic tainting framework for Java applications leveraging on-the-fly bytecode
1010
This framework was developed as part of a research project to test and prevent security and privacy issues in web applications.
1111

1212
### 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).
1414
You can cite our paper using the following bibtex entry:
1515

1616
```
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},
27-
pages = {3343–3357},
28-
numpages = {15},
29-
keywords = {data protection, gdpr enforcement, privacy, taint-tracking},
30-
location = {, Copenhagen, Denmark, },
31-
series = {CCS '23}
17+
@inproceedings{KleRolBarKar+23,
18+
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},
3223
}
3324
```
3425

3526

3627
## Requirements and Setup
3728

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``
3930

4031
## Building additional tools
4132

@@ -85,14 +76,14 @@ It is also possible to pass multiple parameters to the agent
8576
- **config**: Specifies a path for a config file
8677
- **blacklisted_main_classes**: Specifies a filepath to a file which contains blacklisted main classes
8778
- **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
8980

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.
9182

9283
An example for parameters passed to the agent ``-javaagent:"fontus-0.0.1-SNAPSHOT.jar=taintmethod=range,use_caching=false,verbose"``.
9384

9485
## Available Tainting Methods
95-
Currently there are 5 different tainting mechanisms available:
86+
Currently, there are 5 different tainting mechanisms available:
9687
- **boolean**: Only tainting per string. Differentiation which character is tainted is *not* possible. Very fast, little memory overhead, but more false positives
9788
- **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.
9889
- **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:
10192
- **untainted**: An wrapper class is used to redirect all calls to the original classes. No taint calculation is performed! The taint is always "false"
10293

10394
## 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:
10596

10697
- **exit**: Exits the application through System.exit(int). Beforehand the string is printed to stderr
10798
- **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
109100
- **json_logging**: Logs the tainted string to a JSON file in ``./fontus-results.json``
110101

111102
## Taintloss handler types
112103
- **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
114105
- **statistics_logging**: Logs to the statistics MXBean in the format "Caller.method -> Taintloss.method: Hits"
115106

116107
## 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``
119110

120111
## Troubleshoot
121112

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.
123114

124115
## Support, Feedback, Contributing
125116

docs/Getting_Started.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## General Remarks
44

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)!
66

77
## Preliminary Steps
88

@@ -17,7 +17,7 @@ We publish to Maven local as it simplifies the following steps.
1717

1818
0. Ensure the application runs regularly.
1919

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...
2121

2222
1. Prepare your configuration
2323

@@ -39,15 +39,15 @@ I use the following shell script:
3939
#!/bin/bash
4040

4141
APPNAME="$(pwd)/target/app.jar"
42-
FONTUS_PATH="$HOME/.m2/repository/com/sap/fontus/fontus/0.0.1-SNAPSHOT/fontus-0.0.1-SNAPSHOT.jar"
42+
FONTUS_PATH="$HOME/.m2/repository/com/sap/fontus/fontus/0.0.1-SNAPSHOT/fontus-1.0.0-SNAPSHOT.jar"
4343
CONFIG_PATH="$(pwd)/configuration.xml"
4444

4545
./mvnw clean package -DskipTests
4646
java -jar --add-opens java.base/jdk.internal.misc=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/jdk.internal.vm.annotation=ALL-UNNAMED \
4747
-javaagent:"${FONTUS_PATH}=config=${CONFIG_PATH},abort=stderr_logging" "${APPNAME}"
4848
```
4949

50-
If you are really lucky, it just works..
50+
If you are really lucky, it just works...
5151

5252
To add taint persistence, proceed to the [taint persistence](Taint_persistence.md) documentation.
5353

@@ -77,18 +77,18 @@ I have aliased `javapp` to `javap -l -v -p -s` as that's (in my opinion, YMMV!)
7777
To attach a debugger add the following to the run script:
7878

7979
```sh
80-
-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005 \
80+
-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005
8181
```
8282

8383
The JVM will now suspend execution and wait for a remote debugger to be attached on port 5005 before running the application.
8484

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.
8686

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.
8888

8989
7. I'm still stuck!
9090

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!
9292

9393
## Debugging Tips
9494

docs/Taint_persistence.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Adjust the configuration accordingly! In theory other DBMS are also supported, b
88

99
2. Dump the Database
1010

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).
1212

1313
To do this with a running docker container, you can run:
1414
```
@@ -23,23 +23,23 @@ If this worked without errors (haha), go to step 5.
2323

2424
4. There were a bunch of errors...
2525

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.
2727

2828
Some things I noticed:
2929

3030
- `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.
3131
- Some DB specific index syntax. Remove and add back manually.
3232

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!
3434

3535
5. Reimport the tainted SQL
3636

3737
Restore the dump via something like ``mysql -u $USER -p "$DBNAME" < "tainted_$DBNAME.sql"``
3838

3939
If this fails, there are two options:
4040

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.
4343

4444
6. Adjust the application to use taint persistence
4545

@@ -98,7 +98,7 @@ Example for fixing a spring boot application using spring data-jpa:
9898
</dependency>
9999
```
100100

101-
Additionally please add the following to your `application.properties`:
101+
Additionally, please add the following to your `application.properties`:
102102
```ini
103103
spring.datasource.tomcat.use-statement-facade=false
104104
```
@@ -114,5 +114,5 @@ The taint driver has a weird issue with empty taint fields. I actually have no i
114114

115115
9. It works but there are exceptions inside the taint driver
116116

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.
118118

docs/integrating.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ RUN wget https://repo1.maven.org/maven2/org/jacoco/jacoco/0.8.8/jacoco-0.8.8.zip
3131
RUN unzip jacoco-0.8.8.zip
3232

3333
```
34-
Ensure to 'reset' the working directory to not change where fontus logs
35-
classfiles.
34+
Ensure to 'reset' the working directory to not change where fontus logs class files.
3635

3736
2. Add JaCoCo agent to your JVM invocation.
3837

@@ -50,7 +49,7 @@ ports:
5049
```
5150
5251
Ensure to start Fontus with the `verbose` option and make the resulting
53-
classfiles accessible for the report later on.
52+
class files accessible for the report later on.
5453

5554
#### Getting Coverage Statistics
5655

@@ -68,9 +67,9 @@ java -jar jacococli.jar dump --destfile=jacoco.exec
6867
```
6968
3. Generate the report
7069

71-
To generate the report JaCoCo needs read access to the classfiles, so adjust their permissions accordingly.
70+
To generate the report JaCoCo needs read access to the class files, so adjust their permissions accordingly.
7271

73-
Assume the classfiles are located in `temp/agent`, you can generate an HTML report in the folder `cov_report` as follows:
72+
Assume the class files are located in `temp/agent`, you can generate an HTML report in the folder `cov_report` as follows:
7473
```bash
7574
java -jar jacococli.jar report jacoco.exec --classfiles temp/agent/ --html cov_report
7675
```

0 commit comments

Comments
 (0)