Open untyrant opened 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.
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.
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
@dpnishant and when open this line
console.log("MessageDigest.update input: " + updateInput(input));
this is the log ;
MessageDigest.update input: [object Object]
@dpnishant , can u help us ?
Please provide the app and other necessary information to reproduce.
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 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 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 ?
any updates on this issue? I am encountering the same issue :)
@dpnishant @gaplan
there is no update yet.
I want to see arguments (key) of SHA-1 and other crypto operations, but i see "object"