VsCode扩展中的DLL注入器

倾旋
倾旋
技术分享|2023-9-8|最后更新: 2023-9-8|
type
status
date
slug
summary
tags
category
icon
password
URL
💡
VSCode是一款由微软开发的免费且开源的代码编辑器,支持多种编程语言,可通过安装扩展包来进一步扩展其功能。VSCode的扩展包具有丰富的功能,包括但不限于代码片段、自动完成、调试工具、主题等。用户可以轻松地在VSCode中安装、管理和使用扩展包,以满足个人的编程需求。
安装完毕Python调试扩展后,会在扩展目录中生成一些文件:
notion image
notion image
其中以下两个文件是DLL注入器,分别对应X86和X64位操作系统:
  • inject_dll_x86.exe
  • inject_dll_amd64.exe
 
在windows文件夹中还保留了注入器的源代码:
notion image
 
路径:C:\Users\Administrator\.vscode\extensions\ms-python.python-2022.20.2\pythonFiles\lib\python\debugpy\_vendored\pydevd\pydevd_attach_to_process\windows
签名情况:
notion image
使用方式,只需要两个参数:
  • pid : 目标进程的进程ID
  • dll name: 想要注入目标进程的DLL绝对路径
测试效果:
notion image
 
滥用思路:
  1. 钓鱼的时候可以发送一个BAT批处理脚本、dll注入器、dll木马
  1. BAT批处理:获取x64进程的pid
  1. BAT批处理:获取dll木马绝对路径
  1. BAT批处理:执行dll注入器,将dll木马注入到目标进程中
notion image
 
最后的最后,致谢 @Akkuman
©2021-2024 倾旋. All rights reserved.