(fix) move to macho-ts and frida-screenshot ts

This commit is contained in:
Leon Jacobs
2024-06-07 08:32:37 +02:00
parent e6db48bd6a
commit d9c989d2da
5 changed files with 38 additions and 40 deletions
+26 -29
View File
@@ -12,7 +12,7 @@
"frida-java-bridge": "^6",
"frida-objc-bridge": "^7",
"frida-screenshot": "^5",
"macho": "^1"
"macho-ts": "^0.1.0"
},
"devDependencies": {
"@types/frida-gum": "^18",
@@ -22,12 +22,12 @@
}
},
"node_modules/@babel/code-frame": {
"version": "7.24.2",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.2.tgz",
"integrity": "sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==",
"version": "7.24.7",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz",
"integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==",
"dev": true,
"dependencies": {
"@babel/highlight": "^7.24.2",
"@babel/highlight": "^7.24.7",
"picocolors": "^1.0.0"
},
"engines": {
@@ -35,21 +35,21 @@
}
},
"node_modules/@babel/helper-validator-identifier": {
"version": "7.24.5",
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.5.tgz",
"integrity": "sha512-3q93SSKX2TWCG30M2G2kwaKeTYgEUp5Snjuj8qm729SObL6nbtUldAi37qbxkD5gg3xnBio+f9nqpSepGZMvxA==",
"version": "7.24.7",
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz",
"integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==",
"dev": true,
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/highlight": {
"version": "7.24.5",
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.5.tgz",
"integrity": "sha512-8lLmua6AVh/8SLJRRVD6V8p73Hir9w5mJrhE+IPpILG31KKlI9iz5zmBYKcWPS59qSfgP9RaSBQSHHE81WKuEw==",
"version": "7.24.7",
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz",
"integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==",
"dev": true,
"dependencies": {
"@babel/helper-validator-identifier": "^7.24.5",
"@babel/helper-validator-identifier": "^7.24.7",
"chalk": "^2.4.2",
"js-tokens": "^4.0.0",
"picocolors": "^1.0.0"
@@ -374,9 +374,9 @@
"dev": true
},
"node_modules/@types/node": {
"version": "18.19.33",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.33.tgz",
"integrity": "sha512-NR9+KrpSajr2qBVp/Yt5TU/rp+b5Mayi3+OlMlcg2cVCfRmcG5PWZ7S4+MG9PZ5gWBoc9Pd0BKSRViuBCRPu0A==",
"version": "18.19.34",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.34.tgz",
"integrity": "sha512-eXF4pfBNV5DAMKGbI02NnDtWrQ40hAN558/2vvS4gMpMIxaf6JmD7YjnZbq0Q9TDSSkKBamime8ewRoomHdt4g==",
"dev": true,
"dependencies": {
"undici-types": "~5.26.4"
@@ -519,11 +519,6 @@
"node": ">=0.3.1"
}
},
"node_modules/endian-reader": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/endian-reader/-/endian-reader-0.1.0.tgz",
"integrity": "sha512-5e4iguVyduiJiqb+EFF7fJ2HBx38WQjlILgOOReIO73vCuZ4EwSwp7HmEzbL4jN8BdKAnH67eoeEF0JC5DUjow=="
},
"node_modules/escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
@@ -630,6 +625,7 @@
"version": "7.2.3",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
"integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
"deprecated": "Glob versions prior to v9 are no longer supported",
"dev": true,
"dependencies": {
"fs.realpath": "^1.0.0",
@@ -749,12 +745,13 @@
"node": "*"
}
},
"node_modules/macho": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/macho/-/macho-1.5.0.tgz",
"integrity": "sha512-OQIH52wxSFeK7rFGoTnyNdcfWAYTTTBcT9IRWjxutOdj+opRk9dLR1mO0ifZKlPvCf/xWbCRK7Wk87nnrAEQ0w==",
"dependencies": {
"endian-reader": "^0.1.0"
"node_modules/macho-ts": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/macho-ts/-/macho-ts-0.1.0.tgz",
"integrity": "sha512-PuG4ng7EEDL139C56nl3OnYWQH5K92HhzaSkpSEz7M/iXwuru//tHnRiya2V0bsG69O55FhjtXbiFf51ronPyQ==",
"engines": {
"node": ">=16",
"npm": ">=7"
}
},
"node_modules/minimatch": {
@@ -848,9 +845,9 @@
}
},
"node_modules/rxjs/node_modules/tslib": {
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz",
"integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==",
"version": "2.6.3",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz",
"integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==",
"dev": true,
"optional": true
},
+2 -1
View File
@@ -3,6 +3,7 @@
"version": "0.0.0",
"description": "Runtime Mobile Exploration",
"private": true,
"type": "module",
"main": "src/index.ts",
"scripts": {
"prepare": "npm run build",
@@ -31,7 +32,7 @@
"frida-java-bridge": "^6",
"frida-objc-bridge": "^7",
"frida-screenshot": "^5",
"macho": "^1"
"macho-ts": "^0.1.0"
},
"devDependencies": {
"@types/frida-gum": "^18",
+2 -2
View File
@@ -1,5 +1,5 @@
// tslint:disable-next-line:no-var-requires
const macho = require("macho");
import macho from "macho-ts";
import * as iosfilesystem from "./filesystem.js";
import { IBinaryModuleDictionary } from "./lib/interfaces.js";
+5 -5
View File
@@ -1,14 +1,14 @@
// tslint:disable-next-line:no-var-requires
const sc = require("frida-screenshot");
import screenshot from "frida-screenshot";
import { colors as c } from "../lib/color.js";
import { IJob } from "../lib/interfaces.js";
import * as jobs from "../lib/jobs.js";
export const screenshot = (): any => {
export const take = (): any => {
// heavy lifting thanks to frida-screenshot!
// https://github.com/nowsecure/frida-screenshot
return sc();
return screenshot(null);
};
export const dump = (): string => {
@@ -131,7 +131,7 @@ export const biometricsBypass = (): void => {
if (policyJob.invocations) {
policyJob.invocations.push(lacontext1);
} else {
policyJob.invocations = [ lacontext1 ];
policyJob.invocations = [lacontext1];
}
jobs.add(policyJob);
@@ -193,7 +193,7 @@ export const biometricsBypass = (): void => {
if (accessControlJob.invocations) {
accessControlJob.invocations.push(lacontext2);
} else {
accessControlJob.invocations = [ lacontext2 ];
accessControlJob.invocations = [lacontext2];
}
jobs.add(accessControlJob);
};
+3 -3
View File
@@ -80,7 +80,7 @@ export const ios = {
// ios user interface
iosUiAlert: (message: string): void => userinterface.alert(message),
iosUiBiometricsBypass: (): void => userinterface.biometricsBypass(),
iosUiScreenshot: (): any => userinterface.screenshot(),
iosUiScreenshot: (): any => userinterface.take(),
iosUiWindowDump: (): string => userinterface.dump(),
// ios ssl pinning
@@ -97,8 +97,8 @@ export const ios = {
iosKeychainAdd: (account: string, service: string, data: string): boolean =>
ioskeychain.add(account, service, data),
iosKeychainRemove: (account: string, service: string): void => ioskeychain.remove(account, service),
iosKeychainUpdate: (account: string, service: string, newData: string): void =>
ioskeychain.update(account, service, newData),
iosKeychainUpdate: (account: string, service: string, newData: string): void =>
ioskeychain.update(account, service, newData),
iosKeychainEmpty: (): void => ioskeychain.empty(),
iosKeychainList: (smartDecode: boolean = false): IKeychainItem[] => ioskeychain.list(smartDecode),
iosKeychainListRaw: (): void => ioskeychain.listRaw(),