Geração de Scripts Frida Guiada por Contexto Dinâmico para Análise de Segurança Android
Resumo
A instrumentação dinâmica é fundamental para a análise de segurança de aplicações Android, mas exige conhecimento especializado em scripts Frida, em técnicas de desenvolvimento Android e sobre a estrutura interna da aplicação-alvo. Este artigo investiga se o contexto coletado em tempo de execução melhora a geração de scripts Frida por modelos de linguagem para tarefas de segurança. A abordagem investigada incorpora ao processo de geração informações extraídas da aplicação em execução, como classes carregadas, métodos, bibliotecas de terceiros, módulos nativos e mecanismos de armazenamento local, de acordo com o nível de especificidade da consulta. Essa abordagem foi implementada em um sistema de referência utilizado na avaliação experimental. A avaliação foi conduzida em dois cenários complementares: i) 10 aplicações Android intencionalmente vulneráveis, abrangendo 83 tarefas de segurança, 92 consultas em linguagem natural e 460 execuções; e ii) 54 aplicações do repositório Ghera, cada uma voltada ao isolamento de uma vulnerabilidade específica. Os resultados indicam taxas de sucesso de 95,7% e 93,0%, respectivamente. Além disso, no experimento de ablação conduzido em um subconjunto de 12 tarefas, a configuração sem contexto dinâmico alcançou 60%, em comparação com 98,3% na configuração com contexto.Referências
Chen, M., Tworek, J., Jun, H., et al. (2021). Evaluating large language models trained on code. ArXiv, abs/2107.03374.
D’Elia, D. C., Coppa, E., Nicchi, S., Palmaro, F., and Cavallaro, L. (2019). Sok: Using dynamic binary instrumentation for security (and how you may get caught red handed). In Proceedings of the 2019 ACM Asia Conference on Computer and Communications Security, ACM Asia CCS ’19, pages 15–27, New York, NY, USA.
Enck, W., Gilbert, P., Han, S., et al. (2014). TaintDroid: An information-flow tracking system for realtime privacy monitoring on smartphones. ACM Trans. Comput. Syst., 32(2).
Fan, A., Gokkaya, B., Harman, M., Lyubarskiy, M., Sengupta, S., Yoo, S., and Zhang, J. M. (2023). Large language models for software engineering: Survey and open problems. In 2023 IEEE/ACM International Conference on Software Engineering: Future of Software Engineering (ICSE-FoSE), pages 31–53.
Frida (2026). Frida: A world-class dynamic instrumentation toolkit. [link]. Acesso em: abril de 2026.
Frida CodeShare (2026). Frida CodeShare: Community Frida scripts repository. [link]. Acesso em: abril de 2026.
MEDUSA (2026). MEDUSA: Mobile edge-dynamic unified security analysis. [link]. Acesso em: abril de 2026.
Michel, G.-B. (2020). Dexcalibur: Android reverse engineering platform. [link]. Acessado em: abril de 2026.
Minn, W., Demissie, B. F., Tun, Y. N., Liu, J., Ceccato, M., Shar, L. K., and Lo, D. (2026). Covagent: Overcoming the 30% curse of mobile application coverage with agentic ai and dynamic instrumentation. arXiv preprint arXiv:2601.21253.
Mitra, J. and Ranganath, V.-P. (2017). Ghera: A repository of android app vulnerability benchmarks. In Proceedings of the 13th International Conference on Predictive Models and Data Analytics in Software Engineering (PROMISE), pages 43–52, Toronto, Canada. ACM.
Objection (2026). Objection: Runtime mobile exploration. [link]. Acesso em: abril de 2026.
OWASP MASTG (2026). OWASP MASTG – apps. [link]. Acessado em: abril de 2026.
OWASP MASVS (2026). OWASP mobile application security verification standard (MASVS). [link]. Acesso em: maio de 2026.
Pearce, H., Tan, B., Ahmad, B., Karri, R., and Dolan-Gavitt, B. (2023). Examining zero-shot vulnerability repair with large language models. In Proceedings of the 44th IEEE Symposium on Security and Privacy (S&P), pages 2339–2356.
Rozière, B., Gehring, J., Gloeckle, F., et al. (2023). Code llama: Open foundation models for code. ArXiv, abs/2308.12950.
Sutter, T., Kehrer, T., Rennhard, M., Tellenbach, B., and Klein, J. (2024). Dynamic security analysis on android: A systematic literature review. IEEE Access, 12:57261–57287.
Xu, H., Wang, S., Li, N., Wang, K., Zhao, Y., Chen, K., Yu, T., Liu, Y., and Wang, H. (2025). Large language models for cyber security: A systematic literature review. ACM Trans. Softw. Eng. Methodol.
D’Elia, D. C., Coppa, E., Nicchi, S., Palmaro, F., and Cavallaro, L. (2019). Sok: Using dynamic binary instrumentation for security (and how you may get caught red handed). In Proceedings of the 2019 ACM Asia Conference on Computer and Communications Security, ACM Asia CCS ’19, pages 15–27, New York, NY, USA.
Enck, W., Gilbert, P., Han, S., et al. (2014). TaintDroid: An information-flow tracking system for realtime privacy monitoring on smartphones. ACM Trans. Comput. Syst., 32(2).
Fan, A., Gokkaya, B., Harman, M., Lyubarskiy, M., Sengupta, S., Yoo, S., and Zhang, J. M. (2023). Large language models for software engineering: Survey and open problems. In 2023 IEEE/ACM International Conference on Software Engineering: Future of Software Engineering (ICSE-FoSE), pages 31–53.
Frida (2026). Frida: A world-class dynamic instrumentation toolkit. [link]. Acesso em: abril de 2026.
Frida CodeShare (2026). Frida CodeShare: Community Frida scripts repository. [link]. Acesso em: abril de 2026.
MEDUSA (2026). MEDUSA: Mobile edge-dynamic unified security analysis. [link]. Acesso em: abril de 2026.
Michel, G.-B. (2020). Dexcalibur: Android reverse engineering platform. [link]. Acessado em: abril de 2026.
Minn, W., Demissie, B. F., Tun, Y. N., Liu, J., Ceccato, M., Shar, L. K., and Lo, D. (2026). Covagent: Overcoming the 30% curse of mobile application coverage with agentic ai and dynamic instrumentation. arXiv preprint arXiv:2601.21253.
Mitra, J. and Ranganath, V.-P. (2017). Ghera: A repository of android app vulnerability benchmarks. In Proceedings of the 13th International Conference on Predictive Models and Data Analytics in Software Engineering (PROMISE), pages 43–52, Toronto, Canada. ACM.
Objection (2026). Objection: Runtime mobile exploration. [link]. Acesso em: abril de 2026.
OWASP MASTG (2026). OWASP MASTG – apps. [link]. Acessado em: abril de 2026.
OWASP MASVS (2026). OWASP mobile application security verification standard (MASVS). [link]. Acesso em: maio de 2026.
Pearce, H., Tan, B., Ahmad, B., Karri, R., and Dolan-Gavitt, B. (2023). Examining zero-shot vulnerability repair with large language models. In Proceedings of the 44th IEEE Symposium on Security and Privacy (S&P), pages 2339–2356.
Rozière, B., Gehring, J., Gloeckle, F., et al. (2023). Code llama: Open foundation models for code. ArXiv, abs/2308.12950.
Sutter, T., Kehrer, T., Rennhard, M., Tellenbach, B., and Klein, J. (2024). Dynamic security analysis on android: A systematic literature review. IEEE Access, 12:57261–57287.
Xu, H., Wang, S., Li, N., Wang, K., Zhao, Y., Chen, K., Yu, T., Liu, Y., and Wang, H. (2025). Large language models for cyber security: A systematic literature review. ACM Trans. Softw. Eng. Methodol.
Publicado
01/09/2026
Como Citar
SALES, Francisco; SOUTO, Eduardo; FERNANDES, Horácio.
Geração de Scripts Frida Guiada por Contexto Dinâmico para Análise de Segurança Android. In: SIMPÓSIO BRASILEIRO DE CIBERSEGURANÇA (SBSEG), 26. , 2026, Armação dos Búzios/RJ.
Anais [...].
Porto Alegre: Sociedade Brasileira de Computação,
2026
.
p. 676-691.
DOI: https://doi.org/10.5753/sbseg.2026.29086.
