前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >恶意程序分析利器PowerShellArsenal

恶意程序分析利器PowerShellArsenal

作者头像
FB客服
发布2018-02-09 15:52:15
8630
发布2018-02-09 15:52:15
举报
文章被收录于专栏:FreeBufFreeBuf

简介

PowerShellArsenal是一个PowerShell模块,它的功能是帮助逆向工程师来分析.NET恶意软件,PowerShellArsenal的功能非常强大,它可以反汇编.NET恶意软件、分析和抓取内存、解析文件格式和内存结构,获取内部系统信息等。

Disassembly

反汇编代码

Get-CSDisassembly

使用Capstone Engine反汇编引擎反汇编代码

使用方法:

Get-CSDisassembly -Architecture {Arm | Arm64 | Mips | X86 | PPC | CS_ARCH_ALL} -Mode {LittleEndian | Arm | Mode16 | Mode32 | Mode64 | Thumb | Micro | N64 | BigEndian} -Code <Byte[]> [-Offset <UInt64>] [-Count <UInt32>] [-Syntax <S tring>] [-DetailOn] [<CommonParameters>]

Get-ILDisassembly

MSIL(Microsoft Intermediate Language (MSIL)微软中间语言。)反汇编器。

使用方法:

Get-ILDisassembly -AssemblyPath <String> -MetadataToken <Int32> [<CommonParameters>] Get-ILDisassembly -MethodInfo <MethodBase> [<CommonParameters>] Get-ILDisassembly -MethodDef <MethodDef> [<CommonParameters>]

MalwareAnalysis

分析恶意软件时需要用到的工具。

New-FunctionDelegate

提供了一个X86或x86_64功能的可执行包装。

使用方法:

New-FunctionDelegate [[-Parameters] <Type[]>] [[-ReturnType] <Type>] [-FunctionBytes] <Byte[]> [[-CallingConvention ] {Winapi | Cdecl | StdCall | ThisCall | FastCall}] [-DebugBreak] [<CommonParameters>]

Invoke-LoadLibrary

主要调用kernel32!LoadLibrary用于恶意软件分析,将DLL加载到当前的PowerShell进程中。

使用方法:

Invoke-LoadLibrary [-FileName] <String> [<CommonParameters>]

New-DllExportFunction

New-DllExportFunction接受一个模块,然后导出procedure name,返回类型、参数类型。最后创建一个托管的委托,可用于执行非托管函数。

使用方法:

New-DllExportFunction [-Module] <ProcessModule> [-ProcedureName] <String> [[-Parameters] <Type[]>] [[-ReturnType] < Type>] [<CommonParameters>]

Get-HostsFile

解析HOSTS文件

使用方法:

Get-HostsFile [[-Path] <String>] [-Show] [<CommonParameters>]

New-HostsFileEntry

替换或添加内容到HOSTS文件

使用方法:

New-HostsFileEntry [-IPAddress] <IPAddress> [-Hostname] <String> [[-Comment] <String>] [-Path <String>] [-PassThru] [-Show] [<CommonParameters>]

Remove-HostsFileEntry

从HOSTS文件中删除内容

使用方法:

Remove-HostsFileEntry -IPAddress <IPAddress> [-Path <String>] [-PassThru] [-Show] [<CommonParameters>] Remove-HostsFileEntry -Hostname <String> [-Path <String>] [-PassThru] [-Show] [<CommonParameters>] Remove-HostsFileEntry [-Path <String>] [-PassThru] [-Show] [-HostsEntry <PSObject[]>] [<CommonParameters>]

Get-AssemblyStrings

输出.NET可执行文件所有定义的字符串

使用方法:

Get-AssemblyStrings -AssemblyPath <String> [-HeapType <String>] [-Raw] [<CommonParameters>] Get-AssemblyStrings -AssemblyBytes <Byte[]> [-HeapType <String>] [-Raw] [<CommonParameters>] Get-AssemblyStrings -AssemblyInfo <Assembly> [-HeapType <String>] [-Raw] [<CommonParameters>]

