Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works

Random project

ThreadHijacking-Delphi

Thread hijacking

View on GitHub

Anyone may press Interesting, signed in or not. It helps others find this project.

Member rating

No ratings yet.

Sign in to rate this project.

README

Thread Hijacking

This repository contains educational code demonstrating thread hijacking techniques in Windows systems for security research and defensive purposes.

⚠️ Educational Purpose Only: This code is for security research and educational purposes. Use responsibly and only in controlled test environments.

Overview

This project demonstrates three different methods of thread hijacking in Windows systems:

  1. Creating and hijacking a new process
  2. Hijacking an existing process by PID
  3. Finding and hijacking a process by executable name

Technical Details

Implementation Methods

Method 1: Create and Hijack New Process

This method:

  1. Creates a new process in suspended state
  2. Allocates memory for shellcode
  3. Modifies thread context to execute shellcode
  4. Resumes thread execution

Method 2: Hijack by Process ID

Targets an existing process:

  1. Opens target process and its main thread
  2. Suspends thread execution
  3. Injects shellcode
  4. Modifies thread context
  5. Resumes execution

Method 3: Hijack by Process Name

High-level interface that:

  1. Finds process ID by executable name
  2. Calls PID-based hijacking method
  3. Handles process discovery and validation

Contributing

Contributions are welcome! If you have suggestions or bug fixes, please fork the repository and submit a pull request.

Made with ❤️ using Delphi RAD Studio