简体   繁体   English

在进行 APK static 分析时,有没有办法获取 API 调用的参数值?

[英]Is there a way to get the parameter value of API call while doing APK static analysis?

I have get the api calls (external methods) of a apk file by androguard,and I also want to get some params value of sensitive apis.我得到了androguard对apk文件的api调用(外部方法),我也想得到一些敏感api的参数值。 Are there some functions or methods for that?是否有一些功能或方法?

or或者

Is there a way to get the parameter value of the API call from smali file traversal method?有没有办法通过smali文件遍历方法获取API调用的参数值?

example:例子:

invoke-static {v0}, Lcom/xyz/sdk/impl/bd;->setWebContentsDebuggingEnabled(Z)V

How can I find the boolean value of the setWebContentsDebuggingEnabled API call?如何找到 setWebContentsDebuggingEnabled API 调用的 boolean 值?

I read the documentation that last value of the registers will hold the method parameter but can you provide some simple example?我阅读了寄存器的最后一个值将保存方法参数的文档,但你能提供一些简单的例子吗?

The common way is to build an intra-procedural control flow graph so you can check which possible flows and thus what commands are executed before the invocation you are interested in.常见的方法是构建一个过程内控制流图,这样您就可以检查哪些可能的流以及在您感兴趣的调用之前执行了哪些命令。

Then check each those flows (go backwards through the list of commands that are executed) where the register you are looking for is written.然后检查每个流(通过已执行的命令列表倒退)您要查找的寄存器被写入的位置。

Often you end up in processing another method because the register is written using the return value of another method invocation or you go back until you reach the start of the method and recognize that the register value was handed over as argument to the method you are in. So you have to check the whole app code where are calls to this method and thus trace again the used register.通常您最终会处理另一个方法,因为寄存器是使用另一个方法调用的返回值写入的,或者您返回 go 直到您到达方法的开头并认识到寄存器值已作为参数移交给您所在的方法. 所以你必须检查整个应用程序代码在哪里调用这个方法,从而再次跟踪使用的寄存器。

I am not sure if and how Androguard provides such a functionality.我不确定 Androguard 是否以及如何提供这样的功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 安卓apk静态分析工具 - static analysis tool for android apk API 在从教程中执行 apk 时无法正常工作。 “错误代码”:“steps.oauth.v2.FailedToResolveAPIKey” - API is not working while doing apk from tutorial. "errorcode":"steps.oauth.v2.FailedToResolveAPIKey" 进行api调用和android应用时出错 - Getting error while doing api call and android app is crash readyState“:0,”status“:0,”statusText“:”error" while Call api through AjaxCall Realsed Apk android - readyState“:0,”status“:0,”statusText“:”error" while Call api through AjaxCall Realsed Apk android 什么是通过更改android中的参数重复调用rest api的最佳方法 - what is best way to call rest api repeatedly by changing parameter in android 传递带有json请求参数的get请求的正确方法是什么? - what is the proper way to call get request with passing json request parameter? 在 Android 中的 retrofit GET 调用中传递参数的正确方法是什么? - What is the right way to pass the parameter in the retrofit GET call in Android? 以静态方式还是通过参数访问? - Access in a static way or via parameter? 拨打电话时KSoap2 outOfMemoryError - KSoap2 outOfMemoryError while doing a call Android 自动:在进行后台呼叫时显示进度 - Auto: Showing the progress while doing a background call
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM