dpnishant / appmon

Documentation:
http://dpnishant.github.io/appmon
Apache License 2.0
1.55k stars 275 forks source link

crypto object #90

Open untyrant opened 5 years ago

untyrant commented 5 years ago

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

dpnishant commented 5 years ago

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.

untyrant commented 5 years ago

No.

logg.txt

dpnishant commented 5 years ago

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.

gaplan commented 5 years ago

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 commented 5 years ago

@dpnishant and when open this line

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

this is the log ;

MessageDigest.update input: [object Object]

gaplan commented 5 years ago

@dpnishant , can u help us ?

dpnishant commented 5 years ago

Please provide the app and other necessary information to reproduce.

gaplan commented 5 years ago

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 )

dpnishant commented 5 years ago

@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.

gaplan commented 5 years ago

@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

AboveColin commented 4 years ago

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

AboveColin commented 4 years ago

@dpnishant @gaplan

gaplan commented 4 years ago

there is no update yet.