Skip to content

Commit

Permalink
Simplify ios monitor command. (#440)
Browse files Browse the repository at this point in the history
* monitor CommonCrypto in real time

* typo

* improve output when job already registered

* fixed unpad

* attempt to convert dataOut to ascii on decrypt

* fixed output in CCCryptorUpdate

* cleaning up style with tslint

* removed dead code

* simplified `monitor` command for crypto

* removed duplicate helpfile

* renamed helpfile to work with new command

* renamed helpfile to work with new crypto monitor command

Co-authored-by: Corey Gagnon <[email protected]>
  • Loading branch information
gagnonca and corey-gagnon authored Feb 22, 2021
1 parent a343591 commit ebd920e
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 35 deletions.
8 changes: 0 additions & 8 deletions agent/src/ios/crypto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,14 +323,6 @@ export namespace ioscrypto {
});
};

export const disable = (): void => {
// if we already have a job registered then kill it
if (jobs.hasIdent(cryptoidentifier)) {
send(c.red(`Killing `) + `${cryptoidentifier}`);
jobs.kill(cryptoidentifier);
}
};

export const monitor = (): void => {
// if we already have a job registered then return
if (jobs.hasIdent(cryptoidentifier)) {
Expand Down
1 change: 0 additions & 1 deletion agent/src/rpc/ios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ export const ios = {
hooking.watchMethod(selector, dargs, dbt, dret),

// ios crypto monitoring
iosMonitorCryptoDisable: (): void => ioscrypto.disable(),
iosMonitorCryptoEnable: (): void => ioscrypto.monitor(),

// jailbreak detection
Expand Down
13 changes: 0 additions & 13 deletions objection/commands/ios/monitor.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
from objection.state.connection import state_connection


def crypto_disable(args: list = None) -> None:
"""
Attempts to disable ios crypto monitoring.
:param args:
:return:
"""

api = state_connection.get_api()
api.ios_monitor_crypto_disable()


def crypto_enable(args: list = None) -> None:
"""
Attempts to enable ios crypto monitoring.
Expand Down
15 changes: 2 additions & 13 deletions objection/console/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -757,22 +757,11 @@
'meta': 'Commands to work with ios function monitoring',
'commands': {
'crypto': {
'meta': 'Hooks for working with monitoring iOS CommonCrypto usage',
'commands': {
'disable': {
'meta': 'Disable CommonCrypto monitor',
'exec': ios_crypto.crypto_disable
},
'monitor': {
'meta': 'Monitor CommonCrypto operations',
'exec': ios_crypto.crypto_enable
}

}
'meta': 'Monitor CommonCrypto operations',
'exec': ios_crypto.crypto_enable
}
},
},

}
},

Expand Down

0 comments on commit ebd920e

Please sign in to comment.