Questions tagged [dynamic-analysis]

Dynamic analysis extracts information about programs by executing them on a real or virtual processor.

Dynamic analysis is a method for extracting information about programs or the data they process, by collecting critical data during program execution. This can overcome the problem of a static analysis, which is often too conservative ("some event E might occur"), by providing evidence that some specific events (e.g., E) did occur.

A first issue is deciding what information to collect.

A difficult issue is how to insert data-collecting probes into the runtime code:

  • hide the instrumentation in runtime libraries or OS used by the program
  • patch the object code
  • trap code pages of interest and simulate the critical part
  • simulate the entire program execution and collect data as needed
  • modify the source code to insert the instrumentation

Another issue is whether the data collection process interferes with program execution; this is especially important for programs with real time constraints.

64 questions
3
votes
3 answers

Speed up compiled programs using runtime information like for example JVM does it?

Java programs can outperform compiled programming languages like C in specific tasks. It is because the JVM has runtime information, and does JIT compiling when necessary (i guess). (example:…
jsaak
  • 587
  • 4
  • 17
3
votes
3 answers

Are there any C++ tools that detect misuse of static_cast, dynamic_cast, and reinterpret_cast?

The answers to the following question describe the recommended usage of static_cast, dynamic_cast, and reinterpret_cast in C++: When should static_cast, dynamic_cast, const_cast and reinterpret_cast be used? Do you know of any tools that can be used…
3
votes
1 answer

Can predicates be dynamically analyzed?

Let's say I have these three predicates: Predicate pred1 = x => x > 0; Predicate pred2 = x => x > 0 && true; Predicate pred3 = x => false; From a human point of view, it's trivial to say that pred1 and pred2 are equivalent while…
Max
  • 3,453
  • 3
  • 32
  • 50
3
votes
3 answers

C++ Dynamic Code Analysis tools for Windows

i was searching for a tool that detect (Memory Leaks,Memory Corruption, ...) at run-time in VS for C++ and i found this : Dynamic code analysis for C++ unfortunately most of them running under linux so i ask for tools running to VS or at least for…
HokaHelal
  • 1,568
  • 2
  • 15
  • 21
2
votes
2 answers

Predefined algorithm for rapid type analysis and variable type analysis

I'm trying to perform program analysis on the Java source file. Is there any predefined algorithm to perform variable type analysis and rapid type analysis?
sarsarahman
  • 1,078
  • 5
  • 11
  • 26
2
votes
1 answer

Why LLVM's leak sanitizer not working when using with other sanitizers enabled

I was trying to find a memory leak from a simple program: #include #include #include #include void parse(const char* input) { // Goal: parse out a string between brackets // (e.g. " [target…
Jacket
  • 23
  • 4
2
votes
1 answer

bpftrace: uprobe target file does not exist or is not executable

I want to use bpftrace to trace functions inside libasan library, which is inside /usr/lib/x86_64-linux-gnu/. However sudo bpftrace -e 'uretprobe:/usr/lib/x86_64-linux-gnu/libasan.so.4: __interceptor_malloc { printf("pid: %d, malloc %p\n", pid,…
Clover Ye
  • 253
  • 3
  • 8
2
votes
1 answer

Track Data Input Through Application Code and System Libraries

I am a security dude, and I have done extensive research on this one, and at this point I am looking for guidance on where to go next. Also, sorry for the long post, I bolded the important parts. What I am trying to do at a high level is simple: I…
Dave
  • 417
  • 6
  • 15
2
votes
1 answer

Easiest way to collect dynamic Instruction execution counts?

I'd like a simple and fast way to collect the number of times each Instruction in LLVM bitcode was executed in a given run of the application. As far as I can tell, there are a number of approaches I can take: Use PIN. This would require using…
stepthom
  • 1,432
  • 2
  • 16
  • 27
2
votes
1 answer

Reconstruction of Object States in C++

I want to employ an automatic unit test generation approach in C++ with the help of LLVM. The approach should automatically acquire the states of specific objects during a dynamic analysis of the application under test (AUT). After the data has been…
2
votes
1 answer

Program analysis with given input

I have a C program and I want to track all branch conditions which belong to an execution path corresponding to a concrete input. For example, consider a simple program: #include #include int test(char* a) { if (strcmp(a,…
Loi.Luu
  • 373
  • 3
  • 15
2
votes
1 answer

Tools for realtime visualization of Javascript objects

Like many people, my brain tends to work well with visual (aka non-textual) information for reading, writing, and creating. What are some tools that in some way allow me to "see" my currently-running javascript environment visually? One obvious…
themirror
  • 9,963
  • 7
  • 46
  • 79
2
votes
1 answer

What are the go-to tools for finding errors in C code?

It might be either static or dynamic analysis, preferably free.
user2656304
  • 157
  • 8
1
vote
1 answer

Analyzing execution of a Python program from another Python program

I want to write a Python program that analyzes the execution of other arbitrary Python programs. For example, suppose I have a Python script called main.py that calls a function func a certain number of times. I want to create another script called…
Posionus
  • 57
  • 4
1
vote
1 answer

Frida SharedPreferences hooking problem - how can I get the filename and path

I have an app I want to analyze with Frida. The app has over 20 different shared preferences XML files. I am hooking the put methods of the shared preferences like in this code snippet: var sp =…