ts3server ping utility [Linux only]

ehthe

Retired Staff
Joined
Apr 26, 2015
Messages
1,010
Points
176
NO LONGER SUPPORTED. But should still work.

Releasing the first version of my tool :D

You will need the following packages for it to work : libqt5network5 (and libqt5core5)

This tool sends a special crafted UDP packet that appears to be a ping packet in the ts3 protocol. It then monitors the connection and wait for a reply until timeout is reached.

THIS DOES NOT SEND AN ICMP PING. IT SENDS A SPECIAL CRAFTED UDP PACKET. IT CAN DETECT IF YOUR TS SERVER CRASHED WHEREAS A SIMPLE PING CAN'T !


Options :
  1. ip : ip of th server to check (no dns support).
  2. port : port of the server to check (default to 9987).
  3. timeout : time to wait before failing.
  4. response validation : Whether to fail or not if reply is weird.
  5. server type : Normal or SDK
  6. ping type : short is a short ping with no special infos. Realistic sends versions info, and the server replies with more infos (unknown).
  7. new! repeat : Number of pings to send, -1 for infinite
  8. new! pause : Pause between pings, default to 1500ms

Example with voice.teamspeak.com (server is custom as you can see) :


ver 0.4 :
You do not have permission to view link Log in or register now.

You do not have permission to view link Log in or register now.

VirusTotal 0.4 :
You do not have permission to view link Log in or register now.
0/57

You do not have permission to view link Log in or register now.
 
Last edited:

Asphyxia

Server Monkey
Administrator
Joined
Apr 25, 2015
Messages
965
Points
217
Age
25
Location
North America
That's awesome, may I know what this does? ;)
Does it literally just ping a TeamSpeak 3 server or does it open a connection to a server (fake user joining)?
 

ehthe

Retired Staff
Joined
Apr 26, 2015
Messages
1,010
Points
176
It doesn't connect to it. It just sends what I would call a ping packet : "TS3INIT1" or "TS3INSDK".
 

Asphyxia

Server Monkey
Administrator
Joined
Apr 25, 2015
Messages
965
Points
217
Age
25
Location
North America
It doesn't connect to it. It just sends what I would call a ping packet : "TS3INIT1" or "TS3INSDK".
Do you think it would be simple to initiate a successful "fake" connection to a server? That would be a big deal for us to have a fake player flooder.
 

ehthe

Retired Staff
Joined
Apr 26, 2015
Messages
1,010
Points
176
Do you think it would be simple to initiate a successful "fake" connection to a server? That would be a big deal for us to have a fake player flooder.
That would require a shitload of work x) (reversing the way the protocol is encrypted is way too difficult for me right now :p )
 

Asphyxia

Server Monkey
Administrator
Joined
Apr 25, 2015
Messages
965
Points
217
Age
25
Location
North America
It's okay enthe, I thought so.. I was looking into it a little while ago and I remember reading a tutorial on where to begin. It does seem like it would take quite a bit of work. Here are some starting points for anyone interested (Windows).

  • Notepad ++
  • The official Win32 client binary for TS3
  • A recent version of mmBBQ
You will start off by hooking the used Windows network API: WSASendTo(…) and WSAReadFrom(…) --- you are trying to dump the stack arguments from the functions which are wsa_send and wsa_recv.

Throw the below source into your config.lua file.
Code:
-- MSDN: int WSARecvFrom( __in     SOCKET s, __inout  LPWSABUF lpBuffers, __in     DWORD dwBufferCount, __out    LPDWORD lpNumberOfBytesRecvd, ... );
local function wsa_recv(context)
    local buflen = context.arg32(2, "uint32_t**")[0];
    local buf = context.arg32(2, "char**")[1];
    local recv = context.arg32(4, "uint32_t*")[0];
    if recv > 0 then
        printf("[RECV] 0x%X", recv);
        hexdump(buf, recv);
    end
end
codecave.inject(nil, getProcAddress("ws2_32", "WSARecvFrom"), wsa_recv, codecave.INTERCEPT_RETURN)
The call to hook is sent from codecave.inject(…), you may want to read into
You do not have permission to view link Log in or register now.



The above is your hex dump within a console.
Continue on to Step 2 here:
You do not have permission to view link Log in or register now.


[LINUX METHOD COMING SOON?]
enthe
, perhaps you know of a similar way to do this within Linux? :p
If not, that is okay.
This may be of use:
You do not have permission to view link Log in or register now.


Additionally, here is a list of software which helps with disassembling software:
You do not have permission to view link Log in or register now.
 

Bluscream

Retired Staff
Member of the Month
Contributor
Joined
May 8, 2015
Messages
938
Points
171
Location
Germany
Cant install the dependencies :
Code:
[2015-06-10 01:49.28]  /home/root/Downloads
[root.roots-PC_Win8-1] ➤ apt-get install libqt5core5:i386
Trying to download file setup.bz2
Updated setup.ini
Package libqt5core5:i386 not found in cygwin mirror, trying cygwinports mirror
Trying to download file setup.bz2
Updated setup.ini

Package libqt5core5:i386 not found, exiting...

                                                                                                                         ✔
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
[2015-06-10 01:50.04]  /home/root/Downloads
[root.roots-PC_Win8-1] ➤ apt-get install libqt5core5
Package libqt5core5 not found in cygwin mirror, trying cygwinports mirror

Package libqt5core5 not found, exiting...

                                                                                                                         ✔
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
[2015-06-10 01:50.12]  /home/root/Downloads
[root.roots-PC_Win8-1] ➤ apt-get install libqt5network5:i386
Package libqt5network5:i386 not found in cygwin mirror, trying cygwinports mirror

Package libqt5network5:i386 not found, exiting...

                                                                                                                         ✔
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
[2015-06-10 01:50.28]  /home/root/Downloads
[root.roots-PC_Win8-1] ➤ apt-get install libqt5network5
Package libqt5network5 not found in cygwin mirror, trying cygwinports mirror

Package libqt5network5 not found, exiting...
Also cant open the file:
Code:
[2015-06-10 01:49.10]  /home/root/Downloads
[root.roots-PC_Win8-1] ➤ ./sender_32_final
bash: ./sender_32_final: cannot execute binary file
 

ehthe

Retired Staff
Joined
Apr 26, 2015
Messages
1,010
Points
176
New version 0.2 uploaded !
CHANGELOG : Fixed a mixup between ping types.
 

Bluscream

Retired Staff
Member of the Month
Contributor
Joined
May 8, 2015
Messages
938
Points
171
Location
Germany
You seem to have quite a special environment. Try to install a fresh ubuntu/debian in a vm.

EDIT : "cygwin" Here's your problem :p
I never had problems using this environment :eek:
I run a TS3 server and several other scripts and stuff for testing there all over the day :/
 

ehthe

Retired Staff
Joined
Apr 26, 2015
Messages
1,010
Points
176
I never had problems using this environment :eek:
I run a TS3 server and several other scripts and stuff for testing there all over the day :/
I believe the executable won't run because I implemented some security features to prevent people from stealing my work.
But nonetheless you should be able to install qt5 on your system !
 

Supervisor

Administrator
Joined
Apr 27, 2015
Messages
1,739
Points
280
Location
Germany
Sorry for a asking this, it may be a stupid question.. but.. where is the point of creating a ping tool? This is already built in in Linux and windows..
 

ehthe

Retired Staff
Joined
Apr 26, 2015
Messages
1,010
Points
176
Sorry for a asking this, it may be a stupid question.. but.. where is the point of creating a ping tool? This is already built in in Linux and windows..
This tool is nothing like a ping tool on linux or windows. It sends a crafted UDP packet, not a standard ICMP ping !

EDIT : added precisions and example in first post.
 
Last edited:

ehthe

Retired Staff
Joined
Apr 26, 2015
Messages
1,010
Points
176
New version 0.3 uploaded !
CHANGELOG : Fails when the user enters an invalid ip (Instead of trying to send a ping anyway).
 
Last edited:

Bluscream

Retired Staff
Member of the Month
Contributor
Joined
May 8, 2015
Messages
938
Points
171
Location
Germany
I still dont get what it does :eek:

P.S. Is that only for ubuntu? I dont find the dependencies for Debian :c
 
Last edited:

ehthe

Retired Staff
Joined
Apr 26, 2015
Messages
1,010
Points
176
I still dont get what it does :eek:

P.S. Is that only for ubuntu? I dont find the dependencies for Debian :c
I added some precisions in the first post.
It is for linux in general, I think I could even compile it for mac or freebsd without too much hassle (you just need qt5)
 

Zajao

Member
Joined
Jun 9, 2015
Messages
14
Points
35
Is it compatible with linux-x64 versions?
Debian7x64 for example
libqt5network5:i386 - this make me think that noo_O

I also can't find these dependencies for Debian
 

ehthe

Retired Staff
Joined
Apr 26, 2015
Messages
1,010
Points
176
Is it compatible with linux-x64 versions?
Debian7x64 for example
libqt5network5:i386 - this make me think that noo_O

I also can't find these dependencies for Debian
It is compiled in 32bits. If you're on 32bits just install libqt5network5 without the :i386 bit. If you're on x64 keep the :i386 bit.

(
You do not have permission to view link Log in or register now.
)
You do not have permission to view link Log in or register now.
 
Last edited:

ehthe

Retired Staff
Joined
Apr 26, 2015
Messages
1,010
Points
176
New version 0.4 uploaded !
CHANGELOG : Added loop and pause args.
 
Last edited:

Top