Jump to content

Recommended Posts

  • Premium

This is a fix for a DoS Vulnerability where invalid player ids are spammed (i.e. HEADER_CG_CHARACTER_SELECT),

you can confirm this by looking in the syslog for a bunch of [PLAYER_LOAD] Load from PlayerDB pid[0].

 

to fix this:

This is the hidden content, please

 

 

this fix will make sure the player gets disconnected upon choosing an invalid character, making it harder to spam and making rate limits effective again

Thanks to everyone from sura-head.

Edited by LTGT
added support for different packets
  • Metin2 Dev 169
  • kekw 2
  • Think 3
  • Good 39
  • Love 8
  • Love 61

? Sura-Head ?

Link to comment
https://metin2.dev/topic/29892-dos-vulnerability-invalid-player-id-spam/
Share on other sites

  • Contributor

What's dumb is that they checked for the PID when deleting a player

	if (!c_rAccountTable.players[pinfo->index].dwID)
	{
		sys_err("PlayerDelete: Wrong Social ID index %d, login: %s", pinfo->index, c_rAccountTable.login);
		d->Packet(encode_byte(HEADER_GC_CHARACTER_DELETE_WRONG_SOCIAL_ID), 1);
		return;
	}

but they didn't check when selecting it(they've done the same shit in ::ChangeName, the method above ::CharacterSelect).

I advise you to check all packets using indexes sent by the client, because it's not just the one @ LTGT posted.

  • Love 1
  • Premium
5 hours ago, Amun said:

What's dumb is that they checked for the PID when deleting a player

	if (!c_rAccountTable.players[pinfo->index].dwID)
	{
		sys_err("PlayerDelete: Wrong Social ID index %d, login: %s", pinfo->index, c_rAccountTable.login);
		d->Packet(encode_byte(HEADER_GC_CHARACTER_DELETE_WRONG_SOCIAL_ID), 1);
		return;
	}

but they didn't check when selecting it(they've done the same shit in ::ChangeName, the method above ::CharacterSelect).

I advise you to check all packets using indexes sent by the client, because it's not just the one @ LTGT posted.

Main post has been adjusted to support them as well.

? Sura-Head ?

  • Active+ Member

@ LTGTJust a little detail... there isn't any player_index variable.

One step in your tutorial must look like this:

This is the hidden content, please

  • Metin2 Dev 82
  • Think 1
  • Good 17
  • Love 1
  • Love 31

I'll be always helpful!  😉

  • 2 weeks later...

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.