PiRogueToolSuite / pirogue-cli

CLI interface to control the PiRogue
https://pts-project.org/
GNU General Public License v3.0
6 stars 2 forks source link

intercept fails on frida-agent load #12

Closed cosmux closed 7 months ago

cosmux commented 7 months ago

Hello! I have a rooted Samsung A52s running magisk rooted Android 13 stockrom (device details see below). I successfully collected traffic on that phone before, so I currently do not believe, it is the phone that causes the issue. So after updating Pirouge (Debian 11) I run into this issue no matter if I call intercept-gated or -single. But normally I am using the -gated function only. Also, in both cases /data/local/tmp/screen.mp4 does not exist - so can the screenrecording cause the problem or is it just not recording anything? And after the script fails, the phones SytemUI restarts (with black screen with Samsung logo). So here is the output:

sudo pirogue-intercept-gated -o <outputfolder> -i <interface> image

sudo pirogue-intercept-single -U -f <target> -o <outputfile> image

and here is the installed package list dpkg -l | grep pirogue

ii  frida                                15.1.17~pirogue2                 arm64        dynamic instrumentation toolkit for reverse-engineering
ii  pirogue-ap                           1.1.0                            all          Install PiRogue wi-fi AP configuration
ii  pirogue-base                         1.1.0                            all          Install all PiRogue packages
ii  pirogue-cli                          1.0.16                           all          Provision PiRogue CLI tool
ii  pirogue-dashboard                    1.1.0                            all          Provision PiRogue dashboards
ii  pirogue-eve-collector                1.1.0                            all          Provision PiRogue Suricata alarm collector
ii  pirogue-flow-inspector               1.1.0                            all          Provision PiRogue DPI
ii  pirogue-hardware-detection           1.1.0                            all          Automatically detect the hardware configuration during PiRogue installation
ii  pirogue-hat                          1.1.0                            all          Install PiRogue's hat requirements
ii  pirogue-maintenance                  1.1.0                            all          Provision PiRogue maintenance scripts
ii  pirogue-screen-st7789-240x240        1.1.0                            all          Provision PiRogue 240x240px ST7789 screen driver
ii  pirogue-tools                        1.1.0                            all          Install all PiRogue additional tools
ii  python3-adb-shell                    0.4.2-1~pirogue1                 all          Python implementation of ADB with shell and FileSync functionality
ii  python3-communityid                  1.4-1~pirogue1                   all          Community ID flow hashing
ii  python3-geoip2                       4.5.0-1~pirogue1                 all          MaxMind GeoIP2 API
ii  python3-iosbackup                    0.9.923-1~pirogue1               all          reads and extracts files from password-encrypted iOS backups
ii  python3-maxminddb                    2.2.0-1~pirogue1                 arm64        Reader for the MaxMind DB format
ii  python3-mvt                          2.1.4-1~pirogue1                 all          Mobile Verification Toolkit
ii  python3-nskeyedunarchiver            1.5-1~pirogue1                   all          decodes Apple's NSKeyedArchiver
ii  python3-numpy                        1:1.22.1-1+pirogue1              arm64        Fast array facility to the Python 3 language

cat device.json { "fingerprint": "samsung/a52sxqxx/a52sxq:11/RP1A.200720.012/A528BXXU3EWC6:user/release-keys", "brand": "samsung", "device": "a52sxq", "manufacturer": "samsung", "model": "SM-A528B", "name": "a52sxqeea", "serialno": "whatever", "android_version": "13", "api_level": "33" }

Thank you.

U039b commented 7 months ago

Thank you for all the details!

Can you please try to run the following command and tell me if it crashes the device or not?

adb shell screenrecord --bugreport --size 1280x720 --bit-rate 2000000 /data/local/tmp/screen.mp4
cosmux commented 7 months ago

i added --time-limit 10 to the command so I do not have to wait for 3 minutes - no crash. mp4 is created

U039b commented 7 months ago

This issue should be fixed in the latest version of PiRogue OS which comes with Frida 16.0.19. It is not possible to upgrade your version of PiRogue OS because we switched to Debian 12 mainline instead of Raspberry Pi OS. The easiest way for you to test with our latest version is to flash another SD-card so that you can switch back and forth between the 2 versions of PiRogue OS. You can find more details about the installation procedure at https://pts-project.org/guides/g1/#get-pirogue-os.

cosmux commented 7 months ago

alright, I am gonna give it a try. Thank you.

cosmux commented 7 months ago

updating to deb 12 is the cure.

U039b commented 7 months ago

The latest version of PiRogue OS fixes the bug?

cosmux commented 7 months ago

Yes, it does.

U039b commented 7 months ago

Great! Thank you for reporting this bug.