How to patch plugin API version

:warning: Disclaimer

This method does not work for all plugins and patched plugins might result in unexpected behavior and client crashes.

0. Prerequisites

I will use Ghidra in this tutorial.

1. Acquire the plugin

Download the correct version of the plugin you want to patch. If the plugin is distributed as .ts3_plugin, rename that to .zip and extract it. You will need one of the following files:

  • .dll (Windows)
  • .dylib (MacOS)
  • .so (Linux)

2. Load the Plugin in Ghidra

Open Ghidra and if you don’t have one create a new project.
image
Drag and drop the plugin file onto the project to import it using the default values.
When you see the import results click OK.
Open the plugin with a double click.
image
When asked whether to analyze the file accept Yes, keep the Standard Defaults, and click Analyse.


Wait for the analysis to finish. There is a progress bar in the bottom right. Depending on binary size it might take a couple of minutes.

3. Patch the correct function.

Using the default layout of Ghidra there should be the Symbol Tree on the left side.


Expand Exports and locate the function ts3plugin_apiVersion.
By clicking on it you can jump to it in the Listing.

Then in the Decompile view click on the return value to follow any internal function calls.

Now right-click the value in the Listing and select Patch Instruction. You might see a popup telling you the x86 processors are gold-rated, just close that.

Enter the new value you need in hexadecimal (API version 26 = 0x1a) and press Enter to accept.

Then you can export the changes. Simply keep the format as Original File and select a suitable output location.

:partying_face: Congratulations! You just patched your first plugin!

4. Repackage the plugin.

If you want to use the automatic TeamSpeak plugin installation process you can simply repackage the plugin the same way you extracted it.

In the end, you need a file that looks like this:

<plugin_name>.ts3_plugin (renamed zip file)
├─ plugins/
│  └─ <plugin_name>_win64.dll (or .so or .dylib)
└─ package.ini
8 Likes

@MarcusLittle :slight_smile:
This is the patched notifier plugin as a result of this quick tutorial:

You sir, are a hero in disguise. I appreciate it! And thanks for the tutorial as well

2 Likes

Hey nice job, do u can patch this plugin?
:point_down:t2::point_down:t2:
Mass Message Tool - TeamSpeak Server / Tools - TeamSpeak

Thanks!

Man if you patch this you are me personal Hero … ts3g15.dll - Google Drive

This will not work, as it is compiled against Qt. image
Newer versions of TeamSpeak require a later Qt version otherwise, basically anything could happen.

Only because I had a minute.

1 Like

I have to excuse the error I made in the tutorial. It is fixed now and all the patched plugins I uploaded are validated as loadable.

1 Like

image

image

Man you are the god for me… manny thanks G15 plugin finnaly working !!!

2 Likes

I’ve needed this plugin since I started this thread, but I still haven’t gotten access to it.

Can anyone help me with this?