Comments (7)
Thank you for the detailed report @trittimo.
Nothing obvious comes to mind, so a few of guiding questions:
- Which Java version are you using?
- Could the jar be using some non-standard encryption library?
- Is that HTTP requests or TCP communication?
from extract-tls-secrets.
@neykov same thing is happening for me.
This tool says "successfully attached to process XXXX" and exits without creating any file with any keys.
I did some research and found out that this java app uses Apache HTTP client 4.5.2 and JRE-1.8.0_66.
UPDATED: I was wrong, seems it works... but I was confused by wrong path.
from extract-tls-secrets.
@fancywriter could you provide some more details on the relative path - what didn't work and what worked for you?
from extract-tls-secrets.
@neykov I have attached logging.properties similarly how @trittimo did, and I see that it creates file when I do it like this
-javaagent:extract-tls-secrets-4.0.0.jar=secrets.txt
However, it doesn't work with absolute path on another Windows drive letter (sorry, I have to use Windows here, because app is not really portable, though is written on Java)
-javaagent:extract-tls-secrets-4.0.0.jar=A:\secrets.txt
It says
java.io.FileNotFoundException: A:\secrets.txt (The system cannot find the path specified)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileWriter.<init>(Unknown Source)
at name.neykov.secrets.MasterSecretCallback.write(MasterSecretCallback.java:76)
at name.neykov.secrets.MasterSecretCallback.onCalculateKeys(MasterSecretCallback.java:42)
at sun.security.ssl.Handshaker.calculateConnectionKeys(Unknown Source)
at sun.security.ssl.ClientHandshaker.serverHello(Unknown Source)
at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source)
at sun.security.ssl.Handshaker.processLoop(Unknown Source)
at sun.security.ssl.Handshaker.process_record(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.writeRecord(Unknown Source)
at sun.security.ssl.AppOutputStream.write(Unknown Source)
at sun.nio.cs.StreamEncoder.writeBytes(Unknown Source)
at sun.nio.cs.StreamEncoder.implFlushBuffer(Unknown Source)
at sun.nio.cs.StreamEncoder.implFlush(Unknown Source)
at sun.nio.cs.StreamEncoder.flush(Unknown Source)
at java.io.OutputStreamWriter.flush(Unknown Source)
Which doesn't make much sense, it has to create file and the root directory of A:
exists.
from extract-tls-secrets.
What's weird, that from any java app (if I do one-liner doing nothing, but opening the file) it works fine.
For example, either new FileWriter("A:\\secrets.txt", true)
or new FileWriter("A:/secrets.txt", true)
work just fine. But, for example, new FileWriter("B:\\secrets.txt", true)
doesn't (I don't have drive B, I have only A which is network and C which is system). Could you try to reproduce it?
from extract-tls-secrets.
Oh... I have found root cause of why it happened. Sorry. It has nothing to do with Java or your lovely app.
This is how Windows works. 🤦
The network drive A: is accessible for non-admin user, but not accessible for admin user... The app is run by admin. That's why it "doesn't see" drive A.
So looks great. Thanks again for amazing tool!
from extract-tls-secrets.
Thanks for digging into this @fancywriter.
from extract-tls-secrets.
Related Issues (18)
- Doesn't Work with Tomcat 9 (Tested with Tomcat 9.0.12) HOT 3
- Attaching to IBM java HOT 1
- How to deattach? HOT 1
- Cannot attach to the process HOT 4
- can't see the TLS response of request HOT 3
- Error: Could not find or load main class name.neykov.secrets.AgentAttach HOT 12
- EXPORTER_SECRET not work HOT 10
- No BCJSSE support? HOT 1
- No CLIENT_RANDOM output with Java 8, 11 and later HOT 6
- Attaching to running process with missing tools.jar HOT 4
- Unable to log down information HOT 2
- Failed to attach to java process xxxx. Cause: Unable to open socket file: target process not responding or HotSpot VM not loaded HOT 4
- Cannot decrypt TLS 1.2 with TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 cipher suite selected HOT 6
- No output file HOT 1
- Provider WindowsAttachProvider could not be instantiated HOT 1
- Published 4.0.0 package is not installable on Linux
- attach problem HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from extract-tls-secrets.