ПОИСК ВРЕДОНОСНЫХ СЦЕНАРИЕВ POWERSHELL С ИСПОЛЬЗОВАНИЕМ СИНТАКСИЧЕСКИХ ДЕРЕВЬЕВ

Виктор В. Ерохин

Аннотация


Цель статьи: поиск более абстрактного представления функциональности сценария PowerShell с использованием абстрактных синтаксических деревьев, чтобы можно было обнаружить невидимый обфусцированный сценарий PowerShell, если связанный сценарий PowerShell уже является известным вредоносным программным обеспечением. Метод исследования: анализ обфускации сценариев PowerShell осуществляется на трех типах обфускации: токенов, строк и абстрактного синтаксического дерева. Полученный результат; определили, что простые функции на основе AST программной среды PowerShell, такие как количество функций AST и их распределенная глубина, а также параметр косинусного расстояния обфускации сходства AST, рассчитанные на основе типов функций и их расположения в AST, вполне достаточны для атрибуции обфусцированных сценариев PowerShell их исходному сценарию, не подверженному обфускации; описан и реализован метод создания расширенного набора данных обфусцированного PowerShell, включая маркировку исходных файлов; предоставлен обширный анализ набора данных и несколько функций для представления структуры PowerShell.

Ключевые слова


вредоносное программное обеспечение, обфускация, сценарий PowerShell, программирование, исходный код, моделирование, операционная система.

Полный текст:

PDF

Литература


1. JuanPablo Jofre et al. 2022. PowerShell Scripting. Microsoft Docs. URL: https://docs.microsoft.com/ru-ru/powershell/scripting/overview?view=powershell-7.2 (дата обращения: 20.06.2023).

2. Bohannon D. 2018. Invoke-CradleCrafter v1.1.
URL: https://github.com/danielbohannon/Invoke-CradleCrafter (дата обращения: 20.06.2023).

3. Rusak G., Al-Dujaili A., O'Reilly UM. 2018. AST-Based Deep Learning for Detecting Malicious PowerShell. In Proceedings of the 2018 ACM SIGSAC Conference on Computer and Communications Security (CCS '18). Association for Computing Machinery, New York, NY, USA, p. 2276–2278.
DOI: http://dx.doi.org/10.1145/3243734.3278496.

4. Hendler D., Kels S., Rubin A. 2018. Detecting Malicious PowerShell Commands using Deep Neural Networks. In Proceedings of the 2018 on Asia Conference on Computer and Communications Security (ASIACCS '18). Association for Computing Machinery, New York, NY, USA, p. 187–197.
DOI: http://dx.doi.org/10.1145/3196494.3196511.

5. Al-Dujaili A., Huang A., Hemberg E., O'reilly UM. Adversarial Deep Learning for Robust Detection of Binary Encoded Malware. IEEE Security and Privacy Workshops (SPW), San Francisco, CA, USA. 2018, p. 76–82. DOI: http://dx.doi.org/10.1109/SPW.2018.00020.

6. O’Reilly UM., Toutou J., Pertierra, M. et al. Adversarial genetic programming for cyber security: a rising application domain where GP matters. Genet Program Evolvable Mach 21, p. 219–250 (2020).
DOI: http://dx.doi.org/10.1007/s10710-020-09389-y.

7. Peng H., Mou L., Li G., Liu Y., Zhang L., Jin Z. Building Program Vector Representations for Deep Learning. In: Zhang, S., Wirsing, M., Zhang, Z. (eds) Knowledge Science, Engineering and Management. KSEM 2015. Lecture Notes in Computer Science(), vol. 9403. Springer, Cham.
DOI: http://dx.doi.org/10.1007/978-3-319-25159-2_49.

8. Mou LL., Li G., Zhang L., Wang T., Jin Z. Convolutional neural networks over tree structures for programming language processing. Thirtieth AAAI conference on artificial intelligence. 2016, p. 1287–1293.
DOI: http://dx.doi.org/10.13140/RG.2.1.2912.2966.

9. Sun ZY., Zhu QH., Xiong YF., Sun YC., Mou LL., Zhang L. TreeGen: A tree-based transformer architecture for code generation. Thirty-fourth AAAI conference on artificial intelligence, the thirty-second innovative applications of artificial intelligence conference and the tenth AAAI symposium on educational advances in artificial intelligence. 2020, v. 34, p. 8984–8991. DOI: http://dx.doi.org/10.48550/arXiv.1911.09983.

10. Bohannon D. 2018. Invoke-Obfuscation v1.8. URL: https://github.com/danielbohannon/Invoke-Obfuscation (дата обращения: 20.06.2023).

11. Weltner T. 2016. PowerShell Obfuscator. URL: http://www.powertheshell.com/powershell-obfuscator/ (дата обращения: 20.06.2023).

12. Liu C., Xia B., Yu M., Liu YZ. PSDEM: A feasible de-obfuscation method for malicious PowerShell detection. IEEE symposium on computers and communications (ISCC). 2018, p. 830–836.
DOI: http://dx.doi.org/10.1109/ISCC.2018.8538691.

13. Ugarte D., Maiorca D., Cara F., Giacinto G. PowerDrive: Accurate De-obfuscation and Analysis of PowerShell Malware. In: Perdisci, R., Maurice, C., Giacinto, G., Almgren, M. (eds) Detection of Intrusions and Malware, and Vulnerability Assessment. DIMVA 2019. Lecture Notes in Computer Science(), vol 11543. Springer, Cham. DOI: http://dx.doi.org/10.1007/978-3-030-22038-9_12.

14. Malandrone, G.M., Virdis, G., Giacinto, G., Maiorca, D. PowerDecode: a PowerShell script decoder dedicated to malware analysis. In 5th Italian Conference on CyberSecurity (ITASEC), 2021.
URL: https://www.semanticscholar.org/paper/PowerDecode%3A-A-PowerShell-Script-Decoder-Dedicated-Malandrone-Virdis/0f0eaa095288ef07df278a525da1dbb039604bb1 (дата обращения: 20.06.2023).

15. PowerDecode.
URL: https://github.com/Malandrone/PowerDecode (дата обращения: 20.06.2023).

16. PaloAlto. Networks. PowerShell Corpus. Fileset, 2018.
URL: https://www.paloaltonetworks.com (дата обращения: 20.06.2023).

17. Weber R., Schek H.J., Blott S. A quantitative analysis and performance study for similarity-search methods in high-dimensional spaces. Proceedings of the 24th VLDB Conference, New York. 1998, p. 194–205.
URL: https://www.semanticscholar.org/paper/A-Quantitative-Analysis-and-Performance-Study-for-Weber-Schek/63eaeb0c48175065ffd096aad10aed712c6d7bbb (дата обращения: 20.06.2023).

18. Mares I. (2006). A QUANTITATIVE ANALYSIS. In Taxation, Wage Bargaining, and Unemployment (Cambridge Studies in Comparative Politics, p. 61-82). Cambridge: Cambridge University Press.
DOI: http://dx.doi.org/10.1017/CBO9780511625688.003.




DOI: http://dx.doi.org/10.26583/bit.2023.3.05

Ссылки

  • На текущий момент ссылки отсутствуют.


Лицензия Creative Commons
Это произведение доступно по лицензии Creative Commons «Attribution» («Атрибуция») 4.0 Всемирная.