Skip to content

[Stockpile Ability] DLL sideloading ability#589

Open
Ke3n007 wants to merge 7 commits intomitre:masterfrom
Ke3n007:DLL-Sideloading-Ability
Open

[Stockpile Ability] DLL sideloading ability#589
Ke3n007 wants to merge 7 commits intomitre:masterfrom
Ke3n007:DLL-Sideloading-Ability

Conversation

@Ke3n007
Copy link
Copy Markdown
Contributor

@Ke3n007 Ke3n007 commented Jul 28, 2025

Description

This ability leverages DLL hijacking to establish persistence by executing arbitrary code to deploy an agent. The ability involves the following steps:

  • Downloads the portable version of Notepad++ (v8.5.4) from GitHub to C:\Users\Public\npp.zip
  • Extracts the ZIP file to C:\Users\Public\npp directory
  • Creates a run.txt file in C:\Users\Public with a PowerShell command to execute the splunkd.exe payload
  • Places a malicious UxTheme.dll in the Notepad++ directory, which will be loaded instead of the legitimate Windows DLL
  • Launches Notepad++.exe, which will load the malicious DLL due to Windows’ DLL search order

The payload uses Windows API calls to open, read, and load the commands from the txt file into a buffer. Another Windows API call then executes the commands stored in the buffer to deploy an agent.

Cleanup Commands remove both the zip file and the txt file.

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

This ability has been tested by running a successful operation.
Screenshot 2025-07-25 162414
Screenshot 2025-07-28 174724

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

@uruwhy
Copy link
Copy Markdown
Contributor

uruwhy commented Aug 19, 2025

can you also include our DLL source code with compilation instructions in comments at the top? You can put the file in the same payloads directory

@Ke3n007
Copy link
Copy Markdown
Contributor Author

Ke3n007 commented Aug 19, 2025

can you also include our DLL source code with compilation instructions in comments at the top? You can put the file in the same payloads directory

I don't have access to the source code, but I placed it in the Box file share.

@deacon-mp deacon-mp requested a review from Copilot October 6, 2025 22:48
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a new Stockpile ability that implements DLL sideloading for persistence using Notepad++ v8.5.4. The ability exploits Windows' DLL search order by placing a malicious UxTheme.dll in the Notepad++ directory to execute arbitrary code and deploy an agent.

Key changes:

  • Downloads and extracts portable Notepad++ v8.5.4 to establish the target application
  • Creates a malicious DLL hijacking scenario using UxTheme.dll
  • Implements payload execution through a text file containing PowerShell commands

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +12 to +18


Cleanup Commands:


The txt file and notepad++ zip file are then deleted

Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description contains excessive blank lines and formatting inconsistencies. The cleanup section should be properly formatted without unnecessary whitespace.

Copilot uses AI. Check for mistakes.
Ke3n007 and others added 4 commits October 19, 2025 16:37
…b.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…b.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…b.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…b.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown

This pull request is stale because it has had no activity for 60 days. Remove the stale label or comment or this will be closed in 60 days

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants