How to use PersistBOF to achieve persistence in red team activities

0 24
About PersistBOFPersistBOF is a persistence tool for Windows system security tha...

About PersistBOF

PersistBOF is a persistence tool for Windows system security that can automate common persistence techniques. The current version of PersistBOF supports Print Monitor (system service), Time Provider (network service), and startup directory shortcut hijacking (user service) and other features.

All the technologies implemented by PersistBOF depend on a DLL file, which is stored in a distributed manner on the target system disk.

Tool Download

How to use PersistBOF to achieve persistence in red team activities

Researchers can use the following command to clone the source code of this project locally:

git clone https://github.com/IcebreakerSecurity/PersistBOF.git

Next, we need to switch to the project directory and run the make command to build the source code:

make

Finally, add the generated .cna file to the Cobalt Strike client.

Reference Sentences:

persist-ice [PrintMon, TimeProv, Shortcut] [persist or clean] [key/folder name] [dll / lnk exe name];

Tool Usage

Print Monitor

The DLL files used by the tool must be stored on the target device's disk, and the path of the DLL must be set in the PATH environment variable before the BOF runs, otherwise persistence cannot be achieved normally.

This method can elevate administrator privileges to SYSTEM privileges and achieve persistence.

Example of PrintMonitorDll usage:

1. Upload NotMalware.dll to C:\Windows\NotMalware.dll;

2. NotMalware.dll will achieve persistence through PrintMon using TotesLegitMonitor;

3. The program will execute immediately with SYSTEM privileges;

4. The program will automatically execute at system startup;

Time Provider

After running PersistBOF, the program will execute in the form of svchost.exe as NETWORK SERVICE at system startup.

Example of TimeProvider usage:

The tool uses TimeProv and implements persistence through TotesLegitTimeProvider (C:\anywhere\NotMalware.dll);

Startup directory hijacking

Create a new, user-writable directory, copy the hijackable Windows code to this directory, and create a shortcut to this file in the startup directory. Finally, the program will execute when the user logs in.

License Agreement

The development and release of this project followMITOpen Source License Agreement.

Project address

PersistBOF:GitHub link

Reference materials

https://stmxcsr.com/persistence/print-monitor.html

https://stmxcsr.com/persistence/time-provider.html

https://pentestlab.blog/2019/10/28/persistence-port-monitors/

https://blog.f-secure.com/hunting-for-junction-folder-persistence/

https://attack.mitre.org/techniques/T1547/010/

https://attack.mitre.org/techniques/T1547/003/

https://attack.mitre.org/techniques/T1547/009/

你可能想看:

Ensure that the ID can be accessed even if it is guessed or cannot be tampered with; the scenario is common in resource convenience and unauthorized vulnerability scenarios. I have found many vulnerab

It is possible to perform credible verification on the system boot program, system program, important configuration parameters, and application programs of computing devices based on a credible root,

Git leak && AWS AKSK && AWS Lambda cli && Function Information Leakage && JWT secret leak

Data security from the perspective of the red team in offensive and defensive exercises

How to conduct offensive and defensive exercise risk assessment for AI systems: Red Teaming Handbook

How to use truffleHog to search for high-entropy strings and sensitive data in Git repositories to protect the security of code repositories

Data security can be said to be a hot topic in recent years, especially with the rapid development of information security technologies such as big data and artificial intelligence, the situation of d

As announced today, Glupteba is a multi-component botnet targeting Windows computers. Google has taken action to disrupt the operation of Glupteba, and we believe this action will have a significant i

4.5 Main person in charge reviews the simulation results, sorts out the separated simulation issues, and allows the red and blue teams to improve as soon as possible. The main issues are as follows

In today's rapidly developing digital economy, data has become an important engine driving social progress and enterprise development. From being initially regarded as part of intangible assets to now

最后修改时间:
admin
上一篇 2025年03月29日 22:14
下一篇 2025年03月29日 22:36

评论已关闭