Questions tagged [java]
Java is an object-oriented language and runtime environment (JRE). Java programs are platform independent, because they are compiled to bytecode and their execution is handled by a Virtual Machine called the Java VM or JVM.
146
questions
1
vote
1answer
80 views
How to decompile heavily obfuscated classes mixed with Arabic/Chinese/Korean characters?
I recently downloaded a jar file and was curious to see if it was malicious, so I ran it through FernFlower and it wasn't able to deobfuscate it. When I unzipped the jar, I looked inside it and saw ...
3
votes
1answer
385 views
Reverse engineering android native packer
im trying to Reverse engineering an android app and the app have 4 folders in the /data/data/{package} folder
├───app_dexprotector
│ 823517D25836B88F1C499C02370A047E.dat
│ ...
0
votes
1answer
40 views
Making a Android Toast via JNI, i.e. calling Java methods via JNI
Concerning the outputting of an Toast, I found that there are some ways to make a Toast, that invoke calling a FindClass on JNIEnv object with the android/widget/Toast parameter, but I found no ...
0
votes
1answer
40 views
Java Help Understanding RSA Encrypt/Decrypt file and SD card
I was directed tyhis way from the main superuser site:
I have zero experience with Java or Android apps (have coding experience in C) and tried reverse engineering a [now defunct/unsupported] app ...
0
votes
0answers
20 views
“strings” command from *nix, but as a Java API?
Looking for the "strings" command from *nix, but as a Java API. Does such a library or JAR exist? I've automated calling the strings *nix command, but would like to explore reverse ...
0
votes
0answers
17 views
How can I find the native functions used by the Java Runtime Environment on Linux?
I am not usually a Java programmer, but I need to locate for example, which native functions (or APIs) are used in something like java.io.File.createNewFile() on Linux?
Initially, I am thinking of 2 ...
3
votes
2answers
68 views
Frida reading files is slow
I need to read a file around 2 MB into a byte array.
var fis = Java.use("java.io.FileInputStream");
var file = fis.$new("/data/local/file.txt");
var fileBytes = new Uint8Array(file....
0
votes
2answers
945 views
What functions (in which modules) can be hooked by Frida to access unencrypted data of SSL connections in Java programs running under Windows?
There are gazillions of internet resources discussing how to use Frida to hook and otherwise mess around with SSL connections of Java programs running under Android, but seemingly (as far as my google-...
0
votes
0answers
33 views
Tracing all (or most of) function calls in a specific Android app
I'm having a problem, where I'm trying to trace some function calls in an Android app, that uses JNI for about all of its work. More specifically, a function call, in JNI, that makes (IIRC Android ...
0
votes
0answers
30 views
App crashes upon launch after apktool d, apktool b without changing anything
I would like to modify some codes via apktool.
However it crashes once I signed it and installed it.
I have tried resigned it without using apktool.
It works. So I am pretty sure that the app does ...
1
vote
1answer
83 views
DEX file referenced type is not defined in file
I am analyzing a dex file and to ease with reverse engineering, I converted it a jar so it could be decompiled. In the file android/support/v17/leanback/media/MediaControllerGlue.class, the following ...
1
vote
1answer
66 views
How can I see when a library is being called in Android?
Apologies for a beginner-esque question, but I am reverse engineering an Android application, that is most probably using the libusbhost.so library to interface with USB devices via Java Native ...
1
vote
2answers
192 views
J2ME games obfuscator - Spyro and Tekken 5
While reversing some J2ME games like Spyro or Tekken 5 Mobile I have encountered a weird obfuscation where all fields, methods and classes have names like A, a, B, b, Aa, Bb etc.
It's really hard to ...
2
votes
3answers
281 views
Secure resources from being extracted?
I have a jar file with a resources folder, and I have converted it to EXE using Launch4J.
How can I protect my resources from being extracted using winzip/winrar ?
1
vote
2answers
3k views
How to add code to compiled java class
I have java code that is compiled to a .class file.
There is a function that gets few parameters and do some action (e.g. get int x and int y and do x+y)
I want to add to this .class file code that ...
1
vote
1answer
331 views
How can I get classes from “protected” JAR file?
I'm trying to get classes from JAR file / actually running JVM machine but:
When I'm trying to open JAR file using for example 7Zip I dont see any classes. After unzip Manifest file is empty too.
When ...
0
votes
1answer
185 views
Recaf: Recompile disabled, can't edit
I've download recaf jar file and install JDK 8. When I execute it/start it, it all works fine with java -jar recaf-2.12.0-J8-jar-with-dependencies.jar. I open a class file also no problem. The issue ...
0
votes
2answers
86 views
Load Library Android
I Work as cybersecurity consultant and now i'am in mission to reverse engineering of mobile app.
I always reverse it using Jadx and dex2jar ... the problem that after reverse them i found some native ...
2
votes
2answers
2k views
Java - Decipher encrypted classes in a jar file
I have a couple of classes that are encrypted. The class loader must decrypt these before executing in the JVM.
The question is, how and where?
What can I do to understand who is responsible to ...
-2
votes
1answer
120 views
How to deobfuscate Java application protected by Java Antidecompiler [closed]
Here is some infomation I found from MANIFEST.MF
Archiver-Version: Plexus Archiver
Built-By: boonb
Created-By: Apache Maven
Build-Jdk: 1.8.0_231
Main-Class: JavaLauncher
Modified-By: 9.4 (BIS Guard &...
2
votes
1answer
258 views
How to Launch and debug Ghidra from Eclipse with two Modules I'm developing at the same time?
Ghidra comes with its own Eclipse extensions that allows you to develop new Scripts and Modules for Ghidra.
I'm working on several new Modules for Ghidra that will work together. But I've basically ...
3
votes
0answers
30 views
How can I tell whether or not a given library method is being referenced by a consumer program statically in OOP languages?
Preface: This question is about source code reverse engineering and static analysis. Meaning, there is no built code available but I have access to the source code of the program.
Imagine I'm looking ...
1
vote
1answer
50 views
Accessing Call String of CALLOTHER Pcode Instruction via Java API?
Is there a way to access the call string of a CALLOTHER Pcode instruction when iterating over the Pcode in Java? The listing below shows an example of what I mean:
048
...
54
votes
7answers
115k views
What is a good Java decompiler and deobfuscator?
I am using JD-GUI to decompile Java JAR files, but the problem is that it leaves many errors, such as duplicate variables which I have to fix myself and check to see if the program still works (if I ...
0
votes
0answers
30 views
Get Unaffected and KilledByCall Registers from CompilerSpec using Ghidra's Java API
Is there a way to get the volatile and non-volatile registers from Ghidra's CompilerSpec? For instance, when I look into the ARM.cspec I get the following information:
<unaffected>
<register ...
2
votes
0answers
120 views
Google Maps, Android serialisation format
I've come across an SQLite database (gmm_storage.db) used by Google Maps on Android, and I'm unsure as to how the data it contains is serialised. For example:
I'm saying serialised, as from the ...
6
votes
2answers
2k views
Trace system calls, including stack (and java stack if possible), on android?
I have an android app that reads/writes a data file which seems to be encrypted, and i want to make a tool to read/write that file, so i need to reverse the encryption.
The app in question consists ...
-3
votes
1answer
228 views
how to deobfuscate to java zkm?
I will have a question for you, dear forum residents. I have a .jar file encrypted with ZKM which I think will work for me. I don't know how to decrypt this, can you help me?
7
votes
2answers
5k views
Hooking Java APIs
In native code on windows functions can be hooked by replacing their prologue with a JMP instruction.
Is there a way to do something similar with an application written in java? In the end I want to ...
2
votes
1answer
172 views
How do we decompile java so easy?
I have seen a lot of videos where everyone is decompiling the jar files so easily. but I learnt that we cannot decompile any compiled file so easily. I have a little bit of experience in Gidhra. I ...
0
votes
0answers
102 views
frida - The specified child already has a parent. You must call removeView() on the child's parent first when hooking, how do you solve it?
I wanted to hook the method A1f in the below code but frida returns the following exceptions:
Found instance: MyHomeFragment{9bbd8d5} (0965bca9-4838-4ca1-a835-d99639ae15f1)}
java.lang....
1
vote
1answer
130 views
Calling a method of a Java object passed as argument to hooked function in Frida
I am trying to obtain the SecretKey passed to the decryptAesCipherText function. I hooked the function in Frida to try to print out the arguments when the method is called but since SecretKey is an ...
1
vote
2answers
180 views
Working with strong obfuscated Java
I've got a jar file, that is strong obfuscated.
When I tried to put it into decompilers such as bytecode-viewer and luyten I seen many lines of traps and Chinese letters.
I tried to deobfuscate it ...
1
vote
1answer
130 views
Dynamic analysis (Frida) reveals instance of a class that doesn't exist in the source code (dex2jar)
I have been diving into an apk's source code, doing both static analysis with Jadx (same as dex2jar) and dynamic analysis with Frida.
I am trying to replicate the method that signs HTTP requests "...
0
votes
0answers
47 views
Hashing algorithm of length 50
I have been trying to reverse-engineer an Android application using Jadx for static analysis and Frida for dynamic analysis. The end goal is to be able to re-create the request signature, sent as a "x-...
0
votes
0answers
25 views
Force command line argument into exe running java
Ok, bit of an odd one
I'm modding an old game (IL2 Sturmovik 1946). The game is written in Java, and I have the source code (decompiled) in an Eclipse project. I've been asked to fix a curious bug ...
1
vote
1answer
156 views
Reverse Engineering Java - Deobfuscating symbols
I'm new to Java and working on cleaning up a fairly large Java .jar sample where the obfuscator has renamed symbols into invalid names. For example:
import org.lib.00.0.2;
public final class 90
...
3
votes
1answer
180 views
How can I retrieve the encryption key in this code?
can anyone explain the following code? is it possible to retrieve the encryption key?
I think the code was heavily obfuscated in addition to obfuscation, I can recognize it is using algorithms like ...
0
votes
0answers
321 views
Frida finding out a decryption/decode algorithm
It's been a few days I'm working on an application to find out about an encryption it is using on a few strings received from API, but no success so far.
These are the strings:
...
0
votes
0answers
28 views
can't see java file but debugger shows it is present and can access using reflection
I am debugging an android application to find out the implementation of something. I am using a debugger in Android studio from which I came to know that there is a java file that is responsible but ...
3
votes
1answer
251 views
What is the problem with using inner classes in a class enclosing sensitive information?
I recently heard that using Java inner classes in a class that enclose sensitive information is causing the private data of the class to be changed to protected at the bytecode level (meaning that any ...
1
vote
0answers
79 views
JEB Decompiler - Signature recognition engine
I've been playing around with the JEB decompiler and Android reverse engineering suite. One interesting feature they have is deobfuscation by library code matching in which 3rd party libraries out ...
5
votes
1answer
2k views
How to do debug a running java process in linux?
TLDR I want to do live debugging of a java program on a linux machine, and don't how/what debugger to attach to the JVM to get this done.
I expect that this is a well-solved problem, but I lack the ...
1
vote
0answers
209 views
Some obstacles in reversing a JNI Native library
I deleted my last question (it was not still answered and none's effort was wasted) as I got back and thought to re-read JNI documentation, to find I misinterpreted some bits. Things are now clearer
...
2
votes
2answers
1k views
Dealing with heavily obfuscated Java, possibly on bytecode level
I've got a jarfile from a friend, he told me to put it thru an decompiler. So I did, but:
JD-GUI basically spit out just the imports and didn't show any class data
CFR dumped out stack trace on ...
2
votes
2answers
1k views
Reversing Engineering ZKM
So I am attempting to reverse engineer a jar obfuscated with Zelix Klass-Master. I have been using JMD, although it crashes whenever it attempts to crack the bytecode, saying "Could not locate control ...
5
votes
1answer
1k views
Find function in a stripped dynamic ELF library
Im currently reverse engineering an android app and this app calls a function named "getUserInfo" in an ARM 32bit ELF library called "libcms.so" (from TikTok) via the Java Native Interface.
My ...
2
votes
2answers
350 views
Java reverse engineering tool [closed]
I'm getting started on Java reverse engineering but I can't find a great tool. I'm currently using JD-Gui to decompile it.
I've tried PNF's JEB which is really perfect but it's only for Android stuff....
0
votes
1answer
67 views
What types are read from byte array?
I try to understand what data types are read from a byte array. These methods seem to follow a common pattern:
public class Reader {
static short readA(byte[] bytes, int i) {
int s = ((((...
2
votes
1answer
388 views
Are there any Java decompilers accurate enough that if I recompiled the result, it should be identical to the original program?
I am trying to decompile Minecraft, to see if I can analyze the code to make a few small changes, but I need a decompiler good enough so I can recompile it in a way that will work. I have tried ...