Closed jimmy66688 closed 1 year ago
I noticed that in the method boolean loadClassFile(InputStream is)
of class soot.coffi.ClassFile
, after d = new DataInputStream(f);
, all the data in d is assigned to 0.
log shows: soot.coffi.Util - org.apache.cassandra.service.CassandraDaemon is a phantom class!
But, why is this class a phantom class? The class does exist intact in the application's jar package.apache-cassandra-4.0.5.jar
Soot shouldn't use Coffi, which highly outdated, but ASM. How do you run FlowDroid? I guess that org.apache.*
ends up on the exclusion list, which is the default behavior for the Android analyzer, but not for the pure Java engine.
Soot shouldn't use Coffi, which highly outdated, but ASM. How do you run FlowDroid? I guess that
org.apache.*
ends up on the exclusion list, which is the default behavior for the Android analyzer, but not for the pure Java engine.
It was exactly caused by coffi
, I checked my configuration based on your reply and I found Options.v().set_coffi(true)
, when I fixed it the analysis proceeded normally.
Thank you Steven.
Hi @StevenArzt , I am performing a static taint analysis on
cassandra
and I am suffering from a problem with classes not being resolved correctly:I set
entrypoint
as<org.apache.cassandra.service.CassandraDaemon: void main(java.lang.String[])>
and the log shows:Cannot generate constructor for class: org.apache.cassandra.service.CassandraDaemon
.I have debugged the whole class resolution, and I know from the debug window that the class resolution is not correct and there is a lot of information missing.
Following information is obtained by
SootClass toReturn = SootResolver.v().resolveClass(className, desiredLevel)
in methodpublic SootClass tryLoadClass(String className, int desiredLevel)
, which belongs to classsoot.Scene
.It is obvious that the methods in the class cannot be empty.
Similarly, I tried to resolve another class:
org.apache.cassandra.transport.messages.StartupMessage
and got correct results:I'm confused about this situation and what caused it.
Version Informantion: FlowDroid 2.10 Soot 4.3.0 Cassandra 4.0.5