https://github.com/wsargent/securityfixer
Experimental Java agent to stomp on things.
https://github.com/wsargent/securityfixer
Last synced: 7 months ago
JSON representation
Experimental Java agent to stomp on things.
- Host: GitHub
- URL: https://github.com/wsargent/securityfixer
- Owner: wsargent
- License: apache-2.0
- Created: 2016-01-04T03:43:06.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2019-02-10T15:54:40.000Z (over 6 years ago)
- Last Synced: 2024-10-11T10:22:05.409Z (about 1 year ago)
- Language: Java
- Homepage: https://tersesystems.com/blog/2016/01/19/redefining-java-dot-lang-dot-system/
- Size: 20.5 KB
- Stars: 15
- Watchers: 3
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SecurityFixer
Uses Byte Buddy to override the behavior of `System.setSecurityManager`.
NOTE: This is a demo, not a real security implementation. For example, `System.getSecurityManager` isn't intercepted!
## Compiling
```
mvn clean compile package
```## Running
A little awkward. You can use the attached `run.sh` script.
```bash
java -javaagent:agent/target/securityfixer-agent-2.0-SNAPSHOT.jar \
-jar example/target/securityfixer-example-2.0-SNAPSHOT.jar```
## Problems
I have this working with Byte Buddy 1.9.0 after some futzing with `@Advice` using the [generated bootstrap approach](https://stackoverflow.com/questions/44747219/byte-buddy-advice-onmethodexit-constructor-retransformation), but the static security manager must be public.
For the purposes of the demo I'm not worried about it.