appmon icon indicating copy to clipboard operation
appmon copied to clipboard

crypto object

Open untyrant opened this issue 6 years ago • 13 comments

I want to see arguments (key) of SHA-1 and other crypto operations, but i see "object" photo

untyrant avatar Apr 07 '19 09:04 untyrant

In your local copy of appmon, can you add the following line

console.log(JSON.stringify(send_data));

once after this line: appmon/scripts/Android/Crypto/Hash.js#L80 and again after appmon/scripts/Android/Crypto/Hash.js#L111

and check your Terminal if you are able to view the captured data in the format you like?

If that's working we will have to patch it in the python scripts, otherwise we will have to debug it in a different way.

dpnishant avatar Apr 08 '19 22:04 dpnishant

No.

logg.txt

untyrant avatar Apr 09 '19 16:04 untyrant

Thanks for the confirmation. Then the bug seems to be in the appmon/scripts/Android/Crypto/Hash.js#L19 Can you try to debug, because at the moment, I don't have the APK and device with me to reproduce.

dpnishant avatar Apr 09 '19 18:04 dpnishant

Hello @dpnishant , Same issue

console log is ;

[Genymotion Motorola Moto X::com.google.android.youtube]-> message: {u'type': u'send', u'payload': u'{"time":"2019-07-19T10:22:28.204Z","txnType":"Crypto","lib":"java.security.MessageDigest","method":"update","artifact":[{"name":"Raw Data","value":"[object Object]","argSeq":0}]}'} data: None message: {u'type': u'send', u'payload': u'{"time":"2019-07-19T10:22:28.208Z","txnType":"Crypto","lib":"java.security.MessageDigest","method":"digest","artifact":[{"name":"Algorithm","value":"MD5","argSeq":0},{"name":"Digest","value":"[object Object]","argSeq":0}]}'} data: None message: {u'type': u'send', u'payload': u'{"time":"2019-07-19T10:22:45.118Z","txnType":"Crypto","lib":"java.security.MessageDigest","method":"update","artifact":[{"name":"Raw Data","value":"[object Object]","argSeq":0}]}'} data: None message: {u'type': u'send', u'payload': u'{"time":"2019-07-19T10:22:45.121Z","txnType":"Crypto","lib":"java.security.MessageDigest","method":"digest","artifact":[{"name":"Algorithm","value":"SHA","argSeq":0},{"name":"Digest","value":"[object Object]","argSeq":0}]}'} data: None message: {u'type': u'send', u'payload': u'{"time":"2019-07-19T10:22:45.123Z","txnType":"Crypto","lib":"java.security.MessageDigest","method":"update","artifact":[{"name":"Raw Data","value":"[object Object]","argSeq":0}]}'} data: None message: {u'type': u'send', u'payload': u'{"time":"2019-07-19T10:22:45.126Z","txnType":"Crypto","lib":"java.security.MessageDigest","method":"digest","artifact":[{"name":"Algorithm","value":"SHA","argSeq":0},{"name":"Digest","value":"[object Object]","argSeq":0}]}'} data: None message: {u'type': u'send', u'payload': u'{"time":"2019-07-19T10:22:45.652Z","txnType":"Crypto","lib":"java.security.MessageDigest","method":"update","artifact":[{"name":"Raw Data","value":"[object Object]","argSeq":0}]}'} data: None message: {u'type': u'send', u'payload': u'{"time":"2019-07-19T10:22:45.656Z","txnType":"Crypto","lib":"java.security.MessageDigest","method":"digest","artifact":[{"name":"Algorithm","value":"MD5","argSeq":0},{"name":"Digest","value":"[object Object]","argSeq":0}]}'} data: None message: {u'type': u'send', u'payload': u'{"time":"2019-07-19T10:22:45.658Z","txnType":"Crypto","lib":"java.security.MessageDigest","method":"update","artifact":[{"name":"Raw Data","value":"[object Object]","argSeq":0}]}'} data: None message: {u'type': u'send', u'payload': u'{"time":"2019-07-19T10:22:45.663Z","txnType":"Crypto","lib":"java.security.MessageDigest","method":"digest","artifact":[{"name":"Algorithm","value":"MD5","argSeq":0},{"name":"Digest","value":"[object Object]","argSeq":0}]}'} data: None message: {u'type': u'send', u'payload': u'{"time":"2019-07-19T10:22:45.673Z","txnType":"Crypto","lib":"java.security.MessageDigest","method":"update","artifact":[{"name":"Raw Data","value":"[object Object]","argSeq":0}]}'} data: None message: {u'type': u'send', u'payload': u'{"time":"2019-07-19T10:22:45.675Z","txnType":"Crypto","lib":"java.security.MessageDigest","method":"digest","artifact":[{"name":"Algorithm","value":"MD5","argSeq":0},{"name":"Digest","value":"[object Object]","argSeq":0}]}'} data: None message: {u'type': u'send', u'payload': u'{"time":"2019-07-19T10:22:46.263Z","txnType":"Crypto","lib":"java.security.MessageDigest","method":"update","artifact":[{"name":"Raw Data","value":"[object Object]","argSeq":0}]}'} data: None message: {u'type': u'send', u'payload': u'{"time":"2019-07-19T10:22:46.265Z","txnType":"Crypto","lib":"java.security.MessageDigest","method":"digest","artifact":[{"name":"Algorithm","value":"SHA","argSeq":0},{"name":"Digest","value":"[object Object]","argSeq":0}]}'} data: None message: {u'type': u'send', u'payload': u'{"time":"2019-07-19T10:22:46.274Z","txnType":"Crypto","lib":"java.security.MessageDigest","method":"update","artifact":[{"name":"Raw Data","value":"[object Object]","argSeq":0}]}'} data: None message: {u'type': u'send', u'payload': u'{"time":"2019-07-19T10:22:46.275Z","txnType":"Crypto","lib":"java.security.MessageDigest","method":"digest","artifact":[{"name":"Algorithm","value":"SHA","argSeq":0},{"name":"Digest","value":"[object Object]","argSeq":0}]}'} data: None message: {u'type': u'send', u'payload': u'{"time":"2019-07-19T10:22:46.545Z","txnType":"Crypto","lib":"java.security.MessageDigest","method":"update","artifact":[{"name":"Raw Data","value":"[object Object]","argSeq":0}]}'} data: None message: {u'type': u'send', u'payload': u'{"time":"2019-07-19T10:22:46.548Z","txnType":"Crypto","lib":"java.security.MessageDigest","method":"digest","artifact":[{"name":"Algorithm","value":"MD5","argSeq":0},{"name":"Digest","value":"[object Object]","argSeq":0}]}'} data: None message: {u'type': u'send', u'payload': u'{"time":"2019-07-19T10:22:46.549Z","txnType":"Crypto","lib":"java.security.MessageDigest","method":"update","artifact":[{"name":"Raw Data","value":"[object Object]","argSeq":0}]}'} data: None message: {u'type': u'send', u'payload': u'{"time":"2019-07-19T10:22:46.553Z","txnType":"Crypto","lib":"java.security.MessageDigest","method":"digest","artifact":[{"name":"Algorithm","value":"MD5","argSeq":0},{"name":"Digest","value":"[object Object]","argSeq":0}]}'} data: None message: {u'type': u'send', u'payload': u'{"time":"2019-07-19T10:22:46.562Z","txnType":"Crypto","lib":"java.security.MessageDigest","method":"update","artifact":[{"name":"Raw Data","value":"[object Object]","argSeq":0}]}'} data: None message: {u'type': u'send', u'payload': u'{"time":"2019-07-19T10:22:46.563Z","txnType":"Crypto","lib":"java.security.MessageDigest","method":"digest","artifact":[{"name":"Algorithm","value":"MD5","argSeq":0},{"name":"Digest","value":"[object Object]","argSeq":0}]}'} data: None

gaplan avatar Jul 19 '19 10:07 gaplan

@dpnishant and when open this line

console.log("MessageDigest.update input: " + updateInput(input));

this is the log ;

MessageDigest.update input: [object Object]

gaplan avatar Jul 20 '19 09:07 gaplan

@dpnishant , can u help us ?

gaplan avatar Jul 21 '19 19:07 gaplan

Please provide the app and other necessary information to reproduce.

dpnishant avatar Jul 22 '19 18:07 dpnishant

Hello again @dpnishant ,

apk adress is . https://www.apkmirror.com/apk/google-inc/youtube/youtube-14-28-55-release/youtube-14-28-55-10-android-apk-download/ os : MacOs MoJave 10.14.4 emulator : Genymotion 3.0.2 Phone ; Google Nexus 10 ( api 4.4 )

gaplan avatar Jul 22 '19 19:07 gaplan

@gaplan The error is that a javascript object (most probably an Array) is being casted to String instead of being iterated. If you are familiar with javascript, you can re-try by deleting + “” in this line: https://github.com/dpnishant/appmon/blob/master/scripts/Android/Crypto/Hash.js#L26 and see if it works.

dpnishant avatar Jul 23 '19 02:07 dpnishant

@dpnishant Thank you for answer. i delete + “” in this line. and this is the result. and probably array data return. how can we see this data ? Screen Shot 2019-07-23 at 12 12 23

gaplan avatar Jul 23 '19 09:07 gaplan

any updates on this issue? I am encountering the same issue :)

AboveColin avatar Nov 02 '19 18:11 AboveColin

@dpnishant @gaplan

AboveColin avatar Nov 02 '19 20:11 AboveColin

there is no update yet.

gaplan avatar Nov 02 '19 21:11 gaplan