worawit / blutter

Flutter Mobile Application Reverse Engineering Tool
MIT License
760 stars 128 forks source link

error on DartDumper.cpp.o #1

Closed VicoErv closed 10 months ago

VicoErv commented 10 months ago

Tried on flutter version 2 & 3

Ubuntu clang version 15.0.7 gcc (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0

Distributor ID: Ubuntu Description: Ubuntu 23.04 Release: 23.04 Codename: lunar

APK 1: Dart version: 3.0.3, Snapshot: 90b56a561f70cd55e972cb49b79b3d8b, Target: android arm64 APK 2: Dart version: 2.19.6, Snapshot: adb4292f3ec25074ca70abcd2d5c7251, Target: android arm64

/home/xxx/blutter/blutter/src/DartDumper.cpp:679:29: error: invalid operands to binary expression ('std::vector<DartClass *>' and 'const std::ranges::views::_Reverse')
        for (auto parent : parents | std::views::reverse) {
                           ~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~

Is there any steps I missed?

VicoErv commented 10 months ago

I tried on Debian unstable it's working, but the outputs are libapp is loaded at 0x7f75a0e2d000 Dart heap at 0x7f7400000000 exception: unknown code at: 0x770c24, 7

worawit commented 10 months ago

If you run it on Linux, the gcc must be >= 13.

For an exception, it is a case that I never found. I will make it only print an error message without stopping.

Can you give me a apk (or libapp.so and libflutter.so)? so I can fix it.

VicoErv commented 10 months ago

https://pixeldrain.com/u/Vi9Y6FQY Thanks for your help

worawit commented 10 months ago

Just push the quick fix for obfuscated application. Try pulling the latest one then run the same command with an extra option "--rebuild"

Note: many functions are still missing. I guess because of obfuscation. I have to do more check for what I can do against obfuscated app. Now, at least, some data are extracted.

VicoErv commented 10 months ago

Awesome, may I ask how you able to point which byte to which operation by using dart sdk?

worawit commented 10 months ago

Reading an example from testcase Reading Dart sdk source code Guess from name. then try using and debugging

VicoErv commented 10 months ago

great, thanks