Dive into the vast array of tools and services available to developers.

Post

Replies

Boosts

Views

Activity

Detecting Frida
Hi, I am writing in to check if there is a way to detect Frida. As we have a Mobile App Penetration Test (MAPT), and the tester uses Frida as the tool for the penetration test. We have implemented these codes to detect Frida and Objection: static bool isInjected0(){ NSArray *suspiciousLibraries = [NSArray arrayWithObjects:@"FridaGadget", @"frida", @"cynject", @"libcycript", nil]; int count = _dyld_image_count();//Get the number of loaded images if (count> 0) { for (int i = 0; i <count; i++) { //Traverse all image_names. Determine whether there are DynamicLibraries const char * dyld = _dyld_get_image_name(i); if (strstr(dyld, "DynamicLibraries")) { return YES; } for (NSString *suspiciousLibrary in suspiciousLibraries) { if ([[NSString stringWithUTF8String: dyld] rangeOfString:suspiciousLibrary].location != NSNotFound) { return YES; } } } } return NO; } We also added these codes to detect the default ports than Frida is using @interface FridaDetector : NSObject + (BOOL)detectFridaPort; + (BOOL)isPortOpen:(in_port_t)port; @end @implementation FridaDetector + (BOOL)detectFridaPort { in_port_t port = 27042; return [self isPortOpen:port]; } + (BOOL)isPortOpen:(in_port_t)port { int socketFileDescriptor = socket(AF_INET, SOCK_STREAM, 0); if (socketFileDescriptor == -1) { NSLog(@"Failed to create socket"); return NO; } struct sockaddr_in addr; memset(&addr, 0, sizeof(addr)); addr.sin_len = sizeof(addr); addr.sin_family = AF_INET; addr.sin_port = htons(port); // Ensuring the port is in network byte order addr.sin_addr.s_addr = inet_addr("127.0.0.1"); struct sockaddr bind_addr; memcpy(&bind_addr, &addr, sizeof(addr)); BOOL result = NO; if (bind(socketFileDescriptor, (struct sockaddr*)&bind_addr, sizeof(addr)) == -1) { NSLog(@"Failed to bind socket, port might be open"); result = YES; } else if (listen(socketFileDescriptor, SOMAXCONN) == -1) { NSLog(@"Failed to listen on socket, port might be open"); result = YES; } close(socketFileDescriptor); return result; } @end We are able to detect Frida on a normal device, but I believe the tester did some workaround to prevent us from detecting the Frida present on their device. Is there a better way to detect Frida and Objection?
0
0
467
Jul ’24
Request for clarification of Developer mode
Hi Guys, I want to support my client for enable the developer mode, But they not accept to connect with any other devices(Mac Xcode) to enable developer mode. They are nearly 10 people to enable developer mode. But I think without mac we can't enable developer mode in some of devices. So I need a clarification with IOS versions. That's only we are excepting to list out which IOS versions don't have developer mode option default. Please list out that IOS versions Like below: default developer mode available IOS 17.4.1 default developer mode not available IOS 17.5.1
1
0
371
Jun ’24
TimeLimitTrait: minimal time limit way to huge
From the Documentation of .timeLimit(_:): Test timeouts do not support high-precision, arbitrarily short durations due to variability in testing environments. The time limit must be at least one minute, and can only be expressed in increments of one minute. Unit Tests are usually considered too long when they take more than 0.1 seconds. So a minimal time limit of on minute is completely useless for unit tests. Is there a similar trait in Swift Testing to handle millisecond time limits?
1
0
379
Jul ’24
Can't turn on Developer Mode on iPhone 12 mini
Hi, I am developing an iOS application using React Native on the Expo platform with EAS. I have followed all of the Expo documentation for setting up my development environment, but in order to create a development build to test my app on my iPhone 12 mini, it says that I need to enable Developer Mode on my device. The issue I'm running into is that when I go to Settings > Privacy & Security, here is no Developer Mode option as expected. I ensured that my device is registered in the Apple Developer portal, and I tried restarting my device multiple times to no avail. I also tried searching the developer forums for a solution, but the only solution I saw was to hook my device up to XCode which isn't an option since I'm developing my app on Windows using EAS. Note that I'm running iOS 17.5.1 on my iPhone 12 mini. Please let me know if there's anything I can do or anything I'm missing to enable Developer Mode on my device.
2
0
439
Jul ’24
What app provides system alerts in VisionOS? iOS and iPadOS has springboard app, but VisionOS doesn't
I want to automate tests for my iOS app and start writing UITests. Sometimes system alerts appear, and my tests have to simulate button tapping. In iOS and iPadOS these alerts are available via the system Springboard application: let springboard = XCUIApplication(bundleIdentifier: "com.apple.springboard") let cancelButton = springboard.alerts.buttons["Cancel"].firstMatch if cancelButton.exists { cancelButton.tap() // <-- cancel button taps, and test continue working } But when I launch my test in the Vision Pro simulator, the springboard is not available: let springboard = XCUIApplication(bundleIdentifier: "com.apple.springboard") print(springboard.exists) // <-- "false" will be printed, springboard does not exist It means that I can't automate button tapping in system alerts. So, my question is: How can I access system alerts in VisionOS and tap buttons by UITests?
1
0
423
Jul ’24
How to depend on a non-macOS external package in macros
Hello everyone, I am trying to create a macro that depends on an external package to abstract some of the packages logic. The point is that the dependency does not support macOS which results in a build failure when trying to build the macro. Since macOS 10.15 is required for creating macros, any thing can be done to get it to work? Here is a sample to what I'm trying to do import PackageDescription import CompilerPluginSupport let package = Package( name: "Stringify", platforms: [ .macOS(.v10_15), .iOS(.v13), .tvOS(.v13), .watchOS(.v6), .macCatalyst(.v13) ], products: [ .library( name: "Stringify", targets: ["Stringify"] ), .executable( name: "StringifyClient", targets: ["StringifyClient"] ), ], dependencies: [ .package(url: "https://github.com/apple/swift-syntax.git", from: "509.0.0"), .package(url: "https://github.com/MyDependency", from: "1.0.0"), ], targets: [ .target( name: "Stringify", dependencies: ["StringifyMacros"] ), .executableTarget( name: "StringifyClient", dependencies: ["Stringify"] ), .macro( name: "StringifyMacros", dependencies: [ .product(name: "SwiftSyntaxMacros", package: "swift-syntax"), .product(name: "SwiftCompilerPlugin", package: "swift-syntax"), .product(name: "MyDependency", package: "MyDependency"), ], swiftSettings: [ .define("IOS_ONLY") ] ), ], swiftLanguageVersions: [.v5] )
1
0
213
Jul ’24
Is there any script that can detect Apple Submission to TestFlight errors early? like: ".framework contains disallowed nested bundles"
Some of the errors like ".framework contains disallowed nested bundles" we find out at later stage when uploading builds to TestFlight. It will be great if we can have similar script that apple uses or some custom script to verify it during the build time. So before I reinvent the wheel is there any script I can use at build time to detect this issue?
1
0
379
Jul ’24
trouble installing truffle for my MacM2 14.5
im having trouble installing truffle. ive tried root/Administrator but then i get this. if anyone has any guidance that would greatly be appreciated. this is what im getting. % npm install -g truffle npm error code EACCES npm error syscall mkdir npm error path /usr/local/lib/node_modules/truffle npm error errno -13 npm error Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/truffle' npm error at async mkdir (node:internal/fs/promises:858:10) npm error at async /usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:624:20 npm error at async Promise.allSettled (index 0) npm error at async [reifyPackages] (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:325:11) npm error at async Arborist.reify (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:142:5) npm error at async Install.exec (/usr/local/lib/node_modules/npm/lib/commands/install.js:150:5) npm error at async module.exports (/usr/local/lib/node_modules/npm/lib/cli/entry.js:74:5) { npm error errno: -13, npm error code: 'EACCES', npm error syscall: 'mkdir', npm error path: '/usr/local/lib/node_modules/truffle' npm error } npm error npm error The operation was rejected by your operating system. npm error It is likely you do not have the permissions to access this file as the current user npm error npm error If you believe this might be a permissions issue, please double-check the npm error permissions of the file and its containing directories, or try running npm error the command again as root/Administrator. npm error A complete log of this run can be found in: /Users/prestonlofton/.npm/_logs/2024-07-10T00_46_51_500Z-debug-0.log prestonlofton@Prestons-Air ~ % sudo rm -rf /Library/Developer/CommandLineTools Password: Sorry, try again. Password: prestonlofton@Prestons-Air ~ % sudo Xcode-select --install xcode-select: note: install requested for command line developer tools prestonlofton@Prestons-Air ~ % npm install -g truffle 5.0.2 npm error code E404 npm error 404 Not Found - GET https://registry.npmjs.org/5.0.2 - Not found npm error 404 npm error 404 '5.0.2@*' is not in this registry. npm error 404 npm error 404 Note that you can also install from a npm error 404 tarball, folder, http url, or git url. npm error A complete log of this run can be found in: /Users/prestonlofton/.npm/_logs/2024-07-10T00_54_22_459Z-debug-0.log
1
0
301
Jul ’24
Sandbox: bash(5261) deny(1) Issue in Xcode
I'm a complete newbie to building an App, this project is a GUI that interacts with an LLM AI service, it's mostly html, javascript, python. I have something that works in a web browser, and mostly works in Android Studio, but in Xcode there are numerous issues. It's my understanding this is something to do with permissions. I have asked an AI which suggested various things that haven't worked, such as reinstalling Cocoapods, and disabling SIP. Are you smarter than an AI, or at least better informed? If so, suggestions or advice would be appreciated. Sandbox: bash(5261) deny(1) file-read-data ........./ios/App/Pods/Target Support Files/Pods-App/Pods-App-frameworks.sh
1
0
727
Jul ’24
installer doesn't put on disk embedded application
Hello! I have an applications which contains another application in Contents/EmbeddedApps/ pkgbuild --root "$rootdir/$APPNAME" --scripts installscripts --install-location "/Applications/$APPNAME" --identifier com.my.id --sign 'Developer ID Installer: *** (YYY)' --version $VERSION "$PACKAGE.pkg" Notarised then. Now when I install the package I don't see embedded application inside Contents/EmbeddedApps/ macOS Version 14.6 Beta (23G5061b) A month ago I was able to install my packges successfully. But now all my old packages are affected. Also I made simple project with just two "Hello World" applications and embed one into another. I create .pkg notarised package and try to install it. Still EmbeddedApps is empty. But the files of embedded application in build/ directory becomes crowned root:wheel. Looks like installer uses my working directory for embedded application instead of /Applications/MyApp.app/Contents/EmbeddedApps/Emb.app
0
0
227
Jul ’24
Not able to use devicectl usage to run ui tests
Hello, I have a test bundle in my application and one of the strong request of our project is to run ui tests from command line having just application build. How to run unit tests on .app file that has a test target? What we tried xcrun devicectl device install app --device <device-identifier> <UITestBundle-Runner.app> xcrun devicectl device process launch --device <device-identifier> --start-stopped <com.apptestbundle-Runner.xcrun> It launches and is waiting pid to be attached. In lldb: device select <device-identifier> device process list Seeing process 'UITestBundle-Runner' pid. device process --pid 'pid id' It attaches and I can see 'debugserver' in the pid list, but it does not start testing and I need tests to start and run. Thanks!
0
0
365
Jul ’24
VSCode Issue
Issue: I have been using the VSCode for quite sometime. Since today morning, the app is shutting on my machine. I have tried re-installing the app, restarted my laptop, but to no avail. Crashed Thread: 0 CrBrowserMain Dispatch queue: com.apple.main-thread Process: Electron [810] Path: /Volumes/VOLUME/*/Visual Studio Code.app/Contents/MacOS/Electron Identifier: com.microsoft.VSCode Version: 1.91.0 (1.91.0) Code Type: X86-64 (Native) Parent Process: ??? [1] Responsible: Electron [810] User ID: 501 Date/Time: 2024-07-07 15:14:29.236 +0530 OS Version: macOS 11.5.2 (20G95) Report Version: 12 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY
2
0
331
Jul ’24
how to support user-defined C++ types inside <complex>?
Universal is a cross-platform library for plug-in replacement types for C++. With the move to Xcode 15, we have encountered a compilation failure in C++ support. I am looking for insight into the design of std::isinf/std::isnan to resolve the following compilation failure: [ 35%] Building CXX object static/fixpnt/binary/CMakeFiles/fixpnt_mod_complex_mul.dir/complex/mod_complex_mul.cpp.o In file included from /Users/runner/work/universal/universal/static/fixpnt/binary/complex/mod_complex_mul.cpp:7: In file included from /Users/runner/work/universal/universal/./include/universal/utility/directives.hpp:32: In file included from /Applications/Xcode_15.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/usr/include/c++/v1/iostream:43: In file included from /Applications/Xcode_15.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/usr/include/c++/v1/ios:221: In file included from /Applications/Xcode_15.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/usr/include/c++/v1/__locale:18: In file included from /Applications/Xcode_15.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/usr/include/c++/v1/mutex:191: In file included from /Applications/Xcode_15.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/usr/include/c++/v1/__memory/shared_ptr.h:42: In file included from /Applications/Xcode_15.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/usr/include/c++/v1/atomic:2668: /Applications/Xcode_15.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/usr/include/c++/v1/cmath:607:12: error: no matching function for call to 'isinf' return std::isinf(__lcpp_x); ^~~~~~~~~~ /Applications/Xcode_15.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/usr/include/c++/v1/complex:598:29: note: in instantiation of function template specialization 'std::__constexpr_isinf<sw::universal::fixpnt<4, 0>>' requested here bool __z_inf = std::__constexpr_isinf(__a) || std::__constexpr_isinf(__b); ^ /Users/runner/work/universal/universal/static/fixpnt/binary/complex/mod_complex_mul.cpp:74:18: note: in instantiation of function template specialization 'std::operator*<sw::universal::fixpnt<4, 0>>' requested here result = a * b; ^ /Users/runner/work/universal/universal/static/fixpnt/binary/complex/mod_complex_mul.cpp:187:42: note: in instantiation of function template specialization 'VerifyComplexMultiplication<4UL, 0UL, true, unsigned char>' requested here nrOfFailedTestCases += ReportTestResult(VerifyComplexMultiplication< 4, 0, Modulo, uint8_t>(reportTestCases), "fixpnt< 4, 0,Modulo,uint8_t>", test_tag); ^ /Applications/Xcode_15.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/usr/include/c++/v1/math.h:429:87: note: candidate function not viable: no known conversion from 'sw::universal::fixpnt<4, 0>' to 'float' for 1st argument _LIBCPP_NODISCARD_EXT inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool isinf(float __x) _NOEXCEPT { ^ /Applications/Xcode_15.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/usr/include/c++/v1/math.h:433:114: note: candidate function not viable: no known conversion from 'sw::universal::fixpnt<4, 0>' to 'double' for 1st argument _LIBCPP_NODISCARD_EXT inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD bool isinf(double __x) _NOEXCEPT { ^ /Applications/Xcode_15.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/usr/include/c++/v1/math.h:437:87: note: candidate function not viable: no known conversion from 'sw::universal::fixpnt<4, 0>' to 'long double' for 1st argument _LIBCPP_NODISCARD_EXT inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool isinf(long double __x) _NOEXCEPT { ^ /Applications/Xcode_15.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/usr/include/c++/v1/math.h:417:80: note: candidate template ignored: requirement 'std::is_arithmetic<sw::universal::fixpnt<4, 0, true, unsigned char>>::value' was not satisfied [with _A1 = sw::universal::fixpnt<4, 0>] _LIBCPP_NODISCARD_EXT _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool isinf(_A1 __x) _NOEXCEPT { ^ /Applications/Xcode_15.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/usr/include/c++/v1/math.h:424:5: note: candidate template ignored: requirement 'std::is_arithmetic<sw::universal::fixpnt<4, 0, true, unsigned char>>::value' was not satisfied [with _A1 = sw::universal::fixpnt<4, 0>] isinf(_A1) _NOEXCEPT { ^ The failure to cast the fixpnt type to native IEEE floats would be difficult to solve as the design disables automatic conversions to avoid difficult to find numerical bug behavior. However, the std::arithmetic<> error makes sense, but I would like to understand the design intent behind this, as this is the only C++ stack that throws this constraint.
9
0
409
Jul ’24
ld: symbol(s) not found for architecture arm64
Hi,all I'm writing a simple c program on my m1 MacBook with vscode ,but when I complied the project, error occurs: Undefined symbols for architecture arm64: "_isDigitLetter", referenced from: _main in 2330004044t34main-187053.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) I installed and used vscode and my program is : //main.c #include <stdio.h> #include "digital.h" int main() { char input; printf("Enter a character: "); scanf("%c", &input); printf("%c", isDigitLetter(input)); return 0; } //isdigit.c #include "digital.h" _Bool isDigitLetter(char c) { return ((c >= '0') && (c<='9')); } //digital.h #ifndef DIGITAL_H #define DIGITAL_H _Bool isDigitLetter(char c); #endif // DIGITAL_H
1
0
235
Jul ’24
How to access ARM system registers?
I want to retrieve processor features at runtime. I used 'MRS' instruction to access system registers. But it failed on my M1 MacBook. I tried the same code on Nvidia Orin(ARM ISA), it's works. On MacOS, I found only 'NZCV' system register I can access. Does Apple impose limitation on other system registers?
1
0
277
Jul ’24
Can't link metal-cpp to C++ framework in Swift Mac app
I have a very simple Mac app with just a MTKView in it which shows a single color. I want to move the rendering code to C++. For this I created a C++ framework target which interoperates with the Swift code - main project target. I am trying to link metal-cpp library to the C++ framework target using these instructions. Approach described in this article works with simple C++ Mac console apps. But in my mixed Swift/C++ project Xcode cannot find Foundation/Foundation.hpp (and probably other headers) to include into the C++ header. I inserted metal-cpp folder into my project and added it to C++ target's header search paths, as written in the instructions.
3
0
447
Jun ’24
What could be a rational architecture of a "proprietary SDK with DExt" ?
The situation 1a) I am developing an SDK for few "proprietary medical X-ray imaging gadgets" and MACOS, iPAD; 1b) The SDK would be used in near/middle future by 2..5 End-User-App-developers (ether by oldschool-teams and by young-startuplike-teams of different geography and mother-languages). 1c) The SDK necessarily incapsulates a DExt, respective installer-helpers also "API-to-decide", "sample-acquisition-app -to-decide". I am deciding the architecture to be convenient for expecting scope of End-User-App-developers 2a) I would like to make this SDK (with necessary proprietary DExt) convenient (in general) as ~ option 2a1) as a scanner within ImageCapture-Application-framework for older MAC-desktop ~ option 2a2) as an *.AAR in Android 2b) I would like to minimize my future communications with End-User-App-deveopment-teams and simplify further activities about "code-signing" and "provisioning-profiles" By my glance, Swift-packages are nearest approach to AAR. But AAR in Android never needs proprietary drivers like DExt. Respectively I have "general question about architecture": 3a) Is this possible (in a straightforward manner) to incapsulate proprietary signed "DExt.apk" and "DExt_Installer.apk" into a Swift-Package for 3rd-party application-developers ? 3b) What (speculatively,presumably) architecture for "a proprietary SDK with DExt" was/were assumed (as rational one) by architects of Apple-DExt-concept at all?
0
0
186
Jul ’24
Repeated "unlock account" alerts in simulator / test devices
As of a few weeks ago or so I'm finding it hard to test my apps in the simulator or on test devices. When I try to sign into iCloud (my apps use CloudKit) or sometimes even make a sandbox StoreKit purchase, I get a "unlock account" alert that refers me to one of my real devices, which then prompts me to change my password. I did that once but then the next day it wanted me to change the password again. Is this expected, and if so how are developers expected to handle this?
0
1
253
Jul ’24