Get-AssemblyResources

提取程序中的资源

Get-AssemblyResources -AssemblyPath <String> [<CommonParameters>] Get-AssemblyResources -AssemblyBytes <Byte[]> [<CommonParameters>] Get-AssemblyResources -AssemblyInfo <Assembly> [<CommonParameters>]

Remove-AssemblySuppressIldasmAttribute

从.NET程序集中删除SuppressIldasmAttribute属性。

使用方法:

Remove-AssemblySuppressIldasmAttribute -AssemblyPath <String> -FilePath <String> [<CommonParameters>] Remove-AssemblySuppressIldasmAttribute -AssemblyBytes <Byte[]> -FilePath <String> [<CommonParameters>] Remove-AssemblySuppressIldasmAttribute -AssemblyInfo <Assembly> -FilePath <String> [<CommonParameters>]

Get-AssemblyImplementedMethods

返回程序的所有方法。

使用方法:

Get-AssemblyImplementedMethods -AssemblyPath <String> [<CommonParameters>] Get-AssemblyImplementedMethods -AssemblyBytes <Byte[]> [<CommonParameters>] Get-AssemblyImplementedMethods -AssemblyInfo <Assembly> [<CommonParameters>]

MemoryTools

检查和分析进程内存

Get-ProcessStrings

输出一个进程的用户模式内存中所以可打印的字符串

使用方法:

Get-ProcessStrings [-ProcessID] <Int32> [-MinimumLength <UInt16>] [-Encoding <String>] [-IncludeImages] [<CommonPar ameters>]

Get-VirtualMemoryInfo

调用的kernel32!VirtualQueryEx

使用方法:

Get-VirtualMemoryInfo [-ProcessID] <Int32> [-ModuleBaseAddress] <IntPtr> [-PageSize <Int32>] [<CommonParameters>]

Get-ProcessMemoryInfo

类似于!vadump WinDbg命令

使用方法:

Get-ProcessMemoryInfo [-ProcessID] <Int32> [<CommonParameters>]

Get-StructFromMemory

将数据从任意进程中的非托管内存块调度到新分配的指定类型的托管对象。

Get-StructFromMemory [-Id] <UInt16> [-MemoryAddress] <IntPtr> [-StructType] <Type> [<CommonParameters>]

Parsers

解析文件格式和内存结构

Get-PE

分析内存和磁盘上文件的PE头

使用方法: Get-PE [-FilePath] <String[]> [-IgnoreMalformedPE] []

Get-PE [-ProcessID] <Int32> [[-ModuleBaseAddress] <IntPtr>] [[-Module] <ProcessModule[]>] [-DumpDirectory <String>] [-IgnoreMalformedPE] [<CommonParameters>] Get-PE [-FileBytes] <Byte[]> [-IgnoreMalformedPE] [<CommonParameters>]

Find-ProcessPEs

在内存中查找可移植的可执行文件,而不管它们是否以合法方式加载

使用方法:

Find-ProcessPEs [-ProcessID] <Int32> [<CommonParameters>]

Get-LibSymbols

显示来自Windows LIB文件的符号信息。

使用方法:

Get-LibSymbols [-Path] <String[]> [<CommonParameters>]

Get-ObjDump

显示有关Windows对象(OBJ)文件的信息。

使用方法:

Get-ObjDump [-Path] <String[]> [<CommonParameters>]

WindowsInternals

获取并分析低级别的Windows操作系统的信息。

Get-NtSystemInformation

一个实用的程序,调用ntdll!NtQuerySystemInformation函数,可用于查询通常对用户不可见的内部操作系统信息。

使用方法:

Get-NtSystemInformation [-PoolTagInformation] [<CommonParameters>] Get-NtSystemInformation [-ModuleInformation] [<CommonParameters>] Get-NtSystemInformation [-HandleInformation] [-ObjectType <String>] [<CommonParameters>] Get-NtSystemInformation [-ObjectInformation] [<CommonParameters>] Get-NtSystemInformation [-LockInformation] [<CommonParameters>] Get-NtSystemInformation [-CodeIntegrityInformation] [<CommonParameters>] Get-NtSystemInformation [-GlobalFlags] [<CommonParameters>]

Get-PEB

返回一个进程的进程环境块(PEB)。

使用方法:

Get-PEB [-Id] <UInt16[]> [<CommonParameters>]

Register-ProcessModuleTrace

跟踪加载进程的模块

使用方法:

Register-ProcessModuleTrace [<CommonParameters>]

Get-ProcessModuleTrace

显示已加载自调用Register-ProcessModuleTrace流程模块

使用方法:

Get-ProcessModuleTrace [<CommonParameters>]

Unregister-ProcessModuleTrace

停止正在运行的进程模块跟踪

使用方法:

Unregister-ProcessModuleTrace [<CommonParameters>]

Get-SystemInfo

调用kernel32!GetSystemInfo来获取系统的一些信息。

使用方法:

Get-SystemInfo [<CommonParameters>]

Misc

其他的辅助功能

Get-Member

用于扩展内置Get-Member cmdlet的代理函数

使用方法:

Get-Member [-InputObject <PSObject>] [[-Name] <String[]>] [-MemberType {AliasProperty | CodeProperty | Property | NoteProperty | ScriptProperty | Properties | PropertySet | Method | CodeMethod | ScriptMethod | Methods | Parameter izedProperty | MemberSet | Event | Dynamic | All}] [-View {Extended | Adapted | Base | All}] [-Static] [-Force] [<C ommonParameters>] Get-Member [-InputObject <PSObject>] [[-Name] <String[]>] [-PrivateMemberType {Constructor | Event | Field | Metho d | Property | TypeInfo | Custom | NestedType | All}] [-Static] [-Force] [-Private] [<CommonParameters>]

Get-Strings

Get-Strings cmdlet从文件返回字符串(Unicode和/或Ascii)。 此cmdlet对转储字符串很有用。

使用方法:

Get-Strings [-Path] <String[]> [-Encoding <String>] [-MinimumLength <UInt32>] [<CommonParameters>]

ConvertTo-String

ConvertTo-String执行二进制正则表达式非常有用。

使用方法:

ConvertTo-String [-Path] <String> [<CommonParameters>]

Get-Entropy

计算文件或字节数组的熵。

使用方法:

Get-Entropy [-ByteArray] <Byte[]> [<CommonParameters>] Get-Entropy [-FilePath] <FileInfo> [<CommonParameters>]

项目地址

https://github.com/mattifestation/PowerShellArsenal

*本文作者:zusheng,转载请注明来自FreeBuf.COM

本文参与 腾讯云自媒体分享计划,分享自微信公众号。
原始发表:2016-12-24,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 FreeBuf 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • Disassembly
    • Get-CSDisassembly
      • Get-ILDisassembly
      • MalwareAnalysis
        • New-FunctionDelegate
          • Invoke-LoadLibrary
            • New-DllExportFunction
              • Get-HostsFile
                • New-HostsFileEntry
                  • Remove-HostsFileEntry
                    • Get-AssemblyStrings
                      • Get-AssemblyResources
                        • Remove-AssemblySuppressIldasmAttribute
                          • Get-AssemblyImplementedMethods
                          • MemoryTools
                            • Get-ProcessStrings
                              • Get-VirtualMemoryInfo
                                • Get-ProcessMemoryInfo
                                  • Get-StructFromMemory
                                  • Parsers
                                    • Get-PE
                                      • Find-ProcessPEs
                                        • Get-LibSymbols
                                          • Get-ObjDump
                                          • WindowsInternals
                                            • Get-NtSystemInformation
                                              • Get-PEB
                                                • Register-ProcessModuleTrace
                                                  • Get-ProcessModuleTrace
                                                    • Unregister-ProcessModuleTrace
                                                      • Get-SystemInfo
                                                      • Misc
                                                        • Get-Member
                                                          • Get-Strings
                                                            • ConvertTo-String
                                                              • Get-Entropy
                                                              • 项目地址
                                                              领券
                                                              问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档