Comments (7)
I started to develop Dexcalibur as NPM library. So, you can perform everything from a script or node terminal.
I assume you have already configured your config.js
file, and it is located at <CONFIG_PATH>.
(Depending of application size, i recommand to increase nodejs heap size)
$ cd dexcalibur
$ node --max-old-space-size=4096
> const Dexcalibur = require('./src/Project');
> var Project = new Dexcalibur( 'com.myapp', <CONFIG_PATH>);
..
> Project.pull();
..
> Project.fullscan();
..
At this step, web server is not started. You can explore application and generate hook. (i will give you more information asap doc)
Search can be performed by invoking Project.find.*
. For example, if you want hook a method from TelephonyManager class:
1/ First: to list all methods enclosed into a class where FQCN match the regexp .TelephonyManager.
> Project.find.method("enclosingClass.name:TelephonyManager").show()
Running deep search ...
+---------------------------------------------------------------------------------------------------------------------------+
| Index | Class | Modifiers | Method |
+---------------------------------------------------------------------------------------------------------------------------+
| 0 | android.telephony.TelephonyManager | [static,public,constructor] | <clinit> |
| 1 | android.telephony.TelephonyManager | [public,constructor] | <init> |
| 2 | android.telephony.TelephonyManager | [public] | getAllCellInfo |
| 3 | android.telephony.TelephonyManager | [public] | getCallState |
| 4 | android.telephony.TelephonyManager | [public] | getCellLocation |
| 5 | android.telephony.TelephonyManager | [public] | getDataActivity |
| 6 | android.telephony.TelephonyManager | [public] | getDataState |
| 7 | android.telephony.TelephonyManager | [public] | getDeviceId |
| 8 | android.telephony.TelephonyManager | [public] | getDeviceSoftwareVersion |
| 9 | android.telephony.TelephonyManager | [public] | getGroupIdLevel1 |
| 10 | android.telephony.TelephonyManager | [public] | getLine1Number |
| 11 | android.telephony.TelephonyManager | [public] | getMmsUAProfUrl |
| 12 | android.telephony.TelephonyManager | [public] | getMmsUserAgent |
| 13 | android.telephony.TelephonyManager | [public] | getNeighboringCellInfo |
| 14 | android.telephony.TelephonyManager | [public] | getNetworkCountryIso |
| 15 | android.telephony.TelephonyManager | [public] | getNetworkOperator |
| 16 | android.telephony.TelephonyManager | [public] | getNetworkOperatorName |
| 17 | android.telephony.TelephonyManager | [public] | getNetworkType |
| 18 | android.telephony.TelephonyManager | [public] | getPhoneType |
| 19 | android.telephony.TelephonyManager | [public] | getSimCountryIso |
| 20 | android.telephony.TelephonyManager | [public] | getSimOperator |
| 21 | android.telephony.TelephonyManager | [public] | getSimOperatorName |
| 22 | android.telephony.TelephonyManager | [public] | getSimSerialNumber |
| 23 | android.telephony.TelephonyManager | [public] | getSimState |
| 24 | android.telephony.TelephonyManager | [public] | getSubscriberId |
| 25 | android.telephony.TelephonyManager | [public] | getVoiceMailAlphaTag |
| 26 | android.telephony.TelephonyManager | [public] | getVoiceMailNumber |
| 27 | android.telephony.TelephonyManager | [public] | hasCarrierPrivileges |
| 28 | android.telephony.TelephonyManager | [public] | hasIccCard |
| 29 | android.telephony.TelephonyManager | [public] | iccCloseLogicalChannel |
| 30 | android.telephony.TelephonyManager | [public] | iccExchangeSimIO |
| 31 | android.telephony.TelephonyManager | [public] | iccOpenLogicalChannel |
| 32 | android.telephony.TelephonyManager | [public] | iccTransmitApduBasicChannel |
| 33 | android.telephony.TelephonyManager | [public] | iccTransmitApduLogicalChannel |
| 34 | android.telephony.TelephonyManager | [public] | isNetworkRoaming |
| 35 | android.telephony.TelephonyManager | [public] | isSmsCapable |
| 36 | android.telephony.TelephonyManager | [public] | isVoiceCapable |
| 37 | android.telephony.TelephonyManager | [public] | listen |
| 38 | android.telephony.TelephonyManager | [public] | sendEnvelopeWithStatus |
| 39 | android.telephony.TelephonyManager | [public] | setLine1NumberForDisplay |
| 40 | android.telephony.TelephonyManager | [public] | setOperatorBrandOverride |
| 41 | android.telephony.TelephonyManager | [public] | setPreferredNetworkTypeToGlobal |
| 42 | android.telephony.TelephonyManager | [public] | setVoiceMailNumber |
+---------------------------------------------------------------------------------------------------------------------------+
Next you can select an entry by its ID (1st column from left side), and generate a hook. If you would like hook getDeviceID (entry 7), then you can execute:
> var meth = Project.find.method("enclosingClass.name:TelephonyManager").get(7)
> var hook = Project.hook.probe(meth);
At this point a new hook has been created. Now you can spawn/attach to appp and start "hooking".
> Project.hook.startBySpawn( null, "com.myapp")
from dexcalibur.
Actually, the better solution is perhaps to create your own Inspector if you want give the control on what happens into Dexcalibur when a hook message is receipt by the HookManager
from dexcalibur.
from dexcalibur.
Thanks a lot for the information. Thanks to this, I confirm I can:
- use Dexcalibur as a library, with a Node shell
- Find methods
- Create hooks.
FYI I ported this info into https://github.com/FrenchYeti/dexcalibur-doc/blob/master/CLI-User-guide.md#dexcalibur-as-a-library
from dexcalibur.
Hi @FrenchYeti
var Dexcalibur = require("./src/project.js")
does not work anymore. What's the new command to use dexcalibur as a library? Thanks!
from dexcalibur.
Hey @monperrus ,
sorry for this late reply.
Please accept my apologies: latest refactoring (>=0.7) breaks this feature.
However, I fully rewrote Dexcalibur engine and UI and plan to release it this winter. So, Dexcalibur API will be available again, and documented.
from dexcalibur.
from dexcalibur.
Related Issues (20)
- I got an error while installing on Mac OS HOT 5
- Error after uploading APK HOT 2
- Add Cipher.doFinal hook by default (Feature request) HOT 1
- JavaScript heap out of memory HOT 1
- TypeError: this.__tmp_block.setDataWidth is not a function HOT 1
- JavaScript heap out of memory HOT 2
- When killing an app, I get an error that is not catched
- When clicking on Run, a log is created, when clicking back on hook -> dashboard, then Hook -> logs the log is deleted HOT 2
- Hook Failed: error: Need gadget to attach on jailed Android
- Installation on MacOS M1 Monterey HOT 3
- Cannot open project for malicious sample / Unable to generate UID error
- Missing font from repo
- Dexcalibur won't install from repo due to deprecated dependency keyv
- Instructions to run on Windows incorrect
- Dexcalibur should prompt user for action after successful first run HOT 1
- Device enrolment not working as SDK 31-33 isn't available HOT 2
- No error prompt when creating project with APK SDK > device SDK HOT 1
- TypeError: this.__tmp_block.setDataWidth is not a function
- Extracting of frida-server from XZ archive is not supported on Darwin/arm64 HOT 1
- Probe of dynamically discovered method does not work
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dexcalibur